PageSourceSearch

https://www.vpb.de/typo3conf/ext/vpb_navigator/Resources/Public/JavaScript/Navigator/main.js?1765872253

js vpb.de collected 2026-10-02 17:05:30 UTC 1,359,936 bytes, 35,236 lines download raw bytes

vendor: 1,726 bytes, lines 1-47
1var __defProp = Object.defineProperty;
2var __defProps = Object.defineProperties;
3var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4var __getOwnPropNames = Object.getOwnPropertyNames;
5var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6var __hasOwnProp = Object.prototype.hasOwnProperty;
7var __propIsEnum = Object.prototype.propertyIsEnumerable;
8var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9var __spreadValues = (a, b) => {
10  for (var prop in b ||= {})
11    if (__hasOwnProp.call(b, prop))
12      __defNormalProp(a, prop, b[prop]);
13  if (__getOwnPropSymbols)
14    for (var prop of __getOwnPropSymbols(b)) {
15      if (__propIsEnum.call(b, prop))
16        __defNormalProp(a, prop, b[prop]);
17    }
18  return a;
19};
20var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21var __esm = (fn, res) => function __init() {
22  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
23};
24var __commonJS = (cb, mod) => function __require() {
25  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
26};
27var __async = (__this, __arguments, generator) => {
28  return new Promise((resolve, reject) => {
29    var fulfilled = (value) => {
30      try {
31        step(generator.next(value));
32      } catch (e) {
33        reject(e);
34      }
35    };
36    var rejected = (value) => {
37      try {
38        step(generator.throw(value));
39      } catch (e) {
40        reject(e);
41      }
42    };
43    var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
44    step((generator = generator.apply(__this, __arguments)).next());
45  });
46};
47
vendor: 538 bytes, lines 48-68
48// node_modules/@angular/core/fesm2022/not_found.mjs
49function getCurrentInjector() {
50  return _currentInjector;
51}
52function setCurrentInjector(injector) {
53  const former = _currentInjector;
54  _currentInjector = injector;
55  return former;
56}
57function isNotFound(e) {
58  return e === NOT_FOUND || e?.name === "\u0275NotFound";
59}
60var _currentInjector, NOT_FOUND;
61var init_not_found = __esm({
62  "node_modules/@angular/core/fesm2022/not_found.mjs"() {
63    "use strict";
64    _currentInjector = void 0;
65    NOT_FOUND = Symbol("NotFound");
66  }
67});
68
vendor: 11,779 bytes, lines 69-454
69// node_modules/@angular/core/fesm2022/signal.mjs
70function setActiveConsumer(consumer) {
71  const prev = activeConsumer;
72  activeConsumer = consumer;
73  return prev;
74}
75function getActiveConsumer() {
76  return activeConsumer;
77}
78function isInNotificationPhase() {
79  return inNotificationPhase;
80}
81function producerAccessed(node) {
82  if (inNotificationPhase) {
83    throw new Error(typeof ngDevMode !== "undefined" && ngDevMode ? `Assertion error: signal read during notification phase` : "");
84  }
85  if (activeConsumer === null) {
86    return;
87  }
88  activeConsumer.consumerOnSignalRead(node);
89  const prevProducerLink = activeConsumer.producersTail;
90  if (prevProducerLink !== void 0 && prevProducerLink.producer === node) {
91    return;
92  }
93  let nextProducerLink = void 0;
94  const isRecomputing = activeConsumer.recomputing;
95  if (isRecomputing) {
96    nextProducerLink = prevProducerLink !== void 0 ? prevProducerLink.nextProducer : activeConsumer.producers;
97    if (nextProducerLink !== void 0 && nextProducerLink.producer === node) {
98      activeConsumer.producersTail = nextProducerLink;
99      nextProducerLink.lastReadVersion = node.version;
100      return;
101    }
102  }
103  const prevConsumerLink = node.consumersTail;
104  if (prevConsumerLink !== void 0 && prevConsumerLink.consumer === activeConsumer && // However, we have to make sure that the link we've discovered isn't from a node that is incrementally rebuilding its producer list
105  (!isRecomputing || isValidLink(prevConsumerLink, activeConsumer))) {
106    return;
107  }
108  const isLive = consumerIsLive(activeConsumer);
109  const newLink = {
110    producer: node,
111    consumer: activeConsumer,
112    // instead of eagerly destroying the previous link, we delay until we've finished recomputing
113    // the producers list, so that we can destroy all of the old links at once.
114    nextProducer: nextProducerLink,
115    prevConsumer: prevConsumerLink,
116    lastReadVersion: node.version,
117    nextConsumer: void 0
118  };
119  activeConsumer.producersTail = newLink;
120  if (prevProducerLink !== void 0) {
121    prevProducerLink.nextProducer = newLink;
122  } else {
123    activeConsumer.producers = newLink;
124  }
125  if (isLive) {
126    producerAddLiveConsumer(node, newLink);
127  }
128}
129function producerIncrementEpoch() {
130  epoch++;
131}
132function producerUpdateValueVersion(node) {
133  if (consumerIsLive(node) && !node.dirty) {
134    return;
135  }
136  if (!node.dirty && node.lastCleanEpoch === epoch) {
137    return;
138  }
139  if (!node.producerMustRecompute(node) && !consumerPollProducersForChange(node)) {
140    producerMarkClean(node);
141    return;
142  }
143  node.producerRecomputeValue(node);
144  producerMarkClean(node);
145}
146function producerNotifyConsumers(node) {
147  if (node.consumers === void 0) {
148    return;
149  }
150  const prev = inNotificationPhase;
151  inNotificationPhase = true;
152  try {
153    for (let link = node.consumers; link !== void 0; link = link.nextConsumer) {
154      const consumer = link.consumer;
155      if (!consumer.dirty) {
156        consumerMarkDirty(consumer);
157      }
158    }
159  } finally {
160    inNotificationPhase = prev;
161  }
162}
163function producerUpdatesAllowed() {
164  return activeConsumer?.consumerAllowSignalWrites !== false;
165}
166function consumerMarkDirty(node) {
167  node.dirty = true;
168  producerNotifyConsumers(node);
169  node.consumerMarkedDirty?.(node);
170}
171function producerMarkClean(node) {
172  node.dirty = false;
173  node.lastCleanEpoch = epoch;
174}
175function consumerBeforeComputation(node) {
176  if (node)
177    resetConsumerBeforeComputation(node);
178  return setActiveConsumer(node);
179}
180function resetConsumerBeforeComputation(node) {
181  node.producersTail = void 0;
182  node.recomputing = true;
183}
184function consumerAfterComputation(node, prevConsumer) {
185  setActiveConsumer(prevConsumer);
186  if (node)
187    finalizeConsumerAfterComputation(node);
188}
189function finalizeConsumerAfterComputation(node) {
190  node.recomputing = false;
191  const producersTail = node.producersTail;
192  let toRemove = producersTail !== void 0 ? producersTail.nextProducer : node.producers;
193  if (toRemove !== void 0) {
194    if (consumerIsLive(node)) {
195      do {
196        toRemove = producerRemoveLiveConsumerLink(toRemove);
197      } while (toRemove !== void 0);
198    }
199    if (producersTail !== void 0) {
200      producersTail.nextProducer = void 0;
201    } else {
202      node.producers = void 0;
203    }
204  }
205}
206function consumerPollProducersForChange(node) {
207  for (let link = node.producers; link !== void 0; link = link.nextProducer) {
208    const producer = link.producer;
209    const seenVersion = link.lastReadVersion;
210    if (seenVersion !== producer.version) {
211      return true;
212    }
213    producerUpdateValueVersion(producer);
214    if (seenVersion !== producer.version) {
215      return true;
216    }
217  }
218  return false;
219}
220function consumerDestroy(node) {
221  if (consumerIsLive(node)) {
222    let link = node.producers;
223    while (link !== void 0) {
224      link = producerRemoveLiveConsumerLink(link);
225    }
226  }
227  node.producers = void 0;
228  node.producersTail = void 0;
229  node.consumers = void 0;
230  node.consumersTail = void 0;
231}
232function producerAddLiveConsumer(node, link) {
233  const consumersTail = node.consumersTail;
234  const wasLive = consumerIsLive(node);
235  if (consumersTail !== void 0) {
236    link.nextConsumer = consumersTail.nextConsumer;
237    consumersTail.nextConsumer = link;
238  } else {
239    link.nextConsumer = void 0;
240    node.consumers = link;
241  }
242  link.prevConsumer = consumersTail;
243  node.consumersTail = link;
244  if (!wasLive) {
245    for (let link2 = node.producers; link2 !== void 0; link2 = link2.nextProducer) {
246      producerAddLiveConsumer(link2.producer, link2);
247    }
248  }
249}
250function producerRemoveLiveConsumerLink(link) {
251  const producer = link.producer;
252  const nextProducer = link.nextProducer;
253  const nextConsumer = link.nextConsumer;
254  const prevConsumer = link.prevConsumer;
255  link.nextConsumer = void 0;
256  link.prevConsumer = void 0;
257  if (nextConsumer !== void 0) {
258    nextConsumer.prevConsumer = prevConsumer;
259  } else {
260    producer.consumersTail = prevConsumer;
261  }
262  if (prevConsumer !== void 0) {
263    prevConsumer.nextConsumer = nextConsumer;
264  } else {
265    producer.consumers = nextConsumer;
266    if (!consumerIsLive(producer)) {
267      let producerLink = producer.producers;
268      while (producerLink !== void 0) {
269        producerLink = producerRemoveLiveConsumerLink(producerLink);
270      }
271    }
272  }
273  return nextProducer;
274}
275function consumerIsLive(node) {
276  return node.consumerIsAlwaysLive || node.consumers !== void 0;
277}
278function runPostProducerCreatedFn(node) {
279  postProducerCreatedFn?.(node);
280}
281function isValidLink(checkLink, consumer) {
282  const producersTail = consumer.producersTail;
283  if (producersTail !== void 0) {
284    let link = consumer.producers;
285    do {
286      if (link === checkLink) {
287        return true;
288      }
289      if (link === producersTail) {
290        break;
291      }
292      link = link.nextProducer;
293    } while (link !== void 0);
294  }
295  return false;
296}
297function defaultEquals(a, b) {
298  return Object.is(a, b);
299}
300function createComputed(computation, equal) {
301  const node = Object.create(COMPUTED_NODE);
302  node.computation = computation;
303  if (equal !== void 0) {
304    node.equal = equal;
305  }
306  const computed2 = () => {
307    producerUpdateValueVersion(node);
308    producerAccessed(node);
309    if (node.value === ERRORED) {
310      throw node.error;
311    }
312    return node.value;
313  };
314  computed2[SIGNAL] = node;
315  if (typeof ngDevMode !== "undefined" && ngDevMode) {
316    const debugName = node.debugName ? " (" + node.debugName + ")" : "";
317    computed2.toString = () => `[Computed${debugName}: ${node.value}]`;
318  }
319  runPostProducerCreatedFn(node);
320  return computed2;
321}
322function defaultThrowError() {
323  throw new Error();
324}
325function throwInvalidWriteToSignalError(node) {
326  throwInvalidWriteToSignalErrorFn(node);
327}
328function setThrowInvalidWriteToSignalError(fn) {
329  throwInvalidWriteToSignalErrorFn = fn;
330}
331function createSignal(initialValue, equal) {
332  const node = Object.create(SIGNAL_NODE);
333  node.value = initialValue;
334  if (equal !== void 0) {
335    node.equal = equal;
336  }
337  const getter = (() => signalGetFn(node));
338  getter[SIGNAL] = node;
339  if (typeof ngDevMode !== "undefined" && ngDevMode) {
340    const debugName = node.debugName ? " (" + node.debugName + ")" : "";
341    getter.toString = () => `[Signal${debugName}: ${node.value}]`;
342  }
343  runPostProducerCreatedFn(node);
344  const set = (newValue) => signalSetFn(node, newValue);
345  const update = (updateFn) => signalUpdateFn(node, updateFn);
346  return [getter, set, update];
347}
348function signalGetFn(node) {
349  producerAccessed(node);
350  return node.value;
351}
352function signalSetFn(node, newValue) {
353  if (!producerUpdatesAllowed()) {
354    throwInvalidWriteToSignalError(node);
355  }
356  if (!node.equal(node.value, newValue)) {
357    node.value = newValue;
358    signalValueChanged(node);
359  }
360}
361function signalUpdateFn(node, updater) {
362  if (!producerUpdatesAllowed()) {
363    throwInvalidWriteToSignalError(node);
364  }
365  signalSetFn(node, updater(node.value));
366}
367function signalValueChanged(node) {
368  node.version++;
369  producerIncrementEpoch();
370  producerNotifyConsumers(node);
371  postSignalSetFn?.(node);
372}
373var activeConsumer, inNotificationPhase, epoch, postProducerCreatedFn, SIGNAL, REACTIVE_NODE, UNSET, COMPUTING, ERRORED, COMPUTED_NODE, throwInvalidWriteToSignalErrorFn, postSignalSetFn, SIGNAL_NODE;
374var init_signal = __esm({
375  "node_modules/@angular/core/fesm2022/signal.mjs"() {
376    "use strict";
377    activeConsumer = null;
378    inNotificationPhase = false;
379    epoch = 1;
380    postProducerCreatedFn = null;
381    SIGNAL = /* @__PURE__ */ Symbol("SIGNAL");
382    REACTIVE_NODE = {
383      version: 0,
384      lastCleanEpoch: 0,
385      dirty: false,
386      producers: void 0,
387      producersTail: void 0,
388      consumers: void 0,
389      consumersTail: void 0,
390      recomputing: false,
391      consumerAllowSignalWrites: false,
392      consumerIsAlwaysLive: false,
393      kind: "unknown",
394      producerMustRecompute: () => false,
395      producerRecomputeValue: () => {
396      },
397      consumerMarkedDirty: () => {
398      },
399      consumerOnSignalRead: () => {
400      }
401    };
402    UNSET = /* @__PURE__ */ Symbol("UNSET");
403    COMPUTING = /* @__PURE__ */ Symbol("COMPUTING");
404    ERRORED = /* @__PURE__ */ Symbol("ERRORED");
405    COMPUTED_NODE = /* @__PURE__ */ (() => {
406      return __spreadProps(__spreadValues({}, REACTIVE_NODE), {
407        value: UNSET,
408        dirty: true,
409        error: null,
410        equal: defaultEquals,
411        kind: "computed",
412        producerMustRecompute(node) {
413          return node.value === UNSET || node.value === COMPUTING;
414        },
415        producerRecomputeValue(node) {
416          if (node.value === COMPUTING) {
417            throw new Error(typeof ngDevMode !== "undefined" && ngDevMode ? "Detected cycle in computations." : "");
418          }
419          const oldValue = node.value;
420          node.value = COMPUTING;
421          const prevConsumer = consumerBeforeComputation(node);
422          let newValue;
423          let wasEqual = false;
424          try {
425            newValue = node.computation();
426            setActiveConsumer(null);
427            wasEqual = oldValue !== UNSET && oldValue !== ERRORED && newValue !== ERRORED && node.equal(oldValue, newValue);
428          } catch (err) {
429            newValue = ERRORED;
430            node.error = err;
431          } finally {
432            consumerAfterComputation(node, prevConsumer);
433          }
434          if (wasEqual) {
435            node.value = oldValue;
436            return;
437          }
438          node.value = newValue;
439          node.version++;
440        }
441      });
442    })();
443    throwInvalidWriteToSignalErrorFn = defaultThrowError;
444    postSignalSetFn = null;
445    SIGNAL_NODE = /* @__PURE__ */ (() => {
446      return __spreadProps(__spreadValues({}, REACTIVE_NODE), {
447        equal: defaultEquals,
448        value: void 0,
449        kind: "signal"
450      });
451    })();
452  }
453});
454
vendor: 247 bytes, lines 455-464
455// node_modules/rxjs/dist/esm/internal/util/isFunction.js
456function isFunction(value) {
457  return typeof value === "function";
458}
459var init_isFunction = __esm({
460  "node_modules/rxjs/dist/esm/internal/util/isFunction.js"() {
461    "use strict";
462  }
463});
464
vendor: 500 bytes, lines 465-481
465// node_modules/rxjs/dist/esm/internal/util/createErrorClass.js
466function createErrorClass(createImpl) {
467  const _super = (instance) => {
468    Error.call(instance);
469    instance.stack = new Error().stack;
470  };
471  const ctorFunc = createImpl(_super);
472  ctorFunc.prototype = Object.create(Error.prototype);
473  ctorFunc.prototype.constructor = ctorFunc;
474  return ctorFunc;
475}
476var init_createErrorClass = __esm({
477  "node_modules/rxjs/dist/esm/internal/util/createErrorClass.js"() {
478    "use strict";
479  }
480});
481
vendor: 618 bytes, lines 482-497
482// node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js
483var UnsubscriptionError;
484var init_UnsubscriptionError = __esm({
485  "node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js"() {
486    "use strict";
487    init_createErrorClass();
488    UnsubscriptionError = createErrorClass((_super) => function UnsubscriptionErrorImpl(errors) {
489      _super(this);
490      this.message = errors ? `${errors.length} errors occurred during unsubscription:
491${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join("\n  ")}` : "";
492      this.name = "UnsubscriptionError";
493      this.errors = errors;
494    });
495  }
496});
497
vendor: 303 bytes, lines 498-510
498// node_modules/rxjs/dist/esm/internal/util/arrRemove.js
499function arrRemove(arr, item) {
500  if (arr) {
501    const index = arr.indexOf(item);
502    0 <= index && arr.splice(index, 1);
503  }
504}
505var init_arrRemove = __esm({
506  "node_modules/rxjs/dist/esm/internal/util/arrRemove.js"() {
507    "use strict";
508  }
509});
510
vendor: 3,781 bytes, lines 511-628
511// node_modules/rxjs/dist/esm/internal/Subscription.js
512function isSubscription(value) {
513  return value instanceof Subscription || value && "closed" in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe);
514}
515function execFinalizer(finalizer) {
516  if (isFunction(finalizer)) {
517    finalizer();
518  } else {
519    finalizer.unsubscribe();
520  }
521}
522var Subscription, EMPTY_SUBSCRIPTION;
523var init_Subscription = __esm({
524  "node_modules/rxjs/dist/esm/internal/Subscription.js"() {
525    "use strict";
526    init_isFunction();
527    init_UnsubscriptionError();
528    init_arrRemove();
529    Subscription = class _Subscription {
530      constructor(initialTeardown) {
531        this.initialTeardown = initialTeardown;
532        this.closed = false;
533        this._parentage = null;
534        this._finalizers = null;
535      }
536      unsubscribe() {
537        let errors;
538        if (!this.closed) {
539          this.closed = true;
540          const { _parentage } = this;
541          if (_parentage) {
542            this._parentage = null;
543            if (Array.isArray(_parentage)) {
544              for (const parent of _parentage) {
545                parent.remove(this);
546              }
547            } else {
548              _parentage.remove(this);
549            }
550          }
551          const { initialTeardown: initialFinalizer } = this;
552          if (isFunction(initialFinalizer)) {
553            try {
554              initialFinalizer();
555            } catch (e) {
556              errors = e instanceof UnsubscriptionError ? e.errors : [e];
557            }
558          }
559          const { _finalizers } = this;
560          if (_finalizers) {
561            this._finalizers = null;
562            for (const finalizer of _finalizers) {
563              try {
564                execFinalizer(finalizer);
565              } catch (err) {
566                errors = errors !== null && errors !== void 0 ? errors : [];
567                if (err instanceof UnsubscriptionError) {
568                  errors = [...errors, ...err.errors];
569                } else {
570                  errors.push(err);
571                }
572              }
573            }
574          }
575          if (errors) {
576            throw new UnsubscriptionError(errors);
577          }
578        }
579      }
580      add(teardown) {
581        var _a;
582        if (teardown && teardown !== this) {
583          if (this.closed) {
584            execFinalizer(teardown);
585          } else {
586            if (teardown instanceof _Subscription) {
587              if (teardown.closed || teardown._hasParent(this)) {
588                return;
589              }
590              teardown._addParent(this);
591            }
592            (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);
593          }
594        }
595      }
596      _hasParent(parent) {
597        const { _parentage } = this;
598        return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent);
599      }
600      _addParent(parent) {
601        const { _parentage } = this;
602        this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
603      }
604      _removeParent(parent) {
605        const { _parentage } = this;
606        if (_parentage === parent) {
607          this._parentage = null;
608        } else if (Array.isArray(_parentage)) {
609          arrRemove(_parentage, parent);
610        }
611      }
612      remove(teardown) {
613        const { _finalizers } = this;
614        _finalizers && arrRemove(_finalizers, teardown);
615        if (teardown instanceof _Subscription) {
616          teardown._removeParent(this);
617        }
618      }
619    };
620    Subscription.EMPTY = (() => {
621      const empty = new Subscription();
622      empty.closed = true;
623      return empty;
624    })();
625    EMPTY_SUBSCRIPTION = Subscription.EMPTY;
626  }
627});
628
vendor: 368 bytes, lines 629-643
629// node_modules/rxjs/dist/esm/internal/config.js
630var config;
631var init_config = __esm({
632  "node_modules/rxjs/dist/esm/internal/config.js"() {
633    "use strict";
634    config = {
635      onUnhandledError: null,
636      onStoppedNotification: null,
637      Promise: void 0,
638      useDeprecatedSynchronousErrorHandling: false,
639      useDeprecatedNextContext: false
640    };
641  }
642});
643
vendor: 797 bytes, lines 644-665
644// node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js
645var timeoutProvider;
646var init_timeoutProvider = __esm({
647  "node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js"() {
648    "use strict";
649    timeoutProvider = {
650      setTimeout(handler, timeout, ...args) {
651        const { delegate } = timeoutProvider;
652        if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {
653          return delegate.setTimeout(handler, timeout, ...args);
654        }
655        return setTimeout(handler, timeout, ...args);
656      },
657      clearTimeout(handle) {
658        const { delegate } = timeoutProvider;
659        return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);
660      },
661      delegate: void 0
662    };
663  }
664});
665
vendor: 471 bytes, lines 666-684
666// node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js
667function reportUnhandledError(err) {
668  timeoutProvider.setTimeout(() => {
669    const { onUnhandledError } = config;
670    if (onUnhandledError) {
671      onUnhandledError(err);
672    } else {
673      throw err;
674    }
675  });
676}
677var init_reportUnhandledError = __esm({
678  "node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js"() {
679    "use strict";
680    init_config();
681    init_timeoutProvider();
682  }
683});
684
vendor: 180 bytes, lines 685-693
685// node_modules/rxjs/dist/esm/internal/util/noop.js
686function noop() {
687}
688var init_noop = __esm({
689  "node_modules/rxjs/dist/esm/internal/util/noop.js"() {
690    "use strict";
691  }
692});
693
vendor: 579 bytes, lines 694-715
694// node_modules/rxjs/dist/esm/internal/NotificationFactories.js
695function errorNotification(error) {
696  return createNotification("E", void 0, error);
697}
698function nextNotification(value) {
699  return createNotification("N", value, void 0);
700}
701function createNotification(kind, value, error) {
702  return {
703    kind,
704    value,
705    error
706  };
707}
708var COMPLETE_NOTIFICATION;
709var init_NotificationFactories = __esm({
710  "node_modules/rxjs/dist/esm/internal/NotificationFactories.js"() {
711    "use strict";
712    COMPLETE_NOTIFICATION = (() => createNotification("C", void 0, void 0))();
713  }
714});
715
vendor: 764 bytes, lines 716-749
716// node_modules/rxjs/dist/esm/internal/util/errorContext.js
717function errorContext(cb) {
718  if (config.useDeprecatedSynchronousErrorHandling) {
719    const isRoot = !context;
720    if (isRoot) {
721      context = { errorThrown: false, error: null };
722    }
723    cb();
724    if (isRoot) {
725      const { errorThrown, error } = context;
726      context = null;
727      if (errorThrown) {
728        throw error;
729      }
730    }
731  } else {
732    cb();
733  }
734}
735function captureError(err) {
736  if (config.useDeprecatedSynchronousErrorHandling && context) {
737    context.errorThrown = true;
738    context.error = err;
739  }
740}
741var context;
742var init_errorContext = __esm({
743  "node_modules/rxjs/dist/esm/internal/util/errorContext.js"() {
744    "use strict";
745    init_config();
746    context = null;
747  }
748});
749
vendor: 4,850 bytes, lines 750-917
750// node_modules/rxjs/dist/esm/internal/Subscriber.js
751function bind(fn, thisArg) {
752  return _bind.call(fn, thisArg);
753}
754function handleUnhandledError(error) {
755  if (config.useDeprecatedSynchronousErrorHandling) {
756    captureError(error);
757  } else {
758    reportUnhandledError(error);
759  }
760}
761function defaultErrorHandler(err) {
762  throw err;
763}
764function handleStoppedNotification(notification, subscriber) {
765  const { onStoppedNotification } = config;
766  onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));
767}
768var Subscriber, _bind, ConsumerObserver, SafeSubscriber, EMPTY_OBSERVER;
769var init_Subscriber = __esm({
770  "node_modules/rxjs/dist/esm/internal/Subscriber.js"() {
771    "use strict";
772    init_isFunction();
773    init_Subscription();
774    init_config();
775    init_reportUnhandledError();
776    init_noop();
777    init_NotificationFactories();
778    init_timeoutProvider();
779    init_errorContext();
780    Subscriber = class extends Subscription {
781      constructor(destination) {
782        super();
783        this.isStopped = false;
784        if (destination) {
785          this.destination = destination;
786          if (isSubscription(destination)) {
787            destination.add(this);
788          }
789        } else {
790          this.destination = EMPTY_OBSERVER;
791        }
792      }
793      static create(next, error, complete) {
794        return new SafeSubscriber(next, error, complete);
795      }
796      next(value) {
797        if (this.isStopped) {
798          handleStoppedNotification(nextNotification(value), this);
799        } else {
800          this._next(value);
801        }
802      }
803      error(err) {
804        if (this.isStopped) {
805          handleStoppedNotification(errorNotification(err), this);
806        } else {
807          this.isStopped = true;
808          this._error(err);
809        }
810      }
811      complete() {
812        if (this.isStopped) {
813          handleStoppedNotification(COMPLETE_NOTIFICATION, this);
814        } else {
815          this.isStopped = true;
816          this._complete();
817        }
818      }
819      unsubscribe() {
820        if (!this.closed) {
821          this.isStopped = true;
822          super.unsubscribe();
823          this.destination = null;
824        }
825      }
826      _next(value) {
827        this.destination.next(value);
828      }
829      _error(err) {
830        try {
831          this.destination.error(err);
832        } finally {
833          this.unsubscribe();
834        }
835      }
836      _complete() {
837        try {
838          this.destination.complete();
839        } finally {
840          this.unsubscribe();
841        }
842      }
843    };
844    _bind = Function.prototype.bind;
845    ConsumerObserver = class {
846      constructor(partialObserver) {
847        this.partialObserver = partialObserver;
848      }
849      next(value) {
850        const { partialObserver } = this;
851        if (partialObserver.next) {
852          try {
853            partialObserver.next(value);
854          } catch (error) {
855            handleUnhandledError(error);
856          }
857        }
858      }
859      error(err) {
860        const { partialObserver } = this;
861        if (partialObserver.error) {
862          try {
863            partialObserver.error(err);
864          } catch (error) {
865            handleUnhandledError(error);
866          }
867        } else {
868          handleUnhandledError(err);
869        }
870      }
871      complete() {
872        const { partialObserver } = this;
873        if (partialObserver.complete) {
874          try {
875            partialObserver.complete();
876          } catch (error) {
877            handleUnhandledError(error);
878          }
879        }
880      }
881    };
882    SafeSubscriber = class extends Subscriber {
883      constructor(observerOrNext, error, complete) {
884        super();
885        let partialObserver;
886        if (isFunction(observerOrNext) || !observerOrNext) {
887          partialObserver = {
888            next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : void 0,
889            error: error !== null && error !== void 0 ? error : void 0,
890            complete: complete !== null && complete !== void 0 ? complete : void 0
891          };
892        } else {
893          let context2;
894          if (this && config.useDeprecatedNextContext) {
895            context2 = Object.create(observerOrNext);
896            context2.unsubscribe = () => this.unsubscribe();
897            partialObserver = {
898              next: observerOrNext.next && bind(observerOrNext.next, context2),
899              error: observerOrNext.error && bind(observerOrNext.error, context2),
900              complete: observerOrNext.complete && bind(observerOrNext.complete, context2)
901            };
902          } else {
903            partialObserver = observerOrNext;
904          }
905        }
906        this.destination = new ConsumerObserver(partialObserver);
907      }
908    };
909    EMPTY_OBSERVER = {
910      closed: true,
911      next: noop,
912      error: defaultErrorHandler,
913      complete: noop
914    };
915  }
916});
917
vendor: 294 bytes, lines 918-926
918// node_modules/rxjs/dist/esm/internal/symbol/observable.js
919var observable;
920var init_observable = __esm({
921  "node_modules/rxjs/dist/esm/internal/symbol/observable.js"() {
922    "use strict";
923    observable = (() => typeof Symbol === "function" && Symbol.observable || "@@observable")();
924  }
925});
926
vendor: 209 bytes, lines 927-936
927// node_modules/rxjs/dist/esm/internal/util/identity.js
928function identity(x) {
929  return x;
930}
931var init_identity = __esm({
932  "node_modules/rxjs/dist/esm/internal/util/identity.js"() {
933    "use strict";
934  }
935});
936
vendor: 407 bytes, lines 937-955
937// node_modules/rxjs/dist/esm/internal/util/pipe.js
938function pipeFromArray(fns) {
939  if (fns.length === 0) {
940    return identity;
941  }
942  if (fns.length === 1) {
943    return fns[0];
944  }
945  return function piped(input2) {
946    return fns.reduce((prev, fn) => fn(prev), input2);
947  };
948}
949var init_pipe = __esm({
950  "node_modules/rxjs/dist/esm/internal/util/pipe.js"() {
951    "use strict";
952    init_identity();
953  }
954});
955
vendor: 2,888 bytes, lines 956-1046
956// node_modules/rxjs/dist/esm/internal/Observable.js
957function getPromiseCtor(promiseCtor) {
958  var _a;
959  return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
960}
961function isObserver(value) {
962  return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);
963}
964function isSubscriber(value) {
965  return value && value instanceof Subscriber || isObserver(value) && isSubscription(value);
966}
967var Observable;
968var init_Observable = __esm({
969  "node_modules/rxjs/dist/esm/internal/Observable.js"() {
970    "use strict";
971    init_Subscriber();
972    init_Subscription();
973    init_observable();
974    init_pipe();
975    init_config();
976    init_isFunction();
977    init_errorContext();
978    Observable = class _Observable {
979      constructor(subscribe) {
980        if (subscribe) {
981          this._subscribe = subscribe;
982        }
983      }
984      lift(operator) {
985        const observable2 = new _Observable();
986        observable2.source = this;
987        observable2.operator = operator;
988        return observable2;
989      }
990      subscribe(observerOrNext, error, complete) {
991        const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);
992        errorContext(() => {
993          const { operator, source } = this;
994          subscriber.add(operator ? operator.call(subscriber, source) : source ? this._subscribe(subscriber) : this._trySubscribe(subscriber));
995        });
996        return subscriber;
997      }
998      _trySubscribe(sink) {
999        try {
1000          return this._subscribe(sink);
1001        } catch (err) {
1002          sink.error(err);
1003        }
1004      }
1005      forEach(next, promiseCtor) {
1006        promiseCtor = getPromiseCtor(promiseCtor);
1007        return new promiseCtor((resolve, reject) => {
1008          const subscriber = new SafeSubscriber({
1009            next: (value) => {
1010              try {
1011                next(value);
1012              } catch (err) {
1013                reject(err);
1014                subscriber.unsubscribe();
1015              }
1016            },
1017            error: reject,
1018            complete: resolve
1019          });
1020          this.subscribe(subscriber);
1021        });
1022      }
1023      _subscribe(subscriber) {
1024        var _a;
1025        return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);
1026      }
1027      [observable]() {
1028        return this;
1029      }
1030      pipe(...operations) {
1031        return pipeFromArray(operations)(this);
1032      }
1033      toPromise(promiseCtor) {
1034        promiseCtor = getPromiseCtor(promiseCtor);
1035        return new promiseCtor((resolve, reject) => {
1036          let value;
1037          this.subscribe((x) => value = x, (err) => reject(err), () => resolve(value));
1038        });
1039      }
1040    };
1041    Observable.create = (subscribe) => {
1042      return new Observable(subscribe);
1043    };
1044  }
1045});
1046
vendor: 627 bytes, lines 1047-1071
1047// node_modules/rxjs/dist/esm/internal/util/lift.js
1048function hasLift(source) {
1049  return isFunction(source === null || source === void 0 ? void 0 : source.lift);
1050}
1051function operate(init) {
1052  return (source) => {
1053    if (hasLift(source)) {
1054      return source.lift(function(liftedSource) {
1055        try {
1056          return init(liftedSource, this);
1057        } catch (err) {
1058          this.error(err);
1059        }
1060      });
1061    }
1062    throw new TypeError("Unable to lift unknown Observable type");
1063  };
1064}
1065var init_lift = __esm({
1066  "node_modules/rxjs/dist/esm/internal/util/lift.js"() {
1067    "use strict";
1068    init_isFunction();
1069  }
1070});
1071
vendor: 1,689 bytes, lines 1072-1123
1072// node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js
1073function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {
1074  return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);
1075}
1076var OperatorSubscriber;
1077var init_OperatorSubscriber = __esm({
1078  "node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js"() {
1079    "use strict";
1080    init_Subscriber();
1081    OperatorSubscriber = class extends Subscriber {
1082      constructor(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {
1083        super(destination);
1084        this.onFinalize = onFinalize;
1085        this.shouldUnsubscribe = shouldUnsubscribe;
1086        this._next = onNext ? function(value) {
1087          try {
1088            onNext(value);
1089          } catch (err) {
1090            destination.error(err);
1091          }
1092        } : super._next;
1093        this._error = onError ? function(err) {
1094          try {
1095            onError(err);
1096          } catch (err2) {
1097            destination.error(err2);
1098          } finally {
1099            this.unsubscribe();
1100          }
1101        } : super._error;
1102        this._complete = onComplete ? function() {
1103          try {
1104            onComplete();
1105          } catch (err) {
1106            destination.error(err);
1107          } finally {
1108            this.unsubscribe();
1109          }
1110        } : super._complete;
1111      }
1112      unsubscribe() {
1113        var _a;
1114        if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
1115          const { closed } = this;
1116          super.unsubscribe();
1117          !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));
1118        }
1119      }
1120    };
1121  }
1122});
1123
vendor: 492 bytes, lines 1124-1137
1124// node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js
1125var ObjectUnsubscribedError;
1126var init_ObjectUnsubscribedError = __esm({
1127  "node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js"() {
1128    "use strict";
1129    init_createErrorClass();
1130    ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {
1131      _super(this);
1132      this.name = "ObjectUnsubscribedError";
1133      this.message = "object unsubscribed";
1134    });
1135  }
1136});
1137
vendor: 4,363 bytes, lines 1138-1277
1138// node_modules/rxjs/dist/esm/internal/Subject.js
1139var Subject, AnonymousSubject;
1140var init_Subject = __esm({
1141  "node_modules/rxjs/dist/esm/internal/Subject.js"() {
1142    "use strict";
1143    init_Observable();
1144    init_Subscription();
1145    init_ObjectUnsubscribedError();
1146    init_arrRemove();
1147    init_errorContext();
1148    Subject = class extends Observable {
1149      constructor() {
1150        super();
1151        this.closed = false;
1152        this.currentObservers = null;
1153        this.observers = [];
1154        this.isStopped = false;
1155        this.hasError = false;
1156        this.thrownError = null;
1157      }
1158      lift(operator) {
1159        const subject = new AnonymousSubject(this, this);
1160        subject.operator = operator;
1161        return subject;
1162      }
1163      _throwIfClosed() {
1164        if (this.closed) {
1165          throw new ObjectUnsubscribedError();
1166        }
1167      }
1168      next(value) {
1169        errorContext(() => {
1170          this._throwIfClosed();
1171          if (!this.isStopped) {
1172            if (!this.currentObservers) {
1173              this.currentObservers = Array.from(this.observers);
1174            }
1175            for (const observer of this.currentObservers) {
1176              observer.next(value);
1177            }
1178          }
1179        });
1180      }
1181      error(err) {
1182        errorContext(() => {
1183          this._throwIfClosed();
1184          if (!this.isStopped) {
1185            this.hasError = this.isStopped = true;
1186            this.thrownError = err;
1187            const { observers } = this;
1188            while (observers.length) {
1189              observers.shift().error(err);
1190            }
1191          }
1192        });
1193      }
1194      complete() {
1195        errorContext(() => {
1196          this._throwIfClosed();
1197          if (!this.isStopped) {
1198            this.isStopped = true;
1199            const { observers } = this;
1200            while (observers.length) {
1201              observers.shift().complete();
1202            }
1203          }
1204        });
1205      }
1206      unsubscribe() {
1207        this.isStopped = this.closed = true;
1208        this.observers = this.currentObservers = null;
1209      }
1210      get observed() {
1211        var _a;
1212        return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;
1213      }
1214      _trySubscribe(subscriber) {
1215        this._throwIfClosed();
1216        return super._trySubscribe(subscriber);
1217      }
1218      _subscribe(subscriber) {
1219        this._throwIfClosed();
1220        this._checkFinalizedStatuses(subscriber);
1221        return this._innerSubscribe(subscriber);
1222      }
1223      _innerSubscribe(subscriber) {
1224        const { hasError, isStopped, observers } = this;
1225        if (hasError || isStopped) {
1226          return EMPTY_SUBSCRIPTION;
1227        }
1228        this.currentObservers = null;
1229        observers.push(subscriber);
1230        return new Subscription(() => {
1231          this.currentObservers = null;
1232          arrRemove(observers, subscriber);
1233        });
1234      }
1235      _checkFinalizedStatuses(subscriber) {
1236        const { hasError, thrownError, isStopped } = this;
1237        if (hasError) {
1238          subscriber.error(thrownError);
1239        } else if (isStopped) {
1240          subscriber.complete();
1241        }
1242      }
1243      asObservable() {
1244        const observable2 = new Observable();
1245        observable2.source = this;
1246        return observable2;
1247      }
1248    };
1249    Subject.create = (destination, source) => {
1250      return new AnonymousSubject(destination, source);
1251    };
1252    AnonymousSubject = class extends Subject {
1253      constructor(destination, source) {
1254        super();
1255        this.destination = destination;
1256        this.source = source;
1257      }
1258      next(value) {
1259        var _a, _b;
1260        (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);
1261      }
1262      error(err) {
1263        var _a, _b;
1264        (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);
1265      }
1266      complete() {
1267        var _a, _b;
1268        (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);
1269      }
1270      _subscribe(subscriber) {
1271        var _a, _b;
1272        return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;
1273      }
1274    };
1275  }
1276});
1277
vendor: 878 bytes, lines 1278-1311
1278// node_modules/rxjs/dist/esm/internal/BehaviorSubject.js
1279var BehaviorSubject;
1280var init_BehaviorSubject = __esm({
1281  "node_modules/rxjs/dist/esm/internal/BehaviorSubject.js"() {
1282    "use strict";
1283    init_Subject();
1284    BehaviorSubject = class extends Subject {
1285      constructor(_value) {
1286        super();
1287        this._value = _value;
1288      }
1289      get value() {
1290        return this.getValue();
1291      }
1292      _subscribe(subscriber) {
1293        const subscription = super._subscribe(subscriber);
1294        !subscription.closed && subscriber.next(this._value);
1295        return subscription;
1296      }
1297      getValue() {
1298        const { hasError, thrownError, _value } = this;
1299        if (hasError) {
1300          throw thrownError;
1301        }
1302        this._throwIfClosed();
1303        return _value;
1304      }
1305      next(value) {
1306        super.next(this._value = value);
1307      }
1308    };
1309  }
1310});
1311
vendor: 394 bytes, lines 1312-1325
1312// node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js
1313var dateTimestampProvider;
1314var init_dateTimestampProvider = __esm({
1315  "node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js"() {
1316    "use strict";
1317    dateTimestampProvider = {
1318      now() {
1319        return (dateTimestampProvider.delegate || Date).now();
1320      },
1321      delegate: void 0
1322    };
1323  }
1324});
1325
vendor: 2,229 bytes, lines 1326-1382
1326// node_modules/rxjs/dist/esm/internal/ReplaySubject.js
1327var ReplaySubject;
1328var init_ReplaySubject = __esm({
1329  "node_modules/rxjs/dist/esm/internal/ReplaySubject.js"() {
1330    "use strict";
1331    init_Subject();
1332    init_dateTimestampProvider();
1333    ReplaySubject = class extends Subject {
1334      constructor(_bufferSize = Infinity, _windowTime = Infinity, _timestampProvider = dateTimestampProvider) {
1335        super();
1336        this._bufferSize = _bufferSize;
1337        this._windowTime = _windowTime;
1338        this._timestampProvider = _timestampProvider;
1339        this._buffer = [];
1340        this._infiniteTimeWindow = true;
1341        this._infiniteTimeWindow = _windowTime === Infinity;
1342        this._bufferSize = Math.max(1, _bufferSize);
1343        this._windowTime = Math.max(1, _windowTime);
1344      }
1345      next(value) {
1346        const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;
1347        if (!isStopped) {
1348          _buffer.push(value);
1349          !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);
1350        }
1351        this._trimBuffer();
1352        super.next(value);
1353      }
1354      _subscribe(subscriber) {
1355        this._throwIfClosed();
1356        this._trimBuffer();
1357        const subscription = this._innerSubscribe(subscriber);
1358        const { _infiniteTimeWindow, _buffer } = this;
1359        const copy = _buffer.slice();
1360        for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {
1361          subscriber.next(copy[i]);
1362        }
1363        this._checkFinalizedStatuses(subscriber);
1364        return subscription;
1365      }
1366      _trimBuffer() {
1367        const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this;
1368        const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;
1369        _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);
1370        if (!_infiniteTimeWindow) {
1371          const now = _timestampProvider.now();
1372          let last2 = 0;
1373          for (let i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {
1374            last2 = i;
1375          }
1376          last2 && _buffer.splice(0, last2 + 1);
1377        }
1378      }
1379    };
1380  }
1381});
1382
vendor: 276 bytes, lines 1383-1392
1383// node_modules/rxjs/dist/esm/internal/observable/empty.js
1384var EMPTY;
1385var init_empty = __esm({
1386  "node_modules/rxjs/dist/esm/internal/observable/empty.js"() {
1387    "use strict";
1388    init_Observable();
1389    EMPTY = new Observable((subscriber) => subscriber.complete());
1390  }
1391});
1392
vendor: 282 bytes, lines 1393-1403
1393// node_modules/rxjs/dist/esm/internal/util/isScheduler.js
1394function isScheduler(value) {
1395  return value && isFunction(value.schedule);
1396}
1397var init_isScheduler = __esm({
1398  "node_modules/rxjs/dist/esm/internal/util/isScheduler.js"() {
1399    "use strict";
1400    init_isFunction();
1401  }
1402});
1403
vendor: 437 bytes, lines 1404-1420
1404// node_modules/rxjs/dist/esm/internal/util/args.js
1405function last(arr) {
1406  return arr[arr.length - 1];
1407}
1408function popScheduler(args) {
1409  return isScheduler(last(args)) ? args.pop() : void 0;
1410}
1411function popNumber(args, defaultValue) {
1412  return typeof last(args) === "number" ? args.pop() : defaultValue;
1413}
1414var init_args = __esm({
1415  "node_modules/rxjs/dist/esm/internal/util/args.js"() {
1416    "use strict";
1417    init_isScheduler();
1418  }
1419});
1420
vendor: 3,285 bytes, lines 1421-1528
1421// node_modules/tslib/tslib.es6.mjs
1422function __awaiter(thisArg, _arguments, P, generator) {
1423  function adopt(value) {
1424    return value instanceof P ? value : new P(function(resolve) {
1425      resolve(value);
1426    });
1427  }
1428  return new (P || (P = Promise))(function(resolve, reject) {
1429    function fulfilled(value) {
1430      try {
1431        step(generator.next(value));
1432      } catch (e) {
1433        reject(e);
1434      }
1435    }
1436    function rejected(value) {
1437      try {
1438        step(generator["throw"](value));
1439      } catch (e) {
1440        reject(e);
1441      }
1442    }
1443    function step(result) {
1444      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
1445    }
1446    step((generator = generator.apply(thisArg, _arguments || [])).next());
1447  });
1448}
1449function __values(o) {
1450  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
1451  if (m) return m.call(o);
1452  if (o && typeof o.length === "number") return {
1453    next: function() {
1454      if (o && i >= o.length) o = void 0;
1455      return { value: o && o[i++], done: !o };
1456    }
1457  };
1458  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
1459}
1460function __await(v) {
1461  return this instanceof __await ? (this.v = v, this) : new __await(v);
1462}
1463function __asyncGenerator(thisArg, _arguments, generator) {
1464  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1465  var g = generator.apply(thisArg, _arguments || []), i, q = [];
1466  return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() {
1467    return this;
1468  }, i;
1469  function awaitReturn(f) {
1470    return function(v) {
1471      return Promise.resolve(v).then(f, reject);
1472    };
1473  }
1474  function verb(n, f) {
1475    if (g[n]) {
1476      i[n] = function(v) {
1477        return new Promise(function(a, b) {
1478          q.push([n, v, a, b]) > 1 || resume(n, v);
1479        });
1480      };
1481      if (f) i[n] = f(i[n]);
1482    }
1483  }
1484  function resume(n, v) {
1485    try {
1486      step(g[n](v));
1487    } catch (e) {
1488      settle(q[0][3], e);
1489    }
1490  }
1491  function step(r) {
1492    r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
1493  }
1494  function fulfill(value) {
1495    resume("next", value);
1496  }
1497  function reject(value) {
1498    resume("throw", value);
1499  }
1500  function settle(f, v) {
1501    if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
1502  }
1503}
1504function __asyncValues(o) {
1505  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1506  var m = o[Symbol.asyncIterator], i;
1507  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() {
1508    return this;
1509  }, i);
1510  function verb(n) {
1511    i[n] = o[n] && function(v) {
1512      return new Promise(function(resolve, reject) {
1513        v = o[n](v), settle(resolve, reject, v.done, v.value);
1514      });
1515    };
1516  }
1517  function settle(resolve, reject, d, v) {
1518    Promise.resolve(v).then(function(v2) {
1519      resolve({ value: v2, done: d });
1520    }, reject);
1521  }
1522}
1523var init_tslib_es6 = __esm({
1524  "node_modules/tslib/tslib.es6.mjs"() {
1525    "use strict";
1526  }
1527});
1528
vendor: 287 bytes, lines 1529-1537
1529// node_modules/rxjs/dist/esm/internal/util/isArrayLike.js
1530var isArrayLike;
1531var init_isArrayLike = __esm({
1532  "node_modules/rxjs/dist/esm/internal/util/isArrayLike.js"() {
1533    "use strict";
1534    isArrayLike = ((x) => x && typeof x.length === "number" && typeof x !== "function");
1535  }
1536});
1537
vendor: 307 bytes, lines 1538-1548
1538// node_modules/rxjs/dist/esm/internal/util/isPromise.js
1539function isPromise(value) {
1540  return isFunction(value === null || value === void 0 ? void 0 : value.then);
1541}
1542var init_isPromise = __esm({
1543  "node_modules/rxjs/dist/esm/internal/util/isPromise.js"() {
1544    "use strict";
1545    init_isFunction();
1546  }
1547});
1548
vendor: 333 bytes, lines 1549-1560
1549// node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js
1550function isInteropObservable(input2) {
1551  return isFunction(input2[observable]);
1552}
1553var init_isInteropObservable = __esm({
1554  "node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js"() {
1555    "use strict";
1556    init_observable();
1557    init_isFunction();
1558  }
1559});
1560
vendor: 364 bytes, lines 1561-1571
1561// node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js
1562function isAsyncIterable(obj) {
1563  return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);
1564}
1565var init_isAsyncIterable = __esm({
1566  "node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js"() {
1567    "use strict";
1568    init_isFunction();
1569  }
1570});
1571
vendor: 515 bytes, lines 1572-1581
1572// node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js
1573function createInvalidObservableTypeError(input2) {
1574  return new TypeError(`You provided ${input2 !== null && typeof input2 === "object" ? "an invalid object" : `'${input2}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`);
1575}
1576var init_throwUnobservableError = __esm({
1577  "node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js"() {
1578    "use strict";
1579  }
1580});
1581
vendor: 372 bytes, lines 1582-1596
1582// node_modules/rxjs/dist/esm/internal/symbol/iterator.js
1583function getSymbolIterator() {
1584  if (typeof Symbol !== "function" || !Symbol.iterator) {
1585    return "@@iterator";
1586  }
1587  return Symbol.iterator;
1588}
1589var iterator;
1590var init_iterator = __esm({
1591  "node_modules/rxjs/dist/esm/internal/symbol/iterator.js"() {
1592    "use strict";
1593    iterator = getSymbolIterator();
1594  }
1595});
1596
vendor: 341 bytes, lines 1597-1608
1597// node_modules/rxjs/dist/esm/internal/util/isIterable.js
1598function isIterable(input2) {
1599  return isFunction(input2 === null || input2 === void 0 ? void 0 : input2[iterator]);
1600}
1601var init_isIterable = __esm({
1602  "node_modules/rxjs/dist/esm/internal/util/isIterable.js"() {
1603    "use strict";
1604    init_iterator();
1605    init_isFunction();
1606  }
1607});
1608
vendor: 838 bytes, lines 1609-1636
1609// node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js
1610function readableStreamLikeToAsyncGenerator(readableStream) {
1611  return __asyncGenerator(this, arguments, function* readableStreamLikeToAsyncGenerator_1() {
1612    const reader = readableStream.getReader();
1613    try {
1614      while (true) {
1615        const { value, done } = yield __await(reader.read());
1616        if (done) {
1617          return yield __await(void 0);
1618        }
1619        yield yield __await(value);
1620      }
1621    } finally {
1622      reader.releaseLock();
1623    }
1624  });
1625}
1626function isReadableStreamLike(obj) {
1627  return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);
1628}
1629var init_isReadableStreamLike = __esm({
1630  "node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js"() {
1631    "use strict";
1632    init_tslib_es6();
1633    init_isFunction();
1634  }
1635});
1636
vendor: 3,253 bytes, lines 1637-1751
1637// node_modules/rxjs/dist/esm/internal/observable/innerFrom.js
1638function innerFrom(input2) {
1639  if (input2 instanceof Observable) {
1640    return input2;
1641  }
1642  if (input2 != null) {
1643    if (isInteropObservable(input2)) {
1644      return fromInteropObservable(input2);
1645    }
1646    if (isArrayLike(input2)) {
1647      return fromArrayLike(input2);
1648    }
1649    if (isPromise(input2)) {
1650      return fromPromise(input2);
1651    }
1652    if (isAsyncIterable(input2)) {
1653      return fromAsyncIterable(input2);
1654    }
1655    if (isIterable(input2)) {
1656      return fromIterable(input2);
1657    }
1658    if (isReadableStreamLike(input2)) {
1659      return fromReadableStreamLike(input2);
1660    }
1661  }
1662  throw createInvalidObservableTypeError(input2);
1663}
1664function fromInteropObservable(obj) {
1665  return new Observable((subscriber) => {
1666    const obs = obj[observable]();
1667    if (isFunction(obs.subscribe)) {
1668      return obs.subscribe(subscriber);
1669    }
1670    throw new TypeError("Provided object does not correctly implement Symbol.observable");
1671  });
1672}
1673function fromArrayLike(array) {
1674  return new Observable((subscriber) => {
1675    for (let i = 0; i < array.length && !subscriber.closed; i++) {
1676      subscriber.next(array[i]);
1677    }
1678    subscriber.complete();
1679  });
1680}
1681function fromPromise(promise) {
1682  return new Observable((subscriber) => {
1683    promise.then((value) => {
1684      if (!subscriber.closed) {
1685        subscriber.next(value);
1686        subscriber.complete();
1687      }
1688    }, (err) => subscriber.error(err)).then(null, reportUnhandledError);
1689  });
1690}
1691function fromIterable(iterable) {
1692  return new Observable((subscriber) => {
1693    for (const value of iterable) {
1694      subscriber.next(value);
1695      if (subscriber.closed) {
1696        return;
1697      }
1698    }
1699    subscriber.complete();
1700  });
1701}
1702function fromAsyncIterable(asyncIterable) {
1703  return new Observable((subscriber) => {
1704    process(asyncIterable, subscriber).catch((err) => subscriber.error(err));
1705  });
1706}
1707function fromReadableStreamLike(readableStream) {
1708  return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));
1709}
1710function process(asyncIterable, subscriber) {
1711  var asyncIterable_1, asyncIterable_1_1;
1712  var e_1, _a;
1713  return __awaiter(this, void 0, void 0, function* () {
1714    try {
1715      for (asyncIterable_1 = __asyncValues(asyncIterable); asyncIterable_1_1 = yield asyncIterable_1.next(), !asyncIterable_1_1.done; ) {
1716        const value = asyncIterable_1_1.value;
1717        subscriber.next(value);
1718        if (subscriber.closed) {
1719          return;
1720        }
1721      }
1722    } catch (e_1_1) {
1723      e_1 = { error: e_1_1 };
1724    } finally {
1725      try {
1726        if (asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return)) yield _a.call(asyncIterable_1);
1727      } finally {
1728        if (e_1) throw e_1.error;
1729      }
1730    }
1731    subscriber.complete();
1732  });
1733}
1734var init_innerFrom = __esm({
1735  "node_modules/rxjs/dist/esm/internal/observable/innerFrom.js"() {
1736    "use strict";
1737    init_tslib_es6();
1738    init_isArrayLike();
1739    init_isPromise();
1740    init_Observable();
1741    init_isInteropObservable();
1742    init_isAsyncIterable();
1743    init_throwUnobservableError();
1744    init_isIterable();
1745    init_isReadableStreamLike();
1746    init_isFunction();
1747    init_reportUnhandledError();
1748    init_observable();
1749  }
1750});
1751
vendor: 599 bytes, lines 1752-1772
1752// node_modules/rxjs/dist/esm/internal/util/executeSchedule.js
1753function executeSchedule(parentSubscription, scheduler2, work, delay = 0, repeat = false) {
1754  const scheduleSubscription = scheduler2.schedule(function() {
1755    work();
1756    if (repeat) {
1757      parentSubscription.add(this.schedule(null, delay));
1758    } else {
1759      this.unsubscribe();
1760    }
1761  }, delay);
1762  parentSubscription.add(scheduleSubscription);
1763  if (!repeat) {
1764    return scheduleSubscription;
1765  }
1766}
1767var init_executeSchedule = __esm({
1768  "node_modules/rxjs/dist/esm/internal/util/executeSchedule.js"() {
1769    "use strict";
1770  }
1771});
1772
vendor: 674 bytes, lines 1773-1787
1773// node_modules/rxjs/dist/esm/internal/operators/observeOn.js
1774function observeOn(scheduler2, delay = 0) {
1775  return operate((source, subscriber) => {
1776    source.subscribe(createOperatorSubscriber(subscriber, (value) => executeSchedule(subscriber, scheduler2, () => subscriber.next(value), delay), () => executeSchedule(subscriber, scheduler2, () => subscriber.complete(), delay), (err) => executeSchedule(subscriber, scheduler2, () => subscriber.error(err), delay)));
1777  });
1778}
1779var init_observeOn = __esm({
1780  "node_modules/rxjs/dist/esm/internal/operators/observeOn.js"() {
1781    "use strict";
1782    init_executeSchedule();
1783    init_lift();
1784    init_OperatorSubscriber();
1785  }
1786});
1787
vendor: 389 bytes, lines 1788-1800
1788// node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js
1789function subscribeOn(scheduler2, delay = 0) {
1790  return operate((source, subscriber) => {
1791    subscriber.add(scheduler2.schedule(() => source.subscribe(subscriber), delay));
1792  });
1793}
1794var init_subscribeOn = __esm({
1795  "node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js"() {
1796    "use strict";
1797    init_lift();
1798  }
1799});
1800
vendor: 413 bytes, lines 1801-1813
1801// node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js
1802function scheduleObservable(input2, scheduler2) {
1803  return innerFrom(input2).pipe(subscribeOn(scheduler2), observeOn(scheduler2));
1804}
1805var init_scheduleObservable = __esm({
1806  "node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js"() {
1807    "use strict";
1808    init_innerFrom();
1809    init_observeOn();
1810    init_subscribeOn();
1811  }
1812});
1813
vendor: 401 bytes, lines 1814-1826
1814// node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js
1815function schedulePromise(input2, scheduler2) {
1816  return innerFrom(input2).pipe(subscribeOn(scheduler2), observeOn(scheduler2));
1817}
1818var init_schedulePromise = __esm({
1819  "node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js"() {
1820    "use strict";
1821    init_innerFrom();
1822    init_observeOn();
1823    init_subscribeOn();
1824  }
1825});
1826
vendor: 578 bytes, lines 1827-1849
1827// node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js
1828function scheduleArray(input2, scheduler2) {
1829  return new Observable((subscriber) => {
1830    let i = 0;
1831    return scheduler2.schedule(function() {
1832      if (i === input2.length) {
1833        subscriber.complete();
1834      } else {
1835        subscriber.next(input2[i++]);
1836        if (!subscriber.closed) {
1837          this.schedule();
1838        }
1839      }
1840    });
1841  });
1842}
1843var init_scheduleArray = __esm({
1844  "node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js"() {
1845    "use strict";
1846    init_Observable();
1847  }
1848});
1849
vendor: 1,010 bytes, lines 1850-1884
1850// node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js
1851function scheduleIterable(input2, scheduler2) {
1852  return new Observable((subscriber) => {
1853    let iterator2;
1854    executeSchedule(subscriber, scheduler2, () => {
1855      iterator2 = input2[iterator]();
1856      executeSchedule(subscriber, scheduler2, () => {
1857        let value;
1858        let done;
1859        try {
1860          ({ value, done } = iterator2.next());
1861        } catch (err) {
1862          subscriber.error(err);
1863          return;
1864        }
1865        if (done) {
1866          subscriber.complete();
1867        } else {
1868          subscriber.next(value);
1869        }
1870      }, 0, true);
1871    });
1872    return () => isFunction(iterator2 === null || iterator2 === void 0 ? void 0 : iterator2.return) && iterator2.return();
1873  });
1874}
1875var init_scheduleIterable = __esm({
1876  "node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js"() {
1877    "use strict";
1878    init_Observable();
1879    init_iterator();
1880    init_isFunction();
1881    init_executeSchedule();
1882  }
1883});
1884
vendor: 827 bytes, lines 1885-1912
1885// node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js
1886function scheduleAsyncIterable(input2, scheduler2) {
1887  if (!input2) {
1888    throw new Error("Iterable cannot be null");
1889  }
1890  return new Observable((subscriber) => {
1891    executeSchedule(subscriber, scheduler2, () => {
1892      const iterator2 = input2[Symbol.asyncIterator]();
1893      executeSchedule(subscriber, scheduler2, () => {
1894        iterator2.next().then((result) => {
1895          if (result.done) {
1896            subscriber.complete();
1897          } else {
1898            subscriber.next(result.value);
1899          }
1900        });
1901      }, 0, true);
1902    });
1903  });
1904}
1905var init_scheduleAsyncIterable = __esm({
1906  "node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js"() {
1907    "use strict";
1908    init_Observable();
1909    init_executeSchedule();
1910  }
1911});
1912
vendor: 451 bytes, lines 1913-1924
1913// node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js
1914function scheduleReadableStreamLike(input2, scheduler2) {
1915  return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input2), scheduler2);
1916}
1917var init_scheduleReadableStreamLike = __esm({
1918  "node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js"() {
1919    "use strict";
1920    init_scheduleAsyncIterable();
1921    init_isReadableStreamLike();
1922  }
1923});
1924
vendor: 1,249 bytes, lines 1925-1967
1925// node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js
1926function scheduled(input2, scheduler2) {
1927  if (input2 != null) {
1928    if (isInteropObservable(input2)) {
1929      return scheduleObservable(input2, scheduler2);
1930    }
1931    if (isArrayLike(input2)) {
1932      return scheduleArray(input2, scheduler2);
1933    }
1934    if (isPromise(input2)) {
1935      return schedulePromise(input2, scheduler2);
1936    }
1937    if (isAsyncIterable(input2)) {
1938      return scheduleAsyncIterable(input2, scheduler2);
1939    }
1940    if (isIterable(input2)) {
1941      return scheduleIterable(input2, scheduler2);
1942    }
1943    if (isReadableStreamLike(input2)) {
1944      return scheduleReadableStreamLike(input2, scheduler2);
1945    }
1946  }
1947  throw createInvalidObservableTypeError(input2);
1948}
1949var init_scheduled = __esm({
1950  "node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js"() {
1951    "use strict";
1952    init_scheduleObservable();
1953    init_schedulePromise();
1954    init_scheduleArray();
1955    init_scheduleIterable();
1956    init_scheduleAsyncIterable();
1957    init_isInteropObservable();
1958    init_isPromise();
1959    init_isArrayLike();
1960    init_isIterable();
1961    init_isAsyncIterable();
1962    init_throwUnobservableError();
1963    init_isReadableStreamLike();
1964    init_scheduleReadableStreamLike();
1965  }
1966});
1967
vendor: 327 bytes, lines 1968-1979
1968// node_modules/rxjs/dist/esm/internal/observable/from.js
1969function from(input2, scheduler2) {
1970  return scheduler2 ? scheduled(input2, scheduler2) : innerFrom(input2);
1971}
1972var init_from = __esm({
1973  "node_modules/rxjs/dist/esm/internal/observable/from.js"() {
1974    "use strict";
1975    init_scheduled();
1976    init_innerFrom();
1977  }
1978});
1979
vendor: 299 bytes, lines 1980-1992
1980// node_modules/rxjs/dist/esm/internal/observable/of.js
1981function of(...args) {
1982  const scheduler2 = popScheduler(args);
1983  return from(args, scheduler2);
1984}
1985var init_of = __esm({
1986  "node_modules/rxjs/dist/esm/internal/observable/of.js"() {
1987    "use strict";
1988    init_args();
1989    init_from();
1990  }
1991});
1992
vendor: 460 bytes, lines 1993-2009
1993// node_modules/rxjs/dist/esm/internal/operators/map.js
1994function map(project, thisArg) {
1995  return operate((source, subscriber) => {
1996    let index = 0;
1997    source.subscribe(createOperatorSubscriber(subscriber, (value) => {
1998      subscriber.next(project.call(thisArg, value, index++));
1999    }));
2000  });
2001}
2002var init_map = __esm({
2003  "node_modules/rxjs/dist/esm/internal/operators/map.js"() {
2004    "use strict";
2005    init_lift();
2006    init_OperatorSubscriber();
2007  }
2008});
2009
vendor: 1,953 bytes, lines 2010-2070
2010// node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js
2011function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {
2012  const buffer = [];
2013  let active = 0;
2014  let index = 0;
2015  let isComplete = false;
2016  const checkComplete = () => {
2017    if (isComplete && !buffer.length && !active) {
2018      subscriber.complete();
2019    }
2020  };
2021  const outerNext = (value) => active < concurrent ? doInnerSub(value) : buffer.push(value);
2022  const doInnerSub = (value) => {
2023    expand && subscriber.next(value);
2024    active++;
2025    let innerComplete = false;
2026    innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, (innerValue) => {
2027      onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);
2028      if (expand) {
2029        outerNext(innerValue);
2030      } else {
2031        subscriber.next(innerValue);
2032      }
2033    }, () => {
2034      innerComplete = true;
2035    }, void 0, () => {
2036      if (innerComplete) {
2037        try {
2038          active--;
2039          while (buffer.length && active < concurrent) {
2040            const bufferedValue = buffer.shift();
2041            if (innerSubScheduler) {
2042              executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));
2043            } else {
2044              doInnerSub(bufferedValue);
2045            }
2046          }
2047          checkComplete();
2048        } catch (err) {
2049          subscriber.error(err);
2050        }
2051      }
2052    }));
2053  };
2054  source.subscribe(createOperatorSubscriber(subscriber, outerNext, () => {
2055    isComplete = true;
2056    checkComplete();
2057  }));
2058  return () => {
2059    additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();
2060  };
2061}
2062var init_mergeInternals = __esm({
2063  "node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js"() {
2064    "use strict";
2065    init_innerFrom();
2066    init_executeSchedule();
2067    init_OperatorSubscriber();
2068  }
2069});
2070
vendor: 694 bytes, lines 2071-2090
2071// node_modules/rxjs/dist/esm/internal/operators/mergeMap.js
2072function mergeMap(project, resultSelector, concurrent = Infinity) {
2073  if (isFunction(resultSelector)) {
2074    return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);
2075  } else if (typeof resultSelector === "number") {
2076    concurrent = resultSelector;
2077  }
2078  return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));
2079}
2080var init_mergeMap = __esm({
2081  "node_modules/rxjs/dist/esm/internal/operators/mergeMap.js"() {
2082    "use strict";
2083    init_map();
2084    init_innerFrom();
2085    init_lift();
2086    init_mergeInternals();
2087    init_isFunction();
2088  }
2089});
2090
vendor: 310 bytes, lines 2091-2102
2091// node_modules/rxjs/dist/esm/internal/operators/mergeAll.js
2092function mergeAll(concurrent = Infinity) {
2093  return mergeMap(identity, concurrent);
2094}
2095var init_mergeAll = __esm({
2096  "node_modules/rxjs/dist/esm/internal/operators/mergeAll.js"() {
2097    "use strict";
2098    init_mergeMap();
2099    init_identity();
2100  }
2101});
2102
vendor: 542 bytes, lines 2103-2120
2103// node_modules/rxjs/dist/esm/internal/observable/merge.js
2104function merge(...args) {
2105  const scheduler2 = popScheduler(args);
2106  const concurrent = popNumber(args, Infinity);
2107  const sources = args;
2108  return !sources.length ? EMPTY : sources.length === 1 ? innerFrom(sources[0]) : mergeAll(concurrent)(from(sources, scheduler2));
2109}
2110var init_merge = __esm({
2111  "node_modules/rxjs/dist/esm/internal/observable/merge.js"() {
2112    "use strict";
2113    init_mergeAll();
2114    init_innerFrom();
2115    init_empty();
2116    init_args();
2117    init_from();
2118  }
2119});
2120
vendor: 470 bytes, lines 2121-2135
2121// node_modules/rxjs/dist/esm/internal/operators/filter.js
2122function filter(predicate, thisArg) {
2123  return operate((source, subscriber) => {
2124    let index = 0;
2125    source.subscribe(createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value)));
2126  });
2127}
2128var init_filter = __esm({
2129  "node_modules/rxjs/dist/esm/internal/operators/filter.js"() {
2130    "use strict";
2131    init_lift();
2132    init_OperatorSubscriber();
2133  }
2134});
2135
vendor: 153 bytes, lines 2136-2142
2136// node_modules/rxjs/dist/esm/internal/types.js
2137var init_types = __esm({
2138  "node_modules/rxjs/dist/esm/internal/types.js"() {
2139    "use strict";
2140  }
2141});
2142
vendor: 376 bytes, lines 2143-2154
2143// node_modules/rxjs/dist/esm/internal/operators/concatMap.js
2144function concatMap(project, resultSelector) {
2145  return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);
2146}
2147var init_concatMap = __esm({
2148  "node_modules/rxjs/dist/esm/internal/operators/concatMap.js"() {
2149    "use strict";
2150    init_mergeMap();
2151    init_isFunction();
2152  }
2153});
2154
vendor: 380 bytes, lines 2155-2171
2155// node_modules/rxjs/dist/esm/internal/operators/finalize.js
2156function finalize(callback) {
2157  return operate((source, subscriber) => {
2158    try {
2159      source.subscribe(subscriber);
2160    } finally {
2161      subscriber.add(callback);
2162    }
2163  });
2164}
2165var init_finalize = __esm({
2166  "node_modules/rxjs/dist/esm/internal/operators/finalize.js"() {
2167    "use strict";
2168    init_lift();
2169  }
2170});
2171
vendor: 1,135 bytes, lines 2172-2201
2172// node_modules/rxjs/dist/esm/internal/operators/switchMap.js
2173function switchMap(project, resultSelector) {
2174  return operate((source, subscriber) => {
2175    let innerSubscriber = null;
2176    let index = 0;
2177    let isComplete = false;
2178    const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete();
2179    source.subscribe(createOperatorSubscriber(subscriber, (value) => {
2180      innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();
2181      let innerIndex = 0;
2182      const outerIndex = index++;
2183      innerFrom(project(value, outerIndex)).subscribe(innerSubscriber = createOperatorSubscriber(subscriber, (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => {
2184        innerSubscriber = null;
2185        checkComplete();
2186      }));
2187    }, () => {
2188      isComplete = true;
2189      checkComplete();
2190    }));
2191  });
2192}
2193var init_switchMap = __esm({
2194  "node_modules/rxjs/dist/esm/internal/operators/switchMap.js"() {
2195    "use strict";
2196    init_innerFrom();
2197    init_lift();
2198    init_OperatorSubscriber();
2199  }
2200});
2201
vendor: 306 bytes, lines 2202-2216
2202// node_modules/rxjs/dist/esm/index.js
2203var init_esm = __esm({
2204  "node_modules/rxjs/dist/esm/index.js"() {
2205    "use strict";
2206    init_Observable();
2207    init_Subject();
2208    init_BehaviorSubject();
2209    init_ReplaySubject();
2210    init_Subscription();
2211    init_merge();
2212    init_of();
2213    init_types();
2214  }
2215});
2216
vendor: 3,478 bytes, lines 2217-2328
2217// node_modules/@angular/core/fesm2022/effect.mjs
2218function createLinkedSignal(sourceFn, computationFn, equalityFn) {
2219  const node = Object.create(LINKED_SIGNAL_NODE);
2220  node.source = sourceFn;
2221  node.computation = computationFn;
2222  if (equalityFn != void 0) {
2223    node.equal = equalityFn;
2224  }
2225  const linkedSignalGetter = () => {
2226    producerUpdateValueVersion(node);
2227    producerAccessed(node);
2228    if (node.value === ERRORED) {
2229      throw node.error;
2230    }
2231    return node.value;
2232  };
2233  const getter = linkedSignalGetter;
2234  getter[SIGNAL] = node;
2235  if (typeof ngDevMode !== "undefined" && ngDevMode) {
2236    const debugName = node.debugName ? " (" + node.debugName + ")" : "";
2237    getter.toString = () => `[LinkedSignal${debugName}: ${node.value}]`;
2238  }
2239  runPostProducerCreatedFn(node);
2240  return getter;
2241}
2242function linkedSignalSetFn(node, newValue) {
2243  producerUpdateValueVersion(node);
2244  signalSetFn(node, newValue);
2245  producerMarkClean(node);
2246}
2247function linkedSignalUpdateFn(node, updater) {
2248  producerUpdateValueVersion(node);
2249  signalUpdateFn(node, updater);
2250  producerMarkClean(node);
2251}
2252function untracked(nonReactiveReadsFn) {
2253  const prevConsumer = setActiveConsumer(null);
2254  try {
2255    return nonReactiveReadsFn();
2256  } finally {
2257    setActiveConsumer(prevConsumer);
2258  }
2259}
2260function runEffect(node) {
2261  node.dirty = false;
2262  if (node.version > 0 && !consumerPollProducersForChange(node)) {
2263    return;
2264  }
2265  node.version++;
2266  const prevNode = consumerBeforeComputation(node);
2267  try {
2268    node.cleanup();
2269    node.fn();
2270  } finally {
2271    consumerAfterComputation(node, prevNode);
2272  }
2273}
2274var LINKED_SIGNAL_NODE, BASE_EFFECT_NODE;
2275var init_effect = __esm({
2276  "node_modules/@angular/core/fesm2022/effect.mjs"() {
2277    "use strict";
2278    init_signal();
2279    LINKED_SIGNAL_NODE = /* @__PURE__ */ (() => {
2280      return __spreadProps(__spreadValues({}, REACTIVE_NODE), {
2281        value: UNSET,
2282        dirty: true,
2283        error: null,
2284        equal: defaultEquals,
2285        kind: "linkedSignal",
2286        producerMustRecompute(node) {
2287          return node.value === UNSET || node.value === COMPUTING;
2288        },
2289        producerRecomputeValue(node) {
2290          if (node.value === COMPUTING) {
2291            throw new Error(typeof ngDevMode !== "undefined" && ngDevMode ? "Detected cycle in computations." : "");
2292          }
2293          const oldValue = node.value;
2294          node.value = COMPUTING;
2295          const prevConsumer = consumerBeforeComputation(node);
2296          let newValue;
2297          try {
2298            const newSourceValue = node.source();
2299            const prev = oldValue === UNSET || oldValue === ERRORED ? void 0 : {
2300              source: node.sourceValue,
2301              value: oldValue
2302            };
2303            newValue = node.computation(newSourceValue, prev);
2304            node.sourceValue = newSourceValue;
2305          } catch (err) {
2306            newValue = ERRORED;
2307            node.error = err;
2308          } finally {
2309            consumerAfterComputation(node, prevConsumer);
2310          }
2311          if (oldValue !== UNSET && newValue !== ERRORED && node.equal(oldValue, newValue)) {
2312            node.value = oldValue;
2313            return;
2314          }
2315          node.value = newValue;
2316          node.version++;
2317        }
2318      });
2319    })();
2320    BASE_EFFECT_NODE = /* @__PURE__ */ (() => __spreadProps(__spreadValues({}, REACTIVE_NODE), {
2321      consumerIsAlwaysLive: true,
2322      consumerAllowSignalWrites: true,
2323      dirty: true,
2324      kind: "effect"
2325    }))();
2326  }
2327});
2328
vendor: 3,331 bytes, lines 2329-2439
2329// node_modules/@angular/core/fesm2022/primitives/signals.mjs
2330function prettifyPreview(value) {
2331  if (value === null)
2332    return "null";
2333  if (Array.isArray(value))
2334    return `Array(${value.length})`;
2335  if (value instanceof Element)
2336    return `<${value.tagName.toLowerCase()}>`;
2337  if (value instanceof URL)
2338    return `URL`;
2339  switch (typeof value) {
2340    case "undefined": {
2341      return "undefined";
2342    }
2343    case "function": {
2344      if ("prototype" in value) {
2345        return "class";
2346      } else {
2347        return "() => {\u2026}";
2348      }
2349    }
2350    case "object": {
2351      if (value.constructor.name === "Object") {
2352        return "{\u2026}";
2353      } else {
2354        return `${value.constructor.name} {}`;
2355      }
2356    }
2357    default: {
2358      return ["object", { object: value, config: { skipFormatting: true } }];
2359    }
2360  }
2361}
2362function isSignal(value) {
2363  return value[SIGNAL] !== void 0;
2364}
2365function installDevToolsSignalFormatter() {
2366  globalThis.devtoolsFormatters ??= [];
2367  if (!globalThis.devtoolsFormatters.some((f) => f === formatter)) {
2368    globalThis.devtoolsFormatters.push(formatter);
2369  }
2370}
2371var formatter;
2372var init_signals = __esm({
2373  "node_modules/@angular/core/fesm2022/primitives/signals.mjs"() {
2374    "use strict";
2375    init_signal();
2376    init_signal();
2377    formatter = {
2378      /**
2379       *  If the function returns `null`, the formatter is not used for this reference
2380       */
2381      header: (sig, config2) => {
2382        if (!isSignal(sig) || config2?.ngSkipFormatting)
2383          return null;
2384        let value;
2385        try {
2386          value = sig();
2387        } catch {
2388          return ["span", "Signal(\u26A0\uFE0F Error)"];
2389        }
2390        const kind = "computation" in sig[SIGNAL] ? "Computed" : "Signal";
2391        const isPrimitive = value === null || !Array.isArray(value) && typeof value !== "object";
2392        return [
2393          "span",
2394          {},
2395          ["span", {}, `${kind}(`],
2396          (() => {
2397            if (isSignal(value)) {
2398              return formatter.header(value, config2);
2399            } else if (isPrimitive && value !== void 0 && typeof value !== "function") {
2400              return ["object", { object: value }];
2401            } else {
2402              return prettifyPreview(value);
2403            }
2404          })(),
2405          ["span", {}, `)`]
2406        ];
2407      },
2408      hasBody: (sig, config2) => {
2409        if (!isSignal(sig))
2410          return false;
2411        try {
2412          sig();
2413        } catch {
2414          return false;
2415        }
2416        return !config2?.ngSkipFormatting;
2417      },
2418      body: (sig, config2) => {
2419        const color = "var(--sys-color-primary)";
2420        return [
2421          "div",
2422          { style: `background: #FFFFFF10; padding-left: 4px; padding-top: 2px; padding-bottom: 2px;` },
2423          ["div", { style: `color: ${color}` }, "Signal value: "],
2424          ["div", { style: `padding-left: .5rem;` }, ["object", { object: sig(), config: config2 }]],
2425          ["div", { style: `color: ${color}` }, "Signal function: "],
2426          [
2427            "div",
2428            { style: `padding-left: .5rem;` },
2429            ["object", { object: sig, config: __spreadProps(__spreadValues({}, config2), { skipFormatting: true }) }]
2430          ]
2431        ];
2432      }
2433    };
2434    if (typeof ngDevMode !== "undefined" && ngDevMode) {
2435      installDevToolsSignalFormatter();
2436    }
2437  }
2438});
2439
vendor: 190 bytes, lines 2440-2447
2440// node_modules/@angular/core/fesm2022/primitives/di.mjs
2441var init_di = __esm({
2442  "node_modules/@angular/core/fesm2022/primitives/di.mjs"() {
2443    "use strict";
2444    init_not_found();
2445  }
2446});
2447
vendor: 83,179 bytes, lines 2448-4836
2448// node_modules/@angular/core/fesm2022/root_effect_scheduler.mjs
2449function formatRuntimeErrorCode(code) {
2450  return `NG0${Math.abs(code)}`;
2451}
2452function formatRuntimeError(code, message) {
2453  const fullCode = formatRuntimeErrorCode(code);
2454  let errorMessage = `${fullCode}${message ? ": " + message : ""}`;
2455  if (ngDevMode && code < 0) {
2456    const addPeriodSeparator = !errorMessage.match(/[.,;!?\n]$/);
2457    const separator = addPeriodSeparator ? "." : "";
2458    errorMessage = `${errorMessage}${separator} Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/${fullCode}`;
2459  }
2460  return errorMessage;
2461}
2462function ngDevModeResetPerfCounters() {
2463  const locationString = typeof location !== "undefined" ? location.toString() : "";
2464  const newCounters = {
2465    hydratedNodes: 0,
2466    hydratedComponents: 0,
2467    dehydratedViewsRemoved: 0,
2468    dehydratedViewsCleanupRuns: 0,
2469    componentsSkippedHydration: 0,
2470    deferBlocksWithIncrementalHydration: 0
2471  };
2472  const allowNgDevModeTrue = locationString.indexOf("ngDevMode=false") === -1;
2473  if (!allowNgDevModeTrue) {
2474    _global["ngDevMode"] = false;
2475  } else {
2476    if (typeof _global["ngDevMode"] !== "object") {
2477      _global["ngDevMode"] = {};
2478    }
2479    Object.assign(_global["ngDevMode"], newCounters);
2480  }
2481  return newCounters;
2482}
2483function initNgDevMode() {
2484  if (typeof ngDevMode === "undefined" || ngDevMode) {
2485    if (typeof ngDevMode !== "object" || Object.keys(ngDevMode).length === 0) {
2486      ngDevModeResetPerfCounters();
2487    }
2488    return typeof ngDevMode !== "undefined" && !!ngDevMode;
2489  }
2490  return false;
2491}
2492function getClosureSafeProperty(objWithPropertyToExtract) {
2493  for (let key in objWithPropertyToExtract) {
2494    if (objWithPropertyToExtract[key] === getClosureSafeProperty) {
2495      return key;
2496    }
2497  }
2498  throw Error(typeof ngDevMode !== "undefined" && ngDevMode ? "Could not find renamed property on target object." : "");
2499}
2500function fillProperties(target, source) {
2501  for (const key in source) {
2502    if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {
2503      target[key] = source[key];
2504    }
2505  }
2506}
2507function stringify(token) {
2508  if (typeof token === "string") {
2509    return token;
2510  }
2511  if (Array.isArray(token)) {
2512    return `[${token.map(stringify).join(", ")}]`;
2513  }
2514  if (token == null) {
2515    return "" + token;
2516  }
2517  const name = token.overriddenName || token.name;
2518  if (name) {
2519    return `${name}`;
2520  }
2521  const result = token.toString();
2522  if (result == null) {
2523    return "" + result;
2524  }
2525  const newLineIndex = result.indexOf("\n");
2526  return newLineIndex >= 0 ? result.slice(0, newLineIndex) : result;
2527}
2528function concatStringsWithSpace(before, after) {
2529  if (!before)
2530    return after || "";
2531  if (!after)
2532    return before;
2533  return `${before} ${after}`;
2534}
2535function forwardRef(forwardRefFn) {
2536  forwardRefFn.__forward_ref__ = forwardRef;
2537  forwardRefFn.toString = function() {
2538    return stringify(this());
2539  };
2540  return forwardRefFn;
2541}
2542function resolveForwardRef(type) {
2543  return isForwardRef(type) ? type() : type;
2544}
2545function isForwardRef(fn) {
2546  return typeof fn === "function" && fn.hasOwnProperty(__forward_ref__) && fn.__forward_ref__ === forwardRef;
2547}
2548function assertNumber(actual, msg) {
2549  if (!(typeof actual === "number")) {
2550    throwError(msg, typeof actual, "number", "===");
2551  }
2552}
2553function assertNumberInRange(actual, minInclusive, maxInclusive) {
2554  assertNumber(actual, "Expected a number");
2555  assertLessThanOrEqual(actual, maxInclusive, "Expected number to be less than or equal to");
2556  assertGreaterThanOrEqual(actual, minInclusive, "Expected number to be greater than or equal to");
2557}
2558function assertString(actual, msg) {
2559  if (!(typeof actual === "string")) {
2560    throwError(msg, actual === null ? "null" : typeof actual, "string", "===");
2561  }
2562}
2563function assertFunction(actual, msg) {
2564  if (!(typeof actual === "function")) {
2565    throwError(msg, actual === null ? "null" : typeof actual, "function", "===");
2566  }
2567}
2568function assertEqual(actual, expected, msg) {
2569  if (!(actual == expected)) {
2570    throwError(msg, actual, expected, "==");
2571  }
2572}
2573function assertNotEqual(actual, expected, msg) {
2574  if (!(actual != expected)) {
2575    throwError(msg, actual, expected, "!=");
2576  }
2577}
2578function assertSame(actual, expected, msg) {
2579  if (!(actual === expected)) {
2580    throwError(msg, actual, expected, "===");
2581  }
2582}
2583function assertNotSame(actual, expected, msg) {
2584  if (!(actual !== expected)) {
2585    throwError(msg, actual, expected, "!==");
2586  }
2587}
2588function assertLessThan(actual, expected, msg) {
2589  if (!(actual < expected)) {
2590    throwError(msg, actual, expected, "<");
2591  }
2592}
2593function assertLessThanOrEqual(actual, expected, msg) {
2594  if (!(actual <= expected)) {
2595    throwError(msg, actual, expected, "<=");
2596  }
2597}
2598function assertGreaterThan(actual, expected, msg) {
2599  if (!(actual > expected)) {
2600    throwError(msg, actual, expected, ">");
2601  }
2602}
2603function assertGreaterThanOrEqual(actual, expected, msg) {
2604  if (!(actual >= expected)) {
2605    throwError(msg, actual, expected, ">=");
2606  }
2607}
2608function assertDefined(actual, msg) {
2609  if (actual == null) {
2610    throwError(msg, actual, null, "!=");
2611  }
2612}
2613function throwError(msg, actual, expected, comparison) {
2614  throw new Error(`ASSERTION ERROR: ${msg}` + (comparison == null ? "" : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`));
2615}
2616function assertDomNode(node) {
2617  if (!(node instanceof Node)) {
2618    throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`);
2619  }
2620}
2621function assertElement(node) {
2622  if (!(node instanceof Element)) {
2623    throwError(`The provided value must be an element but got ${stringify(node)}`);
2624  }
2625}
2626function assertIndexInRange(arr, index) {
2627  assertDefined(arr, "Array must be defined.");
2628  const maxLen = arr.length;
2629  if (index < 0 || index >= maxLen) {
2630    throwError(`Index expected to be less than ${maxLen} but got ${index}`);
2631  }
2632}
2633function assertOneOf(value, ...validValues) {
2634  if (validValues.indexOf(value) !== -1)
2635    return true;
2636  throwError(`Expected value to be one of ${JSON.stringify(validValues)} but was ${JSON.stringify(value)}.`);
2637}
2638function assertNotReactive(fn) {
2639  if (getActiveConsumer() !== null) {
2640    throwError(`${fn}() should never be called in a reactive context.`);
2641  }
2642}
2643function \u0275\u0275defineInjectable(opts) {
2644  return {
2645    token: opts.token,
2646    providedIn: opts.providedIn || null,
2647    factory: opts.factory,
2648    value: void 0
2649  };
2650}
2651function \u0275\u0275defineInjector(options) {
2652  return { providers: options.providers || [], imports: options.imports || [] };
2653}
2654function getInjectableDef(type) {
2655  return getOwnDefinition(type, NG_PROV_DEF);
2656}
2657function getOwnDefinition(type, field) {
2658  return type.hasOwnProperty(field) && type[field] || null;
2659}
2660function getInheritedInjectableDef(type) {
2661  const def = type?.[NG_PROV_DEF] ?? null;
2662  if (def) {
2663    ngDevMode && console.warn(`DEPRECATED: DI is instantiating a token "${type.name}" that inherits its @Injectable decorator but does not provide one itself.
2664This will become an error in a future version of Angular. Please add @Injectable() to the "${type.name}" class.`);
2665    return def;
2666  } else {
2667    return null;
2668  }
2669}
2670function getInjectorDef(type) {
2671  return type && type.hasOwnProperty(NG_INJ_DEF) ? type[NG_INJ_DEF] : null;
2672}
2673function getInjectorProfilerContext() {
2674  !ngDevMode && throwError("getInjectorProfilerContext should never be called in production mode");
2675  return _injectorProfilerContext;
2676}
2677function setInjectorProfilerContext(context2) {
2678  !ngDevMode && throwError("setInjectorProfilerContext should never be called in production mode");
2679  const previous = _injectorProfilerContext;
2680  _injectorProfilerContext = context2;
2681  return previous;
2682}
2683function removeProfiler(profiler2) {
2684  const profilerIdx = injectorProfilerCallbacks.indexOf(profiler2);
2685  if (profilerIdx !== -1) {
2686    injectorProfilerCallbacks.splice(profilerIdx, 1);
2687  }
2688}
2689function setInjectorProfiler(injectorProfiler2) {
2690  !ngDevMode && throwError("setInjectorProfiler should never be called in production mode");
2691  if (injectorProfiler2 !== null) {
2692    if (!injectorProfilerCallbacks.includes(injectorProfiler2)) {
2693      injectorProfilerCallbacks.push(injectorProfiler2);
2694    }
2695    return () => removeProfiler(injectorProfiler2);
2696  } else {
2697    injectorProfilerCallbacks.length = 0;
2698    return NOOP_PROFILER_REMOVAL;
2699  }
2700}
2701function injectorProfiler(event) {
2702  !ngDevMode && throwError("Injector profiler should never be called in production mode");
2703  for (let i = 0; i < injectorProfilerCallbacks.length; i++) {
2704    const injectorProfilerCallback = injectorProfilerCallbacks[i];
2705    injectorProfilerCallback(event);
2706  }
2707}
2708function emitProviderConfiguredEvent(eventProvider, isViewProvider = false) {
2709  !ngDevMode && throwError("Injector profiler should never be called in production mode");
2710  let token;
2711  if (typeof eventProvider === "function") {
2712    token = eventProvider;
2713  } else if (eventProvider instanceof InjectionToken) {
2714    token = eventProvider;
2715  } else {
2716    token = resolveForwardRef(eventProvider.provide);
2717  }
2718  let provider = eventProvider;
2719  if (eventProvider instanceof InjectionToken) {
2720    provider = eventProvider.\u0275prov || eventProvider;
2721  }
2722  injectorProfiler({
2723    type: 2,
2724    context: getInjectorProfilerContext(),
2725    providerRecord: { token, provider, isViewProvider }
2726  });
2727}
2728function emitInjectorToCreateInstanceEvent(token) {
2729  !ngDevMode && throwError("Injector profiler should never be called in production mode");
2730  injectorProfiler({
2731    type: 4,
2732    context: getInjectorProfilerContext(),
2733    token
2734  });
2735}
2736function emitInstanceCreatedByInjectorEvent(instance) {
2737  !ngDevMode && throwError("Injector profiler should never be called in production mode");
2738  injectorProfiler({
2739    type: 1,
2740    context: getInjectorProfilerContext(),
2741    instance: { value: instance }
2742  });
2743}
2744function emitInjectEvent(token, value, flags) {
2745  !ngDevMode && throwError("Injector profiler should never be called in production mode");
2746  injectorProfiler({
2747    type: 0,
2748    context: getInjectorProfilerContext(),
2749    service: { token, value, flags }
2750  });
2751}
2752function emitEffectCreatedEvent(effect2) {
2753  !ngDevMode && throwError("Injector profiler should never be called in production mode");
2754  injectorProfiler({
2755    type: 3,
2756    context: getInjectorProfilerContext(),
2757    effect: effect2
2758  });
2759}
2760function runInInjectorProfilerContext(injector, token, callback) {
2761  !ngDevMode && throwError("runInInjectorProfilerContext should never be called in production mode");
2762  const prevInjectContext = setInjectorProfilerContext({ injector, token });
2763  try {
2764    callback();
2765  } finally {
2766    setInjectorProfilerContext(prevInjectContext);
2767  }
2768}
2769function isEnvironmentProviders(value) {
2770  return value && !!value.\u0275providers;
2771}
2772function renderStringify(value) {
2773  if (typeof value === "string")
2774    return value;
2775  if (value == null)
2776    return "";
2777  return String(value);
2778}
2779function stringifyForError(value) {
2780  if (typeof value === "function")
2781    return value.name || value.toString();
2782  if (typeof value === "object" && value != null && typeof value.type === "function") {
2783    return value.type.name || value.type.toString();
2784  }
2785  return renderStringify(value);
2786}
2787function cyclicDependencyError(token, path) {
2788  const message = ngDevMode ? `Circular dependency detected for \`${token}\`.` : "";
2789  return createRuntimeError(message, -200, path);
2790}
2791function cyclicDependencyErrorWithDetails(token, path) {
2792  return augmentRuntimeError(cyclicDependencyError(token, path), null);
2793}
2794function throwMixedMultiProviderError() {
2795  throw new Error(`Cannot mix multi providers and regular providers`);
2796}
2797function throwInvalidProviderError(ngModuleType, providers, provider) {
2798  if (ngModuleType && providers) {
2799    const providerDetail = providers.map((v) => v == provider ? "?" + provider + "?" : "...");
2800    throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}' - only instances of Provider and Type are allowed, got: [${providerDetail.join(", ")}]`);
2801  } else if (isEnvironmentProviders(provider)) {
2802    if (provider.\u0275fromNgModule) {
2803      throw new RuntimeError(207, `Invalid providers from 'importProvidersFrom' present in a non-environment injector. 'importProvidersFrom' can't be used for component providers.`);
2804    } else {
2805      throw new RuntimeError(207, `Invalid providers present in a non-environment injector. 'EnvironmentProviders' can't be used for component providers.`);
2806    }
2807  } else {
2808    throw new Error("Invalid provider");
2809  }
2810}
2811function throwProviderNotFoundError(token, injectorName) {
2812  const errorMessage = ngDevMode && `No provider for ${stringifyForError(token)} found${injectorName ? ` in ${injectorName}` : ""}`;
2813  throw new RuntimeError(-201, errorMessage);
2814}
2815function prependTokenToDependencyPath(error, token) {
2816  error[NG_TOKEN_PATH] ??= [];
2817  const currentPath = error[NG_TOKEN_PATH];
2818  let pathStr;
2819  if (typeof token === "object" && "multi" in token && token?.multi === true) {
2820    assertDefined(token.provide, "Token with multi: true should have a provide property");
2821    pathStr = stringifyForError(token.provide);
2822  } else {
2823    pathStr = stringifyForError(token);
2824  }
2825  if (currentPath[0] !== pathStr) {
2826    error[NG_TOKEN_PATH].unshift(pathStr);
2827  }
2828}
2829function augmentRuntimeError(error, source) {
2830  const tokenPath = error[NG_TOKEN_PATH];
2831  const errorCode = error[NG_RUNTIME_ERROR_CODE];
2832  const message = error[NG_RUNTIME_ERROR_MESSAGE] || error.message;
2833  error.message = formatErrorMessage(message, errorCode, tokenPath, source);
2834  return error;
2835}
2836function createRuntimeError(message, code, path) {
2837  const error = new RuntimeError(code, message);
2838  error[NG_RUNTIME_ERROR_CODE] = code;
2839  error[NG_RUNTIME_ERROR_MESSAGE] = message;
2840  if (path) {
2841    error[NG_TOKEN_PATH] = path;
2842  }
2843  return error;
2844}
2845function getRuntimeErrorCode(error) {
2846  return error[NG_RUNTIME_ERROR_CODE];
2847}
2848function formatErrorMessage(text, code, path = [], source = null) {
2849  let pathDetails = "";
2850  if (path && path.length > 1) {
2851    pathDetails = ` Path: ${path.join(" -> ")}.`;
2852  }
2853  const sourceDetails = source ? ` Source: ${source}.` : "";
2854  return formatRuntimeError(code, `${text}${sourceDetails}${pathDetails}`);
2855}
2856function getInjectImplementation() {
2857  return _injectImplementation;
2858}
2859function setInjectImplementation(impl) {
2860  const previous = _injectImplementation;
2861  _injectImplementation = impl;
2862  return previous;
2863}
2864function injectRootLimpMode(token, notFoundValue, flags) {
2865  const injectableDef = getInjectableDef(token);
2866  if (injectableDef && injectableDef.providedIn == "root") {
2867    return injectableDef.value === void 0 ? injectableDef.value = injectableDef.factory() : injectableDef.value;
2868  }
2869  if (flags & 8)
2870    return null;
2871  if (notFoundValue !== void 0)
2872    return notFoundValue;
2873  throwProviderNotFoundError(token, "Injector");
2874}
2875function assertInjectImplementationNotEqual(fn) {
2876  ngDevMode && assertNotEqual(_injectImplementation, fn, "Calling \u0275\u0275inject would cause infinite recursion");
2877}
2878function injectInjectorOnly(token, flags = 0) {
2879  const currentInjector = getCurrentInjector();
2880  if (currentInjector === void 0) {
2881    throw new RuntimeError(-203, ngDevMode && `The \`${stringify(token)}\` token injection failed. \`inject()\` function must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with \`runInInjectionContext\`.`);
2882  } else if (currentInjector === null) {
2883    return injectRootLimpMode(token, void 0, flags);
2884  } else {
2885    const options = convertToInjectOptions(flags);
2886    const value = currentInjector.retrieve(token, options);
2887    ngDevMode && emitInjectEvent(token, value, flags);
2888    if (isNotFound(value)) {
2889      if (options.optional) {
2890        return null;
2891      }
2892      throw value;
2893    }
2894    return value;
2895  }
2896}
2897function \u0275\u0275inject(token, flags = 0) {
2898  return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token), flags);
2899}
2900function \u0275\u0275invalidFactoryDep(index) {
2901  throw new RuntimeError(202, ngDevMode && `This constructor is not compatible with Angular Dependency Injection because its dependency at index ${index} of the parameter list is invalid.
2902This can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.
2903
2904Please check that 1) the type for the parameter at index ${index} is correct and 2) the correct Angular decorators are defined for this class and its ancestors.`);
2905}
2906function inject2(token, options) {
2907  return \u0275\u0275inject(token, convertToBitFlags(options));
2908}
2909function convertToBitFlags(flags) {
2910  if (typeof flags === "undefined" || typeof flags === "number") {
2911    return flags;
2912  }
2913  return 0 | // comment to force a line break in the formatter
2914  (flags.optional && 8) | (flags.host && 1) | (flags.self && 2) | (flags.skipSelf && 4);
2915}
2916function convertToInjectOptions(flags) {
2917  return {
2918    optional: !!(flags & 8),
2919    host: !!(flags & 1),
2920    self: !!(flags & 2),
2921    skipSelf: !!(flags & 4)
2922  };
2923}
2924function injectArgs(types) {
2925  const args = [];
2926  for (let i = 0; i < types.length; i++) {
2927    const arg = resolveForwardRef(types[i]);
2928    if (Array.isArray(arg)) {
2929      if (arg.length === 0) {
2930        throw new RuntimeError(900, ngDevMode && "Arguments array must have arguments.");
2931      }
2932      let type = void 0;
2933      let flags = 0;
2934      for (let j = 0; j < arg.length; j++) {
2935        const meta = arg[j];
2936        const flag = getInjectFlag(meta);
2937        if (typeof flag === "number") {
2938          if (flag === -1) {
2939            type = meta.token;
2940          } else {
2941            flags |= flag;
2942          }
2943        } else {
2944          type = meta;
2945        }
2946      }
2947      args.push(\u0275\u0275inject(type, flags));
2948    } else {
2949      args.push(\u0275\u0275inject(arg));
2950    }
2951  }
2952  return args;
2953}
2954function attachInjectFlag(decorator, flag) {
2955  decorator[DI_DECORATOR_FLAG] = flag;
2956  decorator.prototype[DI_DECORATOR_FLAG] = flag;
2957  return decorator;
2958}
2959function getInjectFlag(token) {
2960  return token[DI_DECORATOR_FLAG];
2961}
2962function getFactoryDef(type, throwNotFound) {
2963  const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);
2964  if (!hasFactoryDef && throwNotFound === true && ngDevMode) {
2965    throw new Error(`Type ${stringify(type)} does not have '\u0275fac' property.`);
2966  }
2967  return hasFactoryDef ? type[NG_FACTORY_DEF] : null;
2968}
2969function arrayEquals(a, b, identityAccessor) {
2970  if (a.length !== b.length)
2971    return false;
2972  for (let i = 0; i < a.length; i++) {
2973    let valueA = a[i];
2974    let valueB = b[i];
2975    if (identityAccessor) {
2976      valueA = identityAccessor(valueA);
2977      valueB = identityAccessor(valueB);
2978    }
2979    if (valueB !== valueA) {
2980      return false;
2981    }
2982  }
2983  return true;
2984}
2985function flatten(list) {
2986  return list.flat(Number.POSITIVE_INFINITY);
2987}
2988function deepForEach(input2, fn) {
2989  input2.forEach((value) => Array.isArray(value) ? deepForEach(value, fn) : fn(value));
2990}
2991function addToArray(arr, index, value) {
2992  if (index >= arr.length) {
2993    arr.push(value);
2994  } else {
2995    arr.splice(index, 0, value);
2996  }
2997}
2998function removeFromArray(arr, index) {
2999  if (index >= arr.length - 1) {
3000    return arr.pop();
3001  } else {
3002    return arr.splice(index, 1)[0];
3003  }
3004}
3005function newArray(size, value) {
3006  const list = [];
3007  for (let i = 0; i < size; i++) {
3008    list.push(value);
3009  }
3010  return list;
3011}
3012function arraySplice(array, index, count) {
3013  const length = array.length - count;
3014  while (index < length) {
3015    array[index] = array[index + count];
3016    index++;
3017  }
3018  while (count--) {
3019    array.pop();
3020  }
3021}
3022function arrayInsert2(array, index, value1, value2) {
3023  ngDevMode && assertLessThanOrEqual(index, array.length, "Can't insert past array end.");
3024  let end = array.length;
3025  if (end == index) {
3026    array.push(value1, value2);
3027  } else if (end === 1) {
3028    array.push(value2, array[0]);
3029    array[0] = value1;
3030  } else {
3031    end--;
3032    array.push(array[end - 1], array[end]);
3033    while (end > index) {
3034      const previousEnd = end - 2;
3035      array[end] = array[previousEnd];
3036      end--;
3037    }
3038    array[index] = value1;
3039    array[index + 1] = value2;
3040  }
3041}
3042function keyValueArraySet(keyValueArray, key, value) {
3043  let index = keyValueArrayIndexOf(keyValueArray, key);
3044  if (index >= 0) {
3045    keyValueArray[index | 1] = value;
3046  } else {
3047    index = ~index;
3048    arrayInsert2(keyValueArray, index, key, value);
3049  }
3050  return index;
3051}
3052function keyValueArrayGet(keyValueArray, key) {
3053  const index = keyValueArrayIndexOf(keyValueArray, key);
3054  if (index >= 0) {
3055    return keyValueArray[index | 1];
3056  }
3057  return void 0;
3058}
3059function keyValueArrayIndexOf(keyValueArray, key) {
3060  return _arrayIndexOfSorted(keyValueArray, key, 1);
3061}
3062function _arrayIndexOfSorted(array, value, shift) {
3063  ngDevMode && assertEqual(Array.isArray(array), true, "Expecting an array");
3064  let start = 0;
3065  let end = array.length >> shift;
3066  while (end !== start) {
3067    const middle = start + (end - start >> 1);
3068    const current = array[middle << shift];
3069    if (value === current) {
3070      return middle << shift;
3071    } else if (current > value) {
3072      end = middle;
3073    } else {
3074      start = middle + 1;
3075    }
3076  }
3077  return ~(end << shift);
3078}
3079function getNgModuleDef(type) {
3080  return type[NG_MOD_DEF] || null;
3081}
3082function getNgModuleDefOrThrow(type) {
3083  const ngModuleDef = getNgModuleDef(type);
3084  if (!ngModuleDef) {
3085    throw new RuntimeError(915, (typeof ngDevMode === "undefined" || ngDevMode) && `Type ${stringify(type)} does not have '\u0275mod' property.`);
3086  }
3087  return ngModuleDef;
3088}
3089function getComponentDef(type) {
3090  return type[NG_COMP_DEF] || null;
3091}
3092function getDirectiveDefOrThrow(type) {
3093  const def = getDirectiveDef(type);
3094  if (!def) {
3095    throw new RuntimeError(916, (typeof ngDevMode === "undefined" || ngDevMode) && `Type ${stringify(type)} does not have '\u0275dir' property.`);
3096  }
3097  return def;
3098}
3099function getDirectiveDef(type) {
3100  return type[NG_DIR_DEF] || null;
3101}
3102function getPipeDef(type) {
3103  return type[NG_PIPE_DEF] || null;
3104}
3105function isStandalone(type) {
3106  const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);
3107  return def !== null && def.standalone;
3108}
3109function makeEnvironmentProviders(providers) {
3110  return {
3111    \u0275providers: providers
3112  };
3113}
3114function importProvidersFrom(...sources) {
3115  return {
3116    \u0275providers: internalImportProvidersFrom(true, sources),
3117    \u0275fromNgModule: true
3118  };
3119}
3120function internalImportProvidersFrom(checkForStandaloneCmp, ...sources) {
3121  const providersOut = [];
3122  const dedup = /* @__PURE__ */ new Set();
3123  let injectorTypesWithProviders;
3124  const collectProviders = (provider) => {
3125    providersOut.push(provider);
3126  };
3127  deepForEach(sources, (source) => {
3128    if ((typeof ngDevMode === "undefined" || ngDevMode) && checkForStandaloneCmp) {
3129      const cmpDef = getComponentDef(source);
3130      if (cmpDef?.standalone) {
3131        throw new RuntimeError(800, `Importing providers supports NgModule or ModuleWithProviders but got a standalone component "${stringifyForError(source)}"`);
3132      }
3133    }
3134    const internalSource = source;
3135    if (walkProviderTree(internalSource, collectProviders, [], dedup)) {
3136      injectorTypesWithProviders ||= [];
3137      injectorTypesWithProviders.push(internalSource);
3138    }
3139  });
3140  if (injectorTypesWithProviders !== void 0) {
3141    processInjectorTypesWithProviders(injectorTypesWithProviders, collectProviders);
3142  }
3143  return providersOut;
3144}
3145function processInjectorTypesWithProviders(typesWithProviders, visitor) {
3146  for (let i = 0; i < typesWithProviders.length; i++) {
3147    const { ngModule, providers } = typesWithProviders[i];
3148    deepForEachProvider(providers, (provider) => {
3149      ngDevMode && validateProvider(provider, providers || EMPTY_ARRAY, ngModule);
3150      visitor(provider, ngModule);
3151    });
3152  }
3153}
3154function walkProviderTree(container, visitor, parents, dedup) {
3155  container = resolveForwardRef(container);
3156  if (!container)
3157    return false;
3158  let defType = null;
3159  let injDef = getInjectorDef(container);
3160  const cmpDef = !injDef && getComponentDef(container);
3161  if (!injDef && !cmpDef) {
3162    const ngModule = container.ngModule;
3163    injDef = getInjectorDef(ngModule);
3164    if (injDef) {
3165      defType = ngModule;
3166    } else {
3167      return false;
3168    }
3169  } else if (cmpDef && !cmpDef.standalone) {
3170    return false;
3171  } else {
3172    defType = container;
3173  }
3174  if (ngDevMode && parents.indexOf(defType) !== -1) {
3175    const defName = stringify(defType);
3176    const path = parents.map(stringify).concat(defName);
3177    throw cyclicDependencyErrorWithDetails(defName, path);
3178  }
3179  const isDuplicate = dedup.has(defType);
3180  if (cmpDef) {
3181    if (isDuplicate) {
3182      return false;
3183    }
3184    dedup.add(defType);
3185    if (cmpDef.dependencies) {
3186      const deps = typeof cmpDef.dependencies === "function" ? cmpDef.dependencies() : cmpDef.dependencies;
3187      for (const dep of deps) {
3188        walkProviderTree(dep, visitor, parents, dedup);
3189      }
3190    }
3191  } else if (injDef) {
3192    if (injDef.imports != null && !isDuplicate) {
3193      ngDevMode && parents.push(defType);
3194      dedup.add(defType);
3195      let importTypesWithProviders;
3196      try {
3197        deepForEach(injDef.imports, (imported) => {
3198          if (walkProviderTree(imported, visitor, parents, dedup)) {
3199            importTypesWithProviders ||= [];
3200            importTypesWithProviders.push(imported);
3201          }
3202        });
3203      } finally {
3204        ngDevMode && parents.pop();
3205      }
3206      if (importTypesWithProviders !== void 0) {
3207        processInjectorTypesWithProviders(importTypesWithProviders, visitor);
3208      }
3209    }
3210    if (!isDuplicate) {
3211      const factory = getFactoryDef(defType) || (() => new defType());
3212      visitor({ provide: defType, useFactory: factory, deps: EMPTY_ARRAY }, defType);
3213      visitor({ provide: INJECTOR_DEF_TYPES, useValue: defType, multi: true }, defType);
3214      visitor({ provide: ENVIRONMENT_INITIALIZER, useValue: () => \u0275\u0275inject(defType), multi: true }, defType);
3215    }
3216    const defProviders = injDef.providers;
3217    if (defProviders != null && !isDuplicate) {
3218      const injectorType = container;
3219      deepForEachProvider(defProviders, (provider) => {
3220        ngDevMode && validateProvider(provider, defProviders, injectorType);
3221        visitor(provider, injectorType);
3222      });
3223    }
3224  } else {
3225    return false;
3226  }
3227  return defType !== container && container.providers !== void 0;
3228}
3229function validateProvider(provider, providers, containerType) {
3230  if (isTypeProvider(provider) || isValueProvider(provider) || isFactoryProvider(provider) || isExistingProvider(provider)) {
3231    return;
3232  }
3233  const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));
3234  if (!classRef) {
3235    throwInvalidProviderError(containerType, providers, provider);
3236  }
3237}
3238function deepForEachProvider(providers, fn) {
3239  for (let provider of providers) {
3240    if (isEnvironmentProviders(provider)) {
3241      provider = provider.\u0275providers;
3242    }
3243    if (Array.isArray(provider)) {
3244      deepForEachProvider(provider, fn);
3245    } else {
3246      fn(provider);
3247    }
3248  }
3249}
3250function isValueProvider(value) {
3251  return value !== null && typeof value == "object" && USE_VALUE in value;
3252}
3253function isExistingProvider(value) {
3254  return !!(value && value.useExisting);
3255}
3256function isFactoryProvider(value) {
3257  return !!(value && value.useFactory);
3258}
3259function isTypeProvider(value) {
3260  return typeof value === "function";
3261}
3262function isClassProvider(value) {
3263  return !!value.useClass;
3264}
3265function getNullInjector() {
3266  if (NULL_INJECTOR === void 0) {
3267    NULL_INJECTOR = new NullInjector();
3268  }
3269  return NULL_INJECTOR;
3270}
3271function injectableDefOrInjectorDefFactory(token) {
3272  const injectableDef = getInjectableDef(token);
3273  const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);
3274  if (factory !== null) {
3275    return factory;
3276  }
3277  if (token instanceof InjectionToken) {
3278    throw new RuntimeError(204, ngDevMode && `Token ${stringify(token)} is missing a \u0275prov definition.`);
3279  }
3280  if (token instanceof Function) {
3281    return getUndecoratedInjectableFactory(token);
3282  }
3283  throw new RuntimeError(204, ngDevMode && "unreachable");
3284}
3285function getUndecoratedInjectableFactory(token) {
3286  const paramLength = token.length;
3287  if (paramLength > 0) {
3288    throw new RuntimeError(204, ngDevMode && `Can't resolve all parameters for ${stringify(token)}: (${newArray(paramLength, "?").join(", ")}).`);
3289  }
3290  const inheritedInjectableDef = getInheritedInjectableDef(token);
3291  if (inheritedInjectableDef !== null) {
3292    return () => inheritedInjectableDef.factory(token);
3293  } else {
3294    return () => new token();
3295  }
3296}
3297function providerToRecord(provider) {
3298  if (isValueProvider(provider)) {
3299    return makeRecord(void 0, provider.useValue);
3300  } else {
3301    const factory = providerToFactory(provider);
3302    return makeRecord(factory, NOT_YET);
3303  }
3304}
3305function providerToFactory(provider, ngModuleType, providers) {
3306  let factory = void 0;
3307  if (ngDevMode && isEnvironmentProviders(provider)) {
3308    throwInvalidProviderError(void 0, providers, provider);
3309  }
3310  if (isTypeProvider(provider)) {
3311    const unwrappedProvider = resolveForwardRef(provider);
3312    return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);
3313  } else {
3314    if (isValueProvider(provider)) {
3315      factory = () => resolveForwardRef(provider.useValue);
3316    } else if (isFactoryProvider(provider)) {
3317      factory = () => provider.useFactory(...injectArgs(provider.deps || []));
3318    } else if (isExistingProvider(provider)) {
3319      factory = (_, flags) => \u0275\u0275inject(resolveForwardRef(provider.useExisting), flags !== void 0 && flags & 8 ? 8 : void 0);
3320    } else {
3321      const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));
3322      if (ngDevMode && !classRef) {
3323        throwInvalidProviderError(ngModuleType, providers, provider);
3324      }
3325      if (hasDeps(provider)) {
3326        factory = () => new classRef(...injectArgs(provider.deps));
3327      } else {
3328        return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);
3329      }
3330    }
3331  }
3332  return factory;
3333}
3334function assertNotDestroyed(injector) {
3335  if (injector.destroyed) {
3336    throw new RuntimeError(205, ngDevMode && "Injector has already been destroyed.");
3337  }
3338}
3339function makeRecord(factory, value, multi = false) {
3340  return {
3341    factory,
3342    value,
3343    multi: multi ? [] : void 0
3344  };
3345}
3346function hasDeps(value) {
3347  return !!value.deps;
3348}
3349function hasOnDestroy(value) {
3350  return value !== null && typeof value === "object" && typeof value.ngOnDestroy === "function";
3351}
3352function couldBeInjectableType(value) {
3353  return typeof value === "function" || typeof value === "object" && value.ngMetadataName === "InjectionToken";
3354}
3355function forEachSingleProvider(providers, fn) {
3356  for (const provider of providers) {
3357    if (Array.isArray(provider)) {
3358      forEachSingleProvider(provider, fn);
3359    } else if (provider && isEnvironmentProviders(provider)) {
3360      forEachSingleProvider(provider.\u0275providers, fn);
3361    } else {
3362      fn(provider);
3363    }
3364  }
3365}
3366function runInInjectionContext(injector, fn) {
3367  let internalInjector;
3368  if (injector instanceof R3Injector) {
3369    assertNotDestroyed(injector);
3370    internalInjector = injector;
3371  } else {
3372    internalInjector = new RetrievingInjector(injector);
3373  }
3374  let prevInjectorProfilerContext;
3375  if (ngDevMode) {
3376    prevInjectorProfilerContext = setInjectorProfilerContext({ injector, token: null });
3377  }
3378  const prevInjector = setCurrentInjector(internalInjector);
3379  const previousInjectImplementation = setInjectImplementation(void 0);
3380  try {
3381    return fn();
3382  } finally {
3383    setCurrentInjector(prevInjector);
3384    ngDevMode && setInjectorProfilerContext(prevInjectorProfilerContext);
3385    setInjectImplementation(previousInjectImplementation);
3386  }
3387}
3388function isInInjectionContext() {
3389  return getInjectImplementation() !== void 0 || getCurrentInjector() != null;
3390}
3391function assertInInjectionContext(debugFn) {
3392  if (!isInInjectionContext()) {
3393    throw new RuntimeError(-203, ngDevMode && debugFn.name + "() can only be used within an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`");
3394  }
3395}
3396function isLView(value) {
3397  return Array.isArray(value) && typeof value[TYPE] === "object";
3398}
3399function isLContainer(value) {
3400  return Array.isArray(value) && value[TYPE] === true;
3401}
3402function isContentQueryHost(tNode) {
3403  return (tNode.flags & 4) !== 0;
3404}
3405function isComponentHost(tNode) {
3406  return tNode.componentOffset > -1;
3407}
3408function isDirectiveHost(tNode) {
3409  return (tNode.flags & 1) === 1;
3410}
3411function isComponentDef(def) {
3412  return !!def.template;
3413}
3414function isRootView(target) {
3415  return (target[FLAGS] & 512) !== 0;
3416}
3417function isDestroyed(lView) {
3418  return (lView[FLAGS] & 256) === 256;
3419}
3420function assertTNodeForLView(tNode, lView) {
3421  assertTNodeForTView(tNode, lView[TVIEW]);
3422}
3423function assertTNodeCreationIndex(lView, index) {
3424  const adjustedIndex = index + HEADER_OFFSET;
3425  assertIndexInRange(lView, adjustedIndex);
3426  assertLessThan(adjustedIndex, lView[TVIEW].bindingStartIndex, "TNodes should be created before any bindings");
3427}
3428function assertTNodeForTView(tNode, tView) {
3429  assertTNode(tNode);
3430  const tData = tView.data;
3431  for (let i = HEADER_OFFSET; i < tData.length; i++) {
3432    if (tData[i] === tNode) {
3433      return;
3434    }
3435  }
3436  throwError("This TNode does not belong to this TView.");
3437}
3438function assertTNode(tNode) {
3439  assertDefined(tNode, "TNode must be defined");
3440  if (!(tNode && typeof tNode === "object" && tNode.hasOwnProperty("directiveStylingLast"))) {
3441    throwError("Not of type TNode, got: " + tNode);
3442  }
3443}
3444function assertTIcu(tIcu) {
3445  assertDefined(tIcu, "Expected TIcu to be defined");
3446  if (!(typeof tIcu.currentCaseLViewIndex === "number")) {
3447    throwError("Object is not of TIcu type.");
3448  }
3449}
3450function assertComponentType(actual, msg = "Type passed in is not ComponentType, it does not have '\u0275cmp' property.") {
3451  if (!getComponentDef(actual)) {
3452    throwError(msg);
3453  }
3454}
3455function assertNgModuleType(actual, msg = "Type passed in is not NgModuleType, it does not have '\u0275mod' property.") {
3456  if (!getNgModuleDef(actual)) {
3457    throwError(msg);
3458  }
3459}
3460function assertHasParent(tNode) {
3461  assertDefined(tNode, "currentTNode should exist!");
3462  assertDefined(tNode.parent, "currentTNode should have a parent");
3463}
3464function assertLContainer(value) {
3465  assertDefined(value, "LContainer must be defined");
3466  assertEqual(isLContainer(value), true, "Expecting LContainer");
3467}
3468function assertLViewOrUndefined(value) {
3469  value && assertEqual(isLView(value), true, "Expecting LView or undefined or null");
3470}
3471function assertLView(value) {
3472  assertDefined(value, "LView must be defined");
3473  assertEqual(isLView(value), true, "Expecting LView");
3474}
3475function assertFirstCreatePass(tView, errMessage) {
3476  assertEqual(tView.firstCreatePass, true, errMessage || "Should only be called in first create pass.");
3477}
3478function assertFirstUpdatePass(tView, errMessage) {
3479  assertEqual(tView.firstUpdatePass, true, "Should only be called in first update pass.");
3480}
3481function assertDirectiveDef(obj) {
3482  if (obj.type === void 0 || obj.selectors == void 0 || obj.inputs === void 0) {
3483    throwError(`Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.`);
3484  }
3485}
3486function assertIndexInDeclRange(tView, index) {
3487  assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);
3488}
3489function assertIndexInExpandoRange(lView, index) {
3490  const tView = lView[1];
3491  assertBetween(tView.expandoStartIndex, lView.length, index);
3492}
3493function assertBetween(lower, upper, index) {
3494  if (!(lower <= index && index < upper)) {
3495    throwError(`Index out of range (expecting ${lower} <= ${index} < ${upper})`);
3496  }
3497}
3498function assertProjectionSlots(lView, errMessage) {
3499  assertDefined(lView[DECLARATION_COMPONENT_VIEW], "Component views should exist.");
3500  assertDefined(lView[DECLARATION_COMPONENT_VIEW][T_HOST].projection, "Components with projection nodes (<ng-content>) must have projection slots defined.");
3501}
3502function assertParentView(lView, errMessage) {
3503  assertDefined(lView, "Component views should always have a parent view (component's host view)");
3504}
3505function assertNodeInjector(lView, injectorIndex) {
3506  assertIndexInExpandoRange(lView, injectorIndex);
3507  assertIndexInExpandoRange(
3508    lView,
3509    injectorIndex + 8
3510    /* NodeInjectorOffset.PARENT */
3511  );
3512  assertNumber(lView[injectorIndex + 0], "injectorIndex should point to a bloom filter");
3513  assertNumber(lView[injectorIndex + 1], "injectorIndex should point to a bloom filter");
3514  assertNumber(lView[injectorIndex + 2], "injectorIndex should point to a bloom filter");
3515  assertNumber(lView[injectorIndex + 3], "injectorIndex should point to a bloom filter");
3516  assertNumber(lView[injectorIndex + 4], "injectorIndex should point to a bloom filter");
3517  assertNumber(lView[injectorIndex + 5], "injectorIndex should point to a bloom filter");
3518  assertNumber(lView[injectorIndex + 6], "injectorIndex should point to a bloom filter");
3519  assertNumber(lView[injectorIndex + 7], "injectorIndex should point to a bloom filter");
3520  assertNumber(lView[
3521    injectorIndex + 8
3522    /* NodeInjectorOffset.PARENT */
3523  ], "injectorIndex should point to parent injector");
3524}
3525function unwrapRNode(value) {
3526  while (Array.isArray(value)) {
3527    value = value[HOST];
3528  }
3529  return value;
3530}
3531function unwrapLView(value) {
3532  while (Array.isArray(value)) {
3533    if (typeof value[TYPE] === "object")
3534      return value;
3535    value = value[HOST];
3536  }
3537  return null;
3538}
3539function getNativeByIndex(index, lView) {
3540  ngDevMode && assertIndexInRange(lView, index);
3541  ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, "Expected to be past HEADER_OFFSET");
3542  return unwrapRNode(lView[index]);
3543}
3544function getNativeByTNode(tNode, lView) {
3545  ngDevMode && assertTNodeForLView(tNode, lView);
3546  ngDevMode && assertIndexInRange(lView, tNode.index);
3547  const node = unwrapRNode(lView[tNode.index]);
3548  return node;
3549}
3550function getTNode(tView, index) {
3551  ngDevMode && assertGreaterThan(index, -1, "wrong index for TNode");
3552  ngDevMode && assertLessThan(index, tView.data.length, "wrong index for TNode");
3553  const tNode = tView.data[index];
3554  ngDevMode && tNode !== null && assertTNode(tNode);
3555  return tNode;
3556}
3557function load(view, index) {
3558  ngDevMode && assertIndexInRange(view, index);
3559  return view[index];
3560}
3561function store(tView, lView, index, value) {
3562  if (index >= tView.data.length) {
3563    tView.data[index] = null;
3564    tView.blueprint[index] = null;
3565  }
3566  lView[index] = value;
3567}
3568function getComponentLViewByIndex(nodeIndex, hostView) {
3569  ngDevMode && assertIndexInRange(hostView, nodeIndex);
3570  const slotValue = hostView[nodeIndex];
3571  const lView = isLView(slotValue) ? slotValue : slotValue[HOST];
3572  return lView;
3573}
3574function isCreationMode(view) {
3575  return (view[FLAGS] & 4) === 4;
3576}
3577function viewAttachedToChangeDetector(view) {
3578  return (view[FLAGS] & 128) === 128;
3579}
3580function viewAttachedToContainer(view) {
3581  return isLContainer(view[PARENT]);
3582}
3583function getConstant(consts, index) {
3584  if (index === null || index === void 0)
3585    return null;
3586  ngDevMode && assertIndexInRange(consts, index);
3587  return consts[index];
3588}
3589function resetPreOrderHookFlags(lView) {
3590  lView[PREORDER_HOOK_FLAGS] = 0;
3591}
3592function markViewForRefresh(lView) {
3593  if (lView[FLAGS] & 1024) {
3594    return;
3595  }
3596  lView[FLAGS] |= 1024;
3597  if (viewAttachedToChangeDetector(lView)) {
3598    markAncestorsForTraversal(lView);
3599  }
3600}
3601function walkUpViews(nestingLevel, currentView) {
3602  while (nestingLevel > 0) {
3603    ngDevMode && assertDefined(currentView[DECLARATION_VIEW], "Declaration view should be defined if nesting level is greater than 0.");
3604    currentView = currentView[DECLARATION_VIEW];
3605    nestingLevel--;
3606  }
3607  return currentView;
3608}
3609function requiresRefreshOrTraversal(lView) {
3610  return !!(lView[FLAGS] & (1024 | 8192) || lView[REACTIVE_TEMPLATE_CONSUMER]?.dirty);
3611}
3612function updateAncestorTraversalFlagsOnAttach(lView) {
3613  lView[ENVIRONMENT].changeDetectionScheduler?.notify(
3614    8
3615    /* NotificationSource.ViewAttached */
3616  );
3617  if (lView[FLAGS] & 64) {
3618    lView[FLAGS] |= 1024;
3619  }
3620  if (requiresRefreshOrTraversal(lView)) {
3621    markAncestorsForTraversal(lView);
3622  }
3623}
3624function markAncestorsForTraversal(lView) {
3625  lView[ENVIRONMENT].changeDetectionScheduler?.notify(
3626    0
3627    /* NotificationSource.MarkAncestorsForTraversal */
3628  );
3629  let parent = getLViewParent(lView);
3630  while (parent !== null) {
3631    if (parent[FLAGS] & 8192) {
3632      break;
3633    }
3634    parent[FLAGS] |= 8192;
3635    if (!viewAttachedToChangeDetector(parent)) {
3636      break;
3637    }
3638    parent = getLViewParent(parent);
3639  }
3640}
3641function storeLViewOnDestroy(lView, onDestroyCallback) {
3642  if (isDestroyed(lView)) {
3643    throw new RuntimeError(911, ngDevMode && "View has already been destroyed.");
3644  }
3645  if (lView[ON_DESTROY_HOOKS] === null) {
3646    lView[ON_DESTROY_HOOKS] = [];
3647  }
3648  lView[ON_DESTROY_HOOKS].push(onDestroyCallback);
3649}
3650function removeLViewOnDestroy(lView, onDestroyCallback) {
3651  if (lView[ON_DESTROY_HOOKS] === null)
3652    return;
3653  const destroyCBIdx = lView[ON_DESTROY_HOOKS].indexOf(onDestroyCallback);
3654  if (destroyCBIdx !== -1) {
3655    lView[ON_DESTROY_HOOKS].splice(destroyCBIdx, 1);
3656  }
3657}
3658function getLViewParent(lView) {
3659  ngDevMode && assertLView(lView);
3660  const parent = lView[PARENT];
3661  return isLContainer(parent) ? parent[PARENT] : parent;
3662}
3663function getOrCreateLViewCleanup(view) {
3664  return view[CLEANUP] ??= [];
3665}
3666function getOrCreateTViewCleanup(tView) {
3667  return tView.cleanup ??= [];
3668}
3669function storeCleanupWithContext(tView, lView, context2, cleanupFn) {
3670  const lCleanup = getOrCreateLViewCleanup(lView);
3671  ngDevMode && assertDefined(context2, "Cleanup context is mandatory when registering framework-level destroy hooks");
3672  lCleanup.push(context2);
3673  if (tView.firstCreatePass) {
3674    getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1);
3675  } else {
3676    if (ngDevMode) {
3677      Object.freeze(getOrCreateTViewCleanup(tView));
3678    }
3679  }
3680}
3681function getElementDepthCount() {
3682  return instructionState.lFrame.elementDepthCount;
3683}
3684function increaseElementDepthCount() {
3685  instructionState.lFrame.elementDepthCount++;
3686}
3687function decreaseElementDepthCount() {
3688  instructionState.lFrame.elementDepthCount--;
3689}
3690function getBindingsEnabled() {
3691  return instructionState.bindingsEnabled;
3692}
3693function isInSkipHydrationBlock() {
3694  return instructionState.skipHydrationRootTNode !== null;
3695}
3696function isSkipHydrationRootTNode(tNode) {
3697  return instructionState.skipHydrationRootTNode === tNode;
3698}
3699function \u0275\u0275enableBindings() {
3700  instructionState.bindingsEnabled = true;
3701}
3702function \u0275\u0275disableBindings() {
3703  instructionState.bindingsEnabled = false;
3704}
3705function leaveSkipHydrationBlock() {
3706  instructionState.skipHydrationRootTNode = null;
3707}
3708function getLView() {
3709  return instructionState.lFrame.lView;
3710}
3711function getTView() {
3712  return instructionState.lFrame.tView;
3713}
3714function \u0275\u0275restoreView(viewToRestore) {
3715  instructionState.lFrame.contextLView = viewToRestore;
3716  return viewToRestore[CONTEXT];
3717}
3718function \u0275\u0275resetView(value) {
3719  instructionState.lFrame.contextLView = null;
3720  return value;
3721}
3722function getCurrentTNode() {
3723  let currentTNode = getCurrentTNodePlaceholderOk();
3724  while (currentTNode !== null && currentTNode.type === 64) {
3725    currentTNode = currentTNode.parent;
3726  }
3727  return currentTNode;
3728}
3729function getCurrentTNodePlaceholderOk() {
3730  return instructionState.lFrame.currentTNode;
3731}
3732function getCurrentParentTNode() {
3733  const lFrame = instructionState.lFrame;
3734  const currentTNode = lFrame.currentTNode;
3735  return lFrame.isParent ? currentTNode : currentTNode.parent;
3736}
3737function setCurrentTNode(tNode, isParent) {
3738  ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView);
3739  const lFrame = instructionState.lFrame;
3740  lFrame.currentTNode = tNode;
3741  lFrame.isParent = isParent;
3742}
3743function isCurrentTNodeParent() {
3744  return instructionState.lFrame.isParent;
3745}
3746function setCurrentTNodeAsNotParent() {
3747  instructionState.lFrame.isParent = false;
3748}
3749function getContextLView() {
3750  const contextLView = instructionState.lFrame.contextLView;
3751  ngDevMode && assertDefined(contextLView, "contextLView must be defined.");
3752  return contextLView;
3753}
3754function isInCheckNoChangesMode() {
3755  !ngDevMode && throwError("Must never be called in production mode");
3756  return _checkNoChangesMode !== CheckNoChangesMode.Off;
3757}
3758function isExhaustiveCheckNoChanges() {
3759  !ngDevMode && throwError("Must never be called in production mode");
3760  return _checkNoChangesMode === CheckNoChangesMode.Exhaustive;
3761}
3762function setIsInCheckNoChangesMode(mode) {
3763  !ngDevMode && throwError("Must never be called in production mode");
3764  _checkNoChangesMode = mode;
3765}
3766function isRefreshingViews() {
3767  return _isRefreshingViews;
3768}
3769function setIsRefreshingViews(mode) {
3770  const prev = _isRefreshingViews;
3771  _isRefreshingViews = mode;
3772  return prev;
3773}
3774function getBindingRoot() {
3775  const lFrame = instructionState.lFrame;
3776  let index = lFrame.bindingRootIndex;
3777  if (index === -1) {
3778    index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;
3779  }
3780  return index;
3781}
3782function getBindingIndex() {
3783  return instructionState.lFrame.bindingIndex;
3784}
3785function setBindingIndex(value) {
3786  return instructionState.lFrame.bindingIndex = value;
3787}
3788function nextBindingIndex() {
3789  return instructionState.lFrame.bindingIndex++;
3790}
3791function incrementBindingIndex(count) {
3792  const lFrame = instructionState.lFrame;
3793  const index = lFrame.bindingIndex;
3794  lFrame.bindingIndex = lFrame.bindingIndex + count;
3795  return index;
3796}
3797function isInI18nBlock() {
3798  return instructionState.lFrame.inI18n;
3799}
3800function setInI18nBlock(isInI18nBlock2) {
3801  instructionState.lFrame.inI18n = isInI18nBlock2;
3802}
3803function setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) {
3804  const lFrame = instructionState.lFrame;
3805  lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex;
3806  setCurrentDirectiveIndex(currentDirectiveIndex);
3807}
3808function getCurrentDirectiveIndex() {
3809  return instructionState.lFrame.currentDirectiveIndex;
3810}
3811function setCurrentDirectiveIndex(currentDirectiveIndex) {
3812  instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex;
3813}
3814function getCurrentDirectiveDef(tData) {
3815  const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;
3816  return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex];
3817}
3818function getCurrentQueryIndex() {
3819  return instructionState.lFrame.currentQueryIndex;
3820}
3821function setCurrentQueryIndex(value) {
3822  instructionState.lFrame.currentQueryIndex = value;
3823}
3824function getDeclarationTNode(lView) {
3825  const tView = lView[TVIEW];
3826  if (tView.type === 2) {
3827    ngDevMode && assertDefined(tView.declTNode, "Embedded TNodes should have declaration parents.");
3828    return tView.declTNode;
3829  }
3830  if (tView.type === 1) {
3831    return lView[T_HOST];
3832  }
3833  return null;
3834}
3835function enterDI(lView, tNode, flags) {
3836  ngDevMode && assertLViewOrUndefined(lView);
3837  if (flags & 4) {
3838    ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);
3839    let parentTNode = tNode;
3840    let parentLView = lView;
3841    while (true) {
3842      ngDevMode && assertDefined(parentTNode, "Parent TNode should be defined");
3843      parentTNode = parentTNode.parent;
3844      if (parentTNode === null && !(flags & 1)) {
3845        parentTNode = getDeclarationTNode(parentLView);
3846        if (parentTNode === null)
3847          break;
3848        ngDevMode && assertDefined(parentLView, "Parent LView should be defined");
3849        parentLView = parentLView[DECLARATION_VIEW];
3850        if (parentTNode.type & (2 | 8)) {
3851          break;
3852        }
3853      } else {
3854        break;
3855      }
3856    }
3857    if (parentTNode === null) {
3858      return false;
3859    } else {
3860      tNode = parentTNode;
3861      lView = parentLView;
3862    }
3863  }
3864  ngDevMode && assertTNodeForLView(tNode, lView);
3865  const lFrame = instructionState.lFrame = allocLFrame();
3866  lFrame.currentTNode = tNode;
3867  lFrame.lView = lView;
3868  return true;
3869}
3870function enterView(newView) {
3871  ngDevMode && assertNotEqual(newView[0], newView[1], "????");
3872  ngDevMode && assertLViewOrUndefined(newView);
3873  const newLFrame = allocLFrame();
3874  if (ngDevMode) {
3875    assertEqual(newLFrame.isParent, true, "Expected clean LFrame");
3876    assertEqual(newLFrame.lView, null, "Expected clean LFrame");
3877    assertEqual(newLFrame.tView, null, "Expected clean LFrame");
3878    assertEqual(newLFrame.selectedIndex, -1, "Expected clean LFrame");
3879    assertEqual(newLFrame.elementDepthCount, 0, "Expected clean LFrame");
3880    assertEqual(newLFrame.currentDirectiveIndex, -1, "Expected clean LFrame");
3881    assertEqual(newLFrame.currentNamespace, null, "Expected clean LFrame");
3882    assertEqual(newLFrame.bindingRootIndex, -1, "Expected clean LFrame");
3883    assertEqual(newLFrame.currentQueryIndex, 0, "Expected clean LFrame");
3884  }
3885  const tView = newView[TVIEW];
3886  instructionState.lFrame = newLFrame;
3887  ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView);
3888  newLFrame.currentTNode = tView.firstChild;
3889  newLFrame.lView = newView;
3890  newLFrame.tView = tView;
3891  newLFrame.contextLView = newView;
3892  newLFrame.bindingIndex = tView.bindingStartIndex;
3893  newLFrame.inI18n = false;
3894}
3895function allocLFrame() {
3896  const currentLFrame = instructionState.lFrame;
3897  const childLFrame = currentLFrame === null ? null : currentLFrame.child;
3898  const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;
3899  return newLFrame;
3900}
3901function createLFrame(parent) {
3902  const lFrame = {
3903    currentTNode: null,
3904    isParent: true,
3905    lView: null,
3906    tView: null,
3907    selectedIndex: -1,
3908    contextLView: null,
3909    elementDepthCount: 0,
3910    currentNamespace: null,
3911    currentDirectiveIndex: -1,
3912    bindingRootIndex: -1,
3913    bindingIndex: -1,
3914    currentQueryIndex: 0,
3915    parent,
3916    child: null,
3917    inI18n: false
3918  };
3919  parent !== null && (parent.child = lFrame);
3920  return lFrame;
3921}
3922function leaveViewLight() {
3923  const oldLFrame = instructionState.lFrame;
3924  instructionState.lFrame = oldLFrame.parent;
3925  oldLFrame.currentTNode = null;
3926  oldLFrame.lView = null;
3927  return oldLFrame;
3928}
3929function leaveView() {
3930  const oldLFrame = leaveViewLight();
3931  oldLFrame.isParent = true;
3932  oldLFrame.tView = null;
3933  oldLFrame.selectedIndex = -1;
3934  oldLFrame.contextLView = null;
3935  oldLFrame.elementDepthCount = 0;
3936  oldLFrame.currentDirectiveIndex = -1;
3937  oldLFrame.currentNamespace = null;
3938  oldLFrame.bindingRootIndex = -1;
3939  oldLFrame.bindingIndex = -1;
3940  oldLFrame.currentQueryIndex = 0;
3941}
3942function nextContextImpl(level) {
3943  const contextLView = instructionState.lFrame.contextLView = walkUpViews(level, instructionState.lFrame.contextLView);
3944  return contextLView[CONTEXT];
3945}
3946function getSelectedIndex() {
3947  return instructionState.lFrame.selectedIndex;
3948}
3949function setSelectedIndex(index) {
3950  ngDevMode && index !== -1 && assertGreaterThanOrEqual(index, HEADER_OFFSET, "Index must be past HEADER_OFFSET (or -1).");
3951  ngDevMode && assertLessThan(index, instructionState.lFrame.lView.length, "Can't set index passed end of LView");
3952  instructionState.lFrame.selectedIndex = index;
3953}
3954function getSelectedTNode() {
3955  const lFrame = instructionState.lFrame;
3956  return getTNode(lFrame.tView, lFrame.selectedIndex);
3957}
3958function \u0275\u0275namespaceSVG() {
3959  instructionState.lFrame.currentNamespace = SVG_NAMESPACE;
3960}
3961function \u0275\u0275namespaceMathML() {
3962  instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE;
3963}
3964function \u0275\u0275namespaceHTML() {
3965  namespaceHTMLInternal();
3966}
3967function namespaceHTMLInternal() {
3968  instructionState.lFrame.currentNamespace = null;
3969}
3970function getNamespace() {
3971  return instructionState.lFrame.currentNamespace;
3972}
3973function wasLastNodeCreated() {
3974  return _wasLastNodeCreated;
3975}
3976function lastNodeWasCreated(flag) {
3977  _wasLastNodeCreated = flag;
3978}
3979function createInjector(defType, parent = null, additionalProviders = null, name) {
3980  const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);
3981  injector.resolveInjectorInitializers();
3982  return injector;
3983}
3984function createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name, scopes = /* @__PURE__ */ new Set()) {
3985  const providers = [additionalProviders || EMPTY_ARRAY, importProvidersFrom(defType)];
3986  name = name || (typeof defType === "object" ? void 0 : stringify(defType));
3987  return new R3Injector(providers, parent || getNullInjector(), name || null, scopes);
3988}
3989function injectDestroyRef() {
3990  return new NodeInjectorDestroyRef(getLView());
3991}
3992function isSignal2(value) {
3993  return typeof value === "function" && value[SIGNAL] !== void 0;
3994}
3995function signal(initialValue, options) {
3996  const [get, set, update] = createSignal(initialValue, options?.equal);
3997  const signalFn = get;
3998  const node = signalFn[SIGNAL];
3999  signalFn.set = set;
4000  signalFn.update = update;
4001  signalFn.asReadonly = signalAsReadonlyFn.bind(signalFn);
4002  if (ngDevMode) {
4003    signalFn.toString = () => `[Signal: ${signalFn()}]`;
4004    node.debugName = options?.debugName;
4005  }
4006  return signalFn;
4007}
4008function signalAsReadonlyFn() {
4009  const node = this[SIGNAL];
4010  if (node.readonlyFn === void 0) {
4011    const readonlyFn = () => this();
4012    readonlyFn[SIGNAL] = node;
4013    node.readonlyFn = readonlyFn;
4014  }
4015  return node.readonlyFn;
4016}
4017function isWritableSignal(value) {
4018  return isSignal2(value) && typeof value.set === "function";
4019}
4020function assertNotInReactiveContext(debugFn, extraContext) {
4021  if (getActiveConsumer() !== null) {
4022    throw new RuntimeError(-602, ngDevMode && `${debugFn.name}() cannot be called from within a reactive context.${extraContext ? ` ${extraContext}` : ""}`);
4023  }
4024}
4025function injectViewContext() {
4026  return new ViewContext(getLView(), getCurrentTNode());
4027}
4028function noop2(...args) {
4029}
4030var Version, VERSION, ERROR_DETAILS_PAGE_BASE_URL, XSS_SECURITY_URL, RuntimeError, _global, __forward_ref__, NG_PROV_DEF, NG_INJ_DEF, InjectionToken, _injectorProfilerContext, injectorProfilerCallbacks, NOOP_PROFILER_REMOVAL, NG_COMP_DEF, NG_DIR_DEF, NG_PIPE_DEF, NG_MOD_DEF, NG_FACTORY_DEF, NG_ELEMENT_ID, NG_ENV_ID, NG_RUNTIME_ERROR_CODE, NG_RUNTIME_ERROR_MESSAGE, NG_TOKEN_PATH, _injectImplementation, _THROW_IF_NOT_FOUND, THROW_IF_NOT_FOUND, DI_DECORATOR_FLAG, RetrievingInjector, EMPTY_OBJ, EMPTY_ARRAY, ENVIRONMENT_INITIALIZER, INJECTOR$1, INJECTOR_DEF_TYPES, NullInjector, USE_VALUE, INJECTOR_SCOPE, NOT_YET, CIRCULAR, NULL_INJECTOR, EnvironmentInjector, R3Injector, HOST, TVIEW, FLAGS, PARENT, NEXT, T_HOST, HYDRATION, CLEANUP, CONTEXT, INJECTOR, ENVIRONMENT, RENDERER, CHILD_HEAD, CHILD_TAIL, DECLARATION_VIEW, DECLARATION_COMPONENT_VIEW, DECLARATION_LCONTAINER, PREORDER_HOOK_FLAGS, QUERIES, ID, EMBEDDED_VIEW_INJECTOR, ON_DESTROY_HOOKS, EFFECTS_TO_SCHEDULE, EFFECTS, REACTIVE_TEMPLATE_CONSUMER, AFTER_RENDER_SEQUENCES_TO_ADD, ANIMATIONS, HEADER_OFFSET, TYPE, DEHYDRATED_VIEWS, NATIVE, VIEW_REFS, MOVED_VIEWS, CONTAINER_HEADER_OFFSET, SVG_NAMESPACE, MATH_ML_NAMESPACE, instructionState, CheckNoChangesMode, _checkNoChangesMode, _isRefreshingViews, leaveDI, _wasLastNodeCreated, Injector, DOCUMENT, DestroyRef, NodeInjectorDestroyRef, ErrorHandler, INTERNAL_APPLICATION_ERROR_HANDLER, errorHandlerEnvironmentInitializer, globalErrorListeners, ViewContext, ChangeDetectionScheduler, ZONELESS_ENABLED, PROVIDED_ZONELESS, ZONELESS_SCHEDULER_DISABLED, SCHEDULE_IN_ROOT_ZONE, PendingTasksInternal, PendingTasks, EffectScheduler, ZoneAwareEffectScheduler;
4031var init_root_effect_scheduler = __esm({
4032  "node_modules/@angular/core/fesm2022/root_effect_scheduler.mjs"() {
4033    "use strict";
4034    init_not_found();
4035    init_signal();
4036    init_esm();
4037    init_signals();
4038    init_di();
4039    Version = class {
4040      full;
4041      major;
4042      minor;
4043      patch;
4044      constructor(full) {
4045        this.full = full;
4046        const parts = full.split(".");
4047        this.major = parts[0];
4048        this.minor = parts[1];
4049        this.patch = parts.slice(2).join(".");
4050      }
4051    };
4052    VERSION = /* @__PURE__ */ new Version("20.3.15");
4053    ERROR_DETAILS_PAGE_BASE_URL = (() => {
4054      const versionSubDomain = VERSION.major !== "0" ? `v${VERSION.major}.` : "";
4055      return `https://${versionSubDomain}angular.dev/errors`;
4056    })();
4057    XSS_SECURITY_URL = "https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss";
4058    RuntimeError = class extends Error {
4059      code;
4060      constructor(code, message) {
4061        super(formatRuntimeError(code, message));
4062        this.code = code;
4063      }
4064    };
4065    _global = globalThis;
4066    __forward_ref__ = getClosureSafeProperty({ __forward_ref__: getClosureSafeProperty });
4067    NG_PROV_DEF = getClosureSafeProperty({ \u0275prov: getClosureSafeProperty });
4068    NG_INJ_DEF = getClosureSafeProperty({ \u0275inj: getClosureSafeProperty });
4069    InjectionToken = class {
4070      _desc;
4071      /** @internal */
4072      ngMetadataName = "InjectionToken";
4073      \u0275prov;
4074      /**
4075       * @param _desc   Description for the token,
4076       *                used only for debugging purposes,
4077       *                it should but does not need to be unique
4078       * @param options Options for the token's usage, as described above
4079       */
4080      constructor(_desc, options) {
4081        this._desc = _desc;
4082        this.\u0275prov = void 0;
4083        if (typeof options == "number") {
4084          (typeof ngDevMode === "undefined" || ngDevMode) && assertLessThan(options, 0, "Only negative numbers are supported here");
4085          this.__NG_ELEMENT_ID__ = options;
4086        } else if (options !== void 0) {
4087          this.\u0275prov = \u0275\u0275defineInjectable({
4088            token: this,
4089            providedIn: options.providedIn || "root",
4090            factory: options.factory
4091          });
4092        }
4093      }
4094      /**
4095       * @internal
4096       */
4097      get multi() {
4098        return this;
4099      }
4100      toString() {
4101        return `InjectionToken ${this._desc}`;
4102      }
4103    };
4104    injectorProfilerCallbacks = [];
4105    NOOP_PROFILER_REMOVAL = () => {
4106    };
4107    NG_COMP_DEF = getClosureSafeProperty({ \u0275cmp: getClosureSafeProperty });
4108    NG_DIR_DEF = getClosureSafeProperty({ \u0275dir: getClosureSafeProperty });
4109    NG_PIPE_DEF = getClosureSafeProperty({ \u0275pipe: getClosureSafeProperty });
4110    NG_MOD_DEF = getClosureSafeProperty({ \u0275mod: getClosureSafeProperty });
4111    NG_FACTORY_DEF = getClosureSafeProperty({ \u0275fac: getClosureSafeProperty });
4112    NG_ELEMENT_ID = getClosureSafeProperty({
4113      __NG_ELEMENT_ID__: getClosureSafeProperty
4114    });
4115    NG_ENV_ID = getClosureSafeProperty({ __NG_ENV_ID__: getClosureSafeProperty });
4116    NG_RUNTIME_ERROR_CODE = getClosureSafeProperty({ "ngErrorCode": getClosureSafeProperty });
4117    NG_RUNTIME_ERROR_MESSAGE = getClosureSafeProperty({ "ngErrorMessage": getClosureSafeProperty });
4118    NG_TOKEN_PATH = getClosureSafeProperty({ "ngTokenPath": getClosureSafeProperty });
4119    _THROW_IF_NOT_FOUND = {};
4120    THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;
4121    DI_DECORATOR_FLAG = "__NG_DI_FLAG__";
4122    RetrievingInjector = class {
4123      injector;
4124      constructor(injector) {
4125        this.injector = injector;
4126      }
4127      retrieve(token, options) {
4128        const flags = convertToBitFlags(options) || 0;
4129        try {
4130          return this.injector.get(
4131            token,
4132            // When a dependency is requested with an optional flag, DI returns null as the default value.
4133            flags & 8 ? null : THROW_IF_NOT_FOUND,
4134            flags
4135          );
4136        } catch (e) {
4137          if (isNotFound(e)) {
4138            return e;
4139          }
4140          throw e;
4141        }
4142      }
4143    };
4144    EMPTY_OBJ = {};
4145    EMPTY_ARRAY = [];
4146    if ((typeof ngDevMode === "undefined" || ngDevMode) && initNgDevMode()) {
4147      Object.freeze(EMPTY_OBJ);
4148      Object.freeze(EMPTY_ARRAY);
4149    }
4150    ENVIRONMENT_INITIALIZER = new InjectionToken(ngDevMode ? "ENVIRONMENT_INITIALIZER" : "");
4151    INJECTOR$1 = new InjectionToken(
4152      ngDevMode ? "INJECTOR" : "",
4153      // Disable tslint because this is const enum which gets inlined not top level prop access.
4154      // tslint:disable-next-line: no-toplevel-property-access
4155      -1
4156      /* InjectorMarkers.Injector */
4157    );
4158    INJECTOR_DEF_TYPES = new InjectionToken(ngDevMode ? "INJECTOR_DEF_TYPES" : "");
4159    NullInjector = class {
4160      get(token, notFoundValue = THROW_IF_NOT_FOUND) {
4161        if (notFoundValue === THROW_IF_NOT_FOUND) {
4162          const message = ngDevMode ? `No provider found for \`${stringify(token)}\`.` : "";
4163          const error = createRuntimeError(
4164            message,
4165            -201
4166            /* RuntimeErrorCode.PROVIDER_NOT_FOUND */
4167          );
4168          error.name = "\u0275NotFound";
4169          throw error;
4170        }
4171        return notFoundValue;
4172      }
4173    };
4174    USE_VALUE = getClosureSafeProperty({
4175      provide: String,
4176      useValue: getClosureSafeProperty
4177    });
4178    INJECTOR_SCOPE = new InjectionToken(ngDevMode ? "Set Injector scope." : "");
4179    NOT_YET = {};
4180    CIRCULAR = {};
4181    NULL_INJECTOR = void 0;
4182    EnvironmentInjector = class {
4183    };
4184    R3Injector = class extends EnvironmentInjector {
4185      parent;
4186      source;
4187      scopes;
4188      /**
4189       * Map of tokens to records which contain the instances of those tokens.
4190       * - `null` value implies that we don't have the record. Used by tree-shakable injectors
4191       * to prevent further searches.
4192       */
4193      records = /* @__PURE__ */ new Map();
4194      /**
4195       * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.
4196       */
4197      _ngOnDestroyHooks = /* @__PURE__ */ new Set();
4198      _onDestroyHooks = [];
4199      /**
4200       * Flag indicating that this injector was previously destroyed.
4201       */
4202      get destroyed() {
4203        return this._destroyed;
4204      }
4205      _destroyed = false;
4206      injectorDefTypes;
4207      constructor(providers, parent, source, scopes) {
4208        super();
4209        this.parent = parent;
4210        this.source = source;
4211        this.scopes = scopes;
4212        forEachSingleProvider(providers, (provider) => this.processProvider(provider));
4213        this.records.set(INJECTOR$1, makeRecord(void 0, this));
4214        if (scopes.has("environment")) {
4215          this.records.set(EnvironmentInjector, makeRecord(void 0, this));
4216        }
4217        const record = this.records.get(INJECTOR_SCOPE);
4218        if (record != null && typeof record.value === "string") {
4219          this.scopes.add(record.value);
4220        }
4221        this.injectorDefTypes = new Set(this.get(INJECTOR_DEF_TYPES, EMPTY_ARRAY, { self: true }));
4222      }
4223      retrieve(token, options) {
4224        const flags = convertToBitFlags(options) || 0;
4225        try {
4226          return this.get(
4227            token,
4228            // When a dependency is requested with an optional flag, DI returns null as the default value.
4229            THROW_IF_NOT_FOUND,
4230            flags
4231          );
4232        } catch (e) {
4233          if (isNotFound(e)) {
4234            return e;
4235          }
4236          throw e;
4237        }
4238      }
4239      /**
4240       * Destroy the injector and release references to every instance or provider associated with it.
4241       *
4242       * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a
4243       * hook was found.
4244       */
4245      destroy() {
4246        assertNotDestroyed(this);
4247        this._destroyed = true;
4248        const prevConsumer = setActiveConsumer(null);
4249        try {
4250          for (const service of this._ngOnDestroyHooks) {
4251            service.ngOnDestroy();
4252          }
4253          const onDestroyHooks = this._onDestroyHooks;
4254          this._onDestroyHooks = [];
4255          for (const hook of onDestroyHooks) {
4256            hook();
4257          }
4258        } finally {
4259          this.records.clear();
4260          this._ngOnDestroyHooks.clear();
4261          this.injectorDefTypes.clear();
4262          setActiveConsumer(prevConsumer);
4263        }
4264      }
4265      onDestroy(callback) {
4266        assertNotDestroyed(this);
4267        this._onDestroyHooks.push(callback);
4268        return () => this.removeOnDestroy(callback);
4269      }
4270      runInContext(fn) {
4271        assertNotDestroyed(this);
4272        const previousInjector = setCurrentInjector(this);
4273        const previousInjectImplementation = setInjectImplementation(void 0);
4274        let prevInjectContext;
4275        if (ngDevMode) {
4276          prevInjectContext = setInjectorProfilerContext({ injector: this, token: null });
4277        }
4278        try {
4279          return fn();
4280        } finally {
4281          setCurrentInjector(previousInjector);
4282          setInjectImplementation(previousInjectImplementation);
4283          ngDevMode && setInjectorProfilerContext(prevInjectContext);
4284        }
4285      }
4286      get(token, notFoundValue = THROW_IF_NOT_FOUND, options) {
4287        assertNotDestroyed(this);
4288        if (token.hasOwnProperty(NG_ENV_ID)) {
4289          return token[NG_ENV_ID](this);
4290        }
4291        const flags = convertToBitFlags(options);
4292        let prevInjectContext;
4293        if (ngDevMode) {
4294          prevInjectContext = setInjectorProfilerContext({ injector: this, token });
4295        }
4296        const previousInjector = setCurrentInjector(this);
4297        const previousInjectImplementation = setInjectImplementation(void 0);
4298        try {
4299          if (!(flags & 4)) {
4300            let record = this.records.get(token);
4301            if (record === void 0) {
4302              const def = couldBeInjectableType(token) && getInjectableDef(token);
4303              if (def && this.injectableDefInScope(def)) {
4304                if (ngDevMode) {
4305                  runInInjectorProfilerContext(this, token, () => {
4306                    emitProviderConfiguredEvent(token);
4307                  });
4308                }
4309                record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);
4310              } else {
4311                record = null;
4312              }
4313              this.records.set(token, record);
4314            }
4315            if (record != null) {
4316              return this.hydrate(token, record, flags);
4317            }
4318          }
4319          const nextInjector = !(flags & 2) ? this.parent : getNullInjector();
4320          notFoundValue = flags & 8 && notFoundValue === THROW_IF_NOT_FOUND ? null : notFoundValue;
4321          return nextInjector.get(token, notFoundValue);
4322        } catch (error) {
4323          const errorCode = getRuntimeErrorCode(error);
4324          if (errorCode === -200 || errorCode === -201) {
4325            if (ngDevMode) {
4326              prependTokenToDependencyPath(error, token);
4327              if (previousInjector) {
4328                throw error;
4329              } else {
4330                throw augmentRuntimeError(error, this.source);
4331              }
4332            } else {
4333              throw new RuntimeError(errorCode, null);
4334            }
4335          } else {
4336            throw error;
4337          }
4338        } finally {
4339          setInjectImplementation(previousInjectImplementation);
4340          setCurrentInjector(previousInjector);
4341          ngDevMode && setInjectorProfilerContext(prevInjectContext);
4342        }
4343      }
4344      /** @internal */
4345      resolveInjectorInitializers() {
4346        const prevConsumer = setActiveConsumer(null);
4347        const previousInjector = setCurrentInjector(this);
4348        const previousInjectImplementation = setInjectImplementation(void 0);
4349        let prevInjectContext;
4350        if (ngDevMode) {
4351          prevInjectContext = setInjectorProfilerContext({ injector: this, token: null });
4352        }
4353        try {
4354          const initializers = this.get(ENVIRONMENT_INITIALIZER, EMPTY_ARRAY, { self: true });
4355          if (ngDevMode && !Array.isArray(initializers)) {
4356            throw new RuntimeError(-209, `Unexpected type of the \`ENVIRONMENT_INITIALIZER\` token value (expected an array, but got ${typeof initializers}). Please check that the \`ENVIRONMENT_INITIALIZER\` token is configured as a \`multi: true\` provider.`);
4357          }
4358          for (const initializer of initializers) {
4359            initializer();
4360          }
4361        } finally {
4362          setCurrentInjector(previousInjector);
4363          setInjectImplementation(previousInjectImplementation);
4364          ngDevMode && setInjectorProfilerContext(prevInjectContext);
4365          setActiveConsumer(prevConsumer);
4366        }
4367      }
4368      toString() {
4369        const tokens = [];
4370        const records = this.records;
4371        for (const token of records.keys()) {
4372          tokens.push(stringify(token));
4373        }
4374        return `R3Injector[${tokens.join(", ")}]`;
4375      }
4376      /**
4377       * Process a `SingleProvider` and add it.
4378       */
4379      processProvider(provider) {
4380        provider = resolveForwardRef(provider);
4381        let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);
4382        const record = providerToRecord(provider);
4383        if (ngDevMode) {
4384          runInInjectorProfilerContext(this, token, () => {
4385            if (isValueProvider(provider)) {
4386              emitInjectorToCreateInstanceEvent(token);
4387              emitInstanceCreatedByInjectorEvent(provider.useValue);
4388            }
4389            emitProviderConfiguredEvent(provider);
4390          });
4391        }
4392        if (!isTypeProvider(provider) && provider.multi === true) {
4393          let multiRecord = this.records.get(token);
4394          if (multiRecord) {
4395            if (ngDevMode && multiRecord.multi === void 0) {
4396              throwMixedMultiProviderError();
4397            }
4398          } else {
4399            multiRecord = makeRecord(void 0, NOT_YET, true);
4400            multiRecord.factory = () => injectArgs(multiRecord.multi);
4401            this.records.set(token, multiRecord);
4402          }
4403          token = provider;
4404          multiRecord.multi.push(provider);
4405        } else {
4406          if (ngDevMode) {
4407            const existing = this.records.get(token);
4408            if (existing && existing.multi !== void 0) {
4409              throwMixedMultiProviderError();
4410            }
4411          }
4412        }
4413        this.records.set(token, record);
4414      }
4415      hydrate(token, record, flags) {
4416        const prevConsumer = setActiveConsumer(null);
4417        try {
4418          if (record.value === CIRCULAR) {
4419            throw cyclicDependencyError(stringify(token));
4420          } else if (record.value === NOT_YET) {
4421            record.value = CIRCULAR;
4422            if (ngDevMode) {
4423              runInInjectorProfilerContext(this, token, () => {
4424                emitInjectorToCreateInstanceEvent(token);
4425                record.value = record.factory(void 0, flags);
4426                emitInstanceCreatedByInjectorEvent(record.value);
4427              });
4428            } else {
4429              record.value = record.factory(void 0, flags);
4430            }
4431          }
4432          if (typeof record.value === "object" && record.value && hasOnDestroy(record.value)) {
4433            this._ngOnDestroyHooks.add(record.value);
4434          }
4435          return record.value;
4436        } finally {
4437          setActiveConsumer(prevConsumer);
4438        }
4439      }
4440      injectableDefInScope(def) {
4441        if (!def.providedIn) {
4442          return false;
4443        }
4444        const providedIn = resolveForwardRef(def.providedIn);
4445        if (typeof providedIn === "string") {
4446          return providedIn === "any" || this.scopes.has(providedIn);
4447        } else {
4448          return this.injectorDefTypes.has(providedIn);
4449        }
4450      }
4451      removeOnDestroy(callback) {
4452        const destroyCBIdx = this._onDestroyHooks.indexOf(callback);
4453        if (destroyCBIdx !== -1) {
4454          this._onDestroyHooks.splice(destroyCBIdx, 1);
4455        }
4456      }
4457    };
4458    HOST = 0;
4459    TVIEW = 1;
4460    FLAGS = 2;
4461    PARENT = 3;
4462    NEXT = 4;
4463    T_HOST = 5;
4464    HYDRATION = 6;
4465    CLEANUP = 7;
4466    CONTEXT = 8;
4467    INJECTOR = 9;
4468    ENVIRONMENT = 10;
4469    RENDERER = 11;
4470    CHILD_HEAD = 12;
4471    CHILD_TAIL = 13;
4472    DECLARATION_VIEW = 14;
4473    DECLARATION_COMPONENT_VIEW = 15;
4474    DECLARATION_LCONTAINER = 16;
4475    PREORDER_HOOK_FLAGS = 17;
4476    QUERIES = 18;
4477    ID = 19;
4478    EMBEDDED_VIEW_INJECTOR = 20;
4479    ON_DESTROY_HOOKS = 21;
4480    EFFECTS_TO_SCHEDULE = 22;
4481    EFFECTS = 23;
4482    REACTIVE_TEMPLATE_CONSUMER = 24;
4483    AFTER_RENDER_SEQUENCES_TO_ADD = 25;
4484    ANIMATIONS = 26;
4485    HEADER_OFFSET = 27;
4486    TYPE = 1;
4487    DEHYDRATED_VIEWS = 6;
4488    NATIVE = 7;
4489    VIEW_REFS = 8;
4490    MOVED_VIEWS = 9;
4491    CONTAINER_HEADER_OFFSET = 10;
4492    SVG_NAMESPACE = "svg";
4493    MATH_ML_NAMESPACE = "math";
4494    instructionState = {
4495      lFrame: createLFrame(null),
4496      bindingsEnabled: true,
4497      skipHydrationRootTNode: null
4498    };
4499    (function(CheckNoChangesMode2) {
4500      CheckNoChangesMode2[CheckNoChangesMode2["Off"] = 0] = "Off";
4501      CheckNoChangesMode2[CheckNoChangesMode2["Exhaustive"] = 1] = "Exhaustive";
4502      CheckNoChangesMode2[CheckNoChangesMode2["OnlyDirtyViews"] = 2] = "OnlyDirtyViews";
4503    })(CheckNoChangesMode || (CheckNoChangesMode = {}));
4504    _checkNoChangesMode = 0;
4505    _isRefreshingViews = false;
4506    leaveDI = leaveViewLight;
4507    _wasLastNodeCreated = true;
4508    Injector = class _Injector {
4509      static THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;
4510      static NULL = new NullInjector();
4511      static create(options, parent) {
4512        if (Array.isArray(options)) {
4513          return createInjector({ name: "" }, parent, options, "");
4514        } else {
4515          const name = options.name ?? "";
4516          return createInjector({ name }, options.parent, options.providers, name);
4517        }
4518      }
4519      /** @nocollapse */
4520      static \u0275prov = (
4521        /** @pureOrBreakMyCode */
4522        /* @__PURE__ */ \u0275\u0275defineInjectable({
4523          token: _Injector,
4524          providedIn: "any",
4525          factory: () => \u0275\u0275inject(INJECTOR$1)
4526        })
4527      );
4528      /**
4529       * @internal
4530       * @nocollapse
4531       */
4532      static __NG_ELEMENT_ID__ = -1;
4533    };
4534    DOCUMENT = new InjectionToken(ngDevMode ? "DocumentToken" : "");
4535    DestroyRef = class {
4536      /**
4537       * @internal
4538       * @nocollapse
4539       */
4540      static __NG_ELEMENT_ID__ = injectDestroyRef;
4541      /**
4542       * @internal
4543       * @nocollapse
4544       */
4545      static __NG_ENV_ID__ = (injector) => injector;
4546    };
4547    NodeInjectorDestroyRef = class extends DestroyRef {
4548      _lView;
4549      constructor(_lView) {
4550        super();
4551        this._lView = _lView;
4552      }
4553      get destroyed() {
4554        return isDestroyed(this._lView);
4555      }
4556      onDestroy(callback) {
4557        const lView = this._lView;
4558        storeLViewOnDestroy(lView, callback);
4559        return () => removeLViewOnDestroy(lView, callback);
4560      }
4561    };
4562    ErrorHandler = class {
4563      /**
4564       * @internal
4565       */
4566      _console = console;
4567      handleError(error) {
4568        this._console.error("ERROR", error);
4569      }
4570    };
4571    INTERNAL_APPLICATION_ERROR_HANDLER = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "internal error handler" : "", {
4572      providedIn: "root",
4573      factory: () => {
4574        const injector = inject2(EnvironmentInjector);
4575        let userErrorHandler;
4576        return (e) => {
4577          if (injector.destroyed && !userErrorHandler) {
4578            setTimeout(() => {
4579              throw e;
4580            });
4581          } else {
4582            userErrorHandler ??= injector.get(ErrorHandler);
4583            userErrorHandler.handleError(e);
4584          }
4585        };
4586      }
4587    });
4588    errorHandlerEnvironmentInitializer = {
4589      provide: ENVIRONMENT_INITIALIZER,
4590      useValue: () => void inject2(ErrorHandler),
4591      multi: true
4592    };
4593    globalErrorListeners = new InjectionToken(ngDevMode ? "GlobalErrorListeners" : "", {
4594      providedIn: "root",
4595      factory: () => {
4596        if (false) {
4597          return;
4598        }
4599        const window2 = inject2(DOCUMENT).defaultView;
4600        if (!window2) {
4601          return;
4602        }
4603        const errorHandler2 = inject2(INTERNAL_APPLICATION_ERROR_HANDLER);
4604        const rejectionListener = (e) => {
4605          errorHandler2(e.reason);
4606          e.preventDefault();
4607        };
4608        const errorListener = (e) => {
4609          if (e.error) {
4610            errorHandler2(e.error);
4611          } else {
4612            errorHandler2(new Error(ngDevMode ? `An ErrorEvent with no error occurred. See Error.cause for details: ${e.message}` : e.message, { cause: e }));
4613          }
4614          e.preventDefault();
4615        };
4616        const setupEventListeners = () => {
4617          window2.addEventListener("unhandledrejection", rejectionListener);
4618          window2.addEventListener("error", errorListener);
4619        };
4620        if (typeof Zone !== "undefined") {
4621          Zone.root.run(setupEventListeners);
4622        } else {
4623          setupEventListeners();
4624        }
4625        inject2(DestroyRef).onDestroy(() => {
4626          window2.removeEventListener("error", errorListener);
4627          window2.removeEventListener("unhandledrejection", rejectionListener);
4628        });
4629      }
4630    });
4631    ViewContext = class {
4632      view;
4633      node;
4634      constructor(view, node) {
4635        this.view = view;
4636        this.node = node;
4637      }
4638      /**
4639       * @internal
4640       * @nocollapse
4641       */
4642      static __NG_ELEMENT_ID__ = injectViewContext;
4643    };
4644    ChangeDetectionScheduler = class {
4645    };
4646    ZONELESS_ENABLED = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "Zoneless enabled" : "", { providedIn: "root", factory: () => false });
4647    PROVIDED_ZONELESS = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "Zoneless provided" : "", { providedIn: "root", factory: () => false });
4648    ZONELESS_SCHEDULER_DISABLED = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "scheduler disabled" : "");
4649    SCHEDULE_IN_ROOT_ZONE = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "run changes outside zone in root" : "");
4650    PendingTasksInternal = class _PendingTasksInternal {
4651      taskId = 0;
4652      pendingTasks = /* @__PURE__ */ new Set();
4653      destroyed = false;
4654      pendingTask = new BehaviorSubject(false);
4655      get hasPendingTasks() {
4656        return this.destroyed ? false : this.pendingTask.value;
4657      }
4658      /**
4659       * In case the service is about to be destroyed, return a self-completing observable.
4660       * Otherwise, return the observable that emits the current state of pending tasks.
4661       */
4662      get hasPendingTasksObservable() {
4663        if (this.destroyed) {
4664          return new Observable((subscriber) => {
4665            subscriber.next(false);
4666            subscriber.complete();
4667          });
4668        }
4669        return this.pendingTask;
4670      }
4671      add() {
4672        if (!this.hasPendingTasks && !this.destroyed) {
4673          this.pendingTask.next(true);
4674        }
4675        const taskId = this.taskId++;
4676        this.pendingTasks.add(taskId);
4677        return taskId;
4678      }
4679      has(taskId) {
4680        return this.pendingTasks.has(taskId);
4681      }
4682      remove(taskId) {
4683        this.pendingTasks.delete(taskId);
4684        if (this.pendingTasks.size === 0 && this.hasPendingTasks) {
4685          this.pendingTask.next(false);
4686        }
4687      }
4688      ngOnDestroy() {
4689        this.pendingTasks.clear();
4690        if (this.hasPendingTasks) {
4691          this.pendingTask.next(false);
4692        }
4693        this.destroyed = true;
4694        this.pendingTask.unsubscribe();
4695      }
4696      /** @nocollapse */
4697      static \u0275prov = (
4698        /** @pureOrBreakMyCode */
4699        /* @__PURE__ */ \u0275\u0275defineInjectable({
4700          token: _PendingTasksInternal,
4701          providedIn: "root",
4702          factory: () => new _PendingTasksInternal()
4703        })
4704      );
4705    };
4706    PendingTasks = class _PendingTasks {
4707      internalPendingTasks = inject2(PendingTasksInternal);
4708      scheduler = inject2(ChangeDetectionScheduler);
4709      errorHandler = inject2(INTERNAL_APPLICATION_ERROR_HANDLER);
4710      /**
4711       * Adds a new task that should block application's stability.
4712       * @returns A cleanup function that removes a task when called.
4713       */
4714      add() {
4715        const taskId = this.internalPendingTasks.add();
4716        return () => {
4717          if (!this.internalPendingTasks.has(taskId)) {
4718            return;
4719          }
4720          this.scheduler.notify(
4721            11
4722            /* NotificationSource.PendingTaskRemoved */
4723          );
4724          this.internalPendingTasks.remove(taskId);
4725        };
4726      }
4727      /**
4728       * Runs an asynchronous function and blocks the application's stability until the function completes.
4729       *
4730       * ```ts
4731       * pendingTasks.run(async () => {
4732       *   const userData = await fetch('/api/user');
4733       *   this.userData.set(userData);
4734       * });
4735       * ```
4736       *
4737       * @param fn The asynchronous function to execute
4738       * @developerPreview 19.0
4739       */
4740      run(fn) {
4741        const removeTask = this.add();
4742        fn().catch(this.errorHandler).finally(removeTask);
4743      }
4744      /** @nocollapse */
4745      static \u0275prov = (
4746        /** @pureOrBreakMyCode */
4747        /* @__PURE__ */ \u0275\u0275defineInjectable({
4748          token: _PendingTasks,
4749          providedIn: "root",
4750          factory: () => new _PendingTasks()
4751        })
4752      );
4753    };
4754    EffectScheduler = class _EffectScheduler {
4755      /** @nocollapse */
4756      static \u0275prov = (
4757        /** @pureOrBreakMyCode */
4758        /* @__PURE__ */ \u0275\u0275defineInjectable({
4759          token: _EffectScheduler,
4760          providedIn: "root",
4761          factory: () => new ZoneAwareEffectScheduler()
4762        })
4763      );
4764    };
4765    ZoneAwareEffectScheduler = class {
4766      dirtyEffectCount = 0;
4767      queues = /* @__PURE__ */ new Map();
4768      add(handle) {
4769        this.enqueue(handle);
4770        this.schedule(handle);
4771      }
4772      schedule(handle) {
4773        if (!handle.dirty) {
4774          return;
4775        }
4776        this.dirtyEffectCount++;
4777      }
4778      remove(handle) {
4779        const zone = handle.zone;
4780        const queue = this.queues.get(zone);
4781        if (!queue.has(handle)) {
4782          return;
4783        }
4784        queue.delete(handle);
4785        if (handle.dirty) {
4786          this.dirtyEffectCount--;
4787        }
4788      }
4789      enqueue(handle) {
4790        const zone = handle.zone;
4791        if (!this.queues.has(zone)) {
4792          this.queues.set(zone, /* @__PURE__ */ new Set());
4793        }
4794        const queue = this.queues.get(zone);
4795        if (queue.has(handle)) {
4796          return;
4797        }
4798        queue.add(handle);
4799      }
4800      /**
4801       * Run all scheduled effects.
4802       *
4803       * Execution order of effects within the same zone is guaranteed to be FIFO, but there is no
4804       * ordering guarantee between effects scheduled in different zones.
4805       */
4806      flush() {
4807        while (this.dirtyEffectCount > 0) {
4808          let ranOneEffect = false;
4809          for (const [zone, queue] of this.queues) {
4810            if (zone === null) {
4811              ranOneEffect ||= this.flushQueue(queue);
4812            } else {
4813              ranOneEffect ||= zone.run(() => this.flushQueue(queue));
4814            }
4815          }
4816          if (!ranOneEffect) {
4817            this.dirtyEffectCount = 0;
4818          }
4819        }
4820      }
4821      flushQueue(queue) {
4822        let ranOneEffect = false;
4823        for (const handle of queue) {
4824          if (!handle.dirty) {
4825            continue;
4826          }
4827          this.dirtyEffectCount--;
4828          ranOneEffect = true;
4829          handle.run();
4830        }
4831        return ranOneEffect;
4832      }
4833    };
4834  }
4835});
4836
vendor: 259 bytes, lines 4837-4848
4837// node_modules/rxjs/dist/esm/operators/index.js
4838var init_operators = __esm({
4839  "node_modules/rxjs/dist/esm/operators/index.js"() {
4840    "use strict";
4841    init_concatMap();
4842    init_filter();
4843    init_finalize();
4844    init_map();
4845    init_switchMap();
4846  }
4847});
4848
vendor: 690,735 bytes, lines 4849-22574
4849// node_modules/@angular/core/fesm2022/debug_node.mjs
4850function noSideEffects(fn) {
4851  return { toString: fn }.toString();
4852}
4853function makeDecorator(name, props, parentClass, additionalProcessing, typeFn) {
4854  return noSideEffects(() => {
4855    const metaCtor = makeMetadataCtor(props);
4856    function DecoratorFactory(...args) {
4857      if (this instanceof DecoratorFactory) {
4858        metaCtor.call(this, ...args);
4859        return this;
4860      }
4861      const annotationInstance = new DecoratorFactory(...args);
4862      return function TypeDecorator(cls) {
4863        if (typeFn)
4864          typeFn(cls, ...args);
4865        const annotations = cls.hasOwnProperty(ANNOTATIONS) ? cls[ANNOTATIONS] : Object.defineProperty(cls, ANNOTATIONS, { value: [] })[ANNOTATIONS];
4866        annotations.push(annotationInstance);
4867        return cls;
4868      };
4869    }
4870    if (parentClass) {
4871      DecoratorFactory.prototype = Object.create(parentClass.prototype);
4872    }
4873    DecoratorFactory.prototype.ngMetadataName = name;
4874    DecoratorFactory.annotationCls = DecoratorFactory;
4875    return DecoratorFactory;
4876  });
4877}
4878function makeMetadataCtor(props) {
4879  return function ctor(...args) {
4880    if (props) {
4881      const values = props(...args);
4882      for (const propName in values) {
4883        this[propName] = values[propName];
4884      }
4885    }
4886  };
4887}
4888function makeParamDecorator(name, props, parentClass) {
4889  return noSideEffects(() => {
4890    const metaCtor = makeMetadataCtor(props);
4891    function ParamDecoratorFactory(...args) {
4892      if (this instanceof ParamDecoratorFactory) {
4893        metaCtor.apply(this, args);
4894        return this;
4895      }
4896      const annotationInstance = new ParamDecoratorFactory(...args);
4897      ParamDecorator.annotation = annotationInstance;
4898      return ParamDecorator;
4899      function ParamDecorator(cls, unusedKey, index) {
4900        const parameters = cls.hasOwnProperty(PARAMETERS) ? cls[PARAMETERS] : Object.defineProperty(cls, PARAMETERS, { value: [] })[PARAMETERS];
4901        while (parameters.length <= index) {
4902          parameters.push(null);
4903        }
4904        (parameters[index] = parameters[index] || []).push(annotationInstance);
4905        return cls;
4906      }
4907    }
4908    ParamDecoratorFactory.prototype.ngMetadataName = name;
4909    ParamDecoratorFactory.annotationCls = ParamDecoratorFactory;
4910    return ParamDecoratorFactory;
4911  });
4912}
4913function makePropDecorator(name, props, parentClass, additionalProcessing) {
4914  return noSideEffects(() => {
4915    const metaCtor = makeMetadataCtor(props);
4916    function PropDecoratorFactory(...args) {
4917      if (this instanceof PropDecoratorFactory) {
4918        metaCtor.apply(this, args);
4919        return this;
4920      }
4921      const decoratorInstance = new PropDecoratorFactory(...args);
4922      function PropDecorator(target, name2) {
4923        if (target === void 0) {
4924          throw new Error("Standard Angular field decorators are not supported in JIT mode.");
4925        }
4926        const constructor = target.constructor;
4927        const meta = constructor.hasOwnProperty(PROP_METADATA) ? constructor[PROP_METADATA] : Object.defineProperty(constructor, PROP_METADATA, { value: {} })[PROP_METADATA];
4928        meta[name2] = meta.hasOwnProperty(name2) && meta[name2] || [];
4929        meta[name2].unshift(decoratorInstance);
4930      }
4931      return PropDecorator;
4932    }
4933    if (parentClass) {
4934      PropDecoratorFactory.prototype = Object.create(parentClass.prototype);
4935    }
4936    PropDecoratorFactory.prototype.ngMetadataName = name;
4937    PropDecoratorFactory.annotationCls = PropDecoratorFactory;
4938    return PropDecoratorFactory;
4939  });
4940}
4941function getCompilerFacade(request) {
4942  const globalNg = _global["ng"];
4943  if (globalNg && globalNg.\u0275compilerFacade) {
4944    return globalNg.\u0275compilerFacade;
4945  }
4946  if (typeof ngDevMode === "undefined" || ngDevMode) {
4947    console.error(`JIT compilation failed for ${request.kind}`, request.type);
4948    let message = `The ${request.kind} '${request.type.name}' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.
4949
4950`;
4951    if (request.usage === 1) {
4952      message += `The ${request.kind} is part of a library that has been partially compiled.
4953`;
4954      message += `However, the Angular Linker has not processed the library such that JIT compilation is used as fallback.
4955`;
4956      message += "\n";
4957      message += `Ideally, the library is processed using the Angular Linker to become fully AOT compiled.
4958`;
4959    } else {
4960      message += `JIT compilation is discouraged for production use-cases! Consider using AOT mode instead.
4961`;
4962    }
4963    message += `Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',
4964`;
4965    message += `or manually provide the compiler with 'import "@angular/compiler";' before bootstrapping.`;
4966    throw new Error(message);
4967  } else {
4968    throw new Error("JIT compiler unavailable");
4969  }
4970}
4971function isType(v) {
4972  return typeof v === "function";
4973}
4974function isDelegateCtor(typeStr) {
4975  return ES5_DELEGATE_CTOR.test(typeStr) || ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) || ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr);
4976}
4977function convertTsickleDecoratorIntoMetadata(decoratorInvocations) {
4978  if (!decoratorInvocations) {
4979    return [];
4980  }
4981  return decoratorInvocations.map((decoratorInvocation) => {
4982    const decoratorType = decoratorInvocation.type;
4983    const annotationCls = decoratorType.annotationCls;
4984    const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];
4985    return new annotationCls(...annotationArgs);
4986  });
4987}
4988function getParentCtor(ctor) {
4989  const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;
4990  const parentCtor = parentProto ? parentProto.constructor : null;
4991  return parentCtor || Object;
4992}
4993function applyValueToInputField(instance, inputSignalNode, privateName, value) {
4994  if (inputSignalNode !== null) {
4995    inputSignalNode.applyValueToInputSignal(inputSignalNode, value);
4996  } else {
4997    instance[privateName] = value;
4998  }
4999}
5000function NgOnChangesFeatureImpl(definition) {
5001  if (definition.type.prototype.ngOnChanges) {
5002    definition.setInput = ngOnChangesSetInput;
5003  }
5004  return rememberChangeHistoryAndInvokeOnChangesHook;
5005}
5006function rememberChangeHistoryAndInvokeOnChangesHook() {
5007  const simpleChangesStore = getSimpleChangesStore(this);
5008  const current = simpleChangesStore?.current;
5009  if (current) {
5010    const previous = simpleChangesStore.previous;
5011    if (previous === EMPTY_OBJ) {
5012      simpleChangesStore.previous = current;
5013    } else {
5014      for (let key in current) {
5015        previous[key] = current[key];
5016      }
5017    }
5018    simpleChangesStore.current = null;
5019    this.ngOnChanges(current);
5020  }
5021}
5022function ngOnChangesSetInput(instance, inputSignalNode, value, publicName, privateName) {
5023  const declaredName = this.declaredInputs[publicName];
5024  ngDevMode && assertString(declaredName, "Name of input in ngOnChanges has to be a string");
5025  const simpleChangesStore = getSimpleChangesStore(instance) || setSimpleChangesStore(instance, { previous: EMPTY_OBJ, current: null });
5026  const current = simpleChangesStore.current || (simpleChangesStore.current = {});
5027  const previous = simpleChangesStore.previous;
5028  const previousChange = previous[declaredName];
5029  current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);
5030  applyValueToInputField(instance, inputSignalNode, privateName, value);
5031}
5032function getSimpleChangesStore(instance) {
5033  return instance[SIMPLE_CHANGES_STORE] || null;
5034}
5035function setSimpleChangesStore(instance, store2) {
5036  return instance[SIMPLE_CHANGES_STORE] = store2;
5037}
5038function removeProfiler2(profiler2) {
5039  const profilerIdx = profilerCallbacks.indexOf(profiler2);
5040  if (profilerIdx !== -1) {
5041    profilerCallbacks.splice(profilerIdx, 1);
5042  }
5043}
5044function setProfiler(profiler2) {
5045  if (profiler2 !== null) {
5046    if (!profilerCallbacks.includes(profiler2)) {
5047      profilerCallbacks.push(profiler2);
5048    }
5049    return () => removeProfiler2(profiler2);
5050  } else {
5051    profilerCallbacks.length = 0;
5052    return NOOP_PROFILER_REMOVAL2;
5053  }
5054}
5055function registerPreOrderHooks(directiveIndex, directiveDef, tView) {
5056  ngDevMode && assertFirstCreatePass(tView);
5057  const { ngOnChanges, ngOnInit, ngDoCheck } = directiveDef.type.prototype;
5058  if (ngOnChanges) {
5059    const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);
5060    (tView.preOrderHooks ??= []).push(directiveIndex, wrappedOnChanges);
5061    (tView.preOrderCheckHooks ??= []).push(directiveIndex, wrappedOnChanges);
5062  }
5063  if (ngOnInit) {
5064    (tView.preOrderHooks ??= []).push(0 - directiveIndex, ngOnInit);
5065  }
5066  if (ngDoCheck) {
5067    (tView.preOrderHooks ??= []).push(directiveIndex, ngDoCheck);
5068    (tView.preOrderCheckHooks ??= []).push(directiveIndex, ngDoCheck);
5069  }
5070}
5071function registerPostOrderHooks(tView, tNode) {
5072  ngDevMode && assertFirstCreatePass(tView);
5073  for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {
5074    const directiveDef = tView.data[i];
5075    ngDevMode && assertDefined(directiveDef, "Expecting DirectiveDef");
5076    const lifecycleHooks = directiveDef.type.prototype;
5077    const { ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, ngOnDestroy } = lifecycleHooks;
5078    if (ngAfterContentInit) {
5079      (tView.contentHooks ??= []).push(-i, ngAfterContentInit);
5080    }
5081    if (ngAfterContentChecked) {
5082      (tView.contentHooks ??= []).push(i, ngAfterContentChecked);
5083      (tView.contentCheckHooks ??= []).push(i, ngAfterContentChecked);
5084    }
5085    if (ngAfterViewInit) {
5086      (tView.viewHooks ??= []).push(-i, ngAfterViewInit);
5087    }
5088    if (ngAfterViewChecked) {
5089      (tView.viewHooks ??= []).push(i, ngAfterViewChecked);
5090      (tView.viewCheckHooks ??= []).push(i, ngAfterViewChecked);
5091    }
5092    if (ngOnDestroy != null) {
5093      (tView.destroyHooks ??= []).push(i, ngOnDestroy);
5094    }
5095  }
5096}
5097function executeCheckHooks(lView, hooks, nodeIndex) {
5098  callHooks(lView, hooks, 3, nodeIndex);
5099}
5100function executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {
5101  ngDevMode && assertNotEqual(initPhase, 3, "Init pre-order hooks should not be called more than once");
5102  if ((lView[FLAGS] & 3) === initPhase) {
5103    callHooks(lView, hooks, initPhase, nodeIndex);
5104  }
5105}
5106function incrementInitPhaseFlags(lView, initPhase) {
5107  ngDevMode && assertNotEqual(initPhase, 3, "Init hooks phase should not be incremented after all init hooks have been run.");
5108  let flags = lView[FLAGS];
5109  if ((flags & 3) === initPhase) {
5110    flags &= 16383;
5111    flags += 1;
5112    lView[FLAGS] = flags;
5113  }
5114}
5115function callHooks(currentView, arr, initPhase, currentNodeIndex) {
5116  ngDevMode && assertEqual(isInCheckNoChangesMode(), false, "Hooks should never be run when in check no changes mode.");
5117  const startIndex = currentNodeIndex !== void 0 ? currentView[PREORDER_HOOK_FLAGS] & 65535 : 0;
5118  const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;
5119  const max = arr.length - 1;
5120  let lastNodeIndexFound = 0;
5121  for (let i = startIndex; i < max; i++) {
5122    const hook = arr[i + 1];
5123    if (typeof hook === "number") {
5124      lastNodeIndexFound = arr[i];
5125      if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {
5126        break;
5127      }
5128    } else {
5129      const isInitHook = arr[i] < 0;
5130      if (isInitHook) {
5131        currentView[PREORDER_HOOK_FLAGS] += 65536;
5132      }
5133      if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {
5134        callHook(currentView, initPhase, arr, i);
5135        currentView[PREORDER_HOOK_FLAGS] = (currentView[PREORDER_HOOK_FLAGS] & 4294901760) + i + 2;
5136      }
5137      i++;
5138    }
5139  }
5140}
5141function callHookInternal(directive, hook) {
5142  profiler(4, directive, hook);
5143  const prevConsumer = setActiveConsumer(null);
5144  try {
5145    hook.call(directive);
5146  } finally {
5147    setActiveConsumer(prevConsumer);
5148    profiler(5, directive, hook);
5149  }
5150}
5151function callHook(currentView, initPhase, arr, i) {
5152  const isInitHook = arr[i] < 0;
5153  const hook = arr[i + 1];
5154  const directiveIndex = isInitHook ? -arr[i] : arr[i];
5155  const directive = currentView[directiveIndex];
5156  if (isInitHook) {
5157    const indexWithintInitPhase = currentView[FLAGS] >> 14;
5158    if (indexWithintInitPhase < currentView[PREORDER_HOOK_FLAGS] >> 16 && (currentView[FLAGS] & 3) === initPhase) {
5159      currentView[FLAGS] += 16384;
5160      callHookInternal(directive, hook);
5161    }
5162  } else {
5163    callHookInternal(directive, hook);
5164  }
5165}
5166function toTNodeTypeAsString(tNodeType) {
5167  let text = "";
5168  tNodeType & 1 && (text += "|Text");
5169  tNodeType & 2 && (text += "|Element");
5170  tNodeType & 4 && (text += "|Container");
5171  tNodeType & 8 && (text += "|ElementContainer");
5172  tNodeType & 16 && (text += "|Projection");
5173  tNodeType & 32 && (text += "|IcuContainer");
5174  tNodeType & 64 && (text += "|Placeholder");
5175  tNodeType & 128 && (text += "|LetDeclaration");
5176  return text.length > 0 ? text.substring(1) : text;
5177}
5178function isTNodeShape(value) {
5179  return value != null && typeof value === "object" && (value.insertBeforeIndex === null || typeof value.insertBeforeIndex === "number" || Array.isArray(value.insertBeforeIndex));
5180}
5181function hasClassInput(tNode) {
5182  return (tNode.flags & 8) !== 0;
5183}
5184function hasStyleInput(tNode) {
5185  return (tNode.flags & 16) !== 0;
5186}
5187function assertTNodeType(tNode, expectedTypes, message) {
5188  assertDefined(tNode, "should be called with a TNode");
5189  if ((tNode.type & expectedTypes) === 0) {
5190    throwError(message || `Expected [${toTNodeTypeAsString(expectedTypes)}] but got ${toTNodeTypeAsString(tNode.type)}.`);
5191  }
5192}
5193function assertPureTNodeType(type) {
5194  if (!(type === 2 || type === 1 || type === 4 || type === 8 || type === 32 || type === 16 || type === 64 || type === 128)) {
5195    throwError(`Expected TNodeType to have only a single type selected, but got ${toTNodeTypeAsString(type)}.`);
5196  }
5197}
5198function setUpAttributes(renderer, native, attrs) {
5199  let i = 0;
5200  while (i < attrs.length) {
5201    const value = attrs[i];
5202    if (typeof value === "number") {
5203      if (value !== 0) {
5204        break;
5205      }
5206      i++;
5207      const namespaceURI = attrs[i++];
5208      const attrName = attrs[i++];
5209      const attrVal = attrs[i++];
5210      renderer.setAttribute(native, attrName, attrVal, namespaceURI);
5211    } else {
5212      const attrName = value;
5213      const attrVal = attrs[++i];
5214      if (isAnimationProp(attrName)) {
5215        renderer.setProperty(native, attrName, attrVal);
5216      } else {
5217        renderer.setAttribute(native, attrName, attrVal);
5218      }
5219      i++;
5220    }
5221  }
5222  return i;
5223}
5224function isNameOnlyAttributeMarker(marker) {
5225  return marker === 3 || marker === 4 || marker === 6;
5226}
5227function isAnimationProp(name) {
5228  return name.charCodeAt(0) === 64;
5229}
5230function mergeHostAttrs(dst, src) {
5231  if (src === null || src.length === 0) ;
5232  else if (dst === null || dst.length === 0) {
5233    dst = src.slice();
5234  } else {
5235    let srcMarker = -1;
5236    for (let i = 0; i < src.length; i++) {
5237      const item = src[i];
5238      if (typeof item === "number") {
5239        srcMarker = item;
5240      } else {
5241        if (srcMarker === 0) ;
5242        else if (srcMarker === -1 || srcMarker === 2) {
5243          mergeHostAttribute(dst, srcMarker, item, null, src[++i]);
5244        } else {
5245          mergeHostAttribute(dst, srcMarker, item, null, null);
5246        }
5247      }
5248    }
5249  }
5250  return dst;
5251}
5252function mergeHostAttribute(dst, marker, key1, key2, value) {
5253  let i = 0;
5254  let markerInsertPosition = dst.length;
5255  if (marker === -1) {
5256    markerInsertPosition = -1;
5257  } else {
5258    while (i < dst.length) {
5259      const dstValue = dst[i++];
5260      if (typeof dstValue === "number") {
5261        if (dstValue === marker) {
5262          markerInsertPosition = -1;
5263          break;
5264        } else if (dstValue > marker) {
5265          markerInsertPosition = i - 1;
5266          break;
5267        }
5268      }
5269    }
5270  }
5271  while (i < dst.length) {
5272    const item = dst[i];
5273    if (typeof item === "number") {
5274      break;
5275    } else if (item === key1) {
5276      {
5277        if (value !== null) {
5278          dst[i + 1] = value;
5279        }
5280        return;
5281      }
5282    }
5283    i++;
5284    if (value !== null)
5285      i++;
5286  }
5287  if (markerInsertPosition !== -1) {
5288    dst.splice(markerInsertPosition, 0, marker);
5289    i = markerInsertPosition + 1;
5290  }
5291  dst.splice(i++, 0, key1);
5292  if (value !== null) {
5293    dst.splice(i++, 0, value);
5294  }
5295}
5296function hasParentInjector(parentLocation) {
5297  return parentLocation !== NO_PARENT_INJECTOR;
5298}
5299function getParentInjectorIndex(parentLocation) {
5300  if (ngDevMode) {
5301    assertNumber(parentLocation, "Number expected");
5302    assertNotEqual(parentLocation, -1, "Not a valid state.");
5303    const parentInjectorIndex = parentLocation & 32767;
5304    assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, "Parent injector must be pointing past HEADER_OFFSET.");
5305  }
5306  return parentLocation & 32767;
5307}
5308function getParentInjectorViewOffset(parentLocation) {
5309  return parentLocation >> 16;
5310}
5311function getParentInjectorView(location2, startView) {
5312  let viewOffset = getParentInjectorViewOffset(location2);
5313  let parentView = startView;
5314  while (viewOffset > 0) {
5315    parentView = parentView[DECLARATION_VIEW];
5316    viewOffset--;
5317  }
5318  return parentView;
5319}
5320function setIncludeViewProviders(v) {
5321  const oldValue = includeViewProviders;
5322  includeViewProviders = v;
5323  return oldValue;
5324}
5325function bloomAdd(injectorIndex, tView, type) {
5326  ngDevMode && assertEqual(tView.firstCreatePass, true, "expected firstCreatePass to be true");
5327  let id;
5328  if (typeof type === "string") {
5329    id = type.charCodeAt(0) || 0;
5330  } else if (type.hasOwnProperty(NG_ELEMENT_ID)) {
5331    id = type[NG_ELEMENT_ID];
5332  }
5333  if (id == null) {
5334    id = type[NG_ELEMENT_ID] = nextNgElementId++;
5335  }
5336  const bloomHash = id & BLOOM_MASK;
5337  const mask = 1 << bloomHash;
5338  tView.data[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask;
5339}
5340function getOrCreateNodeInjectorForNode(tNode, lView) {
5341  const existingInjectorIndex = getInjectorIndex(tNode, lView);
5342  if (existingInjectorIndex !== -1) {
5343    return existingInjectorIndex;
5344  }
5345  const tView = lView[TVIEW];
5346  if (tView.firstCreatePass) {
5347    tNode.injectorIndex = lView.length;
5348    insertBloom(tView.data, tNode);
5349    insertBloom(lView, null);
5350    insertBloom(tView.blueprint, null);
5351  }
5352  const parentLoc = getParentInjectorLocation(tNode, lView);
5353  const injectorIndex = tNode.injectorIndex;
5354  if (hasParentInjector(parentLoc)) {
5355    const parentIndex = getParentInjectorIndex(parentLoc);
5356    const parentLView = getParentInjectorView(parentLoc, lView);
5357    const parentData = parentLView[TVIEW].data;
5358    for (let i = 0; i < 8; i++) {
5359      lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];
5360    }
5361  }
5362  lView[
5363    injectorIndex + 8
5364    /* NodeInjectorOffset.PARENT */
5365  ] = parentLoc;
5366  return injectorIndex;
5367}
5368function insertBloom(arr, footer) {
5369  arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);
5370}
5371function getInjectorIndex(tNode, lView) {
5372  if (tNode.injectorIndex === -1 || // If the injector index is the same as its parent's injector index, then the index has been
5373  // copied down from the parent node. No injector has been created yet on this node.
5374  tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex || // After the first template pass, the injector index might exist but the parent values
5375  // might not have been calculated yet for this instance
5376  lView[
5377    tNode.injectorIndex + 8
5378    /* NodeInjectorOffset.PARENT */
5379  ] === null) {
5380    return -1;
5381  } else {
5382    ngDevMode && assertIndexInRange(lView, tNode.injectorIndex);
5383    return tNode.injectorIndex;
5384  }
5385}
5386function getParentInjectorLocation(tNode, lView) {
5387  if (tNode.parent && tNode.parent.injectorIndex !== -1) {
5388    return tNode.parent.injectorIndex;
5389  }
5390  let declarationViewOffset = 0;
5391  let parentTNode = null;
5392  let lViewCursor = lView;
5393  while (lViewCursor !== null) {
5394    parentTNode = getTNodeFromLView(lViewCursor);
5395    if (parentTNode === null) {
5396      return NO_PARENT_INJECTOR;
5397    }
5398    ngDevMode && parentTNode && assertTNodeForLView(parentTNode, lViewCursor[DECLARATION_VIEW]);
5399    declarationViewOffset++;
5400    lViewCursor = lViewCursor[DECLARATION_VIEW];
5401    if (parentTNode.injectorIndex !== -1) {
5402      return parentTNode.injectorIndex | declarationViewOffset << 16;
5403    }
5404  }
5405  return NO_PARENT_INJECTOR;
5406}
5407function diPublicInInjector(injectorIndex, tView, token) {
5408  bloomAdd(injectorIndex, tView, token);
5409}
5410function injectAttributeImpl(tNode, attrNameToInject) {
5411  ngDevMode && assertTNodeType(
5412    tNode,
5413    12 | 3
5414    /* TNodeType.AnyRNode */
5415  );
5416  ngDevMode && assertDefined(tNode, "expecting tNode");
5417  if (attrNameToInject === "class") {
5418    return tNode.classes;
5419  }
5420  if (attrNameToInject === "style") {
5421    return tNode.styles;
5422  }
5423  const attrs = tNode.attrs;
5424  if (attrs) {
5425    const attrsLength = attrs.length;
5426    let i = 0;
5427    while (i < attrsLength) {
5428      const value = attrs[i];
5429      if (isNameOnlyAttributeMarker(value))
5430        break;
5431      if (value === 0) {
5432        i = i + 2;
5433      } else if (typeof value === "number") {
5434        i++;
5435        while (i < attrsLength && typeof attrs[i] === "string") {
5436          i++;
5437        }
5438      } else if (value === attrNameToInject) {
5439        return attrs[i + 1];
5440      } else {
5441        i = i + 2;
5442      }
5443    }
5444  }
5445  return null;
5446}
5447function notFoundValueOrThrow(notFoundValue, token, flags) {
5448  if (flags & 8 || notFoundValue !== void 0) {
5449    return notFoundValue;
5450  } else {
5451    throwProviderNotFoundError(token, "NodeInjector");
5452  }
5453}
5454function lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {
5455  if (flags & 8 && notFoundValue === void 0) {
5456    notFoundValue = null;
5457  }
5458  if ((flags & (2 | 1)) === 0) {
5459    const moduleInjector = lView[INJECTOR];
5460    const previousInjectImplementation = setInjectImplementation(void 0);
5461    try {
5462      if (moduleInjector) {
5463        return moduleInjector.get(
5464          token,
5465          notFoundValue,
5466          flags & 8
5467          /* InternalInjectFlags.Optional */
5468        );
5469      } else {
5470        return injectRootLimpMode(
5471          token,
5472          notFoundValue,
5473          flags & 8
5474          /* InternalInjectFlags.Optional */
5475        );
5476      }
5477    } finally {
5478      setInjectImplementation(previousInjectImplementation);
5479    }
5480  }
5481  return notFoundValueOrThrow(notFoundValue, token, flags);
5482}
5483function getOrCreateInjectable(tNode, lView, token, flags = 0, notFoundValue) {
5484  if (tNode !== null) {
5485    if (lView[FLAGS] & 2048 && // The token must be present on the current node injector when the `Self`
5486    // flag is set, so the lookup on embedded view injector(s) can be skipped.
5487    !(flags & 2)) {
5488      const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, NOT_FOUND2);
5489      if (embeddedInjectorValue !== NOT_FOUND2) {
5490        return embeddedInjectorValue;
5491      }
5492    }
5493    const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND2);
5494    if (value !== NOT_FOUND2) {
5495      return value;
5496    }
5497  }
5498  return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
5499}
5500function lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue) {
5501  const bloomHash = bloomHashBitOrFactory(token);
5502  if (typeof bloomHash === "function") {
5503    if (!enterDI(lView, tNode, flags)) {
5504      return flags & 1 ? notFoundValueOrThrow(notFoundValue, token, flags) : lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
5505    }
5506    try {
5507      let value;
5508      if (ngDevMode) {
5509        runInInjectorProfilerContext(new NodeInjector(getCurrentTNode(), getLView()), token, () => {
5510          emitInjectorToCreateInstanceEvent(token);
5511          value = bloomHash(flags);
5512          emitInstanceCreatedByInjectorEvent(value);
5513        });
5514      } else {
5515        value = bloomHash(flags);
5516      }
5517      if (value == null && !(flags & 8)) {
5518        throwProviderNotFoundError(token);
5519      } else {
5520        return value;
5521      }
5522    } finally {
5523      leaveDI();
5524    }
5525  } else if (typeof bloomHash === "number") {
5526    let previousTView = null;
5527    let injectorIndex = getInjectorIndex(tNode, lView);
5528    let parentLocation = NO_PARENT_INJECTOR;
5529    let hostTElementNode = flags & 1 ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;
5530    if (injectorIndex === -1 || flags & 4) {
5531      parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) : lView[
5532        injectorIndex + 8
5533        /* NodeInjectorOffset.PARENT */
5534      ];
5535      if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {
5536        injectorIndex = -1;
5537      } else {
5538        previousTView = lView[TVIEW];
5539        injectorIndex = getParentInjectorIndex(parentLocation);
5540        lView = getParentInjectorView(parentLocation, lView);
5541      }
5542    }
5543    while (injectorIndex !== -1) {
5544      ngDevMode && assertNodeInjector(lView, injectorIndex);
5545      const tView = lView[TVIEW];
5546      ngDevMode && assertTNodeForLView(tView.data[
5547        injectorIndex + 8
5548        /* NodeInjectorOffset.TNODE */
5549      ], lView);
5550      if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {
5551        const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);
5552        if (instance !== NOT_FOUND2) {
5553          return instance;
5554        }
5555      }
5556      parentLocation = lView[
5557        injectorIndex + 8
5558        /* NodeInjectorOffset.PARENT */
5559      ];
5560      if (parentLocation !== NO_PARENT_INJECTOR && shouldSearchParent(flags, lView[TVIEW].data[
5561        injectorIndex + 8
5562        /* NodeInjectorOffset.TNODE */
5563      ] === hostTElementNode) && bloomHasToken(bloomHash, injectorIndex, lView)) {
5564        previousTView = tView;
5565        injectorIndex = getParentInjectorIndex(parentLocation);
5566        lView = getParentInjectorView(parentLocation, lView);
5567      } else {
5568        injectorIndex = -1;
5569      }
5570    }
5571  }
5572  return notFoundValue;
5573}
5574function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {
5575  const currentTView = lView[TVIEW];
5576  const tNode = currentTView.data[
5577    injectorIndex + 8
5578    /* NodeInjectorOffset.TNODE */
5579  ];
5580  const canAccessViewProviders = previousTView == null ? (
5581    // 1) This is the first invocation `previousTView == null` which means that we are at the
5582    // `TNode` of where injector is starting to look. In such a case the only time we are allowed
5583    // to look into the ViewProviders is if:
5584    // - we are on a component
5585    // - AND the injector set `includeViewProviders` to true (implying that the token can see
5586    // ViewProviders because it is the Component or a Service which itself was declared in
5587    // ViewProviders)
5588    isComponentHost(tNode) && includeViewProviders
5589  ) : (
5590    // 2) `previousTView != null` which means that we are now walking across the parent nodes.
5591    // In such a case we are only allowed to look into the ViewProviders if:
5592    // - We just crossed from child View to Parent View `previousTView != currentTView`
5593    // - AND the parent TNode is an Element.
5594    // This means that we just came from the Component's View and therefore are allowed to see
5595    // into the ViewProviders.
5596    previousTView != currentTView && (tNode.type & 3) !== 0
5597  );
5598  const isHostSpecialCase = flags & 1 && hostTElementNode === tNode;
5599  const injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);
5600  if (injectableIdx !== null) {
5601    return getNodeInjectable(lView, currentTView, injectableIdx, tNode, flags);
5602  } else {
5603    return NOT_FOUND2;
5604  }
5605}
5606function locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) {
5607  const nodeProviderIndexes = tNode.providerIndexes;
5608  const tInjectables = tView.data;
5609  const injectablesStart = nodeProviderIndexes & 1048575;
5610  const directivesStart = tNode.directiveStart;
5611  const directiveEnd = tNode.directiveEnd;
5612  const cptViewProvidersCount = nodeProviderIndexes >> 20;
5613  const startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount;
5614  const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;
5615  for (let i = startingIndex; i < endIndex; i++) {
5616    const providerTokenOrDef = tInjectables[i];
5617    if (i < directivesStart && token === providerTokenOrDef || i >= directivesStart && providerTokenOrDef.type === token) {
5618      return i;
5619    }
5620  }
5621  if (isHostSpecialCase) {
5622    const dirDef = tInjectables[directivesStart];
5623    if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {
5624      return directivesStart;
5625    }
5626  }
5627  return null;
5628}
5629function getNodeInjectable(lView, tView, index, tNode, flags) {
5630  let value = lView[index];
5631  const tData = tView.data;
5632  if (value instanceof NodeInjectorFactory) {
5633    const factory = value;
5634    ngDevMode && injectionPath.push(factory.name ?? "unknown");
5635    if (factory.resolving) {
5636      const token2 = stringifyForError(tData[index]);
5637      if (ngDevMode) {
5638        throw cyclicDependencyErrorWithDetails(token2, injectionPath);
5639      } else {
5640        throw cyclicDependencyError(token2);
5641      }
5642    }
5643    const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);
5644    factory.resolving = true;
5645    const token = tData[index].type || tData[index];
5646    let prevInjectContext;
5647    if (ngDevMode) {
5648      const injector = new NodeInjector(tNode, lView);
5649      prevInjectContext = setInjectorProfilerContext({ injector, token });
5650    }
5651    const previousInjectImplementation = factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null;
5652    const success = enterDI(
5653      lView,
5654      tNode,
5655      0
5656      /* InternalInjectFlags.Default */
5657    );
5658    ngDevMode && assertEqual(success, true, "Because flags do not contain `SkipSelf' we expect this to always succeed.");
5659    try {
5660      ngDevMode && emitInjectorToCreateInstanceEvent(token);
5661      value = lView[index] = factory.factory(void 0, flags, tData, lView, tNode);
5662      ngDevMode && emitInstanceCreatedByInjectorEvent(value);
5663      if (tView.firstCreatePass && index >= tNode.directiveStart) {
5664        ngDevMode && assertDirectiveDef(tData[index]);
5665        registerPreOrderHooks(index, tData[index], tView);
5666      }
5667    } finally {
5668      ngDevMode && setInjectorProfilerContext(prevInjectContext);
5669      previousInjectImplementation !== null && setInjectImplementation(previousInjectImplementation);
5670      setIncludeViewProviders(previousIncludeViewProviders);
5671      factory.resolving = false;
5672      leaveDI();
5673      ngDevMode && (injectionPath = []);
5674    }
5675  }
5676  return value;
5677}
5678function bloomHashBitOrFactory(token) {
5679  ngDevMode && assertDefined(token, "token must be defined");
5680  if (typeof token === "string") {
5681    return token.charCodeAt(0) || 0;
5682  }
5683  const tokenId = (
5684    // First check with `hasOwnProperty` so we don't get an inherited ID.
5685    token.hasOwnProperty(NG_ELEMENT_ID) ? token[NG_ELEMENT_ID] : void 0
5686  );
5687  if (typeof tokenId === "number") {
5688    if (tokenId >= 0) {
5689      return tokenId & BLOOM_MASK;
5690    } else {
5691      ngDevMode && assertEqual(tokenId, -1, "Expecting to get Special Injector Id");
5692      return createNodeInjector;
5693    }
5694  } else {
5695    return tokenId;
5696  }
5697}
5698function bloomHasToken(bloomHash, injectorIndex, injectorView) {
5699  const mask = 1 << bloomHash;
5700  const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)];
5701  return !!(value & mask);
5702}
5703function shouldSearchParent(flags, isFirstHostTNode) {
5704  return !(flags & 2) && !(flags & 1 && isFirstHostTNode);
5705}
5706function getNodeInjectorLView(nodeInjector) {
5707  return nodeInjector._lView;
5708}
5709function getNodeInjectorTNode(nodeInjector) {
5710  return nodeInjector._tNode;
5711}
5712function createNodeInjector() {
5713  return new NodeInjector(getCurrentTNode(), getLView());
5714}
5715function \u0275\u0275getInheritedFactory(type) {
5716  return noSideEffects(() => {
5717    const ownConstructor = type.prototype.constructor;
5718    const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor);
5719    const objectPrototype = Object.prototype;
5720    let parent = Object.getPrototypeOf(type.prototype).constructor;
5721    while (parent && parent !== objectPrototype) {
5722      const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent);
5723      if (factory && factory !== ownFactory) {
5724        return factory;
5725      }
5726      parent = Object.getPrototypeOf(parent);
5727    }
5728    return (t) => new t();
5729  });
5730}
5731function getFactoryOf(type) {
5732  if (isForwardRef(type)) {
5733    return () => {
5734      const factory = getFactoryOf(resolveForwardRef(type));
5735      return factory && factory();
5736    };
5737  }
5738  return getFactoryDef(type);
5739}
5740function lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundValue) {
5741  let currentTNode = tNode;
5742  let currentLView = lView;
5743  while (currentTNode !== null && currentLView !== null && currentLView[FLAGS] & 2048 && !isRootView(currentLView)) {
5744    ngDevMode && assertTNodeForLView(currentTNode, currentLView);
5745    const nodeInjectorValue = lookupTokenUsingNodeInjector(currentTNode, currentLView, token, flags | 2, NOT_FOUND2);
5746    if (nodeInjectorValue !== NOT_FOUND2) {
5747      return nodeInjectorValue;
5748    }
5749    let parentTNode = currentTNode.parent;
5750    if (!parentTNode) {
5751      const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];
5752      if (embeddedViewInjector) {
5753        const embeddedViewInjectorValue = embeddedViewInjector.get(token, NOT_FOUND2, flags);
5754        if (embeddedViewInjectorValue !== NOT_FOUND2) {
5755          return embeddedViewInjectorValue;
5756        }
5757      }
5758      parentTNode = getTNodeFromLView(currentLView);
5759      currentLView = currentLView[DECLARATION_VIEW];
5760    }
5761    currentTNode = parentTNode;
5762  }
5763  return notFoundValue;
5764}
5765function getTNodeFromLView(lView) {
5766  const tView = lView[TVIEW];
5767  const tViewType = tView.type;
5768  if (tViewType === 2) {
5769    ngDevMode && assertDefined(tView.declTNode, "Embedded TNodes should have declaration parents.");
5770    return tView.declTNode;
5771  } else if (tViewType === 1) {
5772    return lView[T_HOST];
5773  }
5774  return null;
5775}
5776function \u0275\u0275injectAttribute(attrNameToInject) {
5777  return injectAttributeImpl(getCurrentTNode(), attrNameToInject);
5778}
5779function getReflect() {
5780  return _reflect = _reflect || new ReflectionCapabilities();
5781}
5782function reflectDependencies(type) {
5783  return convertDependencies(getReflect().parameters(type));
5784}
5785function convertDependencies(deps) {
5786  return deps.map((dep) => reflectDependency(dep));
5787}
5788function reflectDependency(dep) {
5789  const meta = {
5790    token: null,
5791    attribute: null,
5792    host: false,
5793    optional: false,
5794    self: false,
5795    skipSelf: false
5796  };
5797  if (Array.isArray(dep) && dep.length > 0) {
5798    for (let j = 0; j < dep.length; j++) {
5799      const param = dep[j];
5800      if (param === void 0) {
5801        continue;
5802      }
5803      const proto = Object.getPrototypeOf(param);
5804      if (param instanceof Optional || proto.ngMetadataName === "Optional") {
5805        meta.optional = true;
5806      } else if (param instanceof SkipSelf || proto.ngMetadataName === "SkipSelf") {
5807        meta.skipSelf = true;
5808      } else if (param instanceof Self || proto.ngMetadataName === "Self") {
5809        meta.self = true;
5810      } else if (param instanceof Host || proto.ngMetadataName === "Host") {
5811        meta.host = true;
5812      } else if (param instanceof Inject) {
5813        meta.token = param.token;
5814      } else if (param instanceof Attribute) {
5815        if (param.attributeName === void 0) {
5816          throw new RuntimeError(204, ngDevMode && `Attribute name must be defined.`);
5817        }
5818        meta.attribute = param.attributeName;
5819      } else {
5820        meta.token = param;
5821      }
5822    }
5823  } else if (dep === void 0 || Array.isArray(dep) && dep.length === 0) {
5824    meta.token = null;
5825  } else {
5826    meta.token = dep;
5827  }
5828  return meta;
5829}
5830function compileInjectable(type, meta) {
5831  let ngInjectableDef = null;
5832  let ngFactoryDef = null;
5833  if (!type.hasOwnProperty(NG_PROV_DEF)) {
5834    Object.defineProperty(type, NG_PROV_DEF, {
5835      get: () => {
5836        if (ngInjectableDef === null) {
5837          const compiler = getCompilerFacade({
5838            usage: 0,
5839            kind: "injectable",
5840            type
5841          });
5842          ngInjectableDef = compiler.compileInjectable(angularCoreDiEnv, `ng:///${type.name}/\u0275prov.js`, getInjectableMetadata(type, meta));
5843        }
5844        return ngInjectableDef;
5845      }
5846    });
5847  }
5848  if (!type.hasOwnProperty(NG_FACTORY_DEF)) {
5849    Object.defineProperty(type, NG_FACTORY_DEF, {
5850      get: () => {
5851        if (ngFactoryDef === null) {
5852          const compiler = getCompilerFacade({
5853            usage: 0,
5854            kind: "injectable",
5855            type
5856          });
5857          ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/\u0275fac.js`, {
5858            name: type.name,
5859            type,
5860            typeArgumentCount: 0,
5861            // In JIT mode types are not available nor used.
5862            deps: reflectDependencies(type),
5863            target: compiler.FactoryTarget.Injectable
5864          });
5865        }
5866        return ngFactoryDef;
5867      },
5868      // Leave this configurable so that the factories from directives or pipes can take precedence.
5869      configurable: true
5870    });
5871  }
5872}
5873function isUseClassProvider(meta) {
5874  return meta.useClass !== void 0;
5875}
5876function isUseValueProvider(meta) {
5877  return USE_VALUE2 in meta;
5878}
5879function isUseFactoryProvider(meta) {
5880  return meta.useFactory !== void 0;
5881}
5882function isUseExistingProvider(meta) {
5883  return meta.useExisting !== void 0;
5884}
5885function getInjectableMetadata(type, srcMeta) {
5886  const meta = srcMeta || { providedIn: null };
5887  const compilerMeta = {
5888    name: type.name,
5889    type,
5890    typeArgumentCount: 0,
5891    providedIn: meta.providedIn
5892  };
5893  if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== void 0) {
5894    compilerMeta.deps = convertDependencies(meta.deps);
5895  }
5896  if (isUseClassProvider(meta)) {
5897    compilerMeta.useClass = meta.useClass;
5898  } else if (isUseValueProvider(meta)) {
5899    compilerMeta.useValue = meta.useValue;
5900  } else if (isUseFactoryProvider(meta)) {
5901    compilerMeta.useFactory = meta.useFactory;
5902  } else if (isUseExistingProvider(meta)) {
5903    compilerMeta.useExisting = meta.useExisting;
5904  }
5905  return compilerMeta;
5906}
5907function injectElementRef() {
5908  return createElementRef(getCurrentTNode(), getLView());
5909}
5910function createElementRef(tNode, lView) {
5911  return new ElementRef(getNativeByTNode(tNode, lView));
5912}
5913function unwrapElementRef(value) {
5914  return value instanceof ElementRef ? value.nativeElement : value;
5915}
5916function symbolIterator() {
5917  return this._results[Symbol.iterator]();
5918}
5919function hasInSkipHydrationBlockFlag(tNode) {
5920  return (tNode.flags & 128) === 128;
5921}
5922function getUniqueLViewId() {
5923  return uniqueIdCounter++;
5924}
5925function registerLView(lView) {
5926  ngDevMode && assertNumber(lView[ID], "LView must have an ID in order to be registered");
5927  TRACKED_LVIEWS.set(lView[ID], lView);
5928}
5929function getLViewById(id) {
5930  ngDevMode && assertNumber(id, "ID used for LView lookup must be a number");
5931  return TRACKED_LVIEWS.get(id) || null;
5932}
5933function unregisterLView(lView) {
5934  ngDevMode && assertNumber(lView[ID], "Cannot stop tracking an LView that does not have an ID");
5935  TRACKED_LVIEWS.delete(lView[ID]);
5936}
5937function getTrackedLViews() {
5938  return TRACKED_LVIEWS;
5939}
5940function getLContext(target) {
5941  let mpValue = readPatchedData(target);
5942  if (mpValue) {
5943    if (isLView(mpValue)) {
5944      const lView = mpValue;
5945      let nodeIndex;
5946      let component = void 0;
5947      let directives = void 0;
5948      if (isComponentInstance(target)) {
5949        nodeIndex = findViaComponent(lView, target);
5950        if (nodeIndex == -1) {
5951          throw new Error("The provided component was not found in the application");
5952        }
5953        component = target;
5954      } else if (isDirectiveInstance(target)) {
5955        nodeIndex = findViaDirective(lView, target);
5956        if (nodeIndex == -1) {
5957          throw new Error("The provided directive was not found in the application");
5958        }
5959        directives = getDirectivesAtNodeIndex(nodeIndex, lView);
5960      } else {
5961        nodeIndex = findViaNativeElement(lView, target);
5962        if (nodeIndex == -1) {
5963          return null;
5964        }
5965      }
5966      const native = unwrapRNode(lView[nodeIndex]);
5967      const existingCtx = readPatchedData(native);
5968      const context2 = existingCtx && !Array.isArray(existingCtx) ? existingCtx : createLContext(lView, nodeIndex, native);
5969      if (component && context2.component === void 0) {
5970        context2.component = component;
5971        attachPatchData(context2.component, context2);
5972      }
5973      if (directives && context2.directives === void 0) {
5974        context2.directives = directives;
5975        for (let i = 0; i < directives.length; i++) {
5976          attachPatchData(directives[i], context2);
5977        }
5978      }
5979      attachPatchData(context2.native, context2);
5980      mpValue = context2;
5981    }
5982  } else {
5983    const rElement = target;
5984    ngDevMode && assertDomNode(rElement);
5985    let parent = rElement;
5986    while (parent = parent.parentNode) {
5987      const parentContext = readPatchedData(parent);
5988      if (parentContext) {
5989        const lView = Array.isArray(parentContext) ? parentContext : parentContext.lView;
5990        if (!lView) {
5991          return null;
5992        }
5993        const index = findViaNativeElement(lView, rElement);
5994        if (index >= 0) {
5995          const native = unwrapRNode(lView[index]);
5996          const context2 = createLContext(lView, index, native);
5997          attachPatchData(native, context2);
5998          mpValue = context2;
5999          break;
6000        }
6001      }
6002    }
6003  }
6004  return mpValue || null;
6005}
6006function createLContext(lView, nodeIndex, native) {
6007  return new LContext(lView[ID], nodeIndex, native);
6008}
6009function getComponentViewByInstance(componentInstance) {
6010  let patchedData = readPatchedData(componentInstance);
6011  let lView;
6012  if (isLView(patchedData)) {
6013    const contextLView = patchedData;
6014    const nodeIndex = findViaComponent(contextLView, componentInstance);
6015    lView = getComponentLViewByIndex(nodeIndex, contextLView);
6016    const context2 = createLContext(contextLView, nodeIndex, lView[HOST]);
6017    context2.component = componentInstance;
6018    attachPatchData(componentInstance, context2);
6019    attachPatchData(context2.native, context2);
6020  } else {
6021    const context2 = patchedData;
6022    const contextLView = context2.lView;
6023    ngDevMode && assertLView(contextLView);
6024    lView = getComponentLViewByIndex(context2.nodeIndex, contextLView);
6025  }
6026  return lView;
6027}
6028function attachPatchData(target, data) {
6029  ngDevMode && assertDefined(target, "Target expected");
6030  if (isLView(data)) {
6031    target[MONKEY_PATCH_KEY_NAME] = data[ID];
6032    registerLView(data);
6033  } else {
6034    target[MONKEY_PATCH_KEY_NAME] = data;
6035  }
6036}
6037function readPatchedData(target) {
6038  ngDevMode && assertDefined(target, "Target expected");
6039  const data = target[MONKEY_PATCH_KEY_NAME];
6040  return typeof data === "number" ? getLViewById(data) : data || null;
6041}
6042function readPatchedLView(target) {
6043  const value = readPatchedData(target);
6044  if (value) {
6045    return isLView(value) ? value : value.lView;
6046  }
6047  return null;
6048}
6049function isComponentInstance(instance) {
6050  return instance && instance.constructor && instance.constructor.\u0275cmp;
6051}
6052function isDirectiveInstance(instance) {
6053  return instance && instance.constructor && instance.constructor.\u0275dir;
6054}
6055function findViaNativeElement(lView, target) {
6056  const tView = lView[TVIEW];
6057  for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {
6058    if (unwrapRNode(lView[i]) === target) {
6059      return i;
6060    }
6061  }
6062  return -1;
6063}
6064function traverseNextElement(tNode) {
6065  if (tNode.child) {
6066    return tNode.child;
6067  } else if (tNode.next) {
6068    return tNode.next;
6069  } else {
6070    while (tNode.parent && !tNode.parent.next) {
6071      tNode = tNode.parent;
6072    }
6073    return tNode.parent && tNode.parent.next;
6074  }
6075}
6076function findViaComponent(lView, componentInstance) {
6077  const componentIndices = lView[TVIEW].components;
6078  if (componentIndices) {
6079    for (let i = 0; i < componentIndices.length; i++) {
6080      const elementComponentIndex = componentIndices[i];
6081      const componentView = getComponentLViewByIndex(elementComponentIndex, lView);
6082      if (componentView[CONTEXT] === componentInstance) {
6083        return elementComponentIndex;
6084      }
6085    }
6086  } else {
6087    const rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView);
6088    const rootComponent = rootComponentView[CONTEXT];
6089    if (rootComponent === componentInstance) {
6090      return HEADER_OFFSET;
6091    }
6092  }
6093  return -1;
6094}
6095function findViaDirective(lView, directiveInstance) {
6096  let tNode = lView[TVIEW].firstChild;
6097  while (tNode) {
6098    const directiveIndexStart = tNode.directiveStart;
6099    const directiveIndexEnd = tNode.directiveEnd;
6100    for (let i = directiveIndexStart; i < directiveIndexEnd; i++) {
6101      if (lView[i] === directiveInstance) {
6102        return tNode.index;
6103      }
6104    }
6105    tNode = traverseNextElement(tNode);
6106  }
6107  return -1;
6108}
6109function getDirectivesAtNodeIndex(nodeIndex, lView) {
6110  const tNode = lView[TVIEW].data[nodeIndex];
6111  if (tNode.directiveStart === 0)
6112    return EMPTY_ARRAY;
6113  const results = [];
6114  for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {
6115    const directiveInstance = lView[i];
6116    if (!isComponentInstance(directiveInstance)) {
6117      results.push(directiveInstance);
6118    }
6119  }
6120  return results;
6121}
6122function getComponentAtNodeIndex(nodeIndex, lView) {
6123  const tNode = lView[TVIEW].data[nodeIndex];
6124  return isComponentHost(tNode) ? lView[tNode.directiveStart + tNode.componentOffset] : null;
6125}
6126function getRootView(componentOrLView) {
6127  ngDevMode && assertDefined(componentOrLView, "component");
6128  let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);
6129  while (lView && !isRootView(lView)) {
6130    lView = getLViewParent(lView);
6131  }
6132  ngDevMode && assertLView(lView);
6133  return lView;
6134}
6135function getRootContext(viewOrComponent) {
6136  const rootView = getRootView(viewOrComponent);
6137  ngDevMode && assertDefined(rootView[CONTEXT], "Root view has no context. Perhaps it is disconnected?");
6138  return rootView[CONTEXT];
6139}
6140function getFirstLContainer(lView) {
6141  return getNearestLContainer(lView[CHILD_HEAD]);
6142}
6143function getNextLContainer(container) {
6144  return getNearestLContainer(container[NEXT]);
6145}
6146function getNearestLContainer(viewOrContainer) {
6147  while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {
6148    viewOrContainer = viewOrContainer[NEXT];
6149  }
6150  return viewOrContainer;
6151}
6152function getComponent(element) {
6153  ngDevMode && assertDomElement(element);
6154  const context2 = getLContext(element);
6155  if (context2 === null)
6156    return null;
6157  if (context2.component === void 0) {
6158    const lView = context2.lView;
6159    if (lView === null) {
6160      return null;
6161    }
6162    context2.component = getComponentAtNodeIndex(context2.nodeIndex, lView);
6163  }
6164  return context2.component;
6165}
6166function getContext(element) {
6167  assertDomElement(element);
6168  const context2 = getLContext(element);
6169  const lView = context2 ? context2.lView : null;
6170  return lView === null ? null : lView[CONTEXT];
6171}
6172function getOwningComponent(elementOrDir) {
6173  const context2 = getLContext(elementOrDir);
6174  let lView = context2 ? context2.lView : null;
6175  if (lView === null)
6176    return null;
6177  let parent;
6178  while (lView[TVIEW].type === 2 && (parent = getLViewParent(lView))) {
6179    lView = parent;
6180  }
6181  return isRootView(lView) ? null : lView[CONTEXT];
6182}
6183function getRootComponents(elementOrDir) {
6184  const lView = readPatchedLView(elementOrDir);
6185  return lView !== null ? [getRootContext(lView)] : [];
6186}
6187function getInjector(elementOrDir) {
6188  const context2 = getLContext(elementOrDir);
6189  const lView = context2 ? context2.lView : null;
6190  if (lView === null)
6191    return Injector.NULL;
6192  const tNode = lView[TVIEW].data[context2.nodeIndex];
6193  return new NodeInjector(tNode, lView);
6194}
6195function getDirectives(node) {
6196  if (node instanceof Text) {
6197    return [];
6198  }
6199  const context2 = getLContext(node);
6200  const lView = context2 ? context2.lView : null;
6201  if (lView === null) {
6202    return [];
6203  }
6204  const tView = lView[TVIEW];
6205  const nodeIndex = context2.nodeIndex;
6206  if (!tView?.data[nodeIndex]) {
6207    return [];
6208  }
6209  if (context2.directives === void 0) {
6210    context2.directives = getDirectivesAtNodeIndex(nodeIndex, lView);
6211  }
6212  return context2.directives === null ? [] : [...context2.directives];
6213}
6214function getDirectiveMetadata$1(directiveOrComponentInstance) {
6215  const { constructor } = directiveOrComponentInstance;
6216  if (!constructor) {
6217    throw new Error("Unable to find the instance constructor");
6218  }
6219  const componentDef = getComponentDef(constructor);
6220  if (componentDef) {
6221    const inputs = extractInputDebugMetadata(componentDef.inputs);
6222    return {
6223      inputs,
6224      outputs: componentDef.outputs,
6225      encapsulation: componentDef.encapsulation,
6226      changeDetection: componentDef.onPush ? ChangeDetectionStrategy.OnPush : ChangeDetectionStrategy.Default
6227    };
6228  }
6229  const directiveDef = getDirectiveDef(constructor);
6230  if (directiveDef) {
6231    const inputs = extractInputDebugMetadata(directiveDef.inputs);
6232    return { inputs, outputs: directiveDef.outputs };
6233  }
6234  return null;
6235}
6236function getHostElement(componentOrDirective) {
6237  return getLContext(componentOrDirective).native;
6238}
6239function getListeners(element) {
6240  ngDevMode && assertDomElement(element);
6241  const lContext = getLContext(element);
6242  const lView = lContext === null ? null : lContext.lView;
6243  if (lView === null)
6244    return [];
6245  const tView = lView[TVIEW];
6246  const lCleanup = lView[CLEANUP];
6247  const tCleanup = tView.cleanup;
6248  const listeners = [];
6249  if (tCleanup && lCleanup) {
6250    for (let i = 0; i < tCleanup.length; ) {
6251      const firstParam = tCleanup[i++];
6252      const secondParam = tCleanup[i++];
6253      if (typeof firstParam === "string") {
6254        const name = firstParam;
6255        const listenerElement = unwrapRNode(lView[secondParam]);
6256        const callback = lCleanup[tCleanup[i++]];
6257        const useCaptureOrIndx = tCleanup[i++];
6258        const type = typeof useCaptureOrIndx === "boolean" || useCaptureOrIndx >= 0 ? "dom" : "output";
6259        const useCapture = typeof useCaptureOrIndx === "boolean" ? useCaptureOrIndx : false;
6260        if (element == listenerElement) {
6261          listeners.push({ element, name, callback, useCapture, type });
6262        }
6263      }
6264    }
6265  }
6266  listeners.sort(sortListeners);
6267  return listeners;
6268}
6269function sortListeners(a, b) {
6270  if (a.name == b.name)
6271    return 0;
6272  return a.name < b.name ? -1 : 1;
6273}
6274function assertDomElement(value) {
6275  if (typeof Element !== "undefined" && !(value instanceof Element)) {
6276    throw new Error("Expecting instance of DOM Element");
6277  }
6278}
6279function extractInputDebugMetadata(inputs) {
6280  const res = {};
6281  for (const key in inputs) {
6282    if (inputs.hasOwnProperty(key)) {
6283      const value = inputs[key];
6284      if (value !== void 0) {
6285        res[key] = value[0];
6286      }
6287    }
6288  }
6289  return res;
6290}
6291function setDocument(document2) {
6292  DOCUMENT2 = document2;
6293}
6294function getDocument() {
6295  if (DOCUMENT2 !== void 0) {
6296    return DOCUMENT2;
6297  } else if (typeof document !== "undefined") {
6298    return document;
6299  }
6300  throw new RuntimeError(210, (typeof ngDevMode === "undefined" || ngDevMode) && `The document object is not available in this context. Make sure the DOCUMENT injection token is provided.`);
6301}
6302function makeStateKey(key) {
6303  return key;
6304}
6305function initTransferState() {
6306  const transferState = new TransferState();
6307  if (true) {
6308    transferState.store = retrieveTransferredState(getDocument(), inject2(APP_ID));
6309  }
6310  return transferState;
6311}
6312function retrieveTransferredState(doc, appId) {
6313  const script = doc.getElementById(appId + "-state");
6314  if (script?.textContent) {
6315    try {
6316      return JSON.parse(script.textContent);
6317    } catch (e) {
6318      console.warn("Exception while restoring TransferState for app " + appId, e);
6319    }
6320  }
6321  return {};
6322}
6323function onInteraction(trigger, callback) {
6324  let entry = interactionTriggers.get(trigger);
6325  if (!entry) {
6326    entry = new DeferEventEntry();
6327    interactionTriggers.set(trigger, entry);
6328    for (const name of interactionEventNames) {
6329      trigger.addEventListener(name, entry.listener, eventListenerOptions);
6330    }
6331  }
6332  entry.callbacks.add(callback);
6333  return () => {
6334    const { callbacks, listener } = entry;
6335    callbacks.delete(callback);
6336    if (callbacks.size === 0) {
6337      interactionTriggers.delete(trigger);
6338      for (const name of interactionEventNames) {
6339        trigger.removeEventListener(name, listener, eventListenerOptions);
6340      }
6341    }
6342  };
6343}
6344function onHover(trigger, callback) {
6345  let entry = hoverTriggers.get(trigger);
6346  if (!entry) {
6347    entry = new DeferEventEntry();
6348    hoverTriggers.set(trigger, entry);
6349    for (const name of hoverEventNames) {
6350      trigger.addEventListener(name, entry.listener, eventListenerOptions);
6351    }
6352  }
6353  entry.callbacks.add(callback);
6354  return () => {
6355    const { callbacks, listener } = entry;
6356    callbacks.delete(callback);
6357    if (callbacks.size === 0) {
6358      for (const name of hoverEventNames) {
6359        trigger.removeEventListener(name, listener, eventListenerOptions);
6360      }
6361      hoverTriggers.delete(trigger);
6362    }
6363  };
6364}
6365function createIntersectionObserver() {
6366  return new IntersectionObserver((entries) => {
6367    for (const current of entries) {
6368      if (current.isIntersecting && viewportTriggers.has(current.target)) {
6369        viewportTriggers.get(current.target).listener();
6370      }
6371    }
6372  });
6373}
6374function onViewport(trigger, callback, observerFactoryFn) {
6375  let entry = viewportTriggers.get(trigger);
6376  intersectionObserver = intersectionObserver || observerFactoryFn();
6377  if (!entry) {
6378    entry = new DeferEventEntry();
6379    intersectionObserver.observe(trigger);
6380    viewportTriggers.set(trigger, entry);
6381    observedViewportElements++;
6382  }
6383  entry.callbacks.add(callback);
6384  return () => {
6385    if (!viewportTriggers.has(trigger)) {
6386      return;
6387    }
6388    entry.callbacks.delete(callback);
6389    if (entry.callbacks.size === 0) {
6390      intersectionObserver?.unobserve(trigger);
6391      viewportTriggers.delete(trigger);
6392      observedViewportElements--;
6393    }
6394    if (observedViewportElements === 0) {
6395      intersectionObserver?.disconnect();
6396      intersectionObserver = null;
6397    }
6398  };
6399}
6400function stashEventListenerImpl(lView, target, eventName, wrappedListener) {
6401  _stashEventListenerImpl(lView, target, eventName, wrappedListener);
6402}
6403function isDetachedByI18n(tNode) {
6404  return (tNode.flags & 32) === 32;
6405}
6406function isInternalHydrationTransferStateKey(key) {
6407  return key === TRANSFER_STATE_TOKEN_ID || key === TRANSFER_STATE_DEFER_BLOCKS_INFO;
6408}
6409function retrieveHydrationInfo(rNode, injector, isRootView2 = false) {
6410  return _retrieveHydrationInfoImpl(rNode, injector, isRootView2);
6411}
6412function getLNodeForHydration(viewRef) {
6413  let lView = viewRef._lView;
6414  const tView = lView[TVIEW];
6415  if (tView.type === 2) {
6416    return null;
6417  }
6418  if (isRootView(lView)) {
6419    lView = lView[HEADER_OFFSET];
6420  }
6421  return lView;
6422}
6423function patchHydrationInfo(node, info) {
6424  node[HYDRATION_INFO_KEY] = info;
6425}
6426function markRNodeAsHavingHydrationMismatch(node, expectedNodeDetails = null, actualNodeDetails = null) {
6427  if (!ngDevMode) {
6428    throw new Error("Calling `markRNodeAsMismatchedByHydration` in prod mode is not supported and likely a mistake.");
6429  }
6430  while (node && !getComponent(node)) {
6431    node = node?.parentNode;
6432  }
6433  if (node) {
6434    patchHydrationInfo(node, {
6435      status: HydrationStatus.Mismatched,
6436      expectedNodeDetails,
6437      actualNodeDetails
6438    });
6439  }
6440}
6441function isIncrementalHydrationEnabled(injector) {
6442  return injector.get(IS_INCREMENTAL_HYDRATION_ENABLED, false, {
6443    optional: true
6444  });
6445}
6446function warnIncrementalHydrationNotConfigured() {
6447  if (!incrementalHydrationEnabledWarned) {
6448    incrementalHydrationEnabledWarned = true;
6449    console.warn(formatRuntimeError(508, "Angular has detected that some `@defer` blocks use `hydrate` triggers, but incremental hydration was not enabled. Please ensure that the `withIncrementalHydration()` call is added as an argument for the `provideClientHydration()` function call in your application config."));
6450  }
6451}
6452function assertSsrIdDefined(ssrUniqueId) {
6453  assertDefined(ssrUniqueId, "Internal error: expecting an SSR id for a defer block that should be hydrated, but the id is not present");
6454}
6455function getParentBlockHydrationQueue(deferBlockId, injector) {
6456  const dehydratedBlockRegistry = injector.get(DEHYDRATED_BLOCK_REGISTRY);
6457  const transferState = injector.get(TransferState);
6458  const deferBlockParents = transferState.get(NGH_DEFER_BLOCKS_KEY, {});
6459  let isTopMostDeferBlock = false;
6460  let currentBlockId = deferBlockId;
6461  let parentBlockPromise = null;
6462  const hydrationQueue = [];
6463  while (!isTopMostDeferBlock && currentBlockId) {
6464    ngDevMode && assertEqual(hydrationQueue.indexOf(currentBlockId), -1, "Internal error: defer block hierarchy has a cycle.");
6465    isTopMostDeferBlock = dehydratedBlockRegistry.has(currentBlockId);
6466    const hydratingParentBlock = dehydratedBlockRegistry.hydrating.get(currentBlockId);
6467    if (parentBlockPromise === null && hydratingParentBlock != null) {
6468      parentBlockPromise = hydratingParentBlock.promise;
6469      break;
6470    }
6471    hydrationQueue.unshift(currentBlockId);
6472    currentBlockId = deferBlockParents[currentBlockId][DEFER_PARENT_BLOCK_ID];
6473  }
6474  return { parentBlockPromise, hydrationQueue };
6475}
6476function refreshContentQueries(tView, lView) {
6477  const contentQueries = tView.contentQueries;
6478  if (contentQueries !== null) {
6479    const prevConsumer = setActiveConsumer(null);
6480    try {
6481      for (let i = 0; i < contentQueries.length; i += 2) {
6482        const queryStartIdx = contentQueries[i];
6483        const directiveDefIdx = contentQueries[i + 1];
6484        if (directiveDefIdx !== -1) {
6485          const directiveDef = tView.data[directiveDefIdx];
6486          ngDevMode && assertDefined(directiveDef, "DirectiveDef not found.");
6487          ngDevMode && assertDefined(directiveDef.contentQueries, "contentQueries function should be defined");
6488          setCurrentQueryIndex(queryStartIdx);
6489          directiveDef.contentQueries(2, lView[directiveDefIdx], directiveDefIdx);
6490        }
6491      }
6492    } finally {
6493      setActiveConsumer(prevConsumer);
6494    }
6495  }
6496}
6497function executeViewQueryFn(flags, viewQueryFn, component) {
6498  ngDevMode && assertDefined(viewQueryFn, "View queries function to execute must be defined.");
6499  setCurrentQueryIndex(0);
6500  const prevConsumer = setActiveConsumer(null);
6501  try {
6502    viewQueryFn(flags, component);
6503  } finally {
6504    setActiveConsumer(prevConsumer);
6505  }
6506}
6507function executeContentQueries(tView, tNode, lView) {
6508  if (isContentQueryHost(tNode)) {
6509    const prevConsumer = setActiveConsumer(null);
6510    try {
6511      const start = tNode.directiveStart;
6512      const end = tNode.directiveEnd;
6513      for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {
6514        const def = tView.data[directiveIndex];
6515        if (def.contentQueries) {
6516          const directiveInstance = lView[directiveIndex];
6517          ngDevMode && assertDefined(directiveIndex, "Incorrect reference to a directive defining a content query");
6518          def.contentQueries(1, directiveInstance, directiveIndex);
6519        }
6520      }
6521    } finally {
6522      setActiveConsumer(prevConsumer);
6523    }
6524  }
6525}
6526function validateElementIsKnown(lView, tNode) {
6527  const tView = lView[TVIEW];
6528  if (tView.schemas === null)
6529    return;
6530  const tagName = tNode.value;
6531  if (!isDirectiveHost(tNode) && tagName !== null) {
6532    const isUnknown = (
6533      // Note that we can't check for `typeof HTMLUnknownElement === 'function'` because
6534      // Domino doesn't expose HTMLUnknownElement globally.
6535      typeof HTMLUnknownElement !== "undefined" && HTMLUnknownElement && getNativeByTNode(tNode, lView) instanceof HTMLUnknownElement || typeof customElements !== "undefined" && tagName.indexOf("-") > -1 && !customElements.get(tagName)
6536    );
6537    if (isUnknown && !matchingSchemas(tView.schemas, tagName)) {
6538      const isHostStandalone = isHostComponentStandalone(lView);
6539      const templateLocation = getTemplateLocationDetails(lView);
6540      const schemas = `'${isHostStandalone ? "@Component" : "@NgModule"}.schemas'`;
6541      let message = `'${tagName}' is not a known element${templateLocation}:
6542`;
6543      message += `1. If '${tagName}' is an Angular component, then verify that it is ${isHostStandalone ? "included in the '@Component.imports' of this component" : "a part of an @NgModule where this component is declared"}.
6544`;
6545      if (tagName && tagName.indexOf("-") > -1) {
6546        message += `2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the ${schemas} of this component to suppress this message.`;
6547      } else {
6548        message += `2. To allow any element add 'NO_ERRORS_SCHEMA' to the ${schemas} of this component.`;
6549      }
6550      if (shouldThrowErrorOnUnknownElement) {
6551        throw new RuntimeError(304, message);
6552      } else {
6553        console.error(formatRuntimeError(304, message));
6554      }
6555    }
6556  }
6557}
6558function isPropertyValid(element, propName, tagName, schemas) {
6559  if (schemas === null)
6560    return true;
6561  if (matchingSchemas(schemas, tagName) || propName in element || isAnimationProp(propName)) {
6562    return true;
6563  }
6564  return typeof Node === "undefined" || Node === null || !(element instanceof Node);
6565}
6566function handleUnknownPropertyError(propName, tagName, nodeType, lView) {
6567  if (!tagName && nodeType === 4) {
6568    tagName = "ng-template";
6569  }
6570  const isHostStandalone = isHostComponentStandalone(lView);
6571  const templateLocation = getTemplateLocationDetails(lView);
6572  let message = `Can't bind to '${propName}' since it isn't a known property of '${tagName}'${templateLocation}.`;
6573  const schemas = `'${isHostStandalone ? "@Component" : "@NgModule"}.schemas'`;
6574  const importLocation = isHostStandalone ? "included in the '@Component.imports' of this component" : "a part of an @NgModule where this component is declared";
6575  if (KNOWN_CONTROL_FLOW_DIRECTIVES.has(propName)) {
6576    const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(propName);
6577    message += `
6578If the '${propName}' is an Angular control flow directive, please make sure that either the '${correspondingImport}' directive or the 'CommonModule' is ${importLocation}.`;
6579  } else {
6580    message += `
65811. If '${tagName}' is an Angular component and it has the '${propName}' input, then verify that it is ${importLocation}.`;
6582    if (tagName && tagName.indexOf("-") > -1) {
6583      message += `
65842. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the ${schemas} of this component to suppress this message.`;
6585      message += `
65863. To allow any property add 'NO_ERRORS_SCHEMA' to the ${schemas} of this component.`;
6587    } else {
6588      message += `
65892. To allow any property add 'NO_ERRORS_SCHEMA' to the ${schemas} of this component.`;
6590    }
6591  }
6592  reportUnknownPropertyError(message);
6593}
6594function reportUnknownPropertyError(message) {
6595  if (shouldThrowErrorOnUnknownProperty) {
6596    throw new RuntimeError(303, message);
6597  } else {
6598    console.error(formatRuntimeError(303, message));
6599  }
6600}
6601function getDeclarationComponentDef(lView) {
6602  !ngDevMode && throwError("Must never be called in production mode");
6603  const declarationLView = lView[DECLARATION_COMPONENT_VIEW];
6604  const context2 = declarationLView[CONTEXT];
6605  if (!context2)
6606    return null;
6607  return context2.constructor ? getComponentDef(context2.constructor) : null;
6608}
6609function isHostComponentStandalone(lView) {
6610  !ngDevMode && throwError("Must never be called in production mode");
6611  const componentDef = getDeclarationComponentDef(lView);
6612  return !!componentDef?.standalone;
6613}
6614function getTemplateLocationDetails(lView) {
6615  !ngDevMode && throwError("Must never be called in production mode");
6616  const hostComponentDef = getDeclarationComponentDef(lView);
6617  const componentClassName = hostComponentDef?.type?.name;
6618  return componentClassName ? ` (used in the '${componentClassName}' component template)` : "";
6619}
6620function matchingSchemas(schemas, tagName) {
6621  if (schemas !== null) {
6622    for (let i = 0; i < schemas.length; i++) {
6623      const schema = schemas[i];
6624      if (schema === NO_ERRORS_SCHEMA || schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf("-") > -1) {
6625        return true;
6626      }
6627    }
6628  }
6629  return false;
6630}
6631function getPolicy$1() {
6632  if (policy$1 === void 0) {
6633    policy$1 = null;
6634    if (_global.trustedTypes) {
6635      try {
6636        policy$1 = _global.trustedTypes.createPolicy("angular", {
6637          createHTML: (s) => s,
6638          createScript: (s) => s,
6639          createScriptURL: (s) => s
6640        });
6641      } catch {
6642      }
6643    }
6644  }
6645  return policy$1;
6646}
6647function trustedHTMLFromString(html) {
6648  return getPolicy$1()?.createHTML(html) || html;
6649}
6650function trustedScriptURLFromString(url) {
6651  return getPolicy$1()?.createScriptURL(url) || url;
6652}
6653function getPolicy() {
6654  if (policy === void 0) {
6655    policy = null;
6656    if (_global.trustedTypes) {
6657      try {
6658        policy = _global.trustedTypes.createPolicy("angular#unsafe-bypass", {
6659          createHTML: (s) => s,
6660          createScript: (s) => s,
6661          createScriptURL: (s) => s
6662        });
6663      } catch {
6664      }
6665    }
6666  }
6667  return policy;
6668}
6669function trustedHTMLFromStringBypass(html) {
6670  return getPolicy()?.createHTML(html) || html;
6671}
6672function trustedScriptFromStringBypass(script) {
6673  return getPolicy()?.createScript(script) || script;
6674}
6675function trustedScriptURLFromStringBypass(url) {
6676  return getPolicy()?.createScriptURL(url) || url;
6677}
6678function unwrapSafeValue(value) {
6679  return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity : value;
6680}
6681function allowSanitizationBypassAndThrow(value, type) {
6682  const actualType = getSanitizationBypassType(value);
6683  if (actualType != null && actualType !== type) {
6684    if (actualType === "ResourceURL" && type === "URL")
6685      return true;
6686    throw new Error(`Required a safe ${type}, got a ${actualType} (see ${XSS_SECURITY_URL})`);
6687  }
6688  return actualType === type;
6689}
6690function getSanitizationBypassType(value) {
6691  return value instanceof SafeValueImpl && value.getTypeName() || null;
6692}
6693function bypassSanitizationTrustHtml(trustedHtml) {
6694  return new SafeHtmlImpl(trustedHtml);
6695}
6696function bypassSanitizationTrustStyle(trustedStyle) {
6697  return new SafeStyleImpl(trustedStyle);
6698}
6699function bypassSanitizationTrustScript(trustedScript) {
6700  return new SafeScriptImpl(trustedScript);
6701}
6702function bypassSanitizationTrustUrl(trustedUrl) {
6703  return new SafeUrlImpl(trustedUrl);
6704}
6705function bypassSanitizationTrustResourceUrl(trustedResourceUrl) {
6706  return new SafeResourceUrlImpl(trustedResourceUrl);
6707}
6708function getInertBodyHelper(defaultDoc) {
6709  const inertDocumentHelper = new InertDocumentHelper(defaultDoc);
6710  return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper;
6711}
6712function isDOMParserAvailable() {
6713  try {
6714    return !!new window.DOMParser().parseFromString(trustedHTMLFromString(""), "text/html");
6715  } catch {
6716    return false;
6717  }
6718}
6719function _sanitizeUrl(url) {
6720  url = String(url);
6721  if (url.match(SAFE_URL_PATTERN))
6722    return url;
6723  if (typeof ngDevMode === "undefined" || ngDevMode) {
6724    console.warn(`WARNING: sanitizing unsafe URL value ${url} (see ${XSS_SECURITY_URL})`);
6725  }
6726  return "unsafe:" + url;
6727}
6728function tagSet(tags) {
6729  const res = {};
6730  for (const t of tags.split(","))
6731    res[t] = true;
6732  return res;
6733}
6734function merge2(...sets) {
6735  const res = {};
6736  for (const s of sets) {
6737    for (const v in s) {
6738      if (s.hasOwnProperty(v))
6739        res[v] = true;
6740    }
6741  }
6742  return res;
6743}
6744function isClobberedElement(parentNode, childNode) {
6745  return (parentNode.compareDocumentPosition(childNode) & Node.DOCUMENT_POSITION_CONTAINED_BY) !== Node.DOCUMENT_POSITION_CONTAINED_BY;
6746}
6747function getNextSibling(node) {
6748  const nextSibling = node.nextSibling;
6749  if (nextSibling && node !== nextSibling.previousSibling) {
6750    throw clobberedElementError(nextSibling);
6751  }
6752  return nextSibling;
6753}
6754function getFirstChild(node) {
6755  const firstChild = node.firstChild;
6756  if (firstChild && isClobberedElement(node, firstChild)) {
6757    throw clobberedElementError(firstChild);
6758  }
6759  return firstChild;
6760}
6761function getNodeName(node) {
6762  const nodeName = node.nodeName;
6763  return typeof nodeName === "string" ? nodeName : "FORM";
6764}
6765function clobberedElementError(node) {
6766  return new Error(`Failed to sanitize html because the element is clobbered: ${node.outerHTML}`);
6767}
6768function encodeEntities(value) {
6769  return value.replace(/&/g, "&amp;").replace(SURROGATE_PAIR_REGEXP, function(match) {
6770    const hi = match.charCodeAt(0);
6771    const low = match.charCodeAt(1);
6772    return "&#" + ((hi - 55296) * 1024 + (low - 56320) + 65536) + ";";
6773  }).replace(NON_ALPHANUMERIC_REGEXP, function(match) {
6774    return "&#" + match.charCodeAt(0) + ";";
6775  }).replace(/</g, "&lt;").replace(/>/g, "&gt;");
6776}
6777function _sanitizeHtml(defaultDoc, unsafeHtmlInput) {
6778  let inertBodyElement = null;
6779  try {
6780    inertBodyHelper = inertBodyHelper || getInertBodyHelper(defaultDoc);
6781    let unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : "";
6782    inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);
6783    let mXSSAttempts = 5;
6784    let parsedHtml = unsafeHtml;
6785    do {
6786      if (mXSSAttempts === 0) {
6787        throw new Error("Failed to sanitize html because the input is unstable");
6788      }
6789      mXSSAttempts--;
6790      unsafeHtml = parsedHtml;
6791      parsedHtml = inertBodyElement.innerHTML;
6792      inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);
6793    } while (unsafeHtml !== parsedHtml);
6794    const sanitizer = new SanitizingHtmlSerializer();
6795    const safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement);
6796    if ((typeof ngDevMode === "undefined" || ngDevMode) && sanitizer.sanitizedSomething) {
6797      console.warn(`WARNING: sanitizing HTML stripped some content, see ${XSS_SECURITY_URL}`);
6798    }
6799    return trustedHTMLFromString(safeHtml);
6800  } finally {
6801    if (inertBodyElement) {
6802      const parent = getTemplateContent(inertBodyElement) || inertBodyElement;
6803      while (parent.firstChild) {
6804        parent.firstChild.remove();
6805      }
6806    }
6807  }
6808}
6809function getTemplateContent(el) {
6810  return "content" in el && isTemplateElement(el) ? el.content : null;
6811}
6812function isTemplateElement(el) {
6813  return el.nodeType === Node.ELEMENT_NODE && el.nodeName === "TEMPLATE";
6814}
6815function escapeCommentText(value) {
6816  return value.replace(COMMENT_DISALLOWED, (text) => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED));
6817}
6818function createTextNode(renderer, value) {
6819  return renderer.createText(value);
6820}
6821function updateTextNode(renderer, rNode, value) {
6822  renderer.setValue(rNode, value);
6823}
6824function createCommentNode(renderer, value) {
6825  return renderer.createComment(escapeCommentText(value));
6826}
6827function createElementNode(renderer, name, namespace) {
6828  return renderer.createElement(name, namespace);
6829}
6830function nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {
6831  renderer.insertBefore(parent, child, beforeNode, isMove);
6832}
6833function nativeAppendChild(renderer, parent, child) {
6834  ngDevMode && assertDefined(parent, "parent node must be defined");
6835  renderer.appendChild(parent, child);
6836}
6837function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {
6838  if (beforeNode !== null) {
6839    nativeInsertBefore(renderer, parent, child, beforeNode, isMove);
6840  } else {
6841    nativeAppendChild(renderer, parent, child);
6842  }
6843}
6844function nativeRemoveNode(renderer, rNode, isHostElement, requireSynchronousElementRemoval) {
6845  renderer.removeChild(null, rNode, isHostElement, requireSynchronousElementRemoval);
6846}
6847function writeDirectStyle(renderer, element, newValue) {
6848  ngDevMode && assertString(newValue, "'newValue' should be a string");
6849  renderer.setAttribute(element, "style", newValue);
6850}
6851function writeDirectClass(renderer, element, newValue) {
6852  ngDevMode && assertString(newValue, "'newValue' should be a string");
6853  if (newValue === "") {
6854    renderer.removeAttribute(element, "class");
6855  } else {
6856    renderer.setAttribute(element, "class", newValue);
6857  }
6858}
6859function setupStaticAttributes(renderer, element, tNode) {
6860  const { mergedAttrs, classes, styles } = tNode;
6861  if (mergedAttrs !== null) {
6862    setUpAttributes(renderer, element, mergedAttrs);
6863  }
6864  if (classes !== null) {
6865    writeDirectClass(renderer, element, classes);
6866  }
6867  if (styles !== null) {
6868    writeDirectStyle(renderer, element, styles);
6869  }
6870}
6871function enforceIframeSecurity(iframe) {
6872  const lView = getLView();
6873  iframe.src = "";
6874  iframe.srcdoc = trustedHTMLFromString("");
6875  nativeRemoveNode(lView[RENDERER], iframe);
6876}
6877function \u0275\u0275sanitizeHtml(unsafeHtml) {
6878  const sanitizer = getSanitizer();
6879  if (sanitizer) {
6880    return trustedHTMLFromStringBypass(sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || "");
6881  }
6882  if (allowSanitizationBypassAndThrow(
6883    unsafeHtml,
6884    "HTML"
6885    /* BypassType.Html */
6886  )) {
6887    return trustedHTMLFromStringBypass(unwrapSafeValue(unsafeHtml));
6888  }
6889  return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml));
6890}
6891function \u0275\u0275sanitizeStyle(unsafeStyle) {
6892  const sanitizer = getSanitizer();
6893  if (sanitizer) {
6894    return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || "";
6895  }
6896  if (allowSanitizationBypassAndThrow(
6897    unsafeStyle,
6898    "Style"
6899    /* BypassType.Style */
6900  )) {
6901    return unwrapSafeValue(unsafeStyle);
6902  }
6903  return renderStringify(unsafeStyle);
6904}
6905function \u0275\u0275sanitizeUrl(unsafeUrl) {
6906  const sanitizer = getSanitizer();
6907  if (sanitizer) {
6908    return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || "";
6909  }
6910  if (allowSanitizationBypassAndThrow(
6911    unsafeUrl,
6912    "URL"
6913    /* BypassType.Url */
6914  )) {
6915    return unwrapSafeValue(unsafeUrl);
6916  }
6917  return _sanitizeUrl(renderStringify(unsafeUrl));
6918}
6919function \u0275\u0275sanitizeResourceUrl(unsafeResourceUrl) {
6920  const sanitizer = getSanitizer();
6921  if (sanitizer) {
6922    return trustedScriptURLFromStringBypass(sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || "");
6923  }
6924  if (allowSanitizationBypassAndThrow(
6925    unsafeResourceUrl,
6926    "ResourceURL"
6927    /* BypassType.ResourceUrl */
6928  )) {
6929    return trustedScriptURLFromStringBypass(unwrapSafeValue(unsafeResourceUrl));
6930  }
6931  throw new RuntimeError(904, ngDevMode && `unsafe value used in a resource URL context (see ${XSS_SECURITY_URL})`);
6932}
6933function \u0275\u0275sanitizeScript(unsafeScript) {
6934  const sanitizer = getSanitizer();
6935  if (sanitizer) {
6936    return trustedScriptFromStringBypass(sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || "");
6937  }
6938  if (allowSanitizationBypassAndThrow(
6939    unsafeScript,
6940    "Script"
6941    /* BypassType.Script */
6942  )) {
6943    return trustedScriptFromStringBypass(unwrapSafeValue(unsafeScript));
6944  }
6945  throw new RuntimeError(905, ngDevMode && "unsafe value used in a script context");
6946}
6947function \u0275\u0275trustConstantHtml(html) {
6948  if (ngDevMode && (!Array.isArray(html) || !Array.isArray(html.raw) || html.length !== 1)) {
6949    throw new Error(`Unexpected interpolation in trusted HTML constant: ${html.join("?")}`);
6950  }
6951  return trustedHTMLFromString(html[0]);
6952}
6953function \u0275\u0275trustConstantResourceUrl(url) {
6954  if (ngDevMode && (!Array.isArray(url) || !Array.isArray(url.raw) || url.length !== 1)) {
6955    throw new Error(`Unexpected interpolation in trusted URL constant: ${url.join("?")}`);
6956  }
6957  return trustedScriptURLFromString(url[0]);
6958}
6959function getUrlSanitizer(tag, prop) {
6960  if (prop === "src" && (tag === "embed" || tag === "frame" || tag === "iframe" || tag === "media" || tag === "script") || prop === "href" && (tag === "base" || tag === "link")) {
6961    return \u0275\u0275sanitizeResourceUrl;
6962  }
6963  return \u0275\u0275sanitizeUrl;
6964}
6965function \u0275\u0275sanitizeUrlOrResourceUrl(unsafeUrl, tag, prop) {
6966  return getUrlSanitizer(tag, prop)(unsafeUrl);
6967}
6968function validateAgainstEventProperties(name) {
6969  if (name.toLowerCase().startsWith("on")) {
6970    const errorMessage = `Binding to event property '${name}' is disallowed for security reasons, please use (${name.slice(2)})=...
6971If '${name}' is a directive input, make sure the directive is imported by the current module.`;
6972    throw new RuntimeError(306, errorMessage);
6973  }
6974}
6975function validateAgainstEventAttributes(name) {
6976  if (name.toLowerCase().startsWith("on")) {
6977    const errorMessage = `Binding to event attribute '${name}' is disallowed for security reasons, please use (${name.slice(2)})=...`;
6978    throw new RuntimeError(306, errorMessage);
6979  }
6980}
6981function getSanitizer() {
6982  const lView = getLView();
6983  return lView && lView[ENVIRONMENT].sanitizer;
6984}
6985function \u0275\u0275validateAttribute(value, tagName, attributeName2) {
6986  const lowerCaseTagName = tagName.toLowerCase();
6987  const lowerCaseAttrName = attributeName2.toLowerCase();
6988  if (!SECURITY_SENSITIVE_ELEMENTS[lowerCaseTagName]?.has(lowerCaseAttrName)) {
6989    return value;
6990  }
6991  const tNode = getSelectedTNode();
6992  if (tNode.type !== 2) {
6993    return value;
6994  }
6995  const lView = getLView();
6996  if (lowerCaseTagName === "iframe") {
6997    const element = getNativeByTNode(tNode, lView);
6998    enforceIframeSecurity(element);
6999  }
7000  const errorMessage = ngDevMode && `Angular has detected that the \`${attributeName2}\` was applied as a binding to the <${tagName}> element${getTemplateLocationDetails(lView)}. For security reasons, the \`${attributeName2}\` can be set on the <${tagName}> element as a static attribute only. 
7001To fix this, switch the \`${attributeName2}\` binding to a static attribute in a template or in host bindings section.`;
7002  throw new RuntimeError(-910, errorMessage);
7003}
7004function normalizeDebugBindingName(name) {
7005  name = camelCaseToDashCase(name.replace(/[$@]/g, "_"));
7006  return `ng-reflect-${name}`;
7007}
7008function camelCaseToDashCase(input2) {
7009  return input2.replace(CAMEL_CASE_REGEXP, (...m) => "-" + m[1].toLowerCase());
7010}
7011function normalizeDebugBindingValue(value) {
7012  try {
7013    return value != null ? value.toString().slice(0, 30) : value;
7014  } catch (e) {
7015    return "[ERROR] Exception while trying to serialize the value";
7016  }
7017}
7018function \u0275\u0275resolveWindow(element) {
7019  return element.ownerDocument.defaultView;
7020}
7021function \u0275\u0275resolveDocument(element) {
7022  return element.ownerDocument;
7023}
7024function \u0275\u0275resolveBody(element) {
7025  return element.ownerDocument.body;
7026}
7027function maybeUnwrapFn(value) {
7028  if (value instanceof Function) {
7029    return value();
7030  } else {
7031    return value;
7032  }
7033}
7034function assertStandaloneComponentType(type) {
7035  assertComponentDef(type);
7036  const componentDef = getComponentDef(type);
7037  if (!componentDef.standalone) {
7038    throw new RuntimeError(907, `The ${stringifyForError(type)} component is not marked as standalone, but Angular expects to have a standalone component here. Please make sure the ${stringifyForError(type)} component has the \`standalone: true\` flag in the decorator.`);
7039  }
7040}
7041function assertComponentDef(type) {
7042  if (!getComponentDef(type)) {
7043    throw new RuntimeError(906, `The ${stringifyForError(type)} is not an Angular component, make sure it has the \`@Component\` decorator.`);
7044  }
7045}
7046function throwMultipleComponentError(tNode, first, second) {
7047  throw new RuntimeError(-300, `Multiple components match node with tagname ${tNode.value}: ${stringifyForError(first)} and ${stringifyForError(second)}`);
7048}
7049function throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName, lView) {
7050  const hostComponentDef = getDeclarationComponentDef(lView);
7051  const componentClassName = hostComponentDef?.type?.name;
7052  const field = propName ? ` for '${propName}'` : "";
7053  let msg = `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value${field}: '${formatValue(oldValue)}'. Current value: '${formatValue(currValue)}'.${componentClassName ? ` Expression location: ${componentClassName} component` : ""}`;
7054  if (creationMode) {
7055    msg += ` It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook?`;
7056  }
7057  throw new RuntimeError(-100, msg);
7058}
7059function formatValue(value) {
7060  let strValue = String(value);
7061  try {
7062    if (Array.isArray(value) || strValue === "[object Object]") {
7063      strValue = JSON.stringify(value);
7064    }
7065  } catch (error) {
7066  }
7067  return strValue.length > VALUE_STRING_LENGTH_LIMIT ? strValue.substring(0, VALUE_STRING_LENGTH_LIMIT) + "\u2026" : strValue;
7068}
7069function constructDetailsForInterpolation(lView, rootIndex, expressionIndex, meta, changedValue) {
7070  const [propName, prefix, ...chunks] = meta.split(INTERPOLATION_DELIMITER);
7071  let oldValue = prefix, newValue = prefix;
7072  for (let i = 0; i < chunks.length; i++) {
7073    const slotIdx = rootIndex + i;
7074    oldValue += `${lView[slotIdx]}${chunks[i]}`;
7075    newValue += `${slotIdx === expressionIndex ? changedValue : lView[slotIdx]}${chunks[i]}`;
7076  }
7077  return { propName, oldValue, newValue };
7078}
7079function getExpressionChangedErrorDetails(lView, bindingIndex, oldValue, newValue) {
7080  const tData = lView[TVIEW].data;
7081  const metadata = tData[bindingIndex];
7082  if (typeof metadata === "string") {
7083    if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) {
7084      return constructDetailsForInterpolation(lView, bindingIndex, bindingIndex, metadata, newValue);
7085    }
7086    return { propName: metadata, oldValue, newValue };
7087  }
7088  if (metadata === null) {
7089    let idx = bindingIndex - 1;
7090    while (typeof tData[idx] !== "string" && tData[idx + 1] === null) {
7091      idx--;
7092    }
7093    const meta = tData[idx];
7094    if (typeof meta === "string") {
7095      const matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, "g"));
7096      if (matches && matches.length - 1 > bindingIndex - idx) {
7097        return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue);
7098      }
7099    }
7100  }
7101  return { propName: void 0, oldValue, newValue };
7102}
7103function classIndexOf(className, classToSearch, startingIndex) {
7104  ngDevMode && assertNotEqual(classToSearch, "", 'can not look for "" string.');
7105  let end = className.length;
7106  while (true) {
7107    const foundIndex = className.indexOf(classToSearch, startingIndex);
7108    if (foundIndex === -1)
7109      return foundIndex;
7110    if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= 32) {
7111      const length = classToSearch.length;
7112      if (foundIndex + length === end || className.charCodeAt(foundIndex + length) <= 32) {
7113        return foundIndex;
7114      }
7115    }
7116    startingIndex = foundIndex + 1;
7117  }
7118}
7119function isCssClassMatching(tNode, attrs, cssClassToMatch, isProjectionMode) {
7120  ngDevMode && assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), "Class name expected to be lowercase.");
7121  let i = 0;
7122  if (isProjectionMode) {
7123    for (; i < attrs.length && typeof attrs[i] === "string"; i += 2) {
7124      if (attrs[i] === "class" && classIndexOf(attrs[i + 1].toLowerCase(), cssClassToMatch, 0) !== -1) {
7125        return true;
7126      }
7127    }
7128  } else if (isInlineTemplate(tNode)) {
7129    return false;
7130  }
7131  i = attrs.indexOf(1, i);
7132  if (i > -1) {
7133    let item;
7134    while (++i < attrs.length && typeof (item = attrs[i]) === "string") {
7135      if (item.toLowerCase() === cssClassToMatch) {
7136        return true;
7137      }
7138    }
7139  }
7140  return false;
7141}
7142function isInlineTemplate(tNode) {
7143  return tNode.type === 4 && tNode.value !== NG_TEMPLATE_SELECTOR;
7144}
7145function hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) {
7146  const tagNameToCompare = tNode.type === 4 && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value;
7147  return currentSelector === tagNameToCompare;
7148}
7149function isNodeMatchingSelector(tNode, selector, isProjectionMode) {
7150  ngDevMode && assertDefined(selector[0], "Selector should have a tag name");
7151  let mode = 4;
7152  const nodeAttrs = tNode.attrs;
7153  const nameOnlyMarkerIdx = nodeAttrs !== null ? getNameOnlyMarkerIndex(nodeAttrs) : 0;
7154  let skipToNextSelector = false;
7155  for (let i = 0; i < selector.length; i++) {
7156    const current = selector[i];
7157    if (typeof current === "number") {
7158      if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {
7159        return false;
7160      }
7161      if (skipToNextSelector && isPositive(current))
7162        continue;
7163      skipToNextSelector = false;
7164      mode = current | mode & 1;
7165      continue;
7166    }
7167    if (skipToNextSelector)
7168      continue;
7169    if (mode & 4) {
7170      mode = 2 | mode & 1;
7171      if (current !== "" && !hasTagAndTypeMatch(tNode, current, isProjectionMode) || current === "" && selector.length === 1) {
7172        if (isPositive(mode))
7173          return false;
7174        skipToNextSelector = true;
7175      }
7176    } else if (mode & 8) {
7177      if (nodeAttrs === null || !isCssClassMatching(tNode, nodeAttrs, current, isProjectionMode)) {
7178        if (isPositive(mode))
7179          return false;
7180        skipToNextSelector = true;
7181      }
7182    } else {
7183      const selectorAttrValue = selector[++i];
7184      const attrIndexInNode = findAttrIndexInNode(current, nodeAttrs, isInlineTemplate(tNode), isProjectionMode);
7185      if (attrIndexInNode === -1) {
7186        if (isPositive(mode))
7187          return false;
7188        skipToNextSelector = true;
7189        continue;
7190      }
7191      if (selectorAttrValue !== "") {
7192        let nodeAttrValue;
7193        if (attrIndexInNode > nameOnlyMarkerIdx) {
7194          nodeAttrValue = "";
7195        } else {
7196          ngDevMode && assertNotEqual(nodeAttrs[attrIndexInNode], 0, "We do not match directives on namespaced attributes");
7197          nodeAttrValue = nodeAttrs[attrIndexInNode + 1].toLowerCase();
7198        }
7199        if (mode & 2 && selectorAttrValue !== nodeAttrValue) {
7200          if (isPositive(mode))
7201            return false;
7202          skipToNextSelector = true;
7203        }
7204      }
7205    }
7206  }
7207  return isPositive(mode) || skipToNextSelector;
7208}
7209function isPositive(mode) {
7210  return (mode & 1) === 0;
7211}
7212function findAttrIndexInNode(name, attrs, isInlineTemplate2, isProjectionMode) {
7213  if (attrs === null)
7214    return -1;
7215  let i = 0;
7216  if (isProjectionMode || !isInlineTemplate2) {
7217    let bindingsMode = false;
7218    while (i < attrs.length) {
7219      const maybeAttrName = attrs[i];
7220      if (maybeAttrName === name) {
7221        return i;
7222      } else if (maybeAttrName === 3 || maybeAttrName === 6) {
7223        bindingsMode = true;
7224      } else if (maybeAttrName === 1 || maybeAttrName === 2) {
7225        let value = attrs[++i];
7226        while (typeof value === "string") {
7227          value = attrs[++i];
7228        }
7229        continue;
7230      } else if (maybeAttrName === 4) {
7231        break;
7232      } else if (maybeAttrName === 0) {
7233        i += 4;
7234        continue;
7235      }
7236      i += bindingsMode ? 1 : 2;
7237    }
7238    return -1;
7239  } else {
7240    return matchTemplateAttribute(attrs, name);
7241  }
7242}
7243function isNodeMatchingSelectorList(tNode, selector, isProjectionMode = false) {
7244  for (let i = 0; i < selector.length; i++) {
7245    if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {
7246      return true;
7247    }
7248  }
7249  return false;
7250}
7251function getProjectAsAttrValue(tNode) {
7252  const nodeAttrs = tNode.attrs;
7253  if (nodeAttrs != null) {
7254    const ngProjectAsAttrIdx = nodeAttrs.indexOf(
7255      5
7256      /* AttributeMarker.ProjectAs */
7257    );
7258    if ((ngProjectAsAttrIdx & 1) === 0) {
7259      return nodeAttrs[ngProjectAsAttrIdx + 1];
7260    }
7261  }
7262  return null;
7263}
7264function getNameOnlyMarkerIndex(nodeAttrs) {
7265  for (let i = 0; i < nodeAttrs.length; i++) {
7266    const nodeAttr = nodeAttrs[i];
7267    if (isNameOnlyAttributeMarker(nodeAttr)) {
7268      return i;
7269    }
7270  }
7271  return nodeAttrs.length;
7272}
7273function matchTemplateAttribute(attrs, name) {
7274  let i = attrs.indexOf(
7275    4
7276    /* AttributeMarker.Template */
7277  );
7278  if (i > -1) {
7279    i++;
7280    while (i < attrs.length) {
7281      const attr = attrs[i];
7282      if (typeof attr === "number")
7283        return -1;
7284      if (attr === name)
7285        return i;
7286      i++;
7287    }
7288  }
7289  return -1;
7290}
7291function isSelectorInSelectorList(selector, list) {
7292  selectorListLoop: for (let i = 0; i < list.length; i++) {
7293    const currentSelectorInList = list[i];
7294    if (selector.length !== currentSelectorInList.length) {
7295      continue;
7296    }
7297    for (let j = 0; j < selector.length; j++) {
7298      if (selector[j] !== currentSelectorInList[j]) {
7299        continue selectorListLoop;
7300      }
7301    }
7302    return true;
7303  }
7304  return false;
7305}
7306function maybeWrapInNotSelector(isNegativeMode, chunk) {
7307  return isNegativeMode ? ":not(" + chunk.trim() + ")" : chunk;
7308}
7309function stringifyCSSSelector(selector) {
7310  let result = selector[0];
7311  let i = 1;
7312  let mode = 2;
7313  let currentChunk = "";
7314  let isNegativeMode = false;
7315  while (i < selector.length) {
7316    let valueOrMarker = selector[i];
7317    if (typeof valueOrMarker === "string") {
7318      if (mode & 2) {
7319        const attrValue = selector[++i];
7320        currentChunk += "[" + valueOrMarker + (attrValue.length > 0 ? '="' + attrValue + '"' : "") + "]";
7321      } else if (mode & 8) {
7322        currentChunk += "." + valueOrMarker;
7323      } else if (mode & 4) {
7324        currentChunk += " " + valueOrMarker;
7325      }
7326    } else {
7327      if (currentChunk !== "" && !isPositive(valueOrMarker)) {
7328        result += maybeWrapInNotSelector(isNegativeMode, currentChunk);
7329        currentChunk = "";
7330      }
7331      mode = valueOrMarker;
7332      isNegativeMode = isNegativeMode || !isPositive(mode);
7333    }
7334    i++;
7335  }
7336  if (currentChunk !== "") {
7337    result += maybeWrapInNotSelector(isNegativeMode, currentChunk);
7338  }
7339  return result;
7340}
7341function stringifyCSSSelectorList(selectorList) {
7342  return selectorList.map(stringifyCSSSelector).join(",");
7343}
7344function extractAttrsAndClassesFromSelector(selector) {
7345  const attrs = [];
7346  const classes = [];
7347  let i = 1;
7348  let mode = 2;
7349  while (i < selector.length) {
7350    let valueOrMarker = selector[i];
7351    if (typeof valueOrMarker === "string") {
7352      if (mode === 2) {
7353        if (valueOrMarker !== "") {
7354          attrs.push(valueOrMarker, selector[++i]);
7355        }
7356      } else if (mode === 8) {
7357        classes.push(valueOrMarker);
7358      }
7359    } else {
7360      if (!isPositive(mode))
7361        break;
7362      mode = valueOrMarker;
7363    }
7364    i++;
7365  }
7366  if (classes.length) {
7367    attrs.push(1, ...classes);
7368  }
7369  return attrs;
7370}
7371function createTView(type, declTNode, templateFn, decls, vars, directives, pipes, viewQuery, schemas, constsOrFactory, ssrId) {
7372  const bindingStartIndex = HEADER_OFFSET + decls;
7373  const initialViewLength = bindingStartIndex + vars;
7374  const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);
7375  const consts = typeof constsOrFactory === "function" ? constsOrFactory() : constsOrFactory;
7376  const tView = blueprint[TVIEW] = {
7377    type,
7378    blueprint,
7379    template: templateFn,
7380    queries: null,
7381    viewQuery,
7382    declTNode,
7383    data: blueprint.slice().fill(null, bindingStartIndex),
7384    bindingStartIndex,
7385    expandoStartIndex: initialViewLength,
7386    hostBindingOpCodes: null,
7387    firstCreatePass: true,
7388    firstUpdatePass: true,
7389    staticViewQueries: false,
7390    staticContentQueries: false,
7391    preOrderHooks: null,
7392    preOrderCheckHooks: null,
7393    contentHooks: null,
7394    contentCheckHooks: null,
7395    viewHooks: null,
7396    viewCheckHooks: null,
7397    destroyHooks: null,
7398    cleanup: null,
7399    contentQueries: null,
7400    components: null,
7401    directiveRegistry: typeof directives === "function" ? directives() : directives,
7402    pipeRegistry: typeof pipes === "function" ? pipes() : pipes,
7403    firstChild: null,
7404    schemas,
7405    consts,
7406    incompleteFirstPass: false,
7407    ssrId
7408  };
7409  if (ngDevMode) {
7410    Object.seal(tView);
7411  }
7412  return tView;
7413}
7414function createViewBlueprint(bindingStartIndex, initialViewLength) {
7415  const blueprint = [];
7416  for (let i = 0; i < initialViewLength; i++) {
7417    blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);
7418  }
7419  return blueprint;
7420}
7421function getOrCreateComponentTView(def) {
7422  const tView = def.tView;
7423  if (tView === null || tView.incompleteFirstPass) {
7424    const declTNode = null;
7425    return def.tView = createTView(1, declTNode, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas, def.consts, def.id);
7426  }
7427  return tView;
7428}
7429function createLView(parentLView, tView, context2, flags, host, tHostNode, environment, renderer, injector, embeddedViewInjector, hydrationInfo) {
7430  const lView = tView.blueprint.slice();
7431  lView[HOST] = host;
7432  lView[FLAGS] = flags | 4 | 128 | 8 | 64 | 1024;
7433  if (embeddedViewInjector !== null || parentLView && parentLView[FLAGS] & 2048) {
7434    lView[FLAGS] |= 2048;
7435  }
7436  resetPreOrderHookFlags(lView);
7437  ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);
7438  lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;
7439  lView[CONTEXT] = context2;
7440  lView[ENVIRONMENT] = environment || parentLView && parentLView[ENVIRONMENT];
7441  ngDevMode && assertDefined(lView[ENVIRONMENT], "LViewEnvironment is required");
7442  lView[RENDERER] = renderer || parentLView && parentLView[RENDERER];
7443  ngDevMode && assertDefined(lView[RENDERER], "Renderer is required");
7444  lView[INJECTOR] = injector || parentLView && parentLView[INJECTOR] || null;
7445  lView[T_HOST] = tHostNode;
7446  lView[ID] = getUniqueLViewId();
7447  lView[HYDRATION] = hydrationInfo;
7448  lView[EMBEDDED_VIEW_INJECTOR] = embeddedViewInjector;
7449  ngDevMode && assertEqual(tView.type == 2 ? parentLView !== null : true, true, "Embedded views must have parentLView");
7450  lView[DECLARATION_COMPONENT_VIEW] = tView.type == 2 ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;
7451  return lView;
7452}
7453function createComponentLView(lView, hostTNode, def) {
7454  const native = getNativeByTNode(hostTNode, lView);
7455  const tView = getOrCreateComponentTView(def);
7456  const rendererFactory = lView[ENVIRONMENT].rendererFactory;
7457  const componentView = addToEndOfViewTree(lView, createLView(lView, tView, null, getInitialLViewFlagsFromDef(def), native, hostTNode, null, rendererFactory.createRenderer(native, def), null, null, null));
7458  return lView[hostTNode.index] = componentView;
7459}
7460function getInitialLViewFlagsFromDef(def) {
7461  let flags = 16;
7462  if (def.signals) {
7463    flags = 4096;
7464  } else if (def.onPush) {
7465    flags = 64;
7466  }
7467  return flags;
7468}
7469function allocExpando(tView, lView, numSlotsToAlloc, initialValue) {
7470  if (numSlotsToAlloc === 0)
7471    return -1;
7472  if (ngDevMode) {
7473    assertFirstCreatePass(tView);
7474    assertSame(tView, lView[TVIEW], "`LView` must be associated with `TView`!");
7475    assertEqual(tView.data.length, lView.length, "Expecting LView to be same size as TView");
7476    assertEqual(tView.data.length, tView.blueprint.length, "Expecting Blueprint to be same size as TView");
7477    assertFirstUpdatePass(tView);
7478  }
7479  const allocIdx = lView.length;
7480  for (let i = 0; i < numSlotsToAlloc; i++) {
7481    lView.push(initialValue);
7482    tView.blueprint.push(initialValue);
7483    tView.data.push(null);
7484  }
7485  return allocIdx;
7486}
7487function addToEndOfViewTree(lView, lViewOrLContainer) {
7488  if (lView[CHILD_HEAD]) {
7489    lView[CHILD_TAIL][NEXT] = lViewOrLContainer;
7490  } else {
7491    lView[CHILD_HEAD] = lViewOrLContainer;
7492  }
7493  lView[CHILD_TAIL] = lViewOrLContainer;
7494  return lViewOrLContainer;
7495}
7496function \u0275\u0275advance(delta = 1) {
7497  ngDevMode && assertGreaterThan(delta, 0, "Can only advance forward");
7498  selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, !!ngDevMode && isInCheckNoChangesMode());
7499}
7500function selectIndexInternal(tView, lView, index, checkNoChangesMode) {
7501  ngDevMode && assertIndexInDeclRange(lView[TVIEW], index);
7502  if (!checkNoChangesMode) {
7503    const hooksInitPhaseCompleted = (lView[FLAGS] & 3) === 3;
7504    if (hooksInitPhaseCompleted) {
7505      const preOrderCheckHooks = tView.preOrderCheckHooks;
7506      if (preOrderCheckHooks !== null) {
7507        executeCheckHooks(lView, preOrderCheckHooks, index);
7508      }
7509    } else {
7510      const preOrderHooks = tView.preOrderHooks;
7511      if (preOrderHooks !== null) {
7512        executeInitAndCheckHooks(lView, preOrderHooks, 0, index);
7513      }
7514    }
7515  }
7516  setSelectedIndex(index);
7517}
7518function writeToDirectiveInput(def, instance, publicName, value) {
7519  const prevConsumer = setActiveConsumer(null);
7520  try {
7521    if (ngDevMode) {
7522      if (!def.inputs.hasOwnProperty(publicName)) {
7523        throw new Error(`ASSERTION ERROR: Directive ${def.type.name} does not have an input with a public name of "${publicName}"`);
7524      }
7525      if (instance instanceof NodeInjectorFactory) {
7526        throw new Error(`ASSERTION ERROR: Cannot write input to factory for type ${def.type.name}. Directive has not been created yet.`);
7527      }
7528    }
7529    const [privateName, flags, transform] = def.inputs[publicName];
7530    let inputSignalNode = null;
7531    if ((flags & InputFlags.SignalBased) !== 0) {
7532      const field = instance[privateName];
7533      inputSignalNode = field[SIGNAL];
7534    }
7535    if (inputSignalNode !== null && inputSignalNode.transformFn !== void 0) {
7536      value = inputSignalNode.transformFn(value);
7537    } else if (transform !== null) {
7538      value = transform.call(instance, value);
7539    }
7540    if (def.setInput !== null) {
7541      def.setInput(instance, inputSignalNode, value, publicName, privateName);
7542    } else {
7543      applyValueToInputField(instance, inputSignalNode, privateName, value);
7544    }
7545  } finally {
7546    setActiveConsumer(prevConsumer);
7547  }
7548}
7549function icuContainerIterate(tIcuContainerNode, lView) {
7550  return _icuContainerIterate(tIcuContainerNode, lView);
7551}
7552function ensureIcuContainerVisitorLoaded(loader) {
7553  if (_icuContainerIterate === void 0) {
7554    _icuContainerIterate = loader();
7555  }
7556}
7557function parseCssTimeUnitsToMs(value) {
7558  if (!value)
7559    return 0;
7560  const multiplier = value.toLowerCase().indexOf("ms") > -1 ? 1 : 1e3;
7561  return parseFloat(value) * multiplier;
7562}
7563function parseCssPropertyValue(computedStyle, name) {
7564  const value = computedStyle.getPropertyValue(name);
7565  return value.split(",").map((part) => part.trim());
7566}
7567function getLongestComputedTransition(computedStyle) {
7568  const transitionedProperties = parseCssPropertyValue(computedStyle, "transition-property");
7569  const rawDurations = parseCssPropertyValue(computedStyle, "transition-duration");
7570  const rawDelays = parseCssPropertyValue(computedStyle, "transition-delay");
7571  const longest = { propertyName: "", duration: 0, animationName: void 0 };
7572  for (let i = 0; i < transitionedProperties.length; i++) {
7573    const duration = parseCssTimeUnitsToMs(rawDelays[i]) + parseCssTimeUnitsToMs(rawDurations[i]);
7574    if (duration > longest.duration) {
7575      longest.propertyName = transitionedProperties[i];
7576      longest.duration = duration;
7577    }
7578  }
7579  return longest;
7580}
7581function getLongestComputedAnimation(computedStyle) {
7582  const rawNames = parseCssPropertyValue(computedStyle, "animation-name");
7583  const rawDelays = parseCssPropertyValue(computedStyle, "animation-delay");
7584  const rawDurations = parseCssPropertyValue(computedStyle, "animation-duration");
7585  const longest = { animationName: "", propertyName: void 0, duration: 0 };
7586  for (let i = 0; i < rawNames.length; i++) {
7587    const duration = parseCssTimeUnitsToMs(rawDelays[i]) + parseCssTimeUnitsToMs(rawDurations[i]);
7588    if (duration > longest.duration) {
7589      longest.animationName = rawNames[i];
7590      longest.duration = duration;
7591    }
7592  }
7593  return longest;
7594}
7595function isShorterThanExistingAnimation(existing, longest) {
7596  return existing !== void 0 && existing.duration > longest.duration;
7597}
7598function longestExists(longest) {
7599  return (longest.animationName != void 0 || longest.propertyName != void 0) && longest.duration > 0;
7600}
7601function determineLongestAnimationFromComputedStyles(el, animationsMap) {
7602  const computedStyle = getComputedStyle(el);
7603  const longestAnimation = getLongestComputedAnimation(computedStyle);
7604  const longestTransition = getLongestComputedTransition(computedStyle);
7605  const longest = longestAnimation.duration > longestTransition.duration ? longestAnimation : longestTransition;
7606  if (isShorterThanExistingAnimation(animationsMap.get(el), longest))
7607    return;
7608  if (longestExists(longest)) {
7609    animationsMap.set(el, longest);
7610  }
7611}
7612function determineLongestAnimation(el, animationsMap, areAnimationSupported2) {
7613  if (!areAnimationSupported2)
7614    return;
7615  const animations = el.getAnimations();
7616  return animations.length === 0 ? (
7617    // fallback to computed styles if getAnimations is empty. This would happen if styles are
7618    // currently recalculating due to a reflow happening elsewhere.
7619    determineLongestAnimationFromComputedStyles(el, animationsMap)
7620  ) : determineLongestAnimationFromElementAnimations(el, animationsMap, animations);
7621}
7622function determineLongestAnimationFromElementAnimations(el, animationsMap, animations) {
7623  let longest = {
7624    animationName: void 0,
7625    propertyName: void 0,
7626    duration: 0
7627  };
7628  for (const animation of animations) {
7629    const timing = animation.effect?.getTiming();
7630    const animDuration = typeof timing?.duration === "number" ? timing.duration : 0;
7631    let duration = (timing?.delay ?? 0) + animDuration;
7632    let propertyName;
7633    let animationName;
7634    if (animation.animationName) {
7635      animationName = animation.animationName;
7636    } else {
7637      propertyName = animation.transitionProperty;
7638    }
7639    if (duration >= longest.duration) {
7640      longest = { animationName, propertyName, duration };
7641    }
7642  }
7643  if (isShorterThanExistingAnimation(animationsMap.get(el), longest))
7644    return;
7645  if (longestExists(longest)) {
7646    animationsMap.set(el, longest);
7647  }
7648}
7649function performanceMarkFeature(feature) {
7650  if (markedFeatures.has(feature)) {
7651    return;
7652  }
7653  markedFeatures.add(feature);
7654  performance?.mark?.("mark_feature_usage", { detail: { feature } });
7655}
7656function scheduleCallbackWithRafRace(callback) {
7657  let timeoutId;
7658  let animationFrameId;
7659  function cleanup() {
7660    callback = noop2;
7661    try {
7662      if (animationFrameId !== void 0 && typeof cancelAnimationFrame === "function") {
7663        cancelAnimationFrame(animationFrameId);
7664      }
7665      if (timeoutId !== void 0) {
7666        clearTimeout(timeoutId);
7667      }
7668    } catch {
7669    }
7670  }
7671  timeoutId = setTimeout(() => {
7672    callback();
7673    cleanup();
7674  });
7675  if (typeof requestAnimationFrame === "function") {
7676    animationFrameId = requestAnimationFrame(() => {
7677      callback();
7678      cleanup();
7679    });
7680  }
7681  return () => cleanup();
7682}
7683function scheduleCallbackWithMicrotask(callback) {
7684  queueMicrotask(() => callback());
7685  return () => {
7686    callback = noop2;
7687  };
7688}
7689function checkStable(zone) {
7690  if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {
7691    try {
7692      zone._nesting++;
7693      zone.onMicrotaskEmpty.emit(null);
7694    } finally {
7695      zone._nesting--;
7696      if (!zone.hasPendingMicrotasks) {
7697        try {
7698          zone.runOutsideAngular(() => zone.onStable.emit(null));
7699        } finally {
7700          zone.isStable = true;
7701        }
7702      }
7703    }
7704  }
7705}
7706function delayChangeDetectionForEvents(zone) {
7707  if (zone.isCheckStableRunning || zone.callbackScheduled) {
7708    return;
7709  }
7710  zone.callbackScheduled = true;
7711  function scheduleCheckStable() {
7712    scheduleCallbackWithRafRace(() => {
7713      zone.callbackScheduled = false;
7714      updateMicroTaskStatus(zone);
7715      zone.isCheckStableRunning = true;
7716      checkStable(zone);
7717      zone.isCheckStableRunning = false;
7718    });
7719  }
7720  if (zone.scheduleInRootZone) {
7721    Zone.root.run(() => {
7722      scheduleCheckStable();
7723    });
7724  } else {
7725    zone._outer.run(() => {
7726      scheduleCheckStable();
7727    });
7728  }
7729  updateMicroTaskStatus(zone);
7730}
7731function forkInnerZoneWithAngularBehavior(zone) {
7732  const delayChangeDetectionForEventsDelegate = () => {
7733    delayChangeDetectionForEvents(zone);
7734  };
7735  const instanceId = ngZoneInstanceId++;
7736  zone._inner = zone._inner.fork({
7737    name: "angular",
7738    properties: {
7739      [isAngularZoneProperty]: true,
7740      [angularZoneInstanceIdProperty]: instanceId,
7741      [angularZoneInstanceIdProperty + instanceId]: true
7742    },
7743    onInvokeTask: (delegate, current, target, task, applyThis, applyArgs) => {
7744      if (shouldBeIgnoredByZone(applyArgs)) {
7745        return delegate.invokeTask(target, task, applyThis, applyArgs);
7746      }
7747      try {
7748        onEnter(zone);
7749        return delegate.invokeTask(target, task, applyThis, applyArgs);
7750      } finally {
7751        if (zone.shouldCoalesceEventChangeDetection && task.type === "eventTask" || zone.shouldCoalesceRunChangeDetection) {
7752          delayChangeDetectionForEventsDelegate();
7753        }
7754        onLeave(zone);
7755      }
7756    },
7757    onInvoke: (delegate, current, target, callback, applyThis, applyArgs, source) => {
7758      try {
7759        onEnter(zone);
7760        return delegate.invoke(target, callback, applyThis, applyArgs, source);
7761      } finally {
7762        if (zone.shouldCoalesceRunChangeDetection && // Do not delay change detection when the task is the scheduler's tick.
7763        // We need to synchronously trigger the stability logic so that the
7764        // zone-based scheduler can prevent a duplicate ApplicationRef.tick
7765        // by first checking if the scheduler tick is running. This does seem a bit roundabout,
7766        // but we _do_ still want to trigger all the correct events when we exit the zone.run
7767        // (`onMicrotaskEmpty` and `onStable` _should_ emit; developers can have code which
7768        // relies on these events happening after change detection runs).
7769        // Note: `zone.callbackScheduled` is already in delayChangeDetectionForEventsDelegate
7770        // but is added here as well to prevent reads of applyArgs when not necessary
7771        !zone.callbackScheduled && !isSchedulerTick(applyArgs)) {
7772          delayChangeDetectionForEventsDelegate();
7773        }
7774        onLeave(zone);
7775      }
7776    },
7777    onHasTask: (delegate, current, target, hasTaskState) => {
7778      delegate.hasTask(target, hasTaskState);
7779      if (current === target) {
7780        if (hasTaskState.change == "microTask") {
7781          zone._hasPendingMicrotasks = hasTaskState.microTask;
7782          updateMicroTaskStatus(zone);
7783          checkStable(zone);
7784        } else if (hasTaskState.change == "macroTask") {
7785          zone.hasPendingMacrotasks = hasTaskState.macroTask;
7786        }
7787      }
7788    },
7789    onHandleError: (delegate, current, target, error) => {
7790      delegate.handleError(target, error);
7791      zone.runOutsideAngular(() => zone.onError.emit(error));
7792      return false;
7793    }
7794  });
7795}
7796function updateMicroTaskStatus(zone) {
7797  if (zone._hasPendingMicrotasks || (zone.shouldCoalesceEventChangeDetection || zone.shouldCoalesceRunChangeDetection) && zone.callbackScheduled === true) {
7798    zone.hasPendingMicrotasks = true;
7799  } else {
7800    zone.hasPendingMicrotasks = false;
7801  }
7802}
7803function onEnter(zone) {
7804  zone._nesting++;
7805  if (zone.isStable) {
7806    zone.isStable = false;
7807    zone.onUnstable.emit(null);
7808  }
7809}
7810function onLeave(zone) {
7811  zone._nesting--;
7812  checkStable(zone);
7813}
7814function shouldBeIgnoredByZone(applyArgs) {
7815  return hasApplyArgsData(applyArgs, "__ignore_ng_zone__");
7816}
7817function isSchedulerTick(applyArgs) {
7818  return hasApplyArgsData(applyArgs, "__scheduler_tick__");
7819}
7820function hasApplyArgsData(applyArgs, key) {
7821  if (!Array.isArray(applyArgs)) {
7822    return false;
7823  }
7824  if (applyArgs.length !== 1) {
7825    return false;
7826  }
7827  return applyArgs[0]?.data?.[key] === true;
7828}
7829function getNgZone(ngZoneToUse = "zone.js", options) {
7830  if (ngZoneToUse === "noop") {
7831    return new NoopNgZone();
7832  }
7833  if (ngZoneToUse === "zone.js") {
7834    return new NgZone(options);
7835  }
7836  return ngZoneToUse;
7837}
7838function afterEveryRender(callbackOrSpec, options) {
7839  ngDevMode && assertNotInReactiveContext(afterEveryRender, "Call `afterEveryRender` outside of a reactive context. For example, schedule the render callback inside the component constructor`.");
7840  if (ngDevMode && !options?.injector) {
7841    assertInInjectionContext(afterEveryRender);
7842  }
7843  const injector = options?.injector ?? inject2(Injector);
7844  if (false) {
7845    return NOOP_AFTER_RENDER_REF;
7846  }
7847  performanceMarkFeature("NgAfterRender");
7848  return afterEveryRenderImpl(
7849    callbackOrSpec,
7850    injector,
7851    options,
7852    /* once */
7853    false
7854  );
7855}
7856function afterNextRender(callbackOrSpec, options) {
7857  if (ngDevMode && !options?.injector) {
7858    assertInInjectionContext(afterNextRender);
7859  }
7860  const injector = options?.injector ?? inject2(Injector);
7861  if (false) {
7862    return NOOP_AFTER_RENDER_REF;
7863  }
7864  performanceMarkFeature("NgAfterNextRender");
7865  return afterEveryRenderImpl(
7866    callbackOrSpec,
7867    injector,
7868    options,
7869    /* once */
7870    true
7871  );
7872}
7873function getHooks(callbackOrSpec) {
7874  if (callbackOrSpec instanceof Function) {
7875    return [
7876      void 0,
7877      void 0,
7878      /* MixedReadWrite */
7879      callbackOrSpec,
7880      void 0
7881    ];
7882  } else {
7883    return [
7884      callbackOrSpec.earlyRead,
7885      callbackOrSpec.write,
7886      callbackOrSpec.mixedReadWrite,
7887      callbackOrSpec.read
7888    ];
7889  }
7890}
7891function afterEveryRenderImpl(callbackOrSpec, injector, options, once) {
7892  const manager = injector.get(AfterRenderManager);
7893  manager.impl ??= injector.get(AfterRenderImpl);
7894  const tracing = injector.get(TracingService, null, { optional: true });
7895  const destroyRef = options?.manualCleanup !== true ? injector.get(DestroyRef) : null;
7896  const viewContext = injector.get(ViewContext, null, { optional: true });
7897  const sequence = new AfterRenderSequence(manager.impl, getHooks(callbackOrSpec), viewContext?.view, once, destroyRef, tracing?.snapshot(null));
7898  manager.impl.register(sequence);
7899  return sequence;
7900}
7901function addToAnimationQueue(injector, animationFns, animationData) {
7902  const animationQueue = injector.get(ANIMATION_QUEUE);
7903  if (Array.isArray(animationFns)) {
7904    for (const animateFn of animationFns) {
7905      animationQueue.queue.add(animateFn);
7906      animationData?.detachedLeaveAnimationFns?.push(animateFn);
7907    }
7908  } else {
7909    animationQueue.queue.add(animationFns);
7910    animationData?.detachedLeaveAnimationFns?.push(animationFns);
7911  }
7912  animationQueue.scheduler && animationQueue.scheduler(injector);
7913}
7914function removeFromAnimationQueue(injector, animationData) {
7915  const animationQueue = injector.get(ANIMATION_QUEUE);
7916  if (animationData.detachedLeaveAnimationFns) {
7917    for (const animationFn of animationData.detachedLeaveAnimationFns) {
7918      animationQueue.queue.delete(animationFn);
7919    }
7920    animationData.detachedLeaveAnimationFns = void 0;
7921  }
7922}
7923function scheduleAnimationQueue(injector) {
7924  const animationQueue = injector.get(ANIMATION_QUEUE);
7925  if (!animationQueue.isScheduled) {
7926    afterNextRender(() => {
7927      animationQueue.isScheduled = false;
7928      for (let animateFn of animationQueue.queue) {
7929        animateFn();
7930      }
7931      animationQueue.queue.clear();
7932    }, { injector });
7933    animationQueue.isScheduled = true;
7934  }
7935}
7936function initializeAnimationQueueScheduler(injector) {
7937  const animationQueue = injector.get(ANIMATION_QUEUE);
7938  animationQueue.scheduler = scheduleAnimationQueue;
7939  animationQueue.scheduler(injector);
7940}
7941function queueEnterAnimations(injector, enterAnimations) {
7942  for (const [_, nodeAnimations] of enterAnimations) {
7943    addToAnimationQueue(injector, nodeAnimations.animateFns);
7944  }
7945}
7946function maybeQueueEnterAnimation(parentLView, parent, tNode, injector) {
7947  const enterAnimations = parentLView?.[ANIMATIONS]?.enter;
7948  if (parent !== null && enterAnimations && enterAnimations.has(tNode.index)) {
7949    queueEnterAnimations(injector, enterAnimations);
7950  }
7951}
7952function applyToElementOrContainer(action, renderer, injector, parent, lNodeToHandle, tNode, beforeNode, parentLView) {
7953  if (lNodeToHandle != null) {
7954    let lContainer;
7955    let isComponent2 = false;
7956    if (isLContainer(lNodeToHandle)) {
7957      lContainer = lNodeToHandle;
7958    } else if (isLView(lNodeToHandle)) {
7959      isComponent2 = true;
7960      ngDevMode && assertDefined(lNodeToHandle[HOST], "HOST must be defined for a component LView");
7961      lNodeToHandle = lNodeToHandle[HOST];
7962    }
7963    const rNode = unwrapRNode(lNodeToHandle);
7964    if (action === 0 && parent !== null) {
7965      maybeQueueEnterAnimation(parentLView, parent, tNode, injector);
7966      if (beforeNode == null) {
7967        nativeAppendChild(renderer, parent, rNode);
7968      } else {
7969        nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);
7970      }
7971    } else if (action === 1 && parent !== null) {
7972      maybeQueueEnterAnimation(parentLView, parent, tNode, injector);
7973      nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);
7974    } else if (action === 2) {
7975      runLeaveAnimationsWithCallback(parentLView, tNode, injector, (nodeHasLeaveAnimations) => {
7976        nativeRemoveNode(renderer, rNode, isComponent2, nodeHasLeaveAnimations);
7977      });
7978    } else if (action === 3) {
7979      runLeaveAnimationsWithCallback(parentLView, tNode, injector, () => {
7980        renderer.destroyNode(rNode);
7981      });
7982    }
7983    if (lContainer != null) {
7984      applyContainer(renderer, action, injector, lContainer, tNode, parent, beforeNode);
7985    }
7986  }
7987}
7988function removeViewFromDOM(tView, lView) {
7989  detachViewFromDOM(tView, lView);
7990  lView[HOST] = null;
7991  lView[T_HOST] = null;
7992}
7993function addViewToDOM(tView, parentTNode, renderer, lView, parentNativeNode, beforeNode) {
7994  lView[HOST] = parentNativeNode;
7995  lView[T_HOST] = parentTNode;
7996  applyView(tView, lView, renderer, 1, parentNativeNode, beforeNode);
7997}
7998function detachViewFromDOM(tView, lView) {
7999  lView[ENVIRONMENT].changeDetectionScheduler?.notify(
8000    9
8001    /* NotificationSource.ViewDetachedFromDOM */
8002  );
8003  applyView(tView, lView, lView[RENDERER], 2, null, null);
8004}
8005function destroyViewTree(rootView) {
8006  let lViewOrLContainer = rootView[CHILD_HEAD];
8007  if (!lViewOrLContainer) {
8008    return cleanUpView(rootView[TVIEW], rootView);
8009  }
8010  while (lViewOrLContainer) {
8011    let next = null;
8012    if (isLView(lViewOrLContainer)) {
8013      next = lViewOrLContainer[CHILD_HEAD];
8014    } else {
8015      ngDevMode && assertLContainer(lViewOrLContainer);
8016      const firstView = lViewOrLContainer[CONTAINER_HEADER_OFFSET];
8017      if (firstView)
8018        next = firstView;
8019    }
8020    if (!next) {
8021      while (lViewOrLContainer && !lViewOrLContainer[NEXT] && lViewOrLContainer !== rootView) {
8022        if (isLView(lViewOrLContainer)) {
8023          cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);
8024        }
8025        lViewOrLContainer = lViewOrLContainer[PARENT];
8026      }
8027      if (lViewOrLContainer === null)
8028        lViewOrLContainer = rootView;
8029      if (isLView(lViewOrLContainer)) {
8030        cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);
8031      }
8032      next = lViewOrLContainer && lViewOrLContainer[NEXT];
8033    }
8034    lViewOrLContainer = next;
8035  }
8036}
8037function detachMovedView(declarationContainer, lView) {
8038  ngDevMode && assertLContainer(declarationContainer);
8039  ngDevMode && assertDefined(declarationContainer[MOVED_VIEWS], "A projected view should belong to a non-empty projected views collection");
8040  const movedViews = declarationContainer[MOVED_VIEWS];
8041  const declarationViewIndex = movedViews.indexOf(lView);
8042  movedViews.splice(declarationViewIndex, 1);
8043}
8044function destroyLView(tView, lView) {
8045  if (isDestroyed(lView)) {
8046    return;
8047  }
8048  const renderer = lView[RENDERER];
8049  if (renderer.destroyNode) {
8050    applyView(tView, lView, renderer, 3, null, null);
8051  }
8052  destroyViewTree(lView);
8053}
8054function cleanUpView(tView, lView) {
8055  if (isDestroyed(lView)) {
8056    return;
8057  }
8058  const prevConsumer = setActiveConsumer(null);
8059  try {
8060    lView[FLAGS] &= ~128;
8061    lView[FLAGS] |= 256;
8062    lView[REACTIVE_TEMPLATE_CONSUMER] && consumerDestroy(lView[REACTIVE_TEMPLATE_CONSUMER]);
8063    executeOnDestroys(tView, lView);
8064    processCleanups(tView, lView);
8065    if (lView[TVIEW].type === 1) {
8066      lView[RENDERER].destroy();
8067    }
8068    const declarationContainer = lView[DECLARATION_LCONTAINER];
8069    if (declarationContainer !== null && isLContainer(lView[PARENT])) {
8070      if (declarationContainer !== lView[PARENT]) {
8071        detachMovedView(declarationContainer, lView);
8072      }
8073      const lQueries = lView[QUERIES];
8074      if (lQueries !== null) {
8075        lQueries.detachView(tView);
8076      }
8077    }
8078    unregisterLView(lView);
8079  } finally {
8080    setActiveConsumer(prevConsumer);
8081  }
8082}
8083function runLeaveAnimationsWithCallback(lView, tNode, injector, callback) {
8084  const animations = lView?.[ANIMATIONS];
8085  if (animations == null || animations.leave == void 0 || !animations.leave.has(tNode.index))
8086    return callback(false);
8087  if (lView)
8088    allLeavingAnimations.add(lView);
8089  addToAnimationQueue(injector, () => {
8090    if (animations.leave && animations.leave.has(tNode.index)) {
8091      const leaveAnimationMap = animations.leave;
8092      const leaveAnimations = leaveAnimationMap.get(tNode.index);
8093      const runningAnimations = [];
8094      if (leaveAnimations) {
8095        for (let index = 0; index < leaveAnimations.animateFns.length; index++) {
8096          const animationFn = leaveAnimations.animateFns[index];
8097          const { promise } = animationFn();
8098          runningAnimations.push(promise);
8099        }
8100        animations.detachedLeaveAnimationFns = void 0;
8101      }
8102      animations.running = Promise.allSettled(runningAnimations);
8103      runAfterLeaveAnimations(lView, callback);
8104    } else {
8105      if (lView)
8106        allLeavingAnimations.delete(lView);
8107      callback(false);
8108    }
8109  }, animations);
8110}
8111function runAfterLeaveAnimations(lView, callback) {
8112  const runningAnimations = lView[ANIMATIONS]?.running;
8113  if (runningAnimations) {
8114    runningAnimations.then(() => {
8115      lView[ANIMATIONS].running = void 0;
8116      allLeavingAnimations.delete(lView);
8117      callback(true);
8118    });
8119    return;
8120  }
8121  callback(false);
8122}
8123function processCleanups(tView, lView) {
8124  ngDevMode && assertNotReactive(processCleanups.name);
8125  const tCleanup = tView.cleanup;
8126  const lCleanup = lView[CLEANUP];
8127  if (tCleanup !== null) {
8128    for (let i = 0; i < tCleanup.length - 1; i += 2) {
8129      if (typeof tCleanup[i] === "string") {
8130        const targetIdx = tCleanup[i + 3];
8131        ngDevMode && assertNumber(targetIdx, "cleanup target must be a number");
8132        if (targetIdx >= 0) {
8133          lCleanup[targetIdx]();
8134        } else {
8135          lCleanup[-targetIdx].unsubscribe();
8136        }
8137        i += 2;
8138      } else {
8139        const context2 = lCleanup[tCleanup[i + 1]];
8140        tCleanup[i].call(context2);
8141      }
8142    }
8143  }
8144  if (lCleanup !== null) {
8145    lView[CLEANUP] = null;
8146  }
8147  const destroyHooks = lView[ON_DESTROY_HOOKS];
8148  if (destroyHooks !== null) {
8149    lView[ON_DESTROY_HOOKS] = null;
8150    for (let i = 0; i < destroyHooks.length; i++) {
8151      const destroyHooksFn = destroyHooks[i];
8152      ngDevMode && assertFunction(destroyHooksFn, "Expecting destroy hook to be a function.");
8153      destroyHooksFn();
8154    }
8155  }
8156  const effects = lView[EFFECTS];
8157  if (effects !== null) {
8158    lView[EFFECTS] = null;
8159    for (const effect2 of effects) {
8160      effect2.destroy();
8161    }
8162  }
8163}
8164function executeOnDestroys(tView, lView) {
8165  ngDevMode && assertNotReactive(executeOnDestroys.name);
8166  let destroyHooks;
8167  if (tView != null && (destroyHooks = tView.destroyHooks) != null) {
8168    for (let i = 0; i < destroyHooks.length; i += 2) {
8169      const context2 = lView[destroyHooks[i]];
8170      if (!(context2 instanceof NodeInjectorFactory)) {
8171        const toCall = destroyHooks[i + 1];
8172        if (Array.isArray(toCall)) {
8173          for (let j = 0; j < toCall.length; j += 2) {
8174            const callContext = context2[toCall[j]];
8175            const hook = toCall[j + 1];
8176            profiler(4, callContext, hook);
8177            try {
8178              hook.call(callContext);
8179            } finally {
8180              profiler(5, callContext, hook);
8181            }
8182          }
8183        } else {
8184          profiler(4, context2, toCall);
8185          try {
8186            toCall.call(context2);
8187          } finally {
8188            profiler(5, context2, toCall);
8189          }
8190        }
8191      }
8192    }
8193  }
8194}
8195function getParentRElement(tView, tNode, lView) {
8196  return getClosestRElement(tView, tNode.parent, lView);
8197}
8198function getClosestRElement(tView, tNode, lView) {
8199  let parentTNode = tNode;
8200  while (parentTNode !== null && parentTNode.type & (8 | 32 | 128)) {
8201    tNode = parentTNode;
8202    parentTNode = tNode.parent;
8203  }
8204  if (parentTNode === null) {
8205    return lView[HOST];
8206  } else {
8207    ngDevMode && assertTNodeType(
8208      parentTNode,
8209      3 | 4
8210      /* TNodeType.Container */
8211    );
8212    if (isComponentHost(parentTNode)) {
8213      ngDevMode && assertTNodeForLView(parentTNode, lView);
8214      const { encapsulation } = tView.data[parentTNode.directiveStart + parentTNode.componentOffset];
8215      if (encapsulation === ViewEncapsulation.None || encapsulation === ViewEncapsulation.Emulated) {
8216        return null;
8217      }
8218    }
8219    return getNativeByTNode(parentTNode, lView);
8220  }
8221}
8222function getInsertInFrontOfRNode(parentTNode, currentTNode, lView) {
8223  return _getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView);
8224}
8225function getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView) {
8226  if (parentTNode.type & (8 | 32)) {
8227    return getNativeByTNode(parentTNode, lView);
8228  }
8229  return null;
8230}
8231function setI18nHandling(getInsertInFrontOfRNodeWithI18n2, processI18nInsertBefore2) {
8232  _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithI18n2;
8233  _processI18nInsertBefore = processI18nInsertBefore2;
8234}
8235function appendChild(tView, lView, childRNode, childTNode) {
8236  const parentRNode = getParentRElement(tView, childTNode, lView);
8237  const renderer = lView[RENDERER];
8238  const parentTNode = childTNode.parent || lView[T_HOST];
8239  const anchorNode = getInsertInFrontOfRNode(parentTNode, childTNode, lView);
8240  if (parentRNode != null) {
8241    if (Array.isArray(childRNode)) {
8242      for (let i = 0; i < childRNode.length; i++) {
8243        nativeAppendOrInsertBefore(renderer, parentRNode, childRNode[i], anchorNode, false);
8244      }
8245    } else {
8246      nativeAppendOrInsertBefore(renderer, parentRNode, childRNode, anchorNode, false);
8247    }
8248  }
8249  _processI18nInsertBefore !== void 0 && _processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRNode);
8250}
8251function getFirstNativeNode(lView, tNode) {
8252  if (tNode !== null) {
8253    ngDevMode && assertTNodeType(
8254      tNode,
8255      3 | 12 | 32 | 16 | 128
8256      /* TNodeType.LetDeclaration */
8257    );
8258    const tNodeType = tNode.type;
8259    if (tNodeType & 3) {
8260      return getNativeByTNode(tNode, lView);
8261    } else if (tNodeType & 4) {
8262      return getBeforeNodeForView(-1, lView[tNode.index]);
8263    } else if (tNodeType & 8) {
8264      const elIcuContainerChild = tNode.child;
8265      if (elIcuContainerChild !== null) {
8266        return getFirstNativeNode(lView, elIcuContainerChild);
8267      } else {
8268        const rNodeOrLContainer = lView[tNode.index];
8269        if (isLContainer(rNodeOrLContainer)) {
8270          return getBeforeNodeForView(-1, rNodeOrLContainer);
8271        } else {
8272          return unwrapRNode(rNodeOrLContainer);
8273        }
8274      }
8275    } else if (tNodeType & 128) {
8276      return getFirstNativeNode(lView, tNode.next);
8277    } else if (tNodeType & 32) {
8278      let nextRNode = icuContainerIterate(tNode, lView);
8279      let rNode = nextRNode();
8280      return rNode || unwrapRNode(lView[tNode.index]);
8281    } else {
8282      const projectionNodes = getProjectionNodes(lView, tNode);
8283      if (projectionNodes !== null) {
8284        if (Array.isArray(projectionNodes)) {
8285          return projectionNodes[0];
8286        }
8287        const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);
8288        ngDevMode && assertParentView(parentView);
8289        return getFirstNativeNode(parentView, projectionNodes);
8290      } else {
8291        return getFirstNativeNode(lView, tNode.next);
8292      }
8293    }
8294  }
8295  return null;
8296}
8297function getProjectionNodes(lView, tNode) {
8298  if (tNode !== null) {
8299    const componentView = lView[DECLARATION_COMPONENT_VIEW];
8300    const componentHost = componentView[T_HOST];
8301    const slotIdx = tNode.projection;
8302    ngDevMode && assertProjectionSlots(lView);
8303    return componentHost.projection[slotIdx];
8304  }
8305  return null;
8306}
8307function getBeforeNodeForView(viewIndexInContainer, lContainer) {
8308  const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;
8309  if (nextViewIndex < lContainer.length) {
8310    const lView = lContainer[nextViewIndex];
8311    const firstTNodeOfView = lView[TVIEW].firstChild;
8312    if (firstTNodeOfView !== null) {
8313      return getFirstNativeNode(lView, firstTNodeOfView);
8314    }
8315  }
8316  return lContainer[NATIVE];
8317}
8318function applyNodes(renderer, action, tNode, lView, parentRElement, beforeNode, isProjection) {
8319  while (tNode != null) {
8320    ngDevMode && assertTNodeForLView(tNode, lView);
8321    const injector = lView[INJECTOR];
8322    if (tNode.type === 128) {
8323      tNode = tNode.next;
8324      continue;
8325    }
8326    ngDevMode && assertTNodeType(
8327      tNode,
8328      3 | 12 | 16 | 32
8329      /* TNodeType.Icu */
8330    );
8331    const rawSlotValue = lView[tNode.index];
8332    const tNodeType = tNode.type;
8333    if (isProjection) {
8334      if (action === 0) {
8335        rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);
8336        tNode.flags |= 2;
8337      }
8338    }
8339    if (!isDetachedByI18n(tNode)) {
8340      if (tNodeType & 8) {
8341        applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false);
8342        applyToElementOrContainer(action, renderer, injector, parentRElement, rawSlotValue, tNode, beforeNode, lView);
8343      } else if (tNodeType & 32) {
8344        const nextRNode = icuContainerIterate(tNode, lView);
8345        let rNode;
8346        while (rNode = nextRNode()) {
8347          applyToElementOrContainer(action, renderer, injector, parentRElement, rNode, tNode, beforeNode, lView);
8348        }
8349        applyToElementOrContainer(action, renderer, injector, parentRElement, rawSlotValue, tNode, beforeNode, lView);
8350      } else if (tNodeType & 16) {
8351        applyProjectionRecursive(renderer, action, lView, tNode, parentRElement, beforeNode);
8352      } else {
8353        ngDevMode && assertTNodeType(
8354          tNode,
8355          3 | 4
8356          /* TNodeType.Container */
8357        );
8358        applyToElementOrContainer(action, renderer, injector, parentRElement, rawSlotValue, tNode, beforeNode, lView);
8359      }
8360    }
8361    tNode = isProjection ? tNode.projectionNext : tNode.next;
8362  }
8363}
8364function applyView(tView, lView, renderer, action, parentRElement, beforeNode) {
8365  applyNodes(renderer, action, tView.firstChild, lView, parentRElement, beforeNode, false);
8366}
8367function applyProjection(tView, lView, tProjectionNode) {
8368  const renderer = lView[RENDERER];
8369  const parentRNode = getParentRElement(tView, tProjectionNode, lView);
8370  const parentTNode = tProjectionNode.parent || lView[T_HOST];
8371  let beforeNode = getInsertInFrontOfRNode(parentTNode, tProjectionNode, lView);
8372  applyProjectionRecursive(renderer, 0, lView, tProjectionNode, parentRNode, beforeNode);
8373}
8374function applyProjectionRecursive(renderer, action, lView, tProjectionNode, parentRElement, beforeNode) {
8375  const componentLView = lView[DECLARATION_COMPONENT_VIEW];
8376  const componentNode = componentLView[T_HOST];
8377  ngDevMode && assertEqual(typeof tProjectionNode.projection, "number", "expecting projection index");
8378  const nodeToProjectOrRNodes = componentNode.projection[tProjectionNode.projection];
8379  if (Array.isArray(nodeToProjectOrRNodes)) {
8380    for (let i = 0; i < nodeToProjectOrRNodes.length; i++) {
8381      const rNode = nodeToProjectOrRNodes[i];
8382      applyToElementOrContainer(action, renderer, lView[INJECTOR], parentRElement, rNode, tProjectionNode, beforeNode, lView);
8383    }
8384  } else {
8385    let nodeToProject = nodeToProjectOrRNodes;
8386    const projectedComponentLView = componentLView[PARENT];
8387    if (hasInSkipHydrationBlockFlag(tProjectionNode)) {
8388      nodeToProject.flags |= 128;
8389    }
8390    applyNodes(renderer, action, nodeToProject, projectedComponentLView, parentRElement, beforeNode, true);
8391  }
8392}
8393function applyContainer(renderer, action, injector, lContainer, tNode, parentRElement, beforeNode) {
8394  ngDevMode && assertLContainer(lContainer);
8395  const anchor = lContainer[NATIVE];
8396  const native = unwrapRNode(lContainer);
8397  if (anchor !== native) {
8398    applyToElementOrContainer(action, renderer, injector, parentRElement, anchor, tNode, beforeNode);
8399  }
8400  for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
8401    const lView = lContainer[i];
8402    applyView(lView[TVIEW], lView, renderer, action, parentRElement, anchor);
8403  }
8404}
8405function applyStyling(renderer, isClassBased, rNode, prop, value) {
8406  if (isClassBased) {
8407    if (!value) {
8408      renderer.removeClass(rNode, prop);
8409    } else {
8410      renderer.addClass(rNode, prop);
8411    }
8412  } else {
8413    let flags = prop.indexOf("-") === -1 ? void 0 : RendererStyleFlags2.DashCase;
8414    if (value == null) {
8415      renderer.removeStyle(rNode, prop, flags);
8416    } else {
8417      const isImportant = typeof value === "string" ? value.endsWith("!important") : false;
8418      if (isImportant) {
8419        value = value.slice(0, -10);
8420        flags |= RendererStyleFlags2.Important;
8421      }
8422      renderer.setStyle(rNode, prop, value, flags);
8423    }
8424  }
8425}
8426function executeTemplate(tView, lView, templateFn, rf, context2) {
8427  const prevSelectedIndex = getSelectedIndex();
8428  const isUpdatePhase = rf & 2;
8429  try {
8430    setSelectedIndex(-1);
8431    if (isUpdatePhase && lView.length > HEADER_OFFSET) {
8432      selectIndexInternal(tView, lView, HEADER_OFFSET, !!ngDevMode && isInCheckNoChangesMode());
8433    }
8434    const preHookType = isUpdatePhase ? 2 : 0;
8435    profiler(preHookType, context2, templateFn);
8436    templateFn(rf, context2);
8437  } finally {
8438    setSelectedIndex(prevSelectedIndex);
8439    const postHookType = isUpdatePhase ? 3 : 1;
8440    profiler(postHookType, context2, templateFn);
8441  }
8442}
8443function createDirectivesInstances(tView, lView, tNode) {
8444  instantiateAllDirectives(tView, lView, tNode);
8445  if ((tNode.flags & 64) === 64) {
8446    invokeDirectivesHostBindings(tView, lView, tNode);
8447  }
8448}
8449function saveResolvedLocalsInData(viewData, tNode, localRefExtractor = getNativeByTNode) {
8450  const localNames = tNode.localNames;
8451  if (localNames !== null) {
8452    let localIndex = tNode.index + 1;
8453    for (let i = 0; i < localNames.length; i += 2) {
8454      const index = localNames[i + 1];
8455      const value = index === -1 ? localRefExtractor(tNode, viewData) : viewData[index];
8456      viewData[localIndex++] = value;
8457    }
8458  }
8459}
8460function locateHostElement(renderer, elementOrSelector, encapsulation, injector) {
8461  const preserveHostContent = injector.get(PRESERVE_HOST_CONTENT, PRESERVE_HOST_CONTENT_DEFAULT);
8462  const preserveContent = preserveHostContent || encapsulation === ViewEncapsulation.ShadowDom;
8463  const rootElement = renderer.selectRootElement(elementOrSelector, preserveContent);
8464  applyRootElementTransform(rootElement);
8465  return rootElement;
8466}
8467function applyRootElementTransform(rootElement) {
8468  _applyRootElementTransformImpl(rootElement);
8469}
8470function mapPropName(name) {
8471  if (name === "class")
8472    return "className";
8473  if (name === "for")
8474    return "htmlFor";
8475  if (name === "formaction")
8476    return "formAction";
8477  if (name === "innerHtml")
8478    return "innerHTML";
8479  if (name === "readonly")
8480    return "readOnly";
8481  if (name === "tabindex")
8482    return "tabIndex";
8483  return name;
8484}
8485function setPropertyAndInputs(tNode, lView, propName, value, renderer, sanitizer) {
8486  ngDevMode && assertNotSame(value, NO_CHANGE, "Incoming value should never be NO_CHANGE.");
8487  const tView = lView[TVIEW];
8488  const hasSetInput = setAllInputsForProperty(tNode, tView, lView, propName, value);
8489  if (hasSetInput) {
8490    isComponentHost(tNode) && markDirtyIfOnPush(lView, tNode.index);
8491    ngDevMode && setNgReflectProperties(lView, tView, tNode, propName, value);
8492    return;
8493  }
8494  if (tNode.type & 3) {
8495    propName = mapPropName(propName);
8496  }
8497  setDomProperty(tNode, lView, propName, value, renderer, sanitizer);
8498}
8499function setDomProperty(tNode, lView, propName, value, renderer, sanitizer) {
8500  if (tNode.type & 3) {
8501    const element = getNativeByTNode(tNode, lView);
8502    if (ngDevMode) {
8503      validateAgainstEventProperties(propName);
8504      if (!isPropertyValid(element, propName, tNode.value, lView[TVIEW].schemas)) {
8505        handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);
8506      }
8507    }
8508    value = sanitizer != null ? sanitizer(value, tNode.value || "", propName) : value;
8509    renderer.setProperty(element, propName, value);
8510  } else if (tNode.type & 12) {
8511    if (ngDevMode && !matchingSchemas(lView[TVIEW].schemas, tNode.value)) {
8512      handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);
8513    }
8514  }
8515}
8516function markDirtyIfOnPush(lView, viewIndex) {
8517  ngDevMode && assertLView(lView);
8518  const childComponentLView = getComponentLViewByIndex(viewIndex, lView);
8519  if (!(childComponentLView[FLAGS] & 16)) {
8520    childComponentLView[FLAGS] |= 64;
8521  }
8522}
8523function setNgReflectProperty(lView, tNode, attrName, value) {
8524  const environment = lView[ENVIRONMENT];
8525  if (!environment.ngReflect) {
8526    return;
8527  }
8528  const element = getNativeByTNode(tNode, lView);
8529  const renderer = lView[RENDERER];
8530  attrName = normalizeDebugBindingName(attrName);
8531  const debugValue = normalizeDebugBindingValue(value);
8532  if (tNode.type & 3) {
8533    if (value == null) {
8534      renderer.removeAttribute(element, attrName);
8535    } else {
8536      renderer.setAttribute(element, attrName, debugValue);
8537    }
8538  } else {
8539    const textContent = escapeCommentText(`bindings=${JSON.stringify({ [attrName]: debugValue }, null, 2)}`);
8540    renderer.setValue(element, textContent);
8541  }
8542}
8543function setNgReflectProperties(lView, tView, tNode, publicName, value) {
8544  const environment = lView[ENVIRONMENT];
8545  if (!environment.ngReflect || !(tNode.type & (3 | 4))) {
8546    return;
8547  }
8548  const inputConfig = tNode.inputs?.[publicName];
8549  const hostInputConfig = tNode.hostDirectiveInputs?.[publicName];
8550  if (hostInputConfig) {
8551    for (let i = 0; i < hostInputConfig.length; i += 2) {
8552      const index = hostInputConfig[i];
8553      const publicName2 = hostInputConfig[i + 1];
8554      const def = tView.data[index];
8555      setNgReflectProperty(lView, tNode, def.inputs[publicName2][0], value);
8556    }
8557  }
8558  if (inputConfig) {
8559    for (const index of inputConfig) {
8560      const def = tView.data[index];
8561      setNgReflectProperty(lView, tNode, def.inputs[publicName][0], value);
8562    }
8563  }
8564}
8565function instantiateAllDirectives(tView, lView, tNode) {
8566  const start = tNode.directiveStart;
8567  const end = tNode.directiveEnd;
8568  if (isComponentHost(tNode)) {
8569    ngDevMode && assertTNodeType(
8570      tNode,
8571      3
8572      /* TNodeType.AnyRNode */
8573    );
8574    createComponentLView(lView, tNode, tView.data[start + tNode.componentOffset]);
8575  }
8576  if (!tView.firstCreatePass) {
8577    getOrCreateNodeInjectorForNode(tNode, lView);
8578  }
8579  const initialInputs = tNode.initialInputs;
8580  for (let i = start; i < end; i++) {
8581    const def = tView.data[i];
8582    const directive = getNodeInjectable(lView, tView, i, tNode);
8583    attachPatchData(directive, lView);
8584    if (initialInputs !== null) {
8585      setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs);
8586    }
8587    if (isComponentDef(def)) {
8588      const componentView = getComponentLViewByIndex(tNode.index, lView);
8589      componentView[CONTEXT] = getNodeInjectable(lView, tView, i, tNode);
8590    }
8591  }
8592}
8593function invokeDirectivesHostBindings(tView, lView, tNode) {
8594  const start = tNode.directiveStart;
8595  const end = tNode.directiveEnd;
8596  const elementIndex = tNode.index;
8597  const currentDirectiveIndex = getCurrentDirectiveIndex();
8598  try {
8599    setSelectedIndex(elementIndex);
8600    for (let dirIndex = start; dirIndex < end; dirIndex++) {
8601      const def = tView.data[dirIndex];
8602      const directive = lView[dirIndex];
8603      setCurrentDirectiveIndex(dirIndex);
8604      if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) {
8605        invokeHostBindingsInCreationMode(def, directive);
8606      }
8607    }
8608  } finally {
8609    setSelectedIndex(-1);
8610    setCurrentDirectiveIndex(currentDirectiveIndex);
8611  }
8612}
8613function invokeHostBindingsInCreationMode(def, directive) {
8614  if (def.hostBindings !== null) {
8615    def.hostBindings(1, directive);
8616  }
8617}
8618function findDirectiveDefMatches(tView, tNode) {
8619  ngDevMode && assertFirstCreatePass(tView);
8620  ngDevMode && assertTNodeType(
8621    tNode,
8622    3 | 12
8623    /* TNodeType.AnyContainer */
8624  );
8625  const registry = tView.directiveRegistry;
8626  let matches = null;
8627  if (registry) {
8628    for (let i = 0; i < registry.length; i++) {
8629      const def = registry[i];
8630      if (isNodeMatchingSelectorList(
8631        tNode,
8632        def.selectors,
8633        /* isProjectionMode */
8634        false
8635      )) {
8636        matches ??= [];
8637        if (isComponentDef(def)) {
8638          if (ngDevMode) {
8639            assertTNodeType(tNode, 2, `"${tNode.value}" tags cannot be used as component hosts. Please use a different tag to activate the ${stringify(def.type)} component.`);
8640            if (matches.length && isComponentDef(matches[0])) {
8641              throwMultipleComponentError(tNode, matches.find(isComponentDef).type, def.type);
8642            }
8643          }
8644          matches.unshift(def);
8645        } else {
8646          matches.push(def);
8647        }
8648      }
8649    }
8650  }
8651  return matches;
8652}
8653function elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace) {
8654  if (ngDevMode) {
8655    assertNotSame(value, NO_CHANGE, "Incoming value should never be NO_CHANGE.");
8656    validateAgainstEventAttributes(name);
8657    assertTNodeType(tNode, 2, `Attempted to set attribute \`${name}\` on a container node. Host bindings are not valid on ng-container or ng-template.`);
8658  }
8659  const element = getNativeByTNode(tNode, lView);
8660  setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer);
8661}
8662function setElementAttribute(renderer, element, namespace, tagName, name, value, sanitizer) {
8663  if (value == null) {
8664    renderer.removeAttribute(element, name, namespace);
8665  } else {
8666    const strValue = sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || "", name);
8667    renderer.setAttribute(element, name, strValue, namespace);
8668  }
8669}
8670function setInputsFromAttrs(lView, directiveIndex, instance, def, tNode, initialInputData) {
8671  const initialInputs = initialInputData[directiveIndex];
8672  if (initialInputs !== null) {
8673    for (let i = 0; i < initialInputs.length; i += 2) {
8674      const lookupName = initialInputs[i];
8675      const value = initialInputs[i + 1];
8676      writeToDirectiveInput(def, instance, lookupName, value);
8677      if (ngDevMode) {
8678        setNgReflectProperty(lView, tNode, def.inputs[lookupName][0], value);
8679      }
8680    }
8681  }
8682}
8683function elementLikeStartShared(tNode, lView, index, name, locateOrCreateNativeNode) {
8684  const adjustedIndex = HEADER_OFFSET + index;
8685  const tView = lView[TVIEW];
8686  const native = locateOrCreateNativeNode(tView, lView, tNode, name, index);
8687  lView[adjustedIndex] = native;
8688  setCurrentTNode(tNode, true);
8689  const isElement2 = tNode.type === 2;
8690  if (isElement2) {
8691    setupStaticAttributes(lView[RENDERER], native, tNode);
8692    if (getElementDepthCount() === 0 || isDirectiveHost(tNode)) {
8693      attachPatchData(native, lView);
8694    }
8695    increaseElementDepthCount();
8696  } else {
8697    attachPatchData(native, lView);
8698  }
8699  if (wasLastNodeCreated() && (!isElement2 || !isDetachedByI18n(tNode))) {
8700    appendChild(tView, lView, native, tNode);
8701  }
8702  return tNode;
8703}
8704function elementLikeEndShared(tNode) {
8705  let currentTNode = tNode;
8706  if (isCurrentTNodeParent()) {
8707    setCurrentTNodeAsNotParent();
8708  } else {
8709    ngDevMode && assertHasParent(getCurrentTNode());
8710    currentTNode = currentTNode.parent;
8711    setCurrentTNode(currentTNode, false);
8712  }
8713  return currentTNode;
8714}
8715function storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex, ...interpolationParts) {
8716  if (tData[bindingIndex] === null) {
8717    if (!tNode.inputs?.[propertyName] && !tNode.hostDirectiveInputs?.[propertyName]) {
8718      const propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []);
8719      propBindingIdxs.push(bindingIndex);
8720      let bindingMetadata = propertyName;
8721      if (interpolationParts.length > 0) {
8722        bindingMetadata += INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER);
8723      }
8724      tData[bindingIndex] = bindingMetadata;
8725    }
8726  }
8727}
8728function loadComponentRenderer(currentDef, tNode, lView) {
8729  if (currentDef === null || isComponentDef(currentDef)) {
8730    lView = unwrapLView(lView[tNode.index]);
8731  }
8732  return lView[RENDERER];
8733}
8734function handleUncaughtError(lView, error) {
8735  const injector = lView[INJECTOR];
8736  if (!injector) {
8737    return;
8738  }
8739  let errorHandler2;
8740  try {
8741    errorHandler2 = injector.get(INTERNAL_APPLICATION_ERROR_HANDLER, null);
8742  } catch {
8743    errorHandler2 = null;
8744  }
8745  errorHandler2?.(error);
8746}
8747function setAllInputsForProperty(tNode, tView, lView, publicName, value) {
8748  const inputs = tNode.inputs?.[publicName];
8749  const hostDirectiveInputs = tNode.hostDirectiveInputs?.[publicName];
8750  let hasMatch = false;
8751  if (hostDirectiveInputs) {
8752    for (let i = 0; i < hostDirectiveInputs.length; i += 2) {
8753      const index = hostDirectiveInputs[i];
8754      ngDevMode && assertIndexInRange(lView, index);
8755      const publicName2 = hostDirectiveInputs[i + 1];
8756      const def = tView.data[index];
8757      writeToDirectiveInput(def, lView[index], publicName2, value);
8758      hasMatch = true;
8759    }
8760  }
8761  if (inputs) {
8762    for (const index of inputs) {
8763      ngDevMode && assertIndexInRange(lView, index);
8764      const instance = lView[index];
8765      const def = tView.data[index];
8766      writeToDirectiveInput(def, instance, publicName, value);
8767      hasMatch = true;
8768    }
8769  }
8770  return hasMatch;
8771}
8772function renderComponent(hostLView, componentHostIdx) {
8773  ngDevMode && assertEqual(isCreationMode(hostLView), true, "Should be run in creation mode");
8774  const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);
8775  const componentTView = componentView[TVIEW];
8776  syncViewWithBlueprint(componentTView, componentView);
8777  const hostRNode = componentView[HOST];
8778  if (hostRNode !== null && componentView[HYDRATION] === null) {
8779    componentView[HYDRATION] = retrieveHydrationInfo(hostRNode, componentView[INJECTOR]);
8780  }
8781  profiler(
8782    18
8783    /* ProfilerEvent.ComponentStart */
8784  );
8785  renderView(componentTView, componentView, componentView[CONTEXT]);
8786  profiler(19, componentView[CONTEXT]);
8787}
8788function syncViewWithBlueprint(tView, lView) {
8789  for (let i = lView.length; i < tView.blueprint.length; i++) {
8790    lView.push(tView.blueprint[i]);
8791  }
8792}
8793function renderView(tView, lView, context2) {
8794  ngDevMode && assertEqual(isCreationMode(lView), true, "Should be run in creation mode");
8795  ngDevMode && assertNotReactive(renderView.name);
8796  enterView(lView);
8797  try {
8798    const viewQuery = tView.viewQuery;
8799    if (viewQuery !== null) {
8800      executeViewQueryFn(1, viewQuery, context2);
8801    }
8802    const templateFn = tView.template;
8803    if (templateFn !== null) {
8804      executeTemplate(tView, lView, templateFn, 1, context2);
8805    }
8806    if (tView.firstCreatePass) {
8807      tView.firstCreatePass = false;
8808    }
8809    lView[QUERIES]?.finishViewCreation(tView);
8810    if (tView.staticContentQueries) {
8811      refreshContentQueries(tView, lView);
8812    }
8813    if (tView.staticViewQueries) {
8814      executeViewQueryFn(2, tView.viewQuery, context2);
8815    }
8816    const components = tView.components;
8817    if (components !== null) {
8818      renderChildComponents(lView, components);
8819    }
8820  } catch (error) {
8821    if (tView.firstCreatePass) {
8822      tView.incompleteFirstPass = true;
8823      tView.firstCreatePass = false;
8824    }
8825    throw error;
8826  } finally {
8827    lView[FLAGS] &= ~4;
8828    leaveView();
8829  }
8830}
8831function renderChildComponents(hostLView, components) {
8832  for (let i = 0; i < components.length; i++) {
8833    renderComponent(hostLView, components[i]);
8834  }
8835}
8836function createAndRenderEmbeddedLView(declarationLView, templateTNode, context2, options) {
8837  const prevConsumer = setActiveConsumer(null);
8838  try {
8839    const embeddedTView = templateTNode.tView;
8840    ngDevMode && assertDefined(embeddedTView, "TView must be defined for a template node.");
8841    ngDevMode && assertTNodeForLView(templateTNode, declarationLView);
8842    const isSignalView = declarationLView[FLAGS] & 4096;
8843    const viewFlags = isSignalView ? 4096 : 16;
8844    const embeddedLView = createLView(declarationLView, embeddedTView, context2, viewFlags, null, templateTNode, null, null, options?.injector ?? null, options?.embeddedViewInjector ?? null, options?.dehydratedView ?? null);
8845    const declarationLContainer = declarationLView[templateTNode.index];
8846    ngDevMode && assertLContainer(declarationLContainer);
8847    embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;
8848    const declarationViewLQueries = declarationLView[QUERIES];
8849    if (declarationViewLQueries !== null) {
8850      embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);
8851    }
8852    renderView(embeddedTView, embeddedLView, context2);
8853    return embeddedLView;
8854  } finally {
8855    setActiveConsumer(prevConsumer);
8856  }
8857}
8858function shouldAddViewToDom(tNode, dehydratedView) {
8859  return !dehydratedView || dehydratedView.firstChild === null || hasInSkipHydrationBlockFlag(tNode);
8860}
8861function collectNativeNodes(tView, lView, tNode, result, isProjection = false) {
8862  while (tNode !== null) {
8863    if (tNode.type === 128) {
8864      tNode = isProjection ? tNode.projectionNext : tNode.next;
8865      continue;
8866    }
8867    ngDevMode && assertTNodeType(
8868      tNode,
8869      3 | 12 | 16 | 32
8870      /* TNodeType.Icu */
8871    );
8872    const lNode = lView[tNode.index];
8873    if (lNode !== null) {
8874      result.push(unwrapRNode(lNode));
8875    }
8876    if (isLContainer(lNode)) {
8877      collectNativeNodesInLContainer(lNode, result);
8878    }
8879    const tNodeType = tNode.type;
8880    if (tNodeType & 8) {
8881      collectNativeNodes(tView, lView, tNode.child, result);
8882    } else if (tNodeType & 32) {
8883      const nextRNode = icuContainerIterate(tNode, lView);
8884      let rNode;
8885      while (rNode = nextRNode()) {
8886        result.push(rNode);
8887      }
8888    } else if (tNodeType & 16) {
8889      const nodesInSlot = getProjectionNodes(lView, tNode);
8890      if (Array.isArray(nodesInSlot)) {
8891        result.push(...nodesInSlot);
8892      } else {
8893        const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);
8894        ngDevMode && assertParentView(parentView);
8895        collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true);
8896      }
8897    }
8898    tNode = isProjection ? tNode.projectionNext : tNode.next;
8899  }
8900  return result;
8901}
8902function collectNativeNodesInLContainer(lContainer, result) {
8903  for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
8904    const lViewInAContainer = lContainer[i];
8905    const lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild;
8906    if (lViewFirstChildTNode !== null) {
8907      collectNativeNodes(lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result);
8908    }
8909  }
8910  if (lContainer[NATIVE] !== lContainer[HOST]) {
8911    result.push(lContainer[NATIVE]);
8912  }
8913}
8914function addAfterRenderSequencesForView(lView) {
8915  if (lView[AFTER_RENDER_SEQUENCES_TO_ADD] !== null) {
8916    for (const sequence of lView[AFTER_RENDER_SEQUENCES_TO_ADD]) {
8917      sequence.impl.addSequence(sequence);
8918    }
8919    lView[AFTER_RENDER_SEQUENCES_TO_ADD].length = 0;
8920  }
8921}
8922function getOrBorrowReactiveLViewConsumer(lView) {
8923  return lView[REACTIVE_TEMPLATE_CONSUMER] ?? borrowReactiveLViewConsumer(lView);
8924}
8925function borrowReactiveLViewConsumer(lView) {
8926  const consumer = freeConsumers.pop() ?? Object.create(REACTIVE_LVIEW_CONSUMER_NODE);
8927  consumer.lView = lView;
8928  return consumer;
8929}
8930function maybeReturnReactiveLViewConsumer(consumer) {
8931  if (consumer.lView[REACTIVE_TEMPLATE_CONSUMER] === consumer) {
8932    return;
8933  }
8934  consumer.lView = null;
8935  freeConsumers.push(consumer);
8936}
8937function getOrCreateTemporaryConsumer(lView) {
8938  const consumer = lView[REACTIVE_TEMPLATE_CONSUMER] ?? Object.create(TEMPORARY_CONSUMER_NODE);
8939  consumer.lView = lView;
8940  return consumer;
8941}
8942function viewShouldHaveReactiveConsumer(tView) {
8943  return tView.type !== 2;
8944}
8945function isReactiveLViewConsumer(node) {
8946  return node.kind === "template";
8947}
8948function runEffectsInView(view) {
8949  if (view[EFFECTS] === null) {
8950    return;
8951  }
8952  let tryFlushEffects = true;
8953  while (tryFlushEffects) {
8954    let foundDirtyEffect = false;
8955    for (const effect2 of view[EFFECTS]) {
8956      if (!effect2.dirty) {
8957        continue;
8958      }
8959      foundDirtyEffect = true;
8960      if (effect2.zone === null || Zone.current === effect2.zone) {
8961        effect2.run();
8962      } else {
8963        effect2.zone.run(() => effect2.run());
8964      }
8965    }
8966    tryFlushEffects = foundDirtyEffect && !!(view[FLAGS] & 8192);
8967  }
8968}
8969function detectChangesInternal(lView, mode = 0) {
8970  const environment = lView[ENVIRONMENT];
8971  const rendererFactory = environment.rendererFactory;
8972  const checkNoChangesMode = !!ngDevMode && isInCheckNoChangesMode();
8973  if (!checkNoChangesMode) {
8974    rendererFactory.begin?.();
8975  }
8976  try {
8977    detectChangesInViewWhileDirty(lView, mode);
8978  } finally {
8979    if (!checkNoChangesMode) {
8980      rendererFactory.end?.();
8981    }
8982  }
8983}
8984function detectChangesInViewWhileDirty(lView, mode) {
8985  const lastIsRefreshingViewsValue = isRefreshingViews();
8986  try {
8987    setIsRefreshingViews(true);
8988    detectChangesInView(lView, mode);
8989    if (ngDevMode && isExhaustiveCheckNoChanges()) {
8990      return;
8991    }
8992    let retries = 0;
8993    while (requiresRefreshOrTraversal(lView)) {
8994      if (retries === MAXIMUM_REFRESH_RERUNS$1) {
8995        throw new RuntimeError(103, ngDevMode && "Infinite change detection while trying to refresh views. There may be components which each cause the other to require a refresh, causing an infinite loop.");
8996      }
8997      retries++;
8998      detectChangesInView(
8999        lView,
9000        1
9001        /* ChangeDetectionMode.Targeted */
9002      );
9003    }
9004  } finally {
9005    setIsRefreshingViews(lastIsRefreshingViewsValue);
9006  }
9007}
9008function checkNoChangesInternal(lView, exhaustive) {
9009  setIsInCheckNoChangesMode(exhaustive ? CheckNoChangesMode.Exhaustive : CheckNoChangesMode.OnlyDirtyViews);
9010  try {
9011    detectChangesInternal(lView);
9012  } finally {
9013    setIsInCheckNoChangesMode(CheckNoChangesMode.Off);
9014  }
9015}
9016function refreshView(tView, lView, templateFn, context2) {
9017  ngDevMode && assertEqual(isCreationMode(lView), false, "Should be run in update mode");
9018  if (isDestroyed(lView))
9019    return;
9020  const flags = lView[FLAGS];
9021  const isInCheckNoChangesPass = ngDevMode && isInCheckNoChangesMode();
9022  const isInExhaustiveCheckNoChangesPass = ngDevMode && isExhaustiveCheckNoChanges();
9023  enterView(lView);
9024  let returnConsumerToPool = true;
9025  let prevConsumer = null;
9026  let currentConsumer = null;
9027  if (!isInCheckNoChangesPass) {
9028    if (viewShouldHaveReactiveConsumer(tView)) {
9029      currentConsumer = getOrBorrowReactiveLViewConsumer(lView);
9030      prevConsumer = consumerBeforeComputation(currentConsumer);
9031    } else if (getActiveConsumer() === null) {
9032      returnConsumerToPool = false;
9033      currentConsumer = getOrCreateTemporaryConsumer(lView);
9034      prevConsumer = consumerBeforeComputation(currentConsumer);
9035    } else if (lView[REACTIVE_TEMPLATE_CONSUMER]) {
9036      consumerDestroy(lView[REACTIVE_TEMPLATE_CONSUMER]);
9037      lView[REACTIVE_TEMPLATE_CONSUMER] = null;
9038    }
9039  }
9040  try {
9041    resetPreOrderHookFlags(lView);
9042    setBindingIndex(tView.bindingStartIndex);
9043    if (templateFn !== null) {
9044      executeTemplate(tView, lView, templateFn, 2, context2);
9045    }
9046    const hooksInitPhaseCompleted = (flags & 3) === 3;
9047    if (!isInCheckNoChangesPass) {
9048      if (hooksInitPhaseCompleted) {
9049        const preOrderCheckHooks = tView.preOrderCheckHooks;
9050        if (preOrderCheckHooks !== null) {
9051          executeCheckHooks(lView, preOrderCheckHooks, null);
9052        }
9053      } else {
9054        const preOrderHooks = tView.preOrderHooks;
9055        if (preOrderHooks !== null) {
9056          executeInitAndCheckHooks(lView, preOrderHooks, 0, null);
9057        }
9058        incrementInitPhaseFlags(
9059          lView,
9060          0
9061          /* InitPhaseState.OnInitHooksToBeRun */
9062        );
9063      }
9064    }
9065    if (!isInExhaustiveCheckNoChangesPass) {
9066      markTransplantedViewsForRefresh(lView);
9067    }
9068    runEffectsInView(lView);
9069    detectChangesInEmbeddedViews(
9070      lView,
9071      0
9072      /* ChangeDetectionMode.Global */
9073    );
9074    if (tView.contentQueries !== null) {
9075      refreshContentQueries(tView, lView);
9076    }
9077    if (!isInCheckNoChangesPass) {
9078      if (hooksInitPhaseCompleted) {
9079        const contentCheckHooks = tView.contentCheckHooks;
9080        if (contentCheckHooks !== null) {
9081          executeCheckHooks(lView, contentCheckHooks);
9082        }
9083      } else {
9084        const contentHooks = tView.contentHooks;
9085        if (contentHooks !== null) {
9086          executeInitAndCheckHooks(
9087            lView,
9088            contentHooks,
9089            1
9090            /* InitPhaseState.AfterContentInitHooksToBeRun */
9091          );
9092        }
9093        incrementInitPhaseFlags(
9094          lView,
9095          1
9096          /* InitPhaseState.AfterContentInitHooksToBeRun */
9097        );
9098      }
9099    }
9100    processHostBindingOpCodes(tView, lView);
9101    const components = tView.components;
9102    if (components !== null) {
9103      detectChangesInChildComponents(
9104        lView,
9105        components,
9106        0
9107        /* ChangeDetectionMode.Global */
9108      );
9109    }
9110    const viewQuery = tView.viewQuery;
9111    if (viewQuery !== null) {
9112      executeViewQueryFn(2, viewQuery, context2);
9113    }
9114    if (!isInCheckNoChangesPass) {
9115      if (hooksInitPhaseCompleted) {
9116        const viewCheckHooks = tView.viewCheckHooks;
9117        if (viewCheckHooks !== null) {
9118          executeCheckHooks(lView, viewCheckHooks);
9119        }
9120      } else {
9121        const viewHooks = tView.viewHooks;
9122        if (viewHooks !== null) {
9123          executeInitAndCheckHooks(
9124            lView,
9125            viewHooks,
9126            2
9127            /* InitPhaseState.AfterViewInitHooksToBeRun */
9128          );
9129        }
9130        incrementInitPhaseFlags(
9131          lView,
9132          2
9133          /* InitPhaseState.AfterViewInitHooksToBeRun */
9134        );
9135      }
9136    }
9137    if (tView.firstUpdatePass === true) {
9138      tView.firstUpdatePass = false;
9139    }
9140    if (lView[EFFECTS_TO_SCHEDULE]) {
9141      for (const notifyEffect of lView[EFFECTS_TO_SCHEDULE]) {
9142        notifyEffect();
9143      }
9144      lView[EFFECTS_TO_SCHEDULE] = null;
9145    }
9146    if (!isInCheckNoChangesPass) {
9147      addAfterRenderSequencesForView(lView);
9148      lView[FLAGS] &= ~(64 | 8);
9149    }
9150  } catch (e) {
9151    if (!isInCheckNoChangesPass) {
9152      markAncestorsForTraversal(lView);
9153    }
9154    throw e;
9155  } finally {
9156    if (currentConsumer !== null) {
9157      consumerAfterComputation(currentConsumer, prevConsumer);
9158      if (returnConsumerToPool) {
9159        maybeReturnReactiveLViewConsumer(currentConsumer);
9160      }
9161    }
9162    leaveView();
9163  }
9164}
9165function detectChangesInEmbeddedViews(lView, mode) {
9166  for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {
9167    for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
9168      const embeddedLView = lContainer[i];
9169      detectChangesInViewIfAttached(embeddedLView, mode);
9170    }
9171  }
9172}
9173function markTransplantedViewsForRefresh(lView) {
9174  for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {
9175    if (!(lContainer[FLAGS] & 2))
9176      continue;
9177    const movedViews = lContainer[MOVED_VIEWS];
9178    ngDevMode && assertDefined(movedViews, "Transplanted View flags set but missing MOVED_VIEWS");
9179    for (let i = 0; i < movedViews.length; i++) {
9180      const movedLView = movedViews[i];
9181      markViewForRefresh(movedLView);
9182    }
9183  }
9184}
9185function detectChangesInComponent(hostLView, componentHostIdx, mode) {
9186  ngDevMode && assertEqual(isCreationMode(hostLView), false, "Should be run in update mode");
9187  profiler(
9188    18
9189    /* ProfilerEvent.ComponentStart */
9190  );
9191  const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);
9192  detectChangesInViewIfAttached(componentView, mode);
9193  profiler(19, componentView[CONTEXT]);
9194}
9195function detectChangesInViewIfAttached(lView, mode) {
9196  if (!viewAttachedToChangeDetector(lView)) {
9197    return;
9198  }
9199  detectChangesInView(lView, mode);
9200}
9201function detectChangesInView(lView, mode) {
9202  const isInCheckNoChangesPass = ngDevMode && isInCheckNoChangesMode();
9203  const tView = lView[TVIEW];
9204  const flags = lView[FLAGS];
9205  const consumer = lView[REACTIVE_TEMPLATE_CONSUMER];
9206  let shouldRefreshView = !!(mode === 0 && flags & 16);
9207  shouldRefreshView ||= !!(flags & 64 && mode === 0 && !isInCheckNoChangesPass);
9208  shouldRefreshView ||= !!(flags & 1024);
9209  shouldRefreshView ||= !!(consumer?.dirty && consumerPollProducersForChange(consumer));
9210  shouldRefreshView ||= !!(ngDevMode && isExhaustiveCheckNoChanges());
9211  if (consumer) {
9212    consumer.dirty = false;
9213  }
9214  lView[FLAGS] &= ~(8192 | 1024);
9215  if (shouldRefreshView) {
9216    refreshView(tView, lView, tView.template, lView[CONTEXT]);
9217  } else if (flags & 8192) {
9218    const prevConsumer = setActiveConsumer(null);
9219    try {
9220      if (!isInCheckNoChangesPass) {
9221        runEffectsInView(lView);
9222      }
9223      detectChangesInEmbeddedViews(
9224        lView,
9225        1
9226        /* ChangeDetectionMode.Targeted */
9227      );
9228      const components = tView.components;
9229      if (components !== null) {
9230        detectChangesInChildComponents(
9231          lView,
9232          components,
9233          1
9234          /* ChangeDetectionMode.Targeted */
9235        );
9236      }
9237      if (!isInCheckNoChangesPass) {
9238        addAfterRenderSequencesForView(lView);
9239      }
9240    } finally {
9241      setActiveConsumer(prevConsumer);
9242    }
9243  }
9244}
9245function detectChangesInChildComponents(hostLView, components, mode) {
9246  for (let i = 0; i < components.length; i++) {
9247    detectChangesInComponent(hostLView, components[i], mode);
9248  }
9249}
9250function processHostBindingOpCodes(tView, lView) {
9251  const hostBindingOpCodes = tView.hostBindingOpCodes;
9252  if (hostBindingOpCodes === null)
9253    return;
9254  try {
9255    for (let i = 0; i < hostBindingOpCodes.length; i++) {
9256      const opCode = hostBindingOpCodes[i];
9257      if (opCode < 0) {
9258        setSelectedIndex(~opCode);
9259      } else {
9260        const directiveIdx = opCode;
9261        const bindingRootIndx = hostBindingOpCodes[++i];
9262        const hostBindingFn = hostBindingOpCodes[++i];
9263        setBindingRootForHostBindings(bindingRootIndx, directiveIdx);
9264        const context2 = lView[directiveIdx];
9265        profiler(24, context2);
9266        hostBindingFn(2, context2);
9267        profiler(25, context2);
9268      }
9269    }
9270  } finally {
9271    setSelectedIndex(-1);
9272  }
9273}
9274function markViewDirty(lView, source) {
9275  const dirtyBitsToUse = isRefreshingViews() ? (
9276    // When we are actively refreshing views, we only use the `Dirty` bit to mark a view
9277    64
9278  ) : (
9279    // When we are not actively refreshing a view tree, it is absolutely
9280    // valid to update state and mark views dirty. We use the `RefreshView` flag in this
9281    // case to allow synchronously rerunning change detection. This applies today to
9282    // afterRender hooks as well as animation listeners which execute after detecting
9283    // changes in a view when the render factory flushes.
9284    1024 | 64
9285  );
9286  lView[ENVIRONMENT].changeDetectionScheduler?.notify(source);
9287  while (lView) {
9288    lView[FLAGS] |= dirtyBitsToUse;
9289    const parent = getLViewParent(lView);
9290    if (isRootView(lView) && !parent) {
9291      return lView;
9292    }
9293    lView = parent;
9294  }
9295  return null;
9296}
9297function createLContainer(hostNative, currentView, native, tNode) {
9298  ngDevMode && assertLView(currentView);
9299  const lContainer = [
9300    hostNative,
9301    // host native
9302    true,
9303    // Boolean `true` in this position signifies that this is an `LContainer`
9304    0,
9305    // flags
9306    currentView,
9307    // parent
9308    null,
9309    // next
9310    tNode,
9311    // t_host
9312    null,
9313    // dehydrated views
9314    native,
9315    // native,
9316    null,
9317    // view refs
9318    null
9319    // moved views
9320  ];
9321  ngDevMode && assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, "Should allocate correct number of slots for LContainer header.");
9322  return lContainer;
9323}
9324function getLViewFromLContainer(lContainer, index) {
9325  const adjustedIndex = CONTAINER_HEADER_OFFSET + index;
9326  if (adjustedIndex < lContainer.length) {
9327    const lView = lContainer[adjustedIndex];
9328    ngDevMode && assertLView(lView);
9329    return lView;
9330  }
9331  return void 0;
9332}
9333function addLViewToLContainer(lContainer, lView, index, addToDOM = true) {
9334  const tView = lView[TVIEW];
9335  insertView(tView, lView, lContainer, index);
9336  if (addToDOM) {
9337    const beforeNode = getBeforeNodeForView(index, lContainer);
9338    const renderer = lView[RENDERER];
9339    const parentRNode = renderer.parentNode(lContainer[NATIVE]);
9340    if (parentRNode !== null) {
9341      addViewToDOM(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);
9342    }
9343  }
9344  const hydrationInfo = lView[HYDRATION];
9345  if (hydrationInfo !== null && hydrationInfo.firstChild !== null) {
9346    hydrationInfo.firstChild = null;
9347  }
9348}
9349function removeLViewFromLContainer(lContainer, index) {
9350  const lView = detachView(lContainer, index);
9351  if (lView !== void 0) {
9352    destroyLView(lView[TVIEW], lView);
9353  }
9354  return lView;
9355}
9356function detachView(lContainer, removeIndex) {
9357  if (lContainer.length <= CONTAINER_HEADER_OFFSET)
9358    return;
9359  const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;
9360  const viewToDetach = lContainer[indexInContainer];
9361  if (viewToDetach) {
9362    const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];
9363    if (declarationLContainer !== null && declarationLContainer !== lContainer) {
9364      detachMovedView(declarationLContainer, viewToDetach);
9365    }
9366    if (removeIndex > 0) {
9367      lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT];
9368    }
9369    const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);
9370    removeViewFromDOM(viewToDetach[TVIEW], viewToDetach);
9371    const lQueries = removedLView[QUERIES];
9372    if (lQueries !== null) {
9373      lQueries.detachView(removedLView[TVIEW]);
9374    }
9375    viewToDetach[PARENT] = null;
9376    viewToDetach[NEXT] = null;
9377    viewToDetach[FLAGS] &= ~128;
9378  }
9379  return viewToDetach;
9380}
9381function insertView(tView, lView, lContainer, index) {
9382  ngDevMode && assertLView(lView);
9383  ngDevMode && assertLContainer(lContainer);
9384  const indexInContainer = CONTAINER_HEADER_OFFSET + index;
9385  const containerLength = lContainer.length;
9386  if (index > 0) {
9387    lContainer[indexInContainer - 1][NEXT] = lView;
9388  }
9389  if (index < containerLength - CONTAINER_HEADER_OFFSET) {
9390    lView[NEXT] = lContainer[indexInContainer];
9391    addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);
9392  } else {
9393    lContainer.push(lView);
9394    lView[NEXT] = null;
9395  }
9396  lView[PARENT] = lContainer;
9397  const declarationLContainer = lView[DECLARATION_LCONTAINER];
9398  if (declarationLContainer !== null && lContainer !== declarationLContainer) {
9399    trackMovedView(declarationLContainer, lView);
9400  }
9401  const lQueries = lView[QUERIES];
9402  if (lQueries !== null) {
9403    lQueries.insertView(tView);
9404  }
9405  updateAncestorTraversalFlagsOnAttach(lView);
9406  lView[FLAGS] |= 128;
9407}
9408function trackMovedView(declarationContainer, lView) {
9409  ngDevMode && assertDefined(lView, "LView required");
9410  ngDevMode && assertLContainer(declarationContainer);
9411  const movedViews = declarationContainer[MOVED_VIEWS];
9412  const parent = lView[PARENT];
9413  ngDevMode && assertDefined(parent, "missing parent");
9414  if (isLView(parent)) {
9415    declarationContainer[FLAGS] |= 2;
9416  } else {
9417    const insertedComponentLView = parent[PARENT][DECLARATION_COMPONENT_VIEW];
9418    ngDevMode && assertDefined(insertedComponentLView, "Missing insertedComponentLView");
9419    const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];
9420    ngDevMode && assertDefined(declaredComponentLView, "Missing declaredComponentLView");
9421    if (declaredComponentLView !== insertedComponentLView) {
9422      declarationContainer[FLAGS] |= 2;
9423    }
9424  }
9425  if (movedViews === null) {
9426    declarationContainer[MOVED_VIEWS] = [lView];
9427  } else {
9428    movedViews.push(lView);
9429  }
9430}
9431function isViewDirty(view) {
9432  return requiresRefreshOrTraversal(view._lView) || !!(view._lView[FLAGS] & 64);
9433}
9434function markForRefresh(view) {
9435  markViewForRefresh(view._lView);
9436}
9437function injectTemplateRef() {
9438  return createTemplateRef(getCurrentTNode(), getLView());
9439}
9440function createTemplateRef(hostTNode, hostLView) {
9441  if (hostTNode.type & 4) {
9442    ngDevMode && assertDefined(hostTNode.tView, "TView must be allocated");
9443    return new TemplateRef(hostLView, hostTNode, createElementRef(hostTNode, hostLView));
9444  }
9445  return null;
9446}
9447function getFriendlyStringFromTNodeType(tNodeType) {
9448  switch (tNodeType) {
9449    case 4:
9450      return "view container";
9451    case 2:
9452      return "element";
9453    case 8:
9454      return "ng-container";
9455    case 32:
9456      return "icu";
9457    case 64:
9458      return "i18n";
9459    case 16:
9460      return "projection";
9461    case 1:
9462      return "text";
9463    case 128:
9464      return "@let";
9465    default:
9466      return "<unknown>";
9467  }
9468}
9469function validateSiblingNodeExists(node) {
9470  validateNodeExists(node);
9471  if (!node.nextSibling) {
9472    const header = "During hydration Angular expected more sibling nodes to be present.\n\n";
9473    const actual = `Actual DOM is:
9474
9475${describeDomFromNode(node)}
9476
9477`;
9478    const footer = getHydrationErrorFooter();
9479    const message = header + actual + footer;
9480    markRNodeAsHavingHydrationMismatch(node, "", actual);
9481    throw new RuntimeError(-501, message);
9482  }
9483}
9484function validateNodeExists(node, lView = null, tNode = null) {
9485  if (!node) {
9486    const header = "During hydration, Angular expected an element to be present at this location.\n\n";
9487    let expected = "";
9488    let footer = "";
9489    if (lView !== null && tNode !== null) {
9490      expected = describeExpectedDom(lView, tNode, false);
9491      footer = getHydrationErrorFooter();
9492      markRNodeAsHavingHydrationMismatch(unwrapRNode(lView[HOST]), expected, "");
9493    }
9494    throw new RuntimeError(-502, `${header}${expected}
9495
9496${footer}`);
9497  }
9498}
9499function stringifyTNodeAttrs(tNode) {
9500  const results = [];
9501  if (tNode.attrs) {
9502    for (let i = 0; i < tNode.attrs.length; ) {
9503      const attrName = tNode.attrs[i++];
9504      if (typeof attrName == "number") {
9505        break;
9506      }
9507      const attrValue = tNode.attrs[i++];
9508      results.push(`${attrName}="${shorten(attrValue)}"`);
9509    }
9510  }
9511  return results.join(" ");
9512}
9513function stringifyRNodeAttrs(rNode) {
9514  const results = [];
9515  for (let i = 0; i < rNode.attributes.length; i++) {
9516    const attr = rNode.attributes[i];
9517    if (internalAttrs.has(attr.name))
9518      continue;
9519    results.push(`${attr.name}="${shorten(attr.value)}"`);
9520  }
9521  return results.join(" ");
9522}
9523function describeTNode(tNode, innerContent = "\u2026") {
9524  switch (tNode.type) {
9525    case 1:
9526      const content = tNode.value ? `(${tNode.value})` : "";
9527      return `#text${content}`;
9528    case 2:
9529      const attrs = stringifyTNodeAttrs(tNode);
9530      const tag = tNode.value.toLowerCase();
9531      return `<${tag}${attrs ? " " + attrs : ""}>${innerContent}</${tag}>`;
9532    case 8:
9533      return "<!-- ng-container -->";
9534    case 4:
9535      return "<!-- container -->";
9536    default:
9537      const typeAsString = getFriendlyStringFromTNodeType(tNode.type);
9538      return `#node(${typeAsString})`;
9539  }
9540}
9541function describeRNode(rNode, innerContent = "\u2026") {
9542  const node = rNode;
9543  switch (node.nodeType) {
9544    case Node.ELEMENT_NODE:
9545      const tag = node.tagName.toLowerCase();
9546      const attrs = stringifyRNodeAttrs(node);
9547      return `<${tag}${attrs ? " " + attrs : ""}>${innerContent}</${tag}>`;
9548    case Node.TEXT_NODE:
9549      const content = node.textContent ? shorten(node.textContent) : "";
9550      return `#text${content ? `(${content})` : ""}`;
9551    case Node.COMMENT_NODE:
9552      return `<!-- ${shorten(node.textContent ?? "")} -->`;
9553    default:
9554      return `#node(${node.nodeType})`;
9555  }
9556}
9557function describeExpectedDom(lView, tNode, isViewContainerAnchor) {
9558  const spacer = "  ";
9559  let content = "";
9560  if (tNode.prev) {
9561    content += spacer + "\u2026\n";
9562    content += spacer + describeTNode(tNode.prev) + "\n";
9563  } else if (tNode.type && tNode.type & 12) {
9564    content += spacer + "\u2026\n";
9565  }
9566  if (isViewContainerAnchor) {
9567    content += spacer + describeTNode(tNode) + "\n";
9568    content += spacer + `<!-- container -->  ${AT_THIS_LOCATION}
9569`;
9570  } else {
9571    content += spacer + describeTNode(tNode) + `  ${AT_THIS_LOCATION}
9572`;
9573  }
9574  content += spacer + "\u2026\n";
9575  const parentRNode = tNode.type ? getParentRElement(lView[TVIEW], tNode, lView) : null;
9576  if (parentRNode) {
9577    content = describeRNode(parentRNode, "\n" + content);
9578  }
9579  return content;
9580}
9581function describeDomFromNode(node) {
9582  const spacer = "  ";
9583  let content = "";
9584  const currentNode = node;
9585  if (currentNode.previousSibling) {
9586    content += spacer + "\u2026\n";
9587    content += spacer + describeRNode(currentNode.previousSibling) + "\n";
9588  }
9589  content += spacer + describeRNode(currentNode) + `  ${AT_THIS_LOCATION}
9590`;
9591  if (node.nextSibling) {
9592    content += spacer + "\u2026\n";
9593  }
9594  if (node.parentNode) {
9595    content = describeRNode(currentNode.parentNode, "\n" + content);
9596  }
9597  return content;
9598}
9599function getHydrationErrorFooter(componentClassName) {
9600  const componentInfo = componentClassName ? `the "${componentClassName}"` : "corresponding";
9601  return `To fix this problem:
9602  * check ${componentInfo} component for hydration-related issues
9603  * check to see if your template has valid HTML structure
9604  * or skip hydration by adding the \`ngSkipHydration\` attribute to its host node in a template
9605
9606`;
9607}
9608function stripNewlines(input2) {
9609  return input2.replace(/\s+/gm, "");
9610}
9611function shorten(input2, maxLength = 50) {
9612  if (!input2) {
9613    return "";
9614  }
9615  input2 = stripNewlines(input2);
9616  return input2.length > maxLength ? `${input2.substring(0, maxLength - 1)}\u2026` : input2;
9617}
9618function getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView) {
9619  const tNodeInsertBeforeIndex = currentTNode.insertBeforeIndex;
9620  const insertBeforeIndex = Array.isArray(tNodeInsertBeforeIndex) ? tNodeInsertBeforeIndex[0] : tNodeInsertBeforeIndex;
9621  if (insertBeforeIndex === null) {
9622    return getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView);
9623  } else {
9624    ngDevMode && assertIndexInRange(lView, insertBeforeIndex);
9625    return unwrapRNode(lView[insertBeforeIndex]);
9626  }
9627}
9628function processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRElement) {
9629  const tNodeInsertBeforeIndex = childTNode.insertBeforeIndex;
9630  if (Array.isArray(tNodeInsertBeforeIndex)) {
9631    ngDevMode && assertDomNode(childRNode);
9632    let i18nParent = childRNode;
9633    let anchorRNode = null;
9634    if (!(childTNode.type & 3)) {
9635      anchorRNode = i18nParent;
9636      i18nParent = parentRElement;
9637    }
9638    if (i18nParent !== null && childTNode.componentOffset === -1) {
9639      for (let i = 1; i < tNodeInsertBeforeIndex.length; i++) {
9640        const i18nChild = lView[tNodeInsertBeforeIndex[i]];
9641        nativeInsertBefore(renderer, i18nParent, i18nChild, anchorRNode, false);
9642      }
9643    }
9644  }
9645}
9646function getOrCreateTNode(tView, index, type, name, attrs) {
9647  ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in
9648  // `view_engine_compatibility` for additional context.
9649  assertGreaterThanOrEqual(index, HEADER_OFFSET, "TNodes can't be in the LView header.");
9650  ngDevMode && assertPureTNodeType(type);
9651  let tNode = tView.data[index];
9652  if (tNode === null) {
9653    tNode = createTNodeAtIndex(tView, index, type, name, attrs);
9654    if (isInI18nBlock()) {
9655      tNode.flags |= 32;
9656    }
9657  } else if (tNode.type & 64) {
9658    tNode.type = type;
9659    tNode.value = name;
9660    tNode.attrs = attrs;
9661    const parent = getCurrentParentTNode();
9662    tNode.injectorIndex = parent === null ? -1 : parent.injectorIndex;
9663    ngDevMode && assertTNodeForTView(tNode, tView);
9664    ngDevMode && assertEqual(index, tNode.index, "Expecting same index");
9665  }
9666  setCurrentTNode(tNode, true);
9667  return tNode;
9668}
9669function createTNodeAtIndex(tView, index, type, name, attrs) {
9670  const currentTNode = getCurrentTNodePlaceholderOk();
9671  const isParent = isCurrentTNodeParent();
9672  const parent = isParent ? currentTNode : currentTNode && currentTNode.parent;
9673  const tNode = tView.data[index] = createTNode(tView, parent, type, index, name, attrs);
9674  linkTNodeInTView(tView, tNode, currentTNode, isParent);
9675  return tNode;
9676}
9677function linkTNodeInTView(tView, tNode, currentTNode, isParent) {
9678  if (tView.firstChild === null) {
9679    tView.firstChild = tNode;
9680  }
9681  if (currentTNode !== null) {
9682    if (isParent) {
9683      if (currentTNode.child == null && tNode.parent !== null) {
9684        currentTNode.child = tNode;
9685      }
9686    } else {
9687      if (currentTNode.next === null) {
9688        currentTNode.next = tNode;
9689        tNode.prev = currentTNode;
9690      }
9691    }
9692  }
9693}
9694function createTNode(tView, tParent, type, index, value, attrs) {
9695  ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in
9696  // `view_engine_compatibility` for additional context.
9697  assertGreaterThanOrEqual(index, HEADER_OFFSET, "TNodes can't be in the LView header.");
9698  ngDevMode && assertNotSame(attrs, void 0, "'undefined' is not valid value for 'attrs'");
9699  ngDevMode && tParent && assertTNodeForTView(tParent, tView);
9700  let injectorIndex = tParent ? tParent.injectorIndex : -1;
9701  let flags = 0;
9702  if (isInSkipHydrationBlock()) {
9703    flags |= 128;
9704  }
9705  const tNode = {
9706    type,
9707    index,
9708    insertBeforeIndex: null,
9709    injectorIndex,
9710    directiveStart: -1,
9711    directiveEnd: -1,
9712    directiveStylingLast: -1,
9713    componentOffset: -1,
9714    propertyBindings: null,
9715    flags,
9716    providerIndexes: 0,
9717    value,
9718    attrs,
9719    mergedAttrs: null,
9720    localNames: null,
9721    initialInputs: null,
9722    inputs: null,
9723    hostDirectiveInputs: null,
9724    outputs: null,
9725    hostDirectiveOutputs: null,
9726    directiveToIndex: null,
9727    tView: null,
9728    next: null,
9729    prev: null,
9730    projectionNext: null,
9731    child: null,
9732    parent: tParent,
9733    projection: null,
9734    styles: null,
9735    stylesWithoutHost: null,
9736    residualStyles: void 0,
9737    classes: null,
9738    classesWithoutHost: null,
9739    residualClasses: void 0,
9740    classBindings: 0,
9741    styleBindings: 0
9742  };
9743  if (ngDevMode) {
9744    Object.seal(tNode);
9745  }
9746  return tNode;
9747}
9748function addTNodeAndUpdateInsertBeforeIndex(previousTNodes, newTNode) {
9749  ngDevMode && assertEqual(newTNode.insertBeforeIndex, null, "We expect that insertBeforeIndex is not set");
9750  previousTNodes.push(newTNode);
9751  if (previousTNodes.length > 1) {
9752    for (let i = previousTNodes.length - 2; i >= 0; i--) {
9753      const existingTNode = previousTNodes[i];
9754      if (!isI18nText(existingTNode)) {
9755        if (isNewTNodeCreatedBefore(existingTNode, newTNode) && getInsertBeforeIndex(existingTNode) === null) {
9756          setInsertBeforeIndex(existingTNode, newTNode.index);
9757        }
9758      }
9759    }
9760  }
9761}
9762function isI18nText(tNode) {
9763  return !(tNode.type & 64);
9764}
9765function isNewTNodeCreatedBefore(existingTNode, newTNode) {
9766  return isI18nText(newTNode) || existingTNode.index > newTNode.index;
9767}
9768function getInsertBeforeIndex(tNode) {
9769  const index = tNode.insertBeforeIndex;
9770  return Array.isArray(index) ? index[0] : index;
9771}
9772function setInsertBeforeIndex(tNode, value) {
9773  const index = tNode.insertBeforeIndex;
9774  if (Array.isArray(index)) {
9775    index[0] = value;
9776  } else {
9777    setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);
9778    tNode.insertBeforeIndex = value;
9779  }
9780}
9781function getTIcu(tView, index) {
9782  const value = tView.data[index];
9783  if (value === null || typeof value === "string")
9784    return null;
9785  if (ngDevMode && !(value.hasOwnProperty("tView") || value.hasOwnProperty("currentCaseLViewIndex"))) {
9786    throwError("We expect to get 'null'|'TIcu'|'TIcuContainer', but got: " + value);
9787  }
9788  const tIcu = value.hasOwnProperty("currentCaseLViewIndex") ? value : value.value;
9789  ngDevMode && assertTIcu(tIcu);
9790  return tIcu;
9791}
9792function setTIcu(tView, index, tIcu) {
9793  const tNode = tView.data[index];
9794  ngDevMode && assertEqual(tNode === null || tNode.hasOwnProperty("tView"), true, "We expect to get 'null'|'TIcuContainer'");
9795  if (tNode === null) {
9796    tView.data[index] = tIcu;
9797  } else {
9798    ngDevMode && assertTNodeType(
9799      tNode,
9800      32
9801      /* TNodeType.Icu */
9802    );
9803    tNode.value = tIcu;
9804  }
9805}
9806function setTNodeInsertBeforeIndex(tNode, index) {
9807  ngDevMode && assertTNode(tNode);
9808  let insertBeforeIndex = tNode.insertBeforeIndex;
9809  if (insertBeforeIndex === null) {
9810    setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);
9811    insertBeforeIndex = tNode.insertBeforeIndex = [
9812      null,
9813      index
9814    ];
9815  } else {
9816    assertEqual(Array.isArray(insertBeforeIndex), true, "Expecting array here");
9817    insertBeforeIndex.push(index);
9818  }
9819}
9820function createTNodePlaceholder(tView, previousTNodes, index) {
9821  const tNode = createTNodeAtIndex(tView, index, 64, null, null);
9822  addTNodeAndUpdateInsertBeforeIndex(previousTNodes, tNode);
9823  return tNode;
9824}
9825function getCurrentICUCaseIndex(tIcu, lView) {
9826  const currentCase = lView[tIcu.currentCaseLViewIndex];
9827  return currentCase === null ? currentCase : currentCase < 0 ? ~currentCase : currentCase;
9828}
9829function getParentFromIcuCreateOpCode(mergedCode) {
9830  return mergedCode >>> 17;
9831}
9832function getRefFromIcuCreateOpCode(mergedCode) {
9833  return (mergedCode & 131070) >>> 1;
9834}
9835function getInstructionFromIcuCreateOpCode(mergedCode) {
9836  return mergedCode & 1;
9837}
9838function icuCreateOpCode(opCode, parentIdx, refIdx) {
9839  ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, "Missing parent index");
9840  ngDevMode && assertGreaterThan(refIdx, 0, "Missing ref index");
9841  return opCode | parentIdx << 17 | refIdx << 1;
9842}
9843function isRootTemplateMessage(subTemplateIndex) {
9844  return subTemplateIndex === -1;
9845}
9846function enterIcu(state, tIcu, lView) {
9847  state.index = 0;
9848  const currentCase = getCurrentICUCaseIndex(tIcu, lView);
9849  if (currentCase !== null) {
9850    ngDevMode && assertNumberInRange(currentCase, 0, tIcu.cases.length - 1);
9851    state.removes = tIcu.remove[currentCase];
9852  } else {
9853    state.removes = EMPTY_ARRAY;
9854  }
9855}
9856function icuContainerIteratorNext(state) {
9857  if (state.index < state.removes.length) {
9858    const removeOpCode = state.removes[state.index++];
9859    ngDevMode && assertNumber(removeOpCode, "Expecting OpCode number");
9860    if (removeOpCode > 0) {
9861      const rNode = state.lView[removeOpCode];
9862      ngDevMode && assertDomNode(rNode);
9863      return rNode;
9864    } else {
9865      state.stack.push(state.index, state.removes);
9866      const tIcuIndex = ~removeOpCode;
9867      const tIcu = state.lView[TVIEW].data[tIcuIndex];
9868      ngDevMode && assertTIcu(tIcu);
9869      enterIcu(state, tIcu, state.lView);
9870      return icuContainerIteratorNext(state);
9871    }
9872  } else {
9873    if (state.stack.length === 0) {
9874      state.lView = void 0;
9875      return null;
9876    } else {
9877      state.removes = state.stack.pop();
9878      state.index = state.stack.pop();
9879      return icuContainerIteratorNext(state);
9880    }
9881  }
9882}
9883function loadIcuContainerVisitor() {
9884  const _state = {
9885    stack: [],
9886    index: -1
9887  };
9888  function icuContainerIteratorStart(tIcuContainerNode, lView) {
9889    _state.lView = lView;
9890    while (_state.stack.length)
9891      _state.stack.pop();
9892    ngDevMode && assertTNodeForLView(tIcuContainerNode, lView);
9893    enterIcu(_state, tIcuContainerNode.value, lView);
9894    return icuContainerIteratorNext.bind(null, _state);
9895  }
9896  return icuContainerIteratorStart;
9897}
9898function prepareI18nBlockForHydration(lView, index, parentTNode, subTemplateIndex) {
9899  _prepareI18nBlockForHydrationImpl(lView, index, parentTNode, subTemplateIndex);
9900}
9901function claimDehydratedIcuCase(lView, icuIndex, caseIndex) {
9902  _claimDehydratedIcuCaseImpl(lView, icuIndex, caseIndex);
9903}
9904function cleanupI18nHydrationData(lView) {
9905  const hydrationInfo = lView[HYDRATION];
9906  if (hydrationInfo) {
9907    const { i18nNodes, dehydratedIcuData: dehydratedIcuDataMap } = hydrationInfo;
9908    if (i18nNodes && dehydratedIcuDataMap) {
9909      const renderer = lView[RENDERER];
9910      for (const dehydratedIcuData of dehydratedIcuDataMap.values()) {
9911        cleanupDehydratedIcuData(renderer, i18nNodes, dehydratedIcuData);
9912      }
9913    }
9914    hydrationInfo.i18nNodes = void 0;
9915    hydrationInfo.dehydratedIcuData = void 0;
9916  }
9917}
9918function cleanupDehydratedIcuData(renderer, i18nNodes, dehydratedIcuData) {
9919  for (const node of dehydratedIcuData.node.cases[dehydratedIcuData.case]) {
9920    const rNode = i18nNodes.get(node.index - HEADER_OFFSET);
9921    if (rNode) {
9922      nativeRemoveNode(renderer, rNode, false);
9923    }
9924  }
9925}
9926function removeDehydratedViews(lContainer) {
9927  const views = lContainer[DEHYDRATED_VIEWS] ?? [];
9928  const parentLView = lContainer[PARENT];
9929  const renderer = parentLView[RENDERER];
9930  const retainedViews = [];
9931  for (const view of views) {
9932    if (view.data[DEFER_BLOCK_ID] !== void 0) {
9933      retainedViews.push(view);
9934    } else {
9935      removeDehydratedView(view, renderer);
9936      ngDevMode && ngDevMode.dehydratedViewsRemoved++;
9937    }
9938  }
9939  lContainer[DEHYDRATED_VIEWS] = retainedViews;
9940}
9941function removeDehydratedViewList(deferBlock) {
9942  const { lContainer } = deferBlock;
9943  const dehydratedViews = lContainer[DEHYDRATED_VIEWS];
9944  if (dehydratedViews === null)
9945    return;
9946  const parentLView = lContainer[PARENT];
9947  const renderer = parentLView[RENDERER];
9948  for (const view of dehydratedViews) {
9949    removeDehydratedView(view, renderer);
9950    ngDevMode && ngDevMode.dehydratedViewsRemoved++;
9951  }
9952}
9953function removeDehydratedView(dehydratedView, renderer) {
9954  let nodesRemoved = 0;
9955  let currentRNode = dehydratedView.firstChild;
9956  if (currentRNode) {
9957    const numNodes = dehydratedView.data[NUM_ROOT_NODES];
9958    while (nodesRemoved < numNodes) {
9959      ngDevMode && validateSiblingNodeExists(currentRNode);
9960      const nextSibling = currentRNode.nextSibling;
9961      nativeRemoveNode(renderer, currentRNode, false);
9962      currentRNode = nextSibling;
9963      nodesRemoved++;
9964    }
9965  }
9966}
9967function cleanupLContainer(lContainer) {
9968  removeDehydratedViews(lContainer);
9969  const hostLView = lContainer[HOST];
9970  if (isLView(hostLView)) {
9971    cleanupLView(hostLView);
9972  }
9973  for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
9974    cleanupLView(lContainer[i]);
9975  }
9976}
9977function cleanupLView(lView) {
9978  cleanupI18nHydrationData(lView);
9979  const tView = lView[TVIEW];
9980  for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {
9981    if (isLContainer(lView[i])) {
9982      const lContainer = lView[i];
9983      cleanupLContainer(lContainer);
9984    } else if (isLView(lView[i])) {
9985      cleanupLView(lView[i]);
9986    }
9987  }
9988}
9989function cleanupDehydratedViews(appRef) {
9990  const viewRefs = appRef._views;
9991  for (const viewRef of viewRefs) {
9992    const lNode = getLNodeForHydration(viewRef);
9993    if (lNode !== null && lNode[HOST] !== null) {
9994      if (isLView(lNode)) {
9995        cleanupLView(lNode);
9996      } else {
9997        cleanupLContainer(lNode);
9998      }
9999      ngDevMode && ngDevMode.dehydratedViewsCleanupRuns++;
10000    }
10001  }
10002}
10003function cleanupHydratedDeferBlocks(deferBlock, hydratedBlocks, registry, appRef) {
10004  if (deferBlock !== null) {
10005    registry.cleanup(hydratedBlocks);
10006    cleanupLContainer(deferBlock.lContainer);
10007    cleanupDehydratedViews(appRef);
10008  }
10009}
10010function findMatchingDehydratedView(lContainer, template) {
10011  return _findMatchingDehydratedViewImpl(lContainer, template);
10012}
10013function findAndReconcileMatchingDehydratedViews(lContainer, templateTNode, hostLView) {
10014  return _findAndReconcileMatchingDehydratedViewsImpl(lContainer, templateTNode, hostLView);
10015}
10016function injectRenderer2() {
10017  const lView = getLView();
10018  const tNode = getCurrentTNode();
10019  const nodeAtIndex = getComponentLViewByIndex(tNode.index, lView);
10020  return (isLView(nodeAtIndex) ? nodeAtIndex : lView)[RENDERER];
10021}
10022function isModuleWithProviders(value) {
10023  return value.ngModule !== void 0;
10024}
10025function isNgModule(value) {
10026  return !!getNgModuleDef(value);
10027}
10028function isPipe(value) {
10029  return !!getPipeDef(value);
10030}
10031function isDirective(value) {
10032  return !!getDirectiveDef(value);
10033}
10034function isComponent(value) {
10035  return !!getComponentDef(value);
10036}
10037function getDependencyTypeForError(type) {
10038  if (getComponentDef(type))
10039    return "component";
10040  if (getDirectiveDef(type))
10041    return "directive";
10042  if (getPipeDef(type))
10043    return "pipe";
10044  return "type";
10045}
10046function verifyStandaloneImport(depType, importingType) {
10047  if (isForwardRef(depType)) {
10048    depType = resolveForwardRef(depType);
10049    if (!depType) {
10050      throw new Error(`Expected forwardRef function, imported from "${stringifyForError(importingType)}", to return a standalone entity or NgModule but got "${stringifyForError(depType) || depType}".`);
10051    }
10052  }
10053  if (getNgModuleDef(depType) == null) {
10054    const def = getComponentDef(depType) || getDirectiveDef(depType) || getPipeDef(depType);
10055    if (def != null) {
10056      if (!def.standalone) {
10057        throw new Error(`The "${stringifyForError(depType)}" ${getDependencyTypeForError(depType)}, imported from "${stringifyForError(importingType)}", is not standalone. Did you forget to add the standalone: true flag?`);
10058      }
10059    } else {
10060      if (isModuleWithProviders(depType)) {
10061        throw new Error(`A module with providers was imported from "${stringifyForError(importingType)}". Modules with providers are not supported in standalone components imports.`);
10062      } else {
10063        throw new Error(`The "${stringifyForError(depType)}" type, imported from "${stringifyForError(importingType)}", must be a standalone component / directive / pipe or an NgModule. Did you forget to add the required @Component / @Directive / @Pipe or @NgModule annotation?`);
10064      }
10065    }
10066  }
10067}
10068function addSet(sourceSet, targetSet) {
10069  for (const m of sourceSet) {
10070    targetSet.add(m);
10071  }
10072}
10073function computeStaticStyling(tNode, attrs, writeToHost) {
10074  ngDevMode && assertFirstCreatePass(getTView(), "Expecting to be called in first template pass only");
10075  let styles = writeToHost ? tNode.styles : null;
10076  let classes = writeToHost ? tNode.classes : null;
10077  let mode = 0;
10078  if (attrs !== null) {
10079    for (let i = 0; i < attrs.length; i++) {
10080      const value = attrs[i];
10081      if (typeof value === "number") {
10082        mode = value;
10083      } else if (mode == 1) {
10084        classes = concatStringsWithSpace(classes, value);
10085      } else if (mode == 2) {
10086        const style = value;
10087        const styleValue = attrs[++i];
10088        styles = concatStringsWithSpace(styles, style + ": " + styleValue + ";");
10089      }
10090    }
10091  }
10092  writeToHost ? tNode.styles = styles : tNode.stylesWithoutHost = styles;
10093  writeToHost ? tNode.classes = classes : tNode.classesWithoutHost = classes;
10094}
10095function \u0275\u0275directiveInject(token, flags = 0) {
10096  const lView = getLView();
10097  if (lView === null) {
10098    ngDevMode && assertInjectImplementationNotEqual(\u0275\u0275directiveInject);
10099    return \u0275\u0275inject(token, flags);
10100  }
10101  const tNode = getCurrentTNode();
10102  const value = getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);
10103  ngDevMode && emitInjectEvent(token, value, flags);
10104  return value;
10105}
10106function \u0275\u0275invalidFactory() {
10107  const msg = ngDevMode ? `This constructor was not compatible with Dependency Injection.` : "invalid";
10108  throw new Error(msg);
10109}
10110function resolveDirectives(tView, lView, tNode, localRefs, directiveMatcher) {
10111  ngDevMode && assertFirstCreatePass(tView);
10112  const exportsMap = localRefs === null ? null : { "": -1 };
10113  const matchedDirectiveDefs = directiveMatcher(tView, tNode);
10114  if (matchedDirectiveDefs !== null) {
10115    let directiveDefs = matchedDirectiveDefs;
10116    let hostDirectiveDefs = null;
10117    let hostDirectiveRanges = null;
10118    for (const def of matchedDirectiveDefs) {
10119      if (def.resolveHostDirectives !== null) {
10120        [directiveDefs, hostDirectiveDefs, hostDirectiveRanges] = def.resolveHostDirectives(matchedDirectiveDefs);
10121        break;
10122      }
10123    }
10124    ngDevMode && assertNoDuplicateDirectives(directiveDefs);
10125    initializeDirectives(tView, lView, tNode, directiveDefs, exportsMap, hostDirectiveDefs, hostDirectiveRanges);
10126  }
10127  if (exportsMap !== null && localRefs !== null) {
10128    cacheMatchingLocalNames(tNode, localRefs, exportsMap);
10129  }
10130}
10131function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {
10132  const localNames = tNode.localNames = [];
10133  for (let i = 0; i < localRefs.length; i += 2) {
10134    const index = exportsMap[localRefs[i + 1]];
10135    if (index == null)
10136      throw new RuntimeError(-301, ngDevMode && `Export of name '${localRefs[i + 1]}' not found!`);
10137    localNames.push(localRefs[i], index);
10138  }
10139}
10140function markAsComponentHost(tView, hostTNode, componentOffset) {
10141  ngDevMode && assertFirstCreatePass(tView);
10142  ngDevMode && assertGreaterThan(componentOffset, -1, "componentOffset must be great than -1");
10143  hostTNode.componentOffset = componentOffset;
10144  (tView.components ??= []).push(hostTNode.index);
10145}
10146function initializeDirectives(tView, lView, tNode, directives, exportsMap, hostDirectiveDefs, hostDirectiveRanges) {
10147  ngDevMode && assertFirstCreatePass(tView);
10148  const directivesLength = directives.length;
10149  let hasSeenComponent = false;
10150  for (let i = 0; i < directivesLength; i++) {
10151    const def = directives[i];
10152    if (!hasSeenComponent && isComponentDef(def)) {
10153      hasSeenComponent = true;
10154      markAsComponentHost(tView, tNode, i);
10155    }
10156    diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, def.type);
10157  }
10158  initTNodeFlags(tNode, tView.data.length, directivesLength);
10159  for (let i = 0; i < directivesLength; i++) {
10160    const def = directives[i];
10161    if (def.providersResolver)
10162      def.providersResolver(def);
10163  }
10164  let preOrderHooksFound = false;
10165  let preOrderCheckHooksFound = false;
10166  let directiveIdx = allocExpando(tView, lView, directivesLength, null);
10167  ngDevMode && assertSame(directiveIdx, tNode.directiveStart, "TNode.directiveStart should point to just allocated space");
10168  if (directivesLength > 0) {
10169    tNode.directiveToIndex = /* @__PURE__ */ new Map();
10170  }
10171  for (let i = 0; i < directivesLength; i++) {
10172    const def = directives[i];
10173    tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);
10174    configureViewWithDirective(tView, tNode, lView, directiveIdx, def);
10175    saveNameToExportMap(directiveIdx, def, exportsMap);
10176    if (hostDirectiveRanges !== null && hostDirectiveRanges.has(def)) {
10177      const [start, end] = hostDirectiveRanges.get(def);
10178      tNode.directiveToIndex.set(def.type, [
10179        directiveIdx,
10180        start + tNode.directiveStart,
10181        end + tNode.directiveStart
10182      ]);
10183    } else if (hostDirectiveDefs === null || !hostDirectiveDefs.has(def)) {
10184      tNode.directiveToIndex.set(def.type, directiveIdx);
10185    }
10186    if (def.contentQueries !== null)
10187      tNode.flags |= 4;
10188    if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0)
10189      tNode.flags |= 64;
10190    const lifeCycleHooks = def.type.prototype;
10191    if (!preOrderHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)) {
10192      (tView.preOrderHooks ??= []).push(tNode.index);
10193      preOrderHooksFound = true;
10194    }
10195    if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {
10196      (tView.preOrderCheckHooks ??= []).push(tNode.index);
10197      preOrderCheckHooksFound = true;
10198    }
10199    directiveIdx++;
10200  }
10201  initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefs);
10202}
10203function initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefs) {
10204  ngDevMode && assertFirstCreatePass(tView);
10205  for (let index = tNode.directiveStart; index < tNode.directiveEnd; index++) {
10206    const directiveDef = tView.data[index];
10207    if (hostDirectiveDefs === null || !hostDirectiveDefs.has(directiveDef)) {
10208      setupSelectorMatchedInputsOrOutputs(0, tNode, directiveDef, index);
10209      setupSelectorMatchedInputsOrOutputs(1, tNode, directiveDef, index);
10210      setupInitialInputs(tNode, index, false);
10211    } else {
10212      const hostDirectiveDef = hostDirectiveDefs.get(directiveDef);
10213      setupHostDirectiveInputsOrOutputs(0, tNode, hostDirectiveDef, index);
10214      setupHostDirectiveInputsOrOutputs(1, tNode, hostDirectiveDef, index);
10215      setupInitialInputs(tNode, index, true);
10216    }
10217  }
10218}
10219function setupSelectorMatchedInputsOrOutputs(mode, tNode, def, directiveIndex) {
10220  const aliasMap = mode === 0 ? def.inputs : def.outputs;
10221  for (const publicName in aliasMap) {
10222    if (aliasMap.hasOwnProperty(publicName)) {
10223      let bindings;
10224      if (mode === 0) {
10225        bindings = tNode.inputs ??= {};
10226      } else {
10227        bindings = tNode.outputs ??= {};
10228      }
10229      bindings[publicName] ??= [];
10230      bindings[publicName].push(directiveIndex);
10231      setShadowStylingInputFlags(tNode, publicName);
10232    }
10233  }
10234}
10235function setupHostDirectiveInputsOrOutputs(mode, tNode, config2, directiveIndex) {
10236  const aliasMap = mode === 0 ? config2.inputs : config2.outputs;
10237  for (const initialName in aliasMap) {
10238    if (aliasMap.hasOwnProperty(initialName)) {
10239      const publicName = aliasMap[initialName];
10240      let bindings;
10241      if (mode === 0) {
10242        bindings = tNode.hostDirectiveInputs ??= {};
10243      } else {
10244        bindings = tNode.hostDirectiveOutputs ??= {};
10245      }
10246      bindings[publicName] ??= [];
10247      bindings[publicName].push(directiveIndex, initialName);
10248      setShadowStylingInputFlags(tNode, publicName);
10249    }
10250  }
10251}
10252function setShadowStylingInputFlags(tNode, publicName) {
10253  if (publicName === "class") {
10254    tNode.flags |= 8;
10255  } else if (publicName === "style") {
10256    tNode.flags |= 16;
10257  }
10258}
10259function setupInitialInputs(tNode, directiveIndex, isHostDirective) {
10260  const { attrs, inputs, hostDirectiveInputs } = tNode;
10261  if (attrs === null || !isHostDirective && inputs === null || isHostDirective && hostDirectiveInputs === null || // Do not use unbound attributes as inputs to structural directives, since structural
10262  // directive inputs can only be set using microsyntax (e.g. `<div *dir="exp">`).
10263  isInlineTemplate(tNode)) {
10264    tNode.initialInputs ??= [];
10265    tNode.initialInputs.push(null);
10266    return;
10267  }
10268  let inputsToStore = null;
10269  let i = 0;
10270  while (i < attrs.length) {
10271    const attrName = attrs[i];
10272    if (attrName === 0) {
10273      i += 4;
10274      continue;
10275    } else if (attrName === 5) {
10276      i += 2;
10277      continue;
10278    } else if (typeof attrName === "number") {
10279      break;
10280    }
10281    if (!isHostDirective && inputs.hasOwnProperty(attrName)) {
10282      const inputConfig = inputs[attrName];
10283      for (const index of inputConfig) {
10284        if (index === directiveIndex) {
10285          inputsToStore ??= [];
10286          inputsToStore.push(attrName, attrs[i + 1]);
10287          break;
10288        }
10289      }
10290    } else if (isHostDirective && hostDirectiveInputs.hasOwnProperty(attrName)) {
10291      const config2 = hostDirectiveInputs[attrName];
10292      for (let j = 0; j < config2.length; j += 2) {
10293        if (config2[j] === directiveIndex) {
10294          inputsToStore ??= [];
10295          inputsToStore.push(config2[j + 1], attrs[i + 1]);
10296          break;
10297        }
10298      }
10299    }
10300    i += 2;
10301  }
10302  tNode.initialInputs ??= [];
10303  tNode.initialInputs.push(inputsToStore);
10304}
10305function configureViewWithDirective(tView, tNode, lView, directiveIndex, def) {
10306  ngDevMode && assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, "Must be in Expando section");
10307  tView.data[directiveIndex] = def;
10308  const directiveFactory = def.factory || (def.factory = getFactoryDef(def.type, true));
10309  const nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), \u0275\u0275directiveInject, ngDevMode ? def.type.name : null);
10310  tView.blueprint[directiveIndex] = nodeInjectorFactory;
10311  lView[directiveIndex] = nodeInjectorFactory;
10312  registerHostBindingOpCodes(tView, tNode, directiveIndex, allocExpando(tView, lView, def.hostVars, NO_CHANGE), def);
10313}
10314function registerHostBindingOpCodes(tView, tNode, directiveIdx, directiveVarsIdx, def) {
10315  ngDevMode && assertFirstCreatePass(tView);
10316  const hostBindings = def.hostBindings;
10317  if (hostBindings) {
10318    let hostBindingOpCodes = tView.hostBindingOpCodes;
10319    if (hostBindingOpCodes === null) {
10320      hostBindingOpCodes = tView.hostBindingOpCodes = [];
10321    }
10322    const elementIndx = ~tNode.index;
10323    if (lastSelectedElementIdx(hostBindingOpCodes) != elementIndx) {
10324      hostBindingOpCodes.push(elementIndx);
10325    }
10326    hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings);
10327  }
10328}
10329function lastSelectedElementIdx(hostBindingOpCodes) {
10330  let i = hostBindingOpCodes.length;
10331  while (i > 0) {
10332    const value = hostBindingOpCodes[--i];
10333    if (typeof value === "number" && value < 0) {
10334      return value;
10335    }
10336  }
10337  return 0;
10338}
10339function saveNameToExportMap(directiveIdx, def, exportsMap) {
10340  if (exportsMap) {
10341    if (def.exportAs) {
10342      for (let i = 0; i < def.exportAs.length; i++) {
10343        exportsMap[def.exportAs[i]] = directiveIdx;
10344      }
10345    }
10346    if (isComponentDef(def))
10347      exportsMap[""] = directiveIdx;
10348  }
10349}
10350function initTNodeFlags(tNode, index, numberOfDirectives) {
10351  ngDevMode && assertNotEqual(numberOfDirectives, tNode.directiveEnd - tNode.directiveStart, "Reached the max number of directives");
10352  tNode.flags |= 1;
10353  tNode.directiveStart = index;
10354  tNode.directiveEnd = index + numberOfDirectives;
10355  tNode.providerIndexes = index;
10356}
10357function assertNoDuplicateDirectives(directives) {
10358  if (directives.length < 2) {
10359    return;
10360  }
10361  const seenDirectives = /* @__PURE__ */ new Set();
10362  for (const current of directives) {
10363    if (seenDirectives.has(current)) {
10364      throw new RuntimeError(309, `Directive ${current.type.name} matches multiple times on the same element. Directives can only match an element once.`);
10365    }
10366    seenDirectives.add(current);
10367  }
10368}
10369function directiveHostFirstCreatePass(index, lView, type, name, directiveMatcher, bindingsEnabled, attrsIndex, localRefsIndex) {
10370  const tView = lView[TVIEW];
10371  ngDevMode && assertFirstCreatePass(tView);
10372  const tViewConsts = tView.consts;
10373  const attrs = getConstant(tViewConsts, attrsIndex);
10374  const tNode = getOrCreateTNode(tView, index, type, name, attrs);
10375  if (bindingsEnabled) {
10376    resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex), directiveMatcher);
10377  }
10378  tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);
10379  if (tNode.attrs !== null) {
10380    computeStaticStyling(tNode, tNode.attrs, false);
10381  }
10382  if (tNode.mergedAttrs !== null) {
10383    computeStaticStyling(tNode, tNode.mergedAttrs, true);
10384  }
10385  if (tView.queries !== null) {
10386    tView.queries.elementStart(tView, tNode);
10387  }
10388  return tNode;
10389}
10390function directiveHostEndFirstCreatePass(tView, tNode) {
10391  ngDevMode && assertFirstCreatePass(tView);
10392  registerPostOrderHooks(tView, tNode);
10393  if (isContentQueryHost(tNode)) {
10394    tView.queries.elementEnd(tNode);
10395  }
10396}
10397function domOnlyFirstCreatePass(index, tView, type, name, attrsIndex, localRefsIndex) {
10398  ngDevMode && assertFirstCreatePass(tView);
10399  const tViewConsts = tView.consts;
10400  const attrs = getConstant(tViewConsts, attrsIndex);
10401  const tNode = getOrCreateTNode(tView, index, type, name, attrs);
10402  tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);
10403  if (localRefsIndex != null) {
10404    const refs = getConstant(tViewConsts, localRefsIndex);
10405    tNode.localNames = [];
10406    for (let i = 0; i < refs.length; i += 2) {
10407      tNode.localNames.push(refs[i], -1);
10408    }
10409  }
10410  if (tNode.attrs !== null) {
10411    computeStaticStyling(tNode, tNode.attrs, false);
10412  }
10413  if (tNode.mergedAttrs !== null) {
10414    computeStaticStyling(tNode, tNode.mergedAttrs, true);
10415  }
10416  if (tView.queries !== null) {
10417    tView.queries.elementStart(tView, tNode);
10418  }
10419  return tNode;
10420}
10421function isListLikeIterable(obj) {
10422  if (!isJsObject(obj))
10423    return false;
10424  return Array.isArray(obj) || !(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]
10425  Symbol.iterator in obj;
10426}
10427function areIterablesEqual(a, b, comparator) {
10428  const iterator1 = a[Symbol.iterator]();
10429  const iterator2 = b[Symbol.iterator]();
10430  while (true) {
10431    const item1 = iterator1.next();
10432    const item2 = iterator2.next();
10433    if (item1.done && item2.done)
10434      return true;
10435    if (item1.done || item2.done)
10436      return false;
10437    if (!comparator(item1.value, item2.value))
10438      return false;
10439  }
10440}
10441function iterateListLike(obj, fn) {
10442  if (Array.isArray(obj)) {
10443    for (let i = 0; i < obj.length; i++) {
10444      fn(obj[i]);
10445    }
10446  } else {
10447    const iterator2 = obj[Symbol.iterator]();
10448    let item;
10449    while (!(item = iterator2.next()).done) {
10450      fn(item.value);
10451    }
10452  }
10453}
10454function isJsObject(o) {
10455  return o !== null && (typeof o === "function" || typeof o === "object");
10456}
10457function devModeEqual(a, b) {
10458  const isListLikeIterableA = isListLikeIterable(a);
10459  const isListLikeIterableB = isListLikeIterable(b);
10460  if (isListLikeIterableA && isListLikeIterableB) {
10461    return areIterablesEqual(a, b, devModeEqual);
10462  } else {
10463    const isAObject = a && (typeof a === "object" || typeof a === "function");
10464    const isBObject = b && (typeof b === "object" || typeof b === "function");
10465    if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {
10466      return true;
10467    } else {
10468      return Object.is(a, b);
10469    }
10470  }
10471}
10472function updateBinding(lView, bindingIndex, value) {
10473  return lView[bindingIndex] = value;
10474}
10475function getBinding(lView, bindingIndex) {
10476  ngDevMode && assertIndexInRange(lView, bindingIndex);
10477  ngDevMode && assertNotSame(lView[bindingIndex], NO_CHANGE, "Stored value should never be NO_CHANGE.");
10478  return lView[bindingIndex];
10479}
10480function bindingUpdated(lView, bindingIndex, value) {
10481  ngDevMode && assertLessThan(bindingIndex, lView.length, `Slot should have been initialized to NO_CHANGE`);
10482  if (value === NO_CHANGE) {
10483    return false;
10484  }
10485  const oldValue = lView[bindingIndex];
10486  if (Object.is(oldValue, value)) {
10487    return false;
10488  } else {
10489    if (ngDevMode && isInCheckNoChangesMode()) {
10490      const oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : void 0;
10491      if (!devModeEqual(oldValueToCompare, value)) {
10492        const details = getExpressionChangedErrorDetails(lView, bindingIndex, oldValueToCompare, value);
10493        throwErrorIfNoChangesMode(oldValue === NO_CHANGE, details.oldValue, details.newValue, details.propName, lView);
10494      }
10495      return false;
10496    }
10497    lView[bindingIndex] = value;
10498    return true;
10499  }
10500}
10501function bindingUpdated2(lView, bindingIndex, exp1, exp2) {
10502  const different = bindingUpdated(lView, bindingIndex, exp1);
10503  return bindingUpdated(lView, bindingIndex + 1, exp2) || different;
10504}
10505function bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) {
10506  const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);
10507  return bindingUpdated(lView, bindingIndex + 2, exp3) || different;
10508}
10509function bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) {
10510  const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);
10511  return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;
10512}
10513function wrapListener(tNode, lView, listenerFn) {
10514  return function wrapListenerIn_markDirtyAndPreventDefault(event) {
10515    const startView = isComponentHost(tNode) ? getComponentLViewByIndex(tNode.index, lView) : lView;
10516    markViewDirty(
10517      startView,
10518      5
10519      /* NotificationSource.Listener */
10520    );
10521    const context2 = lView[CONTEXT];
10522    let result = executeListenerWithErrorHandling(lView, context2, listenerFn, event);
10523    let nextListenerFn = wrapListenerIn_markDirtyAndPreventDefault.__ngNextListenerFn__;
10524    while (nextListenerFn) {
10525      result = executeListenerWithErrorHandling(lView, context2, nextListenerFn, event) && result;
10526      nextListenerFn = nextListenerFn.__ngNextListenerFn__;
10527    }
10528    return result;
10529  };
10530}
10531function executeListenerWithErrorHandling(lView, context2, listenerFn, e) {
10532  const prevConsumer = setActiveConsumer(null);
10533  try {
10534    profiler(6, context2, listenerFn);
10535    return listenerFn(e) !== false;
10536  } catch (error) {
10537    handleUncaughtError(lView, error);
10538    return false;
10539  } finally {
10540    profiler(7, context2, listenerFn);
10541    setActiveConsumer(prevConsumer);
10542  }
10543}
10544function listenToDomEvent(tNode, tView, lView, eventTargetResolver, renderer, eventName, originalListener, wrappedListener) {
10545  ngDevMode && assertNotSame(wrappedListener, originalListener, "Expected wrapped and original listeners to be different.");
10546  const isTNodeDirectiveHost = isDirectiveHost(tNode);
10547  let hasCoalesced = false;
10548  let existingListener = null;
10549  if (!eventTargetResolver && isTNodeDirectiveHost) {
10550    existingListener = findExistingListener(tView, lView, eventName, tNode.index);
10551  }
10552  if (existingListener !== null) {
10553    const lastListenerFn = existingListener.__ngLastListenerFn__ || existingListener;
10554    lastListenerFn.__ngNextListenerFn__ = originalListener;
10555    existingListener.__ngLastListenerFn__ = originalListener;
10556    hasCoalesced = true;
10557  } else {
10558    const native = getNativeByTNode(tNode, lView);
10559    const target = eventTargetResolver ? eventTargetResolver(native) : native;
10560    stashEventListenerImpl(lView, target, eventName, wrappedListener);
10561    const cleanupFn = renderer.listen(target, eventName, wrappedListener);
10562    if (!isAnimationEventType(eventName)) {
10563      const idxOrTargetGetter = eventTargetResolver ? (_lView) => eventTargetResolver(unwrapRNode(_lView[tNode.index])) : tNode.index;
10564      storeListenerCleanup(idxOrTargetGetter, tView, lView, eventName, wrappedListener, cleanupFn, false);
10565    }
10566  }
10567  return hasCoalesced;
10568}
10569function isAnimationEventType(eventName) {
10570  return eventName.startsWith("animation") || eventName.startsWith("transition");
10571}
10572function findExistingListener(tView, lView, eventName, tNodeIndex) {
10573  const tCleanup = tView.cleanup;
10574  if (tCleanup != null) {
10575    for (let i = 0; i < tCleanup.length - 1; i += 2) {
10576      const cleanupEventName = tCleanup[i];
10577      if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIndex) {
10578        const lCleanup = lView[CLEANUP];
10579        const listenerIdxInLCleanup = tCleanup[i + 2];
10580        return lCleanup && lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null;
10581      }
10582      if (typeof cleanupEventName === "string") {
10583        i += 2;
10584      }
10585    }
10586  }
10587  return null;
10588}
10589function storeListenerCleanup(indexOrTargetGetter, tView, lView, eventName, listenerFn, cleanup, isOutput) {
10590  const tCleanup = tView.firstCreatePass ? getOrCreateTViewCleanup(tView) : null;
10591  const lCleanup = getOrCreateLViewCleanup(lView);
10592  const index = lCleanup.length;
10593  lCleanup.push(listenerFn, cleanup);
10594  tCleanup && tCleanup.push(eventName, indexOrTargetGetter, index, (index + 1) * (isOutput ? -1 : 1));
10595}
10596function listenToOutput(tNode, lView, directiveIndex, lookupName, eventName, listenerFn) {
10597  ngDevMode && assertIndexInRange(lView, directiveIndex);
10598  const instance = lView[directiveIndex];
10599  const tView = lView[TVIEW];
10600  const def = tView.data[directiveIndex];
10601  const propertyName = def.outputs[lookupName];
10602  const output = instance[propertyName];
10603  if (ngDevMode && !isOutputSubscribable(output)) {
10604    throw new Error(`@Output ${propertyName} not initialized in '${instance.constructor.name}'.`);
10605  }
10606  const subscription = output.subscribe(listenerFn);
10607  storeListenerCleanup(tNode.index, tView, lView, eventName, listenerFn, subscription, true);
10608}
10609function isOutputSubscribable(value) {
10610  return value != null && typeof value.subscribe === "function";
10611}
10612function toInputRefArray(map2) {
10613  return Object.keys(map2).map((name) => {
10614    const [propName, flags, transform] = map2[name];
10615    const inputData = {
10616      propName,
10617      templateName: name,
10618      isSignal: (flags & InputFlags.SignalBased) !== 0
10619    };
10620    if (transform) {
10621      inputData.transform = transform;
10622    }
10623    return inputData;
10624  });
10625}
10626function toOutputRefArray(map2) {
10627  return Object.keys(map2).map((name) => ({ propName: map2[name], templateName: name }));
10628}
10629function verifyNotAnOrphanComponent(componentDef) {
10630  if (false) {
10631    if (depsTracker.isOrphanComponent(componentDef.type)) {
10632      throw new RuntimeError(981, `Orphan component found! Trying to render the component ${debugStringifyTypeForError(componentDef.type)} without first loading the NgModule that declares it. It is recommended to make this component standalone in order to avoid this error. If this is not possible now, import the component's NgModule in the appropriate NgModule, or the standalone component in which you are trying to render this component. If this is a lazy import, load the NgModule lazily as well and use its module injector.`);
10633    }
10634  }
10635}
10636function createRootViewInjector(componentDef, environmentInjector, injector) {
10637  let realEnvironmentInjector = environmentInjector instanceof EnvironmentInjector ? environmentInjector : environmentInjector?.injector;
10638  if (realEnvironmentInjector && componentDef.getStandaloneInjector !== null) {
10639    realEnvironmentInjector = componentDef.getStandaloneInjector(realEnvironmentInjector) || realEnvironmentInjector;
10640  }
10641  const rootViewInjector = realEnvironmentInjector ? new ChainedInjector(injector, realEnvironmentInjector) : injector;
10642  return rootViewInjector;
10643}
10644function createRootLViewEnvironment(rootLViewInjector) {
10645  const rendererFactory = rootLViewInjector.get(RendererFactory2, null);
10646  if (rendererFactory === null) {
10647    throw new RuntimeError(407, ngDevMode && "Angular was not able to inject a renderer (RendererFactory2). Likely this is due to a broken DI hierarchy. Make sure that any injector used to create this component has a correct parent.");
10648  }
10649  const sanitizer = rootLViewInjector.get(Sanitizer, null);
10650  const changeDetectionScheduler = rootLViewInjector.get(ChangeDetectionScheduler, null);
10651  let ngReflect = false;
10652  if (typeof ngDevMode === "undefined" || ngDevMode) {
10653    ngReflect = rootLViewInjector.get(NG_REFLECT_ATTRS_FLAG, NG_REFLECT_ATTRS_FLAG_DEFAULT);
10654  }
10655  return {
10656    rendererFactory,
10657    sanitizer,
10658    changeDetectionScheduler,
10659    ngReflect
10660  };
10661}
10662function createHostElement(componentDef, renderer) {
10663  const tagName = inferTagNameFromDefinition(componentDef);
10664  const namespace = tagName === "svg" ? SVG_NAMESPACE : tagName === "math" ? MATH_ML_NAMESPACE : null;
10665  return createElementNode(renderer, tagName, namespace);
10666}
10667function inferTagNameFromDefinition(componentDef) {
10668  return (componentDef.selectors[0][0] || "div").toLowerCase();
10669}
10670function createRootTView(rootSelectorOrNode, componentDef, componentBindings, directives) {
10671  const tAttributes = rootSelectorOrNode ? ["ng-version", "20.3.15"] : (
10672    // Extract attributes and classes from the first selector only to match VE behavior.
10673    extractAttrsAndClassesFromSelector(componentDef.selectors[0])
10674  );
10675  let creationBindings = null;
10676  let updateBindings = null;
10677  let varsToAllocate = 0;
10678  if (componentBindings) {
10679    for (const binding of componentBindings) {
10680      varsToAllocate += binding[BINDING].requiredVars;
10681      if (binding.create) {
10682        binding.targetIdx = 0;
10683        (creationBindings ??= []).push(binding);
10684      }
10685      if (binding.update) {
10686        binding.targetIdx = 0;
10687        (updateBindings ??= []).push(binding);
10688      }
10689    }
10690  }
10691  if (directives) {
10692    for (let i = 0; i < directives.length; i++) {
10693      const directive = directives[i];
10694      if (typeof directive !== "function") {
10695        for (const binding of directive.bindings) {
10696          varsToAllocate += binding[BINDING].requiredVars;
10697          const targetDirectiveIdx = i + 1;
10698          if (binding.create) {
10699            binding.targetIdx = targetDirectiveIdx;
10700            (creationBindings ??= []).push(binding);
10701          }
10702          if (binding.update) {
10703            binding.targetIdx = targetDirectiveIdx;
10704            (updateBindings ??= []).push(binding);
10705          }
10706        }
10707      }
10708    }
10709  }
10710  const directivesToApply = [componentDef];
10711  if (directives) {
10712    for (const directive of directives) {
10713      const directiveType = typeof directive === "function" ? directive : directive.type;
10714      const directiveDef = ngDevMode ? getDirectiveDefOrThrow(directiveType) : getDirectiveDef(directiveType);
10715      if (ngDevMode && !directiveDef.standalone) {
10716        throw new RuntimeError(907, `The ${stringifyForError(directiveType)} directive must be standalone in order to be applied to a dynamically-created component.`);
10717      }
10718      directivesToApply.push(directiveDef);
10719    }
10720  }
10721  const rootTView = createTView(0, null, getRootTViewTemplate(creationBindings, updateBindings), 1, varsToAllocate, directivesToApply, null, null, null, [tAttributes], null);
10722  return rootTView;
10723}
10724function getRootTViewTemplate(creationBindings, updateBindings) {
10725  if (!creationBindings && !updateBindings) {
10726    return null;
10727  }
10728  return (flags) => {
10729    if (flags & 1 && creationBindings) {
10730      for (const binding of creationBindings) {
10731        binding.create();
10732      }
10733    }
10734    if (flags & 2 && updateBindings) {
10735      for (const binding of updateBindings) {
10736        binding.update();
10737      }
10738    }
10739  };
10740}
10741function isInputBinding(binding) {
10742  const kind = binding[BINDING].kind;
10743  return kind === "input" || kind === "twoWay";
10744}
10745function projectNodes(tNode, ngContentSelectors, projectableNodes) {
10746  const projection = tNode.projection = [];
10747  for (let i = 0; i < ngContentSelectors.length; i++) {
10748    const nodesforSlot = projectableNodes[i];
10749    projection.push(nodesforSlot != null && nodesforSlot.length ? Array.from(nodesforSlot) : null);
10750  }
10751}
10752function injectViewContainerRef() {
10753  const previousTNode = getCurrentTNode();
10754  return createContainerRef(previousTNode, getLView());
10755}
10756function getViewRefs(lContainer) {
10757  return lContainer[VIEW_REFS];
10758}
10759function getOrCreateViewRefs(lContainer) {
10760  return lContainer[VIEW_REFS] || (lContainer[VIEW_REFS] = []);
10761}
10762function createContainerRef(hostTNode, hostLView) {
10763  ngDevMode && assertTNodeType(
10764    hostTNode,
10765    12 | 3
10766    /* TNodeType.AnyRNode */
10767  );
10768  let lContainer;
10769  const slotValue = hostLView[hostTNode.index];
10770  if (isLContainer(slotValue)) {
10771    lContainer = slotValue;
10772  } else {
10773    lContainer = createLContainer(slotValue, hostLView, null, hostTNode);
10774    hostLView[hostTNode.index] = lContainer;
10775    addToEndOfViewTree(hostLView, lContainer);
10776  }
10777  _locateOrCreateAnchorNode(lContainer, hostLView, hostTNode, slotValue);
10778  return new R3ViewContainerRef(lContainer, hostTNode, hostLView);
10779}
10780function insertAnchorNode(hostLView, hostTNode) {
10781  const renderer = hostLView[RENDERER];
10782  const commentNode = renderer.createComment(ngDevMode ? "container" : "");
10783  const hostNative = getNativeByTNode(hostTNode, hostLView);
10784  const parentOfHostNative = renderer.parentNode(hostNative);
10785  nativeInsertBefore(renderer, parentOfHostNative, commentNode, renderer.nextSibling(hostNative), false);
10786  return commentNode;
10787}
10788function populateDehydratedViewsInLContainer(lContainer, tNode, hostLView) {
10789  return _populateDehydratedViewsInLContainer(lContainer, tNode, hostLView);
10790}
10791function createAnchorNode(lContainer, hostLView, hostTNode, slotValue) {
10792  if (lContainer[NATIVE])
10793    return;
10794  let commentNode;
10795  if (hostTNode.type & 8) {
10796    commentNode = unwrapRNode(slotValue);
10797  } else {
10798    commentNode = insertAnchorNode(hostLView, hostTNode);
10799  }
10800  lContainer[NATIVE] = commentNode;
10801}
10802function getIdxOfMatchingSelector(tNode, selector) {
10803  const localNames = tNode.localNames;
10804  if (localNames !== null) {
10805    for (let i = 0; i < localNames.length; i += 2) {
10806      if (localNames[i] === selector) {
10807        return localNames[i + 1];
10808      }
10809    }
10810  }
10811  return null;
10812}
10813function createResultByTNodeType(tNode, currentView) {
10814  if (tNode.type & (3 | 8)) {
10815    return createElementRef(tNode, currentView);
10816  } else if (tNode.type & 4) {
10817    return createTemplateRef(tNode, currentView);
10818  }
10819  return null;
10820}
10821function createResultForNode(lView, tNode, matchingIdx, read) {
10822  if (matchingIdx === -1) {
10823    return createResultByTNodeType(tNode, lView);
10824  } else if (matchingIdx === -2) {
10825    return createSpecialToken(lView, tNode, read);
10826  } else {
10827    return getNodeInjectable(lView, lView[TVIEW], matchingIdx, tNode);
10828  }
10829}
10830function createSpecialToken(lView, tNode, read) {
10831  if (read === ElementRef) {
10832    return createElementRef(tNode, lView);
10833  } else if (read === TemplateRef) {
10834    return createTemplateRef(tNode, lView);
10835  } else if (read === ViewContainerRef) {
10836    ngDevMode && assertTNodeType(
10837      tNode,
10838      3 | 12
10839      /* TNodeType.AnyContainer */
10840    );
10841    return createContainerRef(tNode, lView);
10842  } else {
10843    ngDevMode && throwError(`Special token to read should be one of ElementRef, TemplateRef or ViewContainerRef but got ${stringify(read)}.`);
10844  }
10845}
10846function materializeViewResults(tView, lView, tQuery, queryIndex) {
10847  const lQuery = lView[QUERIES].queries[queryIndex];
10848  if (lQuery.matches === null) {
10849    const tViewData = tView.data;
10850    const tQueryMatches = tQuery.matches;
10851    const result = [];
10852    for (let i = 0; tQueryMatches !== null && i < tQueryMatches.length; i += 2) {
10853      const matchedNodeIdx = tQueryMatches[i];
10854      if (matchedNodeIdx < 0) {
10855        result.push(null);
10856      } else {
10857        ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);
10858        const tNode = tViewData[matchedNodeIdx];
10859        result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));
10860      }
10861    }
10862    lQuery.matches = result;
10863  }
10864  return lQuery.matches;
10865}
10866function collectQueryResults(tView, lView, queryIndex, result) {
10867  const tQuery = tView.queries.getByIndex(queryIndex);
10868  const tQueryMatches = tQuery.matches;
10869  if (tQueryMatches !== null) {
10870    const lViewResults = materializeViewResults(tView, lView, tQuery, queryIndex);
10871    for (let i = 0; i < tQueryMatches.length; i += 2) {
10872      const tNodeIdx = tQueryMatches[i];
10873      if (tNodeIdx > 0) {
10874        result.push(lViewResults[i / 2]);
10875      } else {
10876        const childQueryIndex = tQueryMatches[i + 1];
10877        const declarationLContainer = lView[-tNodeIdx];
10878        ngDevMode && assertLContainer(declarationLContainer);
10879        for (let i2 = CONTAINER_HEADER_OFFSET; i2 < declarationLContainer.length; i2++) {
10880          const embeddedLView = declarationLContainer[i2];
10881          if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) {
10882            collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);
10883          }
10884        }
10885        if (declarationLContainer[MOVED_VIEWS] !== null) {
10886          const embeddedLViews = declarationLContainer[MOVED_VIEWS];
10887          for (let i2 = 0; i2 < embeddedLViews.length; i2++) {
10888            const embeddedLView = embeddedLViews[i2];
10889            collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);
10890          }
10891        }
10892      }
10893    }
10894  }
10895  return result;
10896}
10897function loadQueryInternal(lView, queryIndex) {
10898  ngDevMode && assertDefined(lView[QUERIES], "LQueries should be defined when trying to load a query");
10899  ngDevMode && assertIndexInRange(lView[QUERIES].queries, queryIndex);
10900  return lView[QUERIES].queries[queryIndex].queryList;
10901}
10902function createLQuery(tView, lView, flags) {
10903  const queryList = new QueryList(
10904    (flags & 4) === 4
10905    /* QueryFlags.emitDistinctChangesOnly */
10906  );
10907  storeCleanupWithContext(tView, lView, queryList, queryList.destroy);
10908  const lQueries = (lView[QUERIES] ??= new LQueries_()).queries;
10909  return lQueries.push(new LQuery_(queryList)) - 1;
10910}
10911function createViewQuery(predicate, flags, read) {
10912  ngDevMode && assertNumber(flags, "Expecting flags");
10913  const tView = getTView();
10914  if (tView.firstCreatePass) {
10915    createTQuery(tView, new TQueryMetadata_(predicate, flags, read), -1);
10916    if ((flags & 2) === 2) {
10917      tView.staticViewQueries = true;
10918    }
10919  }
10920  return createLQuery(tView, getLView(), flags);
10921}
10922function createContentQuery(directiveIndex, predicate, flags, read) {
10923  ngDevMode && assertNumber(flags, "Expecting flags");
10924  const tView = getTView();
10925  if (tView.firstCreatePass) {
10926    const tNode = getCurrentTNode();
10927    createTQuery(tView, new TQueryMetadata_(predicate, flags, read), tNode.index);
10928    saveContentQueryAndDirectiveIndex(tView, directiveIndex);
10929    if ((flags & 2) === 2) {
10930      tView.staticContentQueries = true;
10931    }
10932  }
10933  return createLQuery(tView, getLView(), flags);
10934}
10935function splitQueryMultiSelectors(locator) {
10936  return locator.split(",").map((s) => s.trim());
10937}
10938function createTQuery(tView, metadata, nodeIndex) {
10939  if (tView.queries === null)
10940    tView.queries = new TQueries_();
10941  tView.queries.track(new TQuery_(metadata, nodeIndex));
10942}
10943function saveContentQueryAndDirectiveIndex(tView, directiveIndex) {
10944  const tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);
10945  const lastSavedDirectiveIndex = tViewContentQueries.length ? tViewContentQueries[tViewContentQueries.length - 1] : -1;
10946  if (directiveIndex !== lastSavedDirectiveIndex) {
10947    tViewContentQueries.push(tView.queries.length - 1, directiveIndex);
10948  }
10949}
10950function getTQuery(tView, index) {
10951  ngDevMode && assertDefined(tView.queries, "TQueries must be defined to retrieve a TQuery");
10952  return tView.queries.getByIndex(index);
10953}
10954function getQueryResults(lView, queryIndex) {
10955  const tView = lView[TVIEW];
10956  const tQuery = getTQuery(tView, queryIndex);
10957  return tQuery.crossesNgTemplate ? collectQueryResults(tView, lView, queryIndex, []) : materializeViewResults(tView, lView, tQuery, queryIndex);
10958}
10959function createQuerySignalFn(firstOnly, required, opts) {
10960  let node;
10961  const signalFn = createComputed(() => {
10962    node._dirtyCounter();
10963    const value = refreshSignalQuery(node, firstOnly);
10964    if (required && value === void 0) {
10965      throw new RuntimeError(-951, ngDevMode && "Child query result is required but no value is available.");
10966    }
10967    return value;
10968  });
10969  node = signalFn[SIGNAL];
10970  node._dirtyCounter = signal(0);
10971  node._flatValue = void 0;
10972  if (ngDevMode) {
10973    signalFn.toString = () => `[Query Signal]`;
10974    node.debugName = opts?.debugName;
10975  }
10976  return signalFn;
10977}
10978function createSingleResultOptionalQuerySignalFn(opts) {
10979  return createQuerySignalFn(
10980    /* firstOnly */
10981    true,
10982    /* required */
10983    false,
10984    opts
10985  );
10986}
10987function createSingleResultRequiredQuerySignalFn(opts) {
10988  return createQuerySignalFn(
10989    /* firstOnly */
10990    true,
10991    /* required */
10992    true,
10993    opts
10994  );
10995}
10996function createMultiResultQuerySignalFn(opts) {
10997  return createQuerySignalFn(
10998    /* firstOnly */
10999    false,
11000    /* required */
11001    false,
11002    opts
11003  );
11004}
11005function bindQueryToSignal(target, queryIndex) {
11006  const node = target[SIGNAL];
11007  node._lView = getLView();
11008  node._queryIndex = queryIndex;
11009  node._queryList = loadQueryInternal(node._lView, queryIndex);
11010  node._queryList.onDirty(() => node._dirtyCounter.update((v) => v + 1));
11011}
11012function refreshSignalQuery(node, firstOnly) {
11013  const lView = node._lView;
11014  const queryIndex = node._queryIndex;
11015  if (lView === void 0 || queryIndex === void 0 || lView[FLAGS] & 4) {
11016    return firstOnly ? void 0 : EMPTY_ARRAY;
11017  }
11018  const queryList = loadQueryInternal(lView, queryIndex);
11019  const results = getQueryResults(lView, queryIndex);
11020  queryList.reset(results, unwrapElementRef);
11021  if (firstOnly) {
11022    return queryList.first;
11023  } else {
11024    const resultChanged = queryList._changesDetected;
11025    if (resultChanged || node._flatValue === void 0) {
11026      return node._flatValue = queryList.toArray();
11027    }
11028    return node._flatValue;
11029  }
11030}
11031function resolveComponentResources(resourceResolver) {
11032  const componentResolved = [];
11033  const urlMap = /* @__PURE__ */ new Map();
11034  function cachedResourceResolve(url) {
11035    let promise = urlMap.get(url);
11036    if (!promise) {
11037      const resp = resourceResolver(url);
11038      urlMap.set(url, promise = resp.then((res) => unwrapResponse(url, res)));
11039    }
11040    return promise;
11041  }
11042  componentResourceResolutionQueue.forEach((component, type) => {
11043    const promises = [];
11044    if (component.templateUrl) {
11045      promises.push(cachedResourceResolve(component.templateUrl).then((template) => {
11046        component.template = template;
11047      }));
11048    }
11049    const styles = typeof component.styles === "string" ? [component.styles] : component.styles || [];
11050    component.styles = styles;
11051    if (component.styleUrl && component.styleUrls?.length) {
11052      throw new Error("@Component cannot define both `styleUrl` and `styleUrls`. Use `styleUrl` if the component has one stylesheet, or `styleUrls` if it has multiple");
11053    } else if (component.styleUrls?.length) {
11054      const styleOffset = component.styles.length;
11055      const styleUrls = component.styleUrls;
11056      component.styleUrls.forEach((styleUrl, index) => {
11057        styles.push("");
11058        promises.push(cachedResourceResolve(styleUrl).then((style) => {
11059          styles[styleOffset + index] = style;
11060          styleUrls.splice(styleUrls.indexOf(styleUrl), 1);
11061          if (styleUrls.length == 0) {
11062            component.styleUrls = void 0;
11063          }
11064        }));
11065      });
11066    } else if (component.styleUrl) {
11067      promises.push(cachedResourceResolve(component.styleUrl).then((style) => {
11068        styles.push(style);
11069        component.styleUrl = void 0;
11070      }));
11071    }
11072    const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type));
11073    componentResolved.push(fullyResolved);
11074  });
11075  clearResolutionOfComponentResourcesQueue();
11076  return Promise.all(componentResolved).then(() => void 0);
11077}
11078function maybeQueueResolutionOfComponentResources(type, metadata) {
11079  if (componentNeedsResolution(metadata)) {
11080    componentResourceResolutionQueue.set(type, metadata);
11081    componentDefPendingResolution.add(type);
11082  }
11083}
11084function componentNeedsResolution(component) {
11085  return !!(component.templateUrl && !component.hasOwnProperty("template") || component.styleUrls && component.styleUrls.length || component.styleUrl);
11086}
11087function clearResolutionOfComponentResourcesQueue() {
11088  const old = componentResourceResolutionQueue;
11089  componentResourceResolutionQueue = /* @__PURE__ */ new Map();
11090  return old;
11091}
11092function isComponentResourceResolutionQueueEmpty() {
11093  return componentResourceResolutionQueue.size === 0;
11094}
11095function unwrapResponse(url, response) {
11096  if (typeof response === "string") {
11097    return response;
11098  }
11099  if (response.status !== void 0 && response.status !== 200) {
11100    return Promise.reject(new RuntimeError(918, ngDevMode && `Could not load resource: ${url}. Response status: ${response.status}`));
11101  }
11102  return response.text();
11103}
11104function componentDefResolved(type) {
11105  componentDefPendingResolution.delete(type);
11106}
11107function assertSameOrNotExisting(id, type, incoming) {
11108  if (type && type !== incoming && checkForDuplicateNgModules) {
11109    throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);
11110  }
11111}
11112function registerNgModuleType(ngModuleType, id) {
11113  const existing = modules.get(id) || null;
11114  assertSameOrNotExisting(id, existing, ngModuleType);
11115  modules.set(id, ngModuleType);
11116}
11117function createNgModule(ngModule, parentInjector) {
11118  return new NgModuleRef2(ngModule, parentInjector ?? null, []);
11119}
11120function createNgModuleRefWithProviders(moduleType, parentInjector, additionalProviders) {
11121  return new NgModuleRef2(moduleType, parentInjector, additionalProviders, false);
11122}
11123function createEnvironmentInjector(providers, parent, debugName = null) {
11124  const adapter = new EnvironmentNgModuleRefAdapter({
11125    providers,
11126    parent,
11127    debugName,
11128    runEnvironmentInitializers: true
11129  });
11130  return adapter.injector;
11131}
11132function \u0275\u0275defineComponent(componentDefinition) {
11133  return noSideEffects(() => {
11134    (typeof ngDevMode === "undefined" || ngDevMode) && initNgDevMode();
11135    const baseDef = getNgDirectiveDef(componentDefinition);
11136    const def = __spreadProps(__spreadValues({}, baseDef), {
11137      decls: componentDefinition.decls,
11138      vars: componentDefinition.vars,
11139      template: componentDefinition.template,
11140      consts: componentDefinition.consts || null,
11141      ngContentSelectors: componentDefinition.ngContentSelectors,
11142      onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,
11143      directiveDefs: null,
11144      // assigned in noSideEffects
11145      pipeDefs: null,
11146      // assigned in noSideEffects
11147      dependencies: baseDef.standalone && componentDefinition.dependencies || null,
11148      getStandaloneInjector: baseDef.standalone ? (parentInjector) => {
11149        return parentInjector.get(StandaloneService).getOrCreateStandaloneInjector(def);
11150      } : null,
11151      getExternalStyles: null,
11152      signals: componentDefinition.signals ?? false,
11153      data: componentDefinition.data || {},
11154      encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated,
11155      styles: componentDefinition.styles || EMPTY_ARRAY,
11156      _: null,
11157      schemas: componentDefinition.schemas || null,
11158      tView: null,
11159      id: ""
11160    });
11161    if (baseDef.standalone) {
11162      performanceMarkFeature("NgStandalone");
11163    }
11164    initFeatures(def);
11165    const dependencies = componentDefinition.dependencies;
11166    def.directiveDefs = extractDefListOrFactory(dependencies, extractDirectiveDef);
11167    def.pipeDefs = extractDefListOrFactory(dependencies, getPipeDef);
11168    def.id = getComponentId(def);
11169    return def;
11170  });
11171}
11172function extractDirectiveDef(type) {
11173  return getComponentDef(type) || getDirectiveDef(type);
11174}
11175function \u0275\u0275defineNgModule(def) {
11176  return noSideEffects(() => {
11177    const res = {
11178      type: def.type,
11179      bootstrap: def.bootstrap || EMPTY_ARRAY,
11180      declarations: def.declarations || EMPTY_ARRAY,
11181      imports: def.imports || EMPTY_ARRAY,
11182      exports: def.exports || EMPTY_ARRAY,
11183      transitiveCompileScopes: null,
11184      schemas: def.schemas || null,
11185      id: def.id || null
11186    };
11187    return res;
11188  });
11189}
11190function parseAndConvertInputsForDefinition(obj, declaredInputs) {
11191  if (obj == null)
11192    return EMPTY_OBJ;
11193  const newLookup = {};
11194  for (const minifiedKey in obj) {
11195    if (obj.hasOwnProperty(minifiedKey)) {
11196      const value = obj[minifiedKey];
11197      let publicName;
11198      let declaredName;
11199      let inputFlags;
11200      let transform;
11201      if (Array.isArray(value)) {
11202        inputFlags = value[0];
11203        publicName = value[1];
11204        declaredName = value[2] ?? publicName;
11205        transform = value[3] || null;
11206      } else {
11207        publicName = value;
11208        declaredName = value;
11209        inputFlags = InputFlags.None;
11210        transform = null;
11211      }
11212      newLookup[publicName] = [minifiedKey, inputFlags, transform];
11213      declaredInputs[publicName] = declaredName;
11214    }
11215  }
11216  return newLookup;
11217}
11218function parseAndConvertOutputsForDefinition(obj) {
11219  if (obj == null)
11220    return EMPTY_OBJ;
11221  const newLookup = {};
11222  for (const minifiedKey in obj) {
11223    if (obj.hasOwnProperty(minifiedKey)) {
11224      newLookup[obj[minifiedKey]] = minifiedKey;
11225    }
11226  }
11227  return newLookup;
11228}
11229function \u0275\u0275defineDirective(directiveDefinition) {
11230  return noSideEffects(() => {
11231    const def = getNgDirectiveDef(directiveDefinition);
11232    initFeatures(def);
11233    return def;
11234  });
11235}
11236function \u0275\u0275definePipe(pipeDef) {
11237  return {
11238    type: pipeDef.type,
11239    name: pipeDef.name,
11240    factory: null,
11241    pure: pipeDef.pure !== false,
11242    standalone: pipeDef.standalone ?? true,
11243    onDestroy: pipeDef.type.prototype.ngOnDestroy || null
11244  };
11245}
11246function getNgDirectiveDef(directiveDefinition) {
11247  const declaredInputs = {};
11248  return {
11249    type: directiveDefinition.type,
11250    providersResolver: null,
11251    factory: null,
11252    hostBindings: directiveDefinition.hostBindings || null,
11253    hostVars: directiveDefinition.hostVars || 0,
11254    hostAttrs: directiveDefinition.hostAttrs || null,
11255    contentQueries: directiveDefinition.contentQueries || null,
11256    declaredInputs,
11257    inputConfig: directiveDefinition.inputs || EMPTY_OBJ,
11258    exportAs: directiveDefinition.exportAs || null,
11259    standalone: directiveDefinition.standalone ?? true,
11260    signals: directiveDefinition.signals === true,
11261    selectors: directiveDefinition.selectors || EMPTY_ARRAY,
11262    viewQuery: directiveDefinition.viewQuery || null,
11263    features: directiveDefinition.features || null,
11264    setInput: null,
11265    resolveHostDirectives: null,
11266    hostDirectives: null,
11267    inputs: parseAndConvertInputsForDefinition(directiveDefinition.inputs, declaredInputs),
11268    outputs: parseAndConvertOutputsForDefinition(directiveDefinition.outputs),
11269    debugInfo: null
11270  };
11271}
11272function initFeatures(definition) {
11273  definition.features?.forEach((fn) => fn(definition));
11274}
11275function extractDefListOrFactory(dependencies, defExtractor) {
11276  if (!dependencies) {
11277    return null;
11278  }
11279  return () => {
11280    const resolvedDependencies = typeof dependencies === "function" ? dependencies() : dependencies;
11281    const result = [];
11282    for (const dep of resolvedDependencies) {
11283      const definition = defExtractor(dep);
11284      if (definition !== null) {
11285        result.push(definition);
11286      }
11287    }
11288    return result;
11289  };
11290}
11291function getComponentId(componentDef) {
11292  let hash = 0;
11293  const componentDefConsts = typeof componentDef.consts === "function" ? "" : componentDef.consts;
11294  const hashSelectors = [
11295    componentDef.selectors,
11296    componentDef.ngContentSelectors,
11297    componentDef.hostVars,
11298    componentDef.hostAttrs,
11299    componentDefConsts,
11300    componentDef.vars,
11301    componentDef.decls,
11302    componentDef.encapsulation,
11303    componentDef.standalone,
11304    componentDef.signals,
11305    componentDef.exportAs,
11306    JSON.stringify(componentDef.inputs),
11307    JSON.stringify(componentDef.outputs),
11308    // We cannot use 'componentDef.type.name' as the name of the symbol will change and will not
11309    // match in the server and browser bundles.
11310    Object.getOwnPropertyNames(componentDef.type.prototype),
11311    !!componentDef.contentQueries,
11312    !!componentDef.viewQuery
11313  ];
11314  if (typeof ngDevMode === "undefined" || ngDevMode) {
11315    for (const item of hashSelectors) {
11316      assertNotEqual(typeof item, "function", "Internal error: attempting to use a function in component id computation logic.");
11317    }
11318  }
11319  for (const char of hashSelectors.join("|")) {
11320    hash = Math.imul(31, hash) + char.charCodeAt(0) << 0;
11321  }
11322  hash += 2147483647 + 1;
11323  const compId = "c" + hash;
11324  if ((typeof ngDevMode === "undefined" || ngDevMode) && true) {
11325    if (GENERATED_COMP_IDS.has(compId)) {
11326      const previousCompDefType = GENERATED_COMP_IDS.get(compId);
11327      if (previousCompDefType !== componentDef.type) {
11328        console.warn(formatRuntimeError(-912, `Component ID generation collision detected. Components '${previousCompDefType.name}' and '${componentDef.type.name}' with selector '${stringifyCSSSelectorList(componentDef.selectors)}' generated the same component ID. To fix this, you can change the selector of one of those components or add an extra host attribute to force a different ID.`));
11329      }
11330    } else {
11331      GENERATED_COMP_IDS.set(compId, componentDef.type);
11332    }
11333  }
11334  return compId;
11335}
11336function getSuperType(type) {
11337  return Object.getPrototypeOf(type.prototype).constructor;
11338}
11339function \u0275\u0275InheritDefinitionFeature(definition) {
11340  let superType = getSuperType(definition.type);
11341  let shouldInheritFields = true;
11342  const inheritanceChain = [definition];
11343  while (superType) {
11344    let superDef = void 0;
11345    if (isComponentDef(definition)) {
11346      superDef = superType.\u0275cmp || superType.\u0275dir;
11347    } else {
11348      if (superType.\u0275cmp) {
11349        throw new RuntimeError(903, ngDevMode && `Directives cannot inherit Components. Directive ${stringifyForError(definition.type)} is attempting to extend component ${stringifyForError(superType)}`);
11350      }
11351      superDef = superType.\u0275dir;
11352    }
11353    if (superDef) {
11354      if (shouldInheritFields) {
11355        inheritanceChain.push(superDef);
11356        const writeableDef = definition;
11357        writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);
11358        writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);
11359        writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);
11360        const superHostBindings = superDef.hostBindings;
11361        superHostBindings && inheritHostBindings(definition, superHostBindings);
11362        const superViewQuery = superDef.viewQuery;
11363        const superContentQueries = superDef.contentQueries;
11364        superViewQuery && inheritViewQuery(definition, superViewQuery);
11365        superContentQueries && inheritContentQueries(definition, superContentQueries);
11366        mergeInputsWithTransforms(definition, superDef);
11367        fillProperties(definition.outputs, superDef.outputs);
11368        if (isComponentDef(superDef) && superDef.data.animation) {
11369          const defData = definition.data;
11370          defData.animation = (defData.animation || []).concat(superDef.data.animation);
11371        }
11372      }
11373      const features = superDef.features;
11374      if (features) {
11375        for (let i = 0; i < features.length; i++) {
11376          const feature = features[i];
11377          if (feature && feature.ngInherit) {
11378            feature(definition);
11379          }
11380          if (feature === \u0275\u0275InheritDefinitionFeature) {
11381            shouldInheritFields = false;
11382          }
11383        }
11384      }
11385    }
11386    superType = Object.getPrototypeOf(superType);
11387  }
11388  mergeHostAttrsAcrossInheritance(inheritanceChain);
11389}
11390function mergeInputsWithTransforms(target, source) {
11391  for (const key in source.inputs) {
11392    if (!source.inputs.hasOwnProperty(key)) {
11393      continue;
11394    }
11395    if (target.inputs.hasOwnProperty(key)) {
11396      continue;
11397    }
11398    const value = source.inputs[key];
11399    if (value !== void 0) {
11400      target.inputs[key] = value;
11401      target.declaredInputs[key] = source.declaredInputs[key];
11402    }
11403  }
11404}
11405function mergeHostAttrsAcrossInheritance(inheritanceChain) {
11406  let hostVars = 0;
11407  let hostAttrs = null;
11408  for (let i = inheritanceChain.length - 1; i >= 0; i--) {
11409    const def = inheritanceChain[i];
11410    def.hostVars = hostVars += def.hostVars;
11411    def.hostAttrs = mergeHostAttrs(def.hostAttrs, hostAttrs = mergeHostAttrs(hostAttrs, def.hostAttrs));
11412  }
11413}
11414function maybeUnwrapEmpty(value) {
11415  if (value === EMPTY_OBJ) {
11416    return {};
11417  } else if (value === EMPTY_ARRAY) {
11418    return [];
11419  } else {
11420    return value;
11421  }
11422}
11423function inheritViewQuery(definition, superViewQuery) {
11424  const prevViewQuery = definition.viewQuery;
11425  if (prevViewQuery) {
11426    definition.viewQuery = (rf, ctx) => {
11427      superViewQuery(rf, ctx);
11428      prevViewQuery(rf, ctx);
11429    };
11430  } else {
11431    definition.viewQuery = superViewQuery;
11432  }
11433}
11434function inheritContentQueries(definition, superContentQueries) {
11435  const prevContentQueries = definition.contentQueries;
11436  if (prevContentQueries) {
11437    definition.contentQueries = (rf, ctx, directiveIndex) => {
11438      superContentQueries(rf, ctx, directiveIndex);
11439      prevContentQueries(rf, ctx, directiveIndex);
11440    };
11441  } else {
11442    definition.contentQueries = superContentQueries;
11443  }
11444}
11445function inheritHostBindings(definition, superHostBindings) {
11446  const prevHostBindings = definition.hostBindings;
11447  if (prevHostBindings) {
11448    definition.hostBindings = (rf, ctx) => {
11449      superHostBindings(rf, ctx);
11450      prevHostBindings(rf, ctx);
11451    };
11452  } else {
11453    definition.hostBindings = superHostBindings;
11454  }
11455}
11456function \u0275\u0275CopyDefinitionFeature(definition) {
11457  let superType = getSuperType(definition.type);
11458  let superDef = void 0;
11459  if (isComponentDef(definition)) {
11460    superDef = superType.\u0275cmp;
11461  } else {
11462    superDef = superType.\u0275dir;
11463  }
11464  const defAny = definition;
11465  for (const field of COPY_DIRECTIVE_FIELDS) {
11466    defAny[field] = superDef[field];
11467  }
11468  if (isComponentDef(superDef)) {
11469    for (const field of COPY_COMPONENT_FIELDS) {
11470      defAny[field] = superDef[field];
11471    }
11472  }
11473}
11474function \u0275\u0275HostDirectivesFeature(rawHostDirectives) {
11475  const feature = (definition) => {
11476    const isEager = Array.isArray(rawHostDirectives);
11477    if (definition.hostDirectives === null) {
11478      definition.resolveHostDirectives = resolveHostDirectives;
11479      definition.hostDirectives = isEager ? rawHostDirectives.map(createHostDirectiveDef) : [rawHostDirectives];
11480    } else if (isEager) {
11481      definition.hostDirectives.unshift(...rawHostDirectives.map(createHostDirectiveDef));
11482    } else {
11483      definition.hostDirectives.unshift(rawHostDirectives);
11484    }
11485  };
11486  feature.ngInherit = true;
11487  return feature;
11488}
11489function resolveHostDirectives(matches) {
11490  const allDirectiveDefs = [];
11491  let hasComponent = false;
11492  let hostDirectiveDefs = null;
11493  let hostDirectiveRanges = null;
11494  for (let i = 0; i < matches.length; i++) {
11495    const def = matches[i];
11496    if (def.hostDirectives !== null) {
11497      const start = allDirectiveDefs.length;
11498      hostDirectiveDefs ??= /* @__PURE__ */ new Map();
11499      hostDirectiveRanges ??= /* @__PURE__ */ new Map();
11500      findHostDirectiveDefs(def, allDirectiveDefs, hostDirectiveDefs);
11501      hostDirectiveRanges.set(def, [start, allDirectiveDefs.length - 1]);
11502    }
11503    if (i === 0 && isComponentDef(def)) {
11504      hasComponent = true;
11505      allDirectiveDefs.push(def);
11506    }
11507  }
11508  for (let i = hasComponent ? 1 : 0; i < matches.length; i++) {
11509    allDirectiveDefs.push(matches[i]);
11510  }
11511  return [allDirectiveDefs, hostDirectiveDefs, hostDirectiveRanges];
11512}
11513function findHostDirectiveDefs(currentDef, matchedDefs, hostDirectiveDefs) {
11514  if (currentDef.hostDirectives !== null) {
11515    for (const configOrFn of currentDef.hostDirectives) {
11516      if (typeof configOrFn === "function") {
11517        const resolved = configOrFn();
11518        for (const config2 of resolved) {
11519          trackHostDirectiveDef(createHostDirectiveDef(config2), matchedDefs, hostDirectiveDefs);
11520        }
11521      } else {
11522        trackHostDirectiveDef(configOrFn, matchedDefs, hostDirectiveDefs);
11523      }
11524    }
11525  }
11526}
11527function trackHostDirectiveDef(def, matchedDefs, hostDirectiveDefs) {
11528  const hostDirectiveDef = getDirectiveDef(def.directive);
11529  if (typeof ngDevMode === "undefined" || ngDevMode) {
11530    validateHostDirective(def, hostDirectiveDef);
11531  }
11532  patchDeclaredInputs(hostDirectiveDef.declaredInputs, def.inputs);
11533  findHostDirectiveDefs(hostDirectiveDef, matchedDefs, hostDirectiveDefs);
11534  hostDirectiveDefs.set(hostDirectiveDef, def);
11535  matchedDefs.push(hostDirectiveDef);
11536}
11537function createHostDirectiveDef(config2) {
11538  return typeof config2 === "function" ? { directive: resolveForwardRef(config2), inputs: EMPTY_OBJ, outputs: EMPTY_OBJ } : {
11539    directive: resolveForwardRef(config2.directive),
11540    inputs: bindingArrayToMap(config2.inputs),
11541    outputs: bindingArrayToMap(config2.outputs)
11542  };
11543}
11544function bindingArrayToMap(bindings) {
11545  if (bindings === void 0 || bindings.length === 0) {
11546    return EMPTY_OBJ;
11547  }
11548  const result = {};
11549  for (let i = 0; i < bindings.length; i += 2) {
11550    result[bindings[i]] = bindings[i + 1];
11551  }
11552  return result;
11553}
11554function patchDeclaredInputs(declaredInputs, exposedInputs) {
11555  for (const publicName in exposedInputs) {
11556    if (exposedInputs.hasOwnProperty(publicName)) {
11557      const remappedPublicName = exposedInputs[publicName];
11558      const privateName = declaredInputs[publicName];
11559      if ((typeof ngDevMode === "undefined" || ngDevMode) && declaredInputs.hasOwnProperty(remappedPublicName)) {
11560        assertEqual(declaredInputs[remappedPublicName], declaredInputs[publicName], `Conflicting host directive input alias ${publicName}.`);
11561      }
11562      declaredInputs[remappedPublicName] = privateName;
11563    }
11564  }
11565}
11566function validateHostDirective(hostDirectiveConfig, directiveDef) {
11567  const type = hostDirectiveConfig.directive;
11568  if (directiveDef === null) {
11569    if (getComponentDef(type) !== null) {
11570      throw new RuntimeError(310, `Host directive ${type.name} cannot be a component.`);
11571    }
11572    throw new RuntimeError(307, `Could not resolve metadata for host directive ${type.name}. Make sure that the ${type.name} class is annotated with an @Directive decorator.`);
11573  }
11574  if (!directiveDef.standalone) {
11575    throw new RuntimeError(308, `Host directive ${directiveDef.type.name} must be standalone.`);
11576  }
11577  validateMappings("input", directiveDef, hostDirectiveConfig.inputs);
11578  validateMappings("output", directiveDef, hostDirectiveConfig.outputs);
11579}
11580function validateMappings(bindingType, def, hostDirectiveBindings) {
11581  const className = def.type.name;
11582  const bindings = bindingType === "input" ? def.inputs : def.outputs;
11583  for (const publicName in hostDirectiveBindings) {
11584    if (hostDirectiveBindings.hasOwnProperty(publicName)) {
11585      if (!bindings.hasOwnProperty(publicName)) {
11586        throw new RuntimeError(311, `Directive ${className} does not have an ${bindingType} with a public name of ${publicName}.`);
11587      }
11588      const remappedPublicName = hostDirectiveBindings[publicName];
11589      if (bindings.hasOwnProperty(remappedPublicName) && remappedPublicName !== publicName) {
11590        throw new RuntimeError(312, `Cannot alias ${bindingType} ${publicName} of host directive ${className} to ${remappedPublicName}, because it already has a different ${bindingType} with the same public name.`);
11591      }
11592    }
11593  }
11594}
11595function templateCreate(tNode, declarationLView, declarationTView, index, templateFn, decls, vars, flags) {
11596  if (declarationTView.firstCreatePass) {
11597    tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);
11598    const embeddedTView = tNode.tView = createTView(
11599      2,
11600      tNode,
11601      templateFn,
11602      decls,
11603      vars,
11604      declarationTView.directiveRegistry,
11605      declarationTView.pipeRegistry,
11606      null,
11607      declarationTView.schemas,
11608      declarationTView.consts,
11609      null
11610      /* ssrId */
11611    );
11612    if (declarationTView.queries !== null) {
11613      declarationTView.queries.template(declarationTView, tNode);
11614      embeddedTView.queries = declarationTView.queries.embeddedTView(tNode);
11615    }
11616  }
11617  if (flags) {
11618    tNode.flags |= flags;
11619  }
11620  setCurrentTNode(tNode, false);
11621  const comment = _locateOrCreateContainerAnchor(declarationTView, declarationLView, tNode, index);
11622  if (wasLastNodeCreated()) {
11623    appendChild(declarationTView, declarationLView, comment, tNode);
11624  }
11625  attachPatchData(comment, declarationLView);
11626  const lContainer = createLContainer(comment, declarationLView, comment, tNode);
11627  declarationLView[index + HEADER_OFFSET] = lContainer;
11628  addToEndOfViewTree(declarationLView, lContainer);
11629  populateDehydratedViewsInLContainer(lContainer, tNode, declarationLView);
11630}
11631function declareDirectiveHostTemplate(declarationLView, declarationTView, index, templateFn, decls, vars, tagName, attrs, flags, localRefsIndex, localRefExtractor) {
11632  const adjustedIndex = index + HEADER_OFFSET;
11633  let tNode;
11634  if (declarationTView.firstCreatePass) {
11635    tNode = getOrCreateTNode(declarationTView, adjustedIndex, 4, tagName || null, attrs || null);
11636    if (getBindingsEnabled()) {
11637      resolveDirectives(declarationTView, declarationLView, tNode, getConstant(declarationTView.consts, localRefsIndex), findDirectiveDefMatches);
11638    }
11639    registerPostOrderHooks(declarationTView, tNode);
11640  } else {
11641    tNode = declarationTView.data[adjustedIndex];
11642  }
11643  templateCreate(tNode, declarationLView, declarationTView, index, templateFn, decls, vars, flags);
11644  if (isDirectiveHost(tNode)) {
11645    createDirectivesInstances(declarationTView, declarationLView, tNode);
11646  }
11647  if (localRefsIndex != null) {
11648    saveResolvedLocalsInData(declarationLView, tNode, localRefExtractor);
11649  }
11650  return tNode;
11651}
11652function declareNoDirectiveHostTemplate(declarationLView, declarationTView, index, templateFn, decls, vars, tagName, attrs, flags, localRefsIndex, localRefExtractor) {
11653  const adjustedIndex = index + HEADER_OFFSET;
11654  let tNode;
11655  if (declarationTView.firstCreatePass) {
11656    tNode = getOrCreateTNode(declarationTView, adjustedIndex, 4, tagName || null, attrs || null);
11657    if (localRefsIndex != null) {
11658      const refs = getConstant(declarationTView.consts, localRefsIndex);
11659      tNode.localNames = [];
11660      for (let i = 0; i < refs.length; i += 2) {
11661        tNode.localNames.push(refs[i], -1);
11662      }
11663    }
11664  } else {
11665    tNode = declarationTView.data[adjustedIndex];
11666  }
11667  templateCreate(tNode, declarationLView, declarationTView, index, templateFn, decls, vars, flags);
11668  if (localRefsIndex != null) {
11669    saveResolvedLocalsInData(declarationLView, tNode, localRefExtractor);
11670  }
11671  return tNode;
11672}
11673function \u0275\u0275template(index, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex, localRefExtractor) {
11674  const lView = getLView();
11675  const tView = getTView();
11676  const attrs = getConstant(tView.consts, attrsIndex);
11677  declareDirectiveHostTemplate(lView, tView, index, templateFn, decls, vars, tagName, attrs, void 0, localRefsIndex, localRefExtractor);
11678  return \u0275\u0275template;
11679}
11680function \u0275\u0275domTemplate(index, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex, localRefExtractor) {
11681  const lView = getLView();
11682  const tView = getTView();
11683  const attrs = getConstant(tView.consts, attrsIndex);
11684  declareNoDirectiveHostTemplate(lView, tView, index, templateFn, decls, vars, tagName, attrs, void 0, localRefsIndex, localRefExtractor);
11685  return \u0275\u0275domTemplate;
11686}
11687function createContainerAnchorImpl(tView, lView, tNode, index) {
11688  lastNodeWasCreated(true);
11689  return lView[RENDERER].createComment(ngDevMode ? "container" : "");
11690}
11691function storeTriggerCleanupFn(type, lDetails, cleanupFn) {
11692  const key = getCleanupFnKeyByType(type);
11693  if (lDetails[key] === null) {
11694    lDetails[key] = [];
11695  }
11696  lDetails[key].push(cleanupFn);
11697}
11698function invokeTriggerCleanupFns(type, lDetails) {
11699  const key = getCleanupFnKeyByType(type);
11700  const cleanupFns = lDetails[key];
11701  if (cleanupFns !== null) {
11702    for (const cleanupFn of cleanupFns) {
11703      cleanupFn();
11704    }
11705    lDetails[key] = null;
11706  }
11707}
11708function invokeAllTriggerCleanupFns(lDetails) {
11709  invokeTriggerCleanupFns(1, lDetails);
11710  invokeTriggerCleanupFns(0, lDetails);
11711  invokeTriggerCleanupFns(2, lDetails);
11712}
11713function getCleanupFnKeyByType(type) {
11714  let key = TRIGGER_CLEANUP_FNS;
11715  if (type === 1) {
11716    key = PREFETCH_TRIGGER_CLEANUP_FNS;
11717  } else if (type === 2) {
11718    key = HYDRATE_TRIGGER_CLEANUP_FNS;
11719  }
11720  return key;
11721}
11722function getDeferBlockDataIndex(deferBlockIndex) {
11723  return deferBlockIndex + 1;
11724}
11725function getLDeferBlockDetails(lView, tNode) {
11726  const tView = lView[TVIEW];
11727  const slotIndex = getDeferBlockDataIndex(tNode.index);
11728  ngDevMode && assertIndexInDeclRange(tView, slotIndex);
11729  return lView[slotIndex];
11730}
11731function setLDeferBlockDetails(lView, deferBlockIndex, lDetails) {
11732  const tView = lView[TVIEW];
11733  const slotIndex = getDeferBlockDataIndex(deferBlockIndex);
11734  ngDevMode && assertIndexInDeclRange(tView, slotIndex);
11735  lView[slotIndex] = lDetails;
11736}
11737function getTDeferBlockDetails(tView, tNode) {
11738  const slotIndex = getDeferBlockDataIndex(tNode.index);
11739  ngDevMode && assertIndexInDeclRange(tView, slotIndex);
11740  return tView.data[slotIndex];
11741}
11742function setTDeferBlockDetails(tView, deferBlockIndex, deferBlockConfig) {
11743  const slotIndex = getDeferBlockDataIndex(deferBlockIndex);
11744  ngDevMode && assertIndexInDeclRange(tView, slotIndex);
11745  tView.data[slotIndex] = deferBlockConfig;
11746}
11747function getTemplateIndexForState(newState, hostLView, tNode) {
11748  const tView = hostLView[TVIEW];
11749  const tDetails = getTDeferBlockDetails(tView, tNode);
11750  switch (newState) {
11751    case DeferBlockState.Complete:
11752      return tDetails.primaryTmplIndex;
11753    case DeferBlockState.Loading:
11754      return tDetails.loadingTmplIndex;
11755    case DeferBlockState.Error:
11756      return tDetails.errorTmplIndex;
11757    case DeferBlockState.Placeholder:
11758      return tDetails.placeholderTmplIndex;
11759    default:
11760      ngDevMode && throwError(`Unexpected defer block state: ${newState}`);
11761      return null;
11762  }
11763}
11764function getMinimumDurationForState(tDetails, currentState) {
11765  if (currentState === DeferBlockState.Placeholder) {
11766    return tDetails.placeholderBlockConfig?.[MINIMUM_SLOT] ?? null;
11767  } else if (currentState === DeferBlockState.Loading) {
11768    return tDetails.loadingBlockConfig?.[MINIMUM_SLOT] ?? null;
11769  }
11770  return null;
11771}
11772function getLoadingBlockAfter(tDetails) {
11773  return tDetails.loadingBlockConfig?.[LOADING_AFTER_SLOT] ?? null;
11774}
11775function addDepsToRegistry(currentDeps, newDeps) {
11776  if (!currentDeps || currentDeps.length === 0) {
11777    return newDeps;
11778  }
11779  const currentDepSet = new Set(currentDeps);
11780  for (const dep of newDeps) {
11781    currentDepSet.add(dep);
11782  }
11783  return currentDeps.length === currentDepSet.size ? currentDeps : Array.from(currentDepSet);
11784}
11785function getPrimaryBlockTNode(tView, tDetails) {
11786  const adjustedIndex = tDetails.primaryTmplIndex + HEADER_OFFSET;
11787  return getTNode(tView, adjustedIndex);
11788}
11789function assertDeferredDependenciesLoaded(tDetails) {
11790  assertEqual(tDetails.loadingState, DeferDependenciesLoadingState.COMPLETE, "Expecting all deferred dependencies to be loaded.");
11791}
11792function isTDeferBlockDetails(value) {
11793  return value !== null && typeof value === "object" && typeof value.primaryTmplIndex === "number";
11794}
11795function trackTriggerForDebugging(tView, tNode, textRepresentation) {
11796  const tDetails = getTDeferBlockDetails(tView, tNode);
11797  tDetails.debug ??= {};
11798  tDetails.debug.triggers ??= /* @__PURE__ */ new Set();
11799  tDetails.debug.triggers.add(textRepresentation);
11800}
11801function onViewportWrapper(trigger, callback, injector) {
11802  const ngZone = injector.get(NgZone);
11803  return onViewport(trigger, () => ngZone.run(callback), () => ngZone.runOutsideAngular(() => createIntersectionObserver()));
11804}
11805function getTriggerLView(deferredHostLView, deferredTNode, walkUpTimes) {
11806  if (walkUpTimes == null) {
11807    return deferredHostLView;
11808  }
11809  if (walkUpTimes >= 0) {
11810    return walkUpViews(walkUpTimes, deferredHostLView);
11811  }
11812  const deferredContainer = deferredHostLView[deferredTNode.index];
11813  ngDevMode && assertLContainer(deferredContainer);
11814  const triggerLView = deferredContainer[CONTAINER_HEADER_OFFSET] ?? null;
11815  if (ngDevMode && triggerLView !== null) {
11816    const lDetails = getLDeferBlockDetails(deferredHostLView, deferredTNode);
11817    const renderedState = lDetails[DEFER_BLOCK_STATE];
11818    assertEqual(renderedState, DeferBlockState.Placeholder, "Expected a placeholder to be rendered in this defer block.");
11819    assertLView(triggerLView);
11820  }
11821  return triggerLView;
11822}
11823function getTriggerElement(triggerLView, triggerIndex) {
11824  const element = getNativeByIndex(HEADER_OFFSET + triggerIndex, triggerLView);
11825  ngDevMode && assertElement(element);
11826  return element;
11827}
11828function registerDomTrigger(initialLView, tNode, triggerIndex, walkUpTimes, registerFn, callback, type) {
11829  const injector = initialLView[INJECTOR];
11830  const zone = injector.get(NgZone);
11831  let poll;
11832  function pollDomTrigger() {
11833    if (isDestroyed(initialLView)) {
11834      poll.destroy();
11835      return;
11836    }
11837    const lDetails = getLDeferBlockDetails(initialLView, tNode);
11838    const renderedState = lDetails[DEFER_BLOCK_STATE];
11839    if (renderedState !== DeferBlockInternalState.Initial && renderedState !== DeferBlockState.Placeholder) {
11840      poll.destroy();
11841      return;
11842    }
11843    const triggerLView = getTriggerLView(initialLView, tNode, walkUpTimes);
11844    if (!triggerLView) {
11845      return;
11846    }
11847    poll.destroy();
11848    if (isDestroyed(triggerLView)) {
11849      return;
11850    }
11851    const element = getTriggerElement(triggerLView, triggerIndex);
11852    const cleanup = registerFn(element, () => {
11853      zone.run(() => {
11854        if (initialLView !== triggerLView) {
11855          removeLViewOnDestroy(triggerLView, cleanup);
11856        }
11857        callback();
11858      });
11859    }, injector);
11860    if (initialLView !== triggerLView) {
11861      storeLViewOnDestroy(triggerLView, cleanup);
11862    }
11863    storeTriggerCleanupFn(type, lDetails, cleanup);
11864  }
11865  poll = afterEveryRender({ read: pollDomTrigger }, { injector });
11866}
11867function onIdle(callback, injector) {
11868  const scheduler2 = injector.get(IdleScheduler);
11869  const cleanupFn = () => scheduler2.remove(callback);
11870  scheduler2.add(callback);
11871  return cleanupFn;
11872}
11873function onTimer(delay) {
11874  return (callback, injector) => scheduleTimerTrigger(delay, callback, injector);
11875}
11876function scheduleTimerTrigger(delay, callback, injector) {
11877  const scheduler2 = injector.get(TimerScheduler);
11878  const ngZone = injector.get(NgZone);
11879  const cleanupFn = () => scheduler2.remove(callback);
11880  scheduler2.add(delay, callback, ngZone);
11881  return cleanupFn;
11882}
11883function getOrCreateEnvironmentInjector(parentInjector, tDetails, providers) {
11884  return parentInjector.get(CachedInjectorService).getOrCreateInjector(tDetails, parentInjector, providers, ngDevMode ? "DeferBlock Injector" : "");
11885}
11886function createDeferBlockInjector(parentInjector, tDetails, providers) {
11887  if (parentInjector instanceof ChainedInjector) {
11888    const origInjector = parentInjector.injector;
11889    const parentEnvInjector2 = parentInjector.parentInjector;
11890    const envInjector = getOrCreateEnvironmentInjector(parentEnvInjector2, tDetails, providers);
11891    return new ChainedInjector(origInjector, envInjector);
11892  }
11893  const parentEnvInjector = parentInjector.get(EnvironmentInjector);
11894  if (parentEnvInjector !== parentInjector) {
11895    const envInjector = getOrCreateEnvironmentInjector(parentEnvInjector, tDetails, providers);
11896    return new ChainedInjector(parentInjector, envInjector);
11897  }
11898  return getOrCreateEnvironmentInjector(parentInjector, tDetails, providers);
11899}
11900function renderDeferBlockState(newState, tNode, lContainer, skipTimerScheduling = false) {
11901  const hostLView = lContainer[PARENT];
11902  const hostTView = hostLView[TVIEW];
11903  if (isDestroyed(hostLView))
11904    return;
11905  ngDevMode && assertTNodeForLView(tNode, hostLView);
11906  const lDetails = getLDeferBlockDetails(hostLView, tNode);
11907  ngDevMode && assertDefined(lDetails, "Expected a defer block state defined");
11908  const currentState = lDetails[DEFER_BLOCK_STATE];
11909  const ssrState = lDetails[SSR_BLOCK_STATE];
11910  if (ssrState !== null && newState < ssrState) {
11911    return;
11912  }
11913  if (isValidStateChange(currentState, newState) && isValidStateChange(lDetails[NEXT_DEFER_BLOCK_STATE] ?? -1, newState)) {
11914    const tDetails = getTDeferBlockDetails(hostTView, tNode);
11915    const needsScheduling = !skipTimerScheduling && true && (getLoadingBlockAfter(tDetails) !== null || getMinimumDurationForState(tDetails, DeferBlockState.Loading) !== null || getMinimumDurationForState(tDetails, DeferBlockState.Placeholder));
11916    if (ngDevMode && needsScheduling) {
11917      assertDefined(applyDeferBlockStateWithSchedulingImpl, "Expected scheduling function to be defined");
11918    }
11919    const applyStateFn = needsScheduling ? applyDeferBlockStateWithSchedulingImpl : applyDeferBlockState;
11920    try {
11921      applyStateFn(newState, lDetails, lContainer, tNode, hostLView);
11922    } catch (error) {
11923      handleUncaughtError(hostLView, error);
11924    }
11925  }
11926}
11927function findMatchingDehydratedViewForDeferBlock(lContainer, lDetails) {
11928  const dehydratedViewIx = lContainer[DEHYDRATED_VIEWS]?.findIndex((view) => view.data[DEFER_BLOCK_STATE$1] === lDetails[DEFER_BLOCK_STATE]) ?? -1;
11929  const dehydratedView = dehydratedViewIx > -1 ? lContainer[DEHYDRATED_VIEWS][dehydratedViewIx] : null;
11930  return { dehydratedView, dehydratedViewIx };
11931}
11932function applyDeferBlockState(newState, lDetails, lContainer, tNode, hostLView) {
11933  profiler(
11934    20
11935    /* ProfilerEvent.DeferBlockStateStart */
11936  );
11937  const stateTmplIndex = getTemplateIndexForState(newState, hostLView, tNode);
11938  if (stateTmplIndex !== null) {
11939    lDetails[DEFER_BLOCK_STATE] = newState;
11940    const hostTView = hostLView[TVIEW];
11941    const adjustedIndex = stateTmplIndex + HEADER_OFFSET;
11942    const activeBlockTNode = getTNode(hostTView, adjustedIndex);
11943    const viewIndex = 0;
11944    removeLViewFromLContainer(lContainer, viewIndex);
11945    let injector;
11946    if (newState === DeferBlockState.Complete) {
11947      const tDetails = getTDeferBlockDetails(hostTView, tNode);
11948      const providers = tDetails.providers;
11949      if (providers && providers.length > 0) {
11950        injector = createDeferBlockInjector(hostLView[INJECTOR], tDetails, providers);
11951      }
11952    }
11953    const { dehydratedView, dehydratedViewIx } = findMatchingDehydratedViewForDeferBlock(lContainer, lDetails);
11954    const embeddedLView = createAndRenderEmbeddedLView(hostLView, activeBlockTNode, null, {
11955      injector,
11956      dehydratedView
11957    });
11958    addLViewToLContainer(lContainer, embeddedLView, viewIndex, shouldAddViewToDom(activeBlockTNode, dehydratedView));
11959    markViewDirty(
11960      embeddedLView,
11961      2
11962      /* NotificationSource.DeferBlockStateUpdate */
11963    );
11964    if (dehydratedViewIx > -1) {
11965      lContainer[DEHYDRATED_VIEWS]?.splice(dehydratedViewIx, 1);
11966    }
11967    if ((newState === DeferBlockState.Complete || newState === DeferBlockState.Error) && Array.isArray(lDetails[ON_COMPLETE_FNS])) {
11968      for (const callback of lDetails[ON_COMPLETE_FNS]) {
11969        callback();
11970      }
11971      lDetails[ON_COMPLETE_FNS] = null;
11972    }
11973  }
11974  profiler(
11975    21
11976    /* ProfilerEvent.DeferBlockStateEnd */
11977  );
11978}
11979function applyDeferBlockStateWithScheduling(newState, lDetails, lContainer, tNode, hostLView) {
11980  const now = Date.now();
11981  const hostTView = hostLView[TVIEW];
11982  const tDetails = getTDeferBlockDetails(hostTView, tNode);
11983  if (lDetails[STATE_IS_FROZEN_UNTIL] === null || lDetails[STATE_IS_FROZEN_UNTIL] <= now) {
11984    lDetails[STATE_IS_FROZEN_UNTIL] = null;
11985    const loadingAfter = getLoadingBlockAfter(tDetails);
11986    const inLoadingAfterPhase = lDetails[LOADING_AFTER_CLEANUP_FN] !== null;
11987    if (newState === DeferBlockState.Loading && loadingAfter !== null && !inLoadingAfterPhase) {
11988      lDetails[NEXT_DEFER_BLOCK_STATE] = newState;
11989      const cleanupFn = scheduleDeferBlockUpdate(loadingAfter, lDetails, tNode, lContainer, hostLView);
11990      lDetails[LOADING_AFTER_CLEANUP_FN] = cleanupFn;
11991    } else {
11992      if (newState > DeferBlockState.Loading && inLoadingAfterPhase) {
11993        lDetails[LOADING_AFTER_CLEANUP_FN]();
11994        lDetails[LOADING_AFTER_CLEANUP_FN] = null;
11995        lDetails[NEXT_DEFER_BLOCK_STATE] = null;
11996      }
11997      applyDeferBlockState(newState, lDetails, lContainer, tNode, hostLView);
11998      const duration = getMinimumDurationForState(tDetails, newState);
11999      if (duration !== null) {
12000        lDetails[STATE_IS_FROZEN_UNTIL] = now + duration;
12001        scheduleDeferBlockUpdate(duration, lDetails, tNode, lContainer, hostLView);
12002      }
12003    }
12004  } else {
12005    lDetails[NEXT_DEFER_BLOCK_STATE] = newState;
12006  }
12007}
12008function scheduleDeferBlockUpdate(timeout, lDetails, tNode, lContainer, hostLView) {
12009  const callback = () => {
12010    const nextState = lDetails[NEXT_DEFER_BLOCK_STATE];
12011    lDetails[STATE_IS_FROZEN_UNTIL] = null;
12012    lDetails[NEXT_DEFER_BLOCK_STATE] = null;
12013    if (nextState !== null) {
12014      renderDeferBlockState(nextState, tNode, lContainer);
12015    }
12016  };
12017  return scheduleTimerTrigger(timeout, callback, hostLView[INJECTOR]);
12018}
12019function isValidStateChange(currentState, newState) {
12020  return currentState < newState;
12021}
12022function renderPlaceholder(lView, tNode) {
12023  const lContainer = lView[tNode.index];
12024  ngDevMode && assertLContainer(lContainer);
12025  renderDeferBlockState(DeferBlockState.Placeholder, tNode, lContainer);
12026}
12027function renderDeferStateAfterResourceLoading(tDetails, tNode, lContainer) {
12028  ngDevMode && assertDefined(tDetails.loadingPromise, "Expected loading Promise to exist on this defer block");
12029  tDetails.loadingPromise.then(() => {
12030    if (tDetails.loadingState === DeferDependenciesLoadingState.COMPLETE) {
12031      ngDevMode && assertDeferredDependenciesLoaded(tDetails);
12032      renderDeferBlockState(DeferBlockState.Complete, tNode, lContainer);
12033    } else if (tDetails.loadingState === DeferDependenciesLoadingState.FAILED) {
12034      renderDeferBlockState(DeferBlockState.Error, tNode, lContainer);
12035    }
12036  });
12037}
12038function \u0275\u0275deferEnableTimerScheduling(tView, tDetails, placeholderConfigIndex, loadingConfigIndex) {
12039  const tViewConsts = tView.consts;
12040  if (placeholderConfigIndex != null) {
12041    tDetails.placeholderBlockConfig = getConstant(tViewConsts, placeholderConfigIndex);
12042  }
12043  if (loadingConfigIndex != null) {
12044    tDetails.loadingBlockConfig = getConstant(tViewConsts, loadingConfigIndex);
12045  }
12046  if (applyDeferBlockStateWithSchedulingImpl === null) {
12047    applyDeferBlockStateWithSchedulingImpl = applyDeferBlockStateWithScheduling;
12048  }
12049}
12050function setClassMetadata(type, decorators, ctorParameters, propDecorators) {
12051  return noSideEffects(() => {
12052    const clazz = type;
12053    if (decorators !== null) {
12054      if (clazz.hasOwnProperty("decorators") && clazz.decorators !== void 0) {
12055        clazz.decorators.push(...decorators);
12056      } else {
12057        clazz.decorators = decorators;
12058      }
12059    }
12060    if (ctorParameters !== null) {
12061      clazz.ctorParameters = ctorParameters;
12062    }
12063    if (propDecorators !== null) {
12064      if (clazz.hasOwnProperty("propDecorators") && clazz.propDecorators !== void 0) {
12065        clazz.propDecorators = __spreadValues(__spreadValues({}, clazz.propDecorators), propDecorators);
12066      } else {
12067        clazz.propDecorators = propDecorators;
12068      }
12069    }
12070  });
12071}
12072function getFrameworkDIDebugData() {
12073  return frameworkDIDebugData;
12074}
12075function setupFrameworkInjectorProfiler() {
12076  frameworkDIDebugData.reset();
12077  setInjectorProfiler(injectorProfilerEventHandler);
12078}
12079function injectorProfilerEventHandler(injectorProfilerEvent) {
12080  const { context: context2, type } = injectorProfilerEvent;
12081  if (type === 0) {
12082    handleInjectEvent(context2, injectorProfilerEvent.service);
12083  } else if (type === 1) {
12084    handleInstanceCreatedByInjectorEvent(context2, injectorProfilerEvent.instance);
12085  } else if (type === 2) {
12086    handleProviderConfiguredEvent(context2, injectorProfilerEvent.providerRecord);
12087  } else if (type === 3) {
12088    handleEffectCreatedEvent(context2, injectorProfilerEvent.effect);
12089  }
12090}
12091function handleEffectCreatedEvent(context2, effect2) {
12092  const diResolver = getDIResolver(context2.injector);
12093  if (diResolver === null) {
12094    throwError("An EffectCreated event must be run within an injection context.");
12095  }
12096  const { resolverToEffects } = frameworkDIDebugData;
12097  if (!resolverToEffects.has(diResolver)) {
12098    resolverToEffects.set(diResolver, []);
12099  }
12100  resolverToEffects.get(diResolver).push(effect2);
12101}
12102function handleInjectEvent(context2, data) {
12103  const diResolver = getDIResolver(context2.injector);
12104  if (diResolver === null) {
12105    throwError("An Inject event must be run within an injection context.");
12106  }
12107  const diResolverToInstantiatedToken = frameworkDIDebugData.resolverToTokenToDependencies;
12108  if (!diResolverToInstantiatedToken.has(diResolver)) {
12109    diResolverToInstantiatedToken.set(diResolver, /* @__PURE__ */ new WeakMap());
12110  }
12111  if (!canBeHeldWeakly(context2.token)) {
12112    return;
12113  }
12114  const instantiatedTokenToDependencies = diResolverToInstantiatedToken.get(diResolver);
12115  if (!instantiatedTokenToDependencies.has(context2.token)) {
12116    instantiatedTokenToDependencies.set(context2.token, []);
12117  }
12118  const { token, value, flags } = data;
12119  assertDefined(context2.token, "Injector profiler context token is undefined.");
12120  const dependencies = instantiatedTokenToDependencies.get(context2.token);
12121  assertDefined(dependencies, "Could not resolve dependencies for token.");
12122  if (context2.injector instanceof NodeInjector) {
12123    dependencies.push({ token, value, flags, injectedIn: getNodeInjectorContext(context2.injector) });
12124  } else {
12125    dependencies.push({ token, value, flags });
12126  }
12127}
12128function getNodeInjectorContext(injector) {
12129  if (!(injector instanceof NodeInjector)) {
12130    throwError("getNodeInjectorContext must be called with a NodeInjector");
12131  }
12132  const lView = getNodeInjectorLView(injector);
12133  const tNode = getNodeInjectorTNode(injector);
12134  if (tNode === null) {
12135    return;
12136  }
12137  assertTNodeForLView(tNode, lView);
12138  return { lView, tNode };
12139}
12140function handleInstanceCreatedByInjectorEvent(context2, data) {
12141  const { value } = data;
12142  if (data.value == null) {
12143    return;
12144  }
12145  if (getDIResolver(context2.injector) === null) {
12146    throwError("An InjectorCreatedInstance event must be run within an injection context.");
12147  }
12148  let standaloneComponent = void 0;
12149  if (typeof value === "object") {
12150    standaloneComponent = value?.constructor;
12151  }
12152  if (standaloneComponent == void 0 || !isStandaloneComponent(standaloneComponent)) {
12153    return;
12154  }
12155  const environmentInjector = context2.injector.get(EnvironmentInjector, null, { optional: true });
12156  if (environmentInjector === null) {
12157    return;
12158  }
12159  const { standaloneInjectorToComponent } = frameworkDIDebugData;
12160  if (standaloneInjectorToComponent.has(environmentInjector)) {
12161    return;
12162  }
12163  standaloneInjectorToComponent.set(environmentInjector, standaloneComponent);
12164}
12165function isStandaloneComponent(value) {
12166  const def = getComponentDef(value);
12167  return !!def?.standalone;
12168}
12169function handleProviderConfiguredEvent(context2, data) {
12170  const { resolverToProviders } = frameworkDIDebugData;
12171  let diResolver;
12172  if (context2?.injector instanceof NodeInjector) {
12173    diResolver = getNodeInjectorTNode(context2.injector);
12174  } else {
12175    diResolver = context2.injector;
12176  }
12177  if (diResolver === null) {
12178    throwError("A ProviderConfigured event must be run within an injection context.");
12179  }
12180  if (!resolverToProviders.has(diResolver)) {
12181    resolverToProviders.set(diResolver, []);
12182  }
12183  resolverToProviders.get(diResolver).push(data);
12184}
12185function getDIResolver(injector) {
12186  let diResolver = null;
12187  if (injector === void 0) {
12188    return diResolver;
12189  }
12190  if (injector instanceof NodeInjector) {
12191    diResolver = getNodeInjectorLView(injector);
12192  } else {
12193    diResolver = injector;
12194  }
12195  return diResolver;
12196}
12197function canBeHeldWeakly(value) {
12198  return value !== null && (typeof value === "object" || typeof value === "function" || typeof value === "symbol");
12199}
12200function applyChanges(component) {
12201  ngDevMode && assertDefined(component, "component");
12202  markViewDirty(
12203    getComponentViewByInstance(component),
12204    3
12205    /* NotificationSource.DebugApplyChanges */
12206  );
12207  getRootComponents(component).forEach((rootComponent) => detectChanges(rootComponent));
12208}
12209function detectChanges(component) {
12210  const view = getComponentViewByInstance(component);
12211  view[FLAGS] |= 1024;
12212  detectChangesInternal(view);
12213}
12214function getDeferBlocks$1(lView, deferBlocks) {
12215  const tView = lView[TVIEW];
12216  for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {
12217    if (isLContainer(lView[i])) {
12218      const lContainer = lView[i];
12219      const isLast = i === tView.bindingStartIndex - 1;
12220      if (!isLast) {
12221        const tNode = tView.data[i];
12222        const tDetails = getTDeferBlockDetails(tView, tNode);
12223        if (isTDeferBlockDetails(tDetails)) {
12224          deferBlocks.push({ lContainer, lView, tNode, tDetails });
12225          continue;
12226        }
12227      }
12228      if (isLView(lContainer[HOST])) {
12229        getDeferBlocks$1(lContainer[HOST], deferBlocks);
12230      }
12231      for (let j = CONTAINER_HEADER_OFFSET; j < lContainer.length; j++) {
12232        getDeferBlocks$1(lContainer[j], deferBlocks);
12233      }
12234    } else if (isLView(lView[i])) {
12235      getDeferBlocks$1(lView[i], deferBlocks);
12236    }
12237  }
12238}
12239function getDeferBlocks(node) {
12240  const results = [];
12241  const lView = getLContext(node)?.lView;
12242  if (lView) {
12243    findDeferBlocks(node, lView, results);
12244  }
12245  return results;
12246}
12247function findDeferBlocks(node, lView, results) {
12248  const viewInjector = lView[INJECTOR];
12249  const registry = viewInjector.get(DEHYDRATED_BLOCK_REGISTRY, null, { optional: true });
12250  const blocks = [];
12251  getDeferBlocks$1(lView, blocks);
12252  const transferState = viewInjector.get(TransferState);
12253  const deferBlockParents = transferState.get(NGH_DEFER_BLOCKS_KEY, {});
12254  for (const details of blocks) {
12255    const native = getNativeByTNode(details.tNode, details.lView);
12256    const lDetails = getLDeferBlockDetails(details.lView, details.tNode);
12257    if (!node.contains(native)) {
12258      continue;
12259    }
12260    const tDetails = details.tDetails;
12261    const renderedLView = getRendererLView(details);
12262    const rootNodes = [];
12263    const hydrationState = inferHydrationState(tDetails, lDetails, registry);
12264    if (renderedLView !== null) {
12265      collectNativeNodes(renderedLView[TVIEW], renderedLView, renderedLView[TVIEW].firstChild, rootNodes);
12266    } else if (hydrationState === "dehydrated") {
12267      const deferId = lDetails[SSR_UNIQUE_ID];
12268      const deferData = deferBlockParents[deferId];
12269      const numberOfRootNodes = deferData[NUM_ROOT_NODES];
12270      let collectedNodeCount = 0;
12271      const deferBlockCommentNode = details.lContainer[NATIVE];
12272      let currentNode = deferBlockCommentNode.previousSibling;
12273      while (collectedNodeCount < numberOfRootNodes && currentNode) {
12274        rootNodes.unshift(currentNode);
12275        currentNode = currentNode.previousSibling;
12276        collectedNodeCount++;
12277      }
12278    }
12279    const data = {
12280      state: stringifyState(lDetails[DEFER_BLOCK_STATE]),
12281      incrementalHydrationState: hydrationState,
12282      hasErrorBlock: tDetails.errorTmplIndex !== null,
12283      loadingBlock: {
12284        exists: tDetails.loadingTmplIndex !== null,
12285        minimumTime: tDetails.loadingBlockConfig?.[MINIMUM_SLOT] ?? null,
12286        afterTime: tDetails.loadingBlockConfig?.[LOADING_AFTER_SLOT] ?? null
12287      },
12288      placeholderBlock: {
12289        exists: tDetails.placeholderTmplIndex !== null,
12290        minimumTime: tDetails.placeholderBlockConfig?.[MINIMUM_SLOT] ?? null
12291      },
12292      triggers: tDetails.debug?.triggers ? Array.from(tDetails.debug.triggers).sort() : [],
12293      rootNodes
12294    };
12295    results.push(data);
12296    if (renderedLView !== null) {
12297      findDeferBlocks(node, renderedLView, results);
12298    }
12299  }
12300}
12301function stringifyState(state) {
12302  switch (state) {
12303    case DeferBlockState.Complete:
12304      return "complete";
12305    case DeferBlockState.Loading:
12306      return "loading";
12307    case DeferBlockState.Placeholder:
12308      return "placeholder";
12309    case DeferBlockState.Error:
12310      return "error";
12311    case DeferBlockInternalState.Initial:
12312      return "initial";
12313    default:
12314      throw new Error(`Unrecognized state ${state}`);
12315  }
12316}
12317function inferHydrationState(tDetails, lDetails, registry) {
12318  if (registry === null || lDetails[SSR_UNIQUE_ID] === null || tDetails.hydrateTriggers === null || tDetails.hydrateTriggers.has(
12319    7
12320    /* DeferBlockTrigger.Never */
12321  )) {
12322    return "not-configured";
12323  }
12324  return registry.has(lDetails[SSR_UNIQUE_ID]) ? "dehydrated" : "hydrated";
12325}
12326function getRendererLView(details) {
12327  if (details.lContainer.length <= CONTAINER_HEADER_OFFSET) {
12328    return null;
12329  }
12330  const lView = details.lContainer[CONTAINER_HEADER_OFFSET];
12331  ngDevMode && assertLView(lView);
12332  return lView;
12333}
12334function getDependenciesFromInjectable(injector, token) {
12335  const instance = injector.get(token, null, { self: true, optional: true });
12336  if (instance === null) {
12337    throw new Error(`Unable to determine instance of ${token} in given injector`);
12338  }
12339  const unformattedDependencies = getDependenciesForTokenInInjector(token, injector);
12340  const resolutionPath = getInjectorResolutionPath(injector);
12341  const dependencies = unformattedDependencies.map((dep) => {
12342    const formattedDependency = {
12343      value: dep.value
12344    };
12345    const flags = dep.flags;
12346    formattedDependency.flags = {
12347      optional: (8 & flags) === 8,
12348      host: (1 & flags) === 1,
12349      self: (2 & flags) === 2,
12350      skipSelf: (4 & flags) === 4
12351    };
12352    for (let i = 0; i < resolutionPath.length; i++) {
12353      const injectorToCheck = resolutionPath[i];
12354      if (i === 0 && formattedDependency.flags.skipSelf) {
12355        continue;
12356      }
12357      if (formattedDependency.flags.host && injectorToCheck instanceof EnvironmentInjector) {
12358        break;
12359      }
12360      const instance2 = injectorToCheck.get(dep.token, null, {
12361        self: true,
12362        optional: true
12363      });
12364      if (instance2 !== null) {
12365        if (formattedDependency.flags.host) {
12366          const firstInjector = resolutionPath[0];
12367          const lookupFromFirstInjector = firstInjector.get(dep.token, null, __spreadProps(__spreadValues({}, formattedDependency.flags), {
12368            optional: true
12369          }));
12370          if (lookupFromFirstInjector !== null) {
12371            formattedDependency.providedIn = injectorToCheck;
12372          }
12373          break;
12374        }
12375        formattedDependency.providedIn = injectorToCheck;
12376        break;
12377      }
12378      if (i === 0 && formattedDependency.flags.self) {
12379        break;
12380      }
12381    }
12382    if (dep.token)
12383      formattedDependency.token = dep.token;
12384    return formattedDependency;
12385  });
12386  return { instance, dependencies };
12387}
12388function getDependenciesForTokenInInjector(token, injector) {
12389  const { resolverToTokenToDependencies } = getFrameworkDIDebugData();
12390  if (!(injector instanceof NodeInjector)) {
12391    return resolverToTokenToDependencies.get(injector)?.get?.(token) ?? [];
12392  }
12393  const lView = getNodeInjectorLView(injector);
12394  const tokenDependencyMap = resolverToTokenToDependencies.get(lView);
12395  const dependencies = tokenDependencyMap?.get(token) ?? [];
12396  return dependencies.filter((dependency) => {
12397    const dependencyNode = dependency.injectedIn?.tNode;
12398    if (dependencyNode === void 0) {
12399      return false;
12400    }
12401    const instanceNode = getNodeInjectorTNode(injector);
12402    assertTNode(dependencyNode);
12403    assertTNode(instanceNode);
12404    return dependencyNode === instanceNode;
12405  });
12406}
12407function getProviderImportsContainer(injector) {
12408  const { standaloneInjectorToComponent } = getFrameworkDIDebugData();
12409  if (standaloneInjectorToComponent.has(injector)) {
12410    return standaloneInjectorToComponent.get(injector);
12411  }
12412  const defTypeRef = injector.get(NgModuleRef$1, null, { self: true, optional: true });
12413  if (defTypeRef === null) {
12414    return null;
12415  }
12416  if (defTypeRef.instance === null) {
12417    return null;
12418  }
12419  return defTypeRef.instance.constructor;
12420}
12421function getNodeInjectorProviders(injector) {
12422  const diResolver = getNodeInjectorTNode(injector);
12423  const { resolverToProviders } = getFrameworkDIDebugData();
12424  return resolverToProviders.get(diResolver) ?? [];
12425}
12426function getProviderImportPaths(providerImportsContainer) {
12427  const providerToPath = /* @__PURE__ */ new Map();
12428  const visitedContainers = /* @__PURE__ */ new Set();
12429  const visitor = walkProviderTreeToDiscoverImportPaths(providerToPath, visitedContainers);
12430  walkProviderTree(providerImportsContainer, visitor, [], /* @__PURE__ */ new Set());
12431  return providerToPath;
12432}
12433function walkProviderTreeToDiscoverImportPaths(providerToPath, visitedContainers) {
12434  return (provider, container) => {
12435    if (!providerToPath.has(provider)) {
12436      providerToPath.set(provider, [container]);
12437    }
12438    if (!visitedContainers.has(container)) {
12439      for (const prov of providerToPath.keys()) {
12440        const existingImportPath = providerToPath.get(prov);
12441        let containerDef = getInjectorDef(container);
12442        if (!containerDef) {
12443          const ngModule = container.ngModule;
12444          containerDef = getInjectorDef(ngModule);
12445        }
12446        if (!containerDef) {
12447          return;
12448        }
12449        const lastContainerAddedToPath = existingImportPath[0];
12450        let isNextStepInPath = false;
12451        deepForEach(containerDef.imports, (moduleImport) => {
12452          if (isNextStepInPath) {
12453            return;
12454          }
12455          isNextStepInPath = moduleImport.ngModule === lastContainerAddedToPath || moduleImport === lastContainerAddedToPath;
12456          if (isNextStepInPath) {
12457            providerToPath.get(prov)?.unshift(container);
12458          }
12459        });
12460      }
12461    }
12462    visitedContainers.add(container);
12463  };
12464}
12465function getEnvironmentInjectorProviders(injector) {
12466  const providerRecordsWithoutImportPaths = getFrameworkDIDebugData().resolverToProviders.get(injector) ?? [];
12467  if (isPlatformInjector(injector)) {
12468    return providerRecordsWithoutImportPaths;
12469  }
12470  const providerImportsContainer = getProviderImportsContainer(injector);
12471  if (providerImportsContainer === null) {
12472    return providerRecordsWithoutImportPaths;
12473  }
12474  const providerToPath = getProviderImportPaths(providerImportsContainer);
12475  const providerRecords = [];
12476  for (const providerRecord of providerRecordsWithoutImportPaths) {
12477    const provider = providerRecord.provider;
12478    const token = provider.provide;
12479    if (token === ENVIRONMENT_INITIALIZER || token === INJECTOR_DEF_TYPES) {
12480      continue;
12481    }
12482    let importPath = providerToPath.get(provider) ?? [];
12483    const def = getComponentDef(providerImportsContainer);
12484    const isStandaloneComponent2 = !!def?.standalone;
12485    if (isStandaloneComponent2) {
12486      importPath = [providerImportsContainer, ...importPath];
12487    }
12488    providerRecords.push(__spreadProps(__spreadValues({}, providerRecord), { importPath }));
12489  }
12490  return providerRecords;
12491}
12492function isPlatformInjector(injector) {
12493  return injector instanceof R3Injector && injector.scopes.has("platform");
12494}
12495function getInjectorProviders(injector) {
12496  if (injector instanceof NodeInjector) {
12497    return getNodeInjectorProviders(injector);
12498  } else if (injector instanceof EnvironmentInjector) {
12499    return getEnvironmentInjectorProviders(injector);
12500  }
12501  throwError("getInjectorProviders only supports NodeInjector and EnvironmentInjector");
12502}
12503function getInjectorMetadata(injector) {
12504  if (injector instanceof NodeInjector) {
12505    const lView = getNodeInjectorLView(injector);
12506    const tNode = getNodeInjectorTNode(injector);
12507    assertTNodeForLView(tNode, lView);
12508    return { type: "element", source: getNativeByTNode(tNode, lView) };
12509  }
12510  if (injector instanceof R3Injector) {
12511    return { type: "environment", source: injector.source ?? null };
12512  }
12513  if (injector instanceof NullInjector) {
12514    return { type: "null", source: null };
12515  }
12516  return null;
12517}
12518function getInjectorResolutionPath(injector) {
12519  const resolutionPath = [injector];
12520  getInjectorResolutionPathHelper(injector, resolutionPath);
12521  return resolutionPath;
12522}
12523function getInjectorResolutionPathHelper(injector, resolutionPath) {
12524  const parent = getInjectorParent(injector);
12525  if (parent === null) {
12526    if (injector instanceof NodeInjector) {
12527      const firstInjector = resolutionPath[0];
12528      if (firstInjector instanceof NodeInjector) {
12529        const moduleInjector = getModuleInjectorOfNodeInjector(firstInjector);
12530        if (moduleInjector === null) {
12531          throwError("NodeInjector must have some connection to the module injector tree");
12532        }
12533        resolutionPath.push(moduleInjector);
12534        getInjectorResolutionPathHelper(moduleInjector, resolutionPath);
12535      }
12536      return resolutionPath;
12537    }
12538  } else {
12539    resolutionPath.push(parent);
12540    getInjectorResolutionPathHelper(parent, resolutionPath);
12541  }
12542  return resolutionPath;
12543}
12544function getInjectorParent(injector) {
12545  if (injector instanceof R3Injector) {
12546    return injector.parent;
12547  }
12548  let tNode;
12549  let lView;
12550  if (injector instanceof NodeInjector) {
12551    tNode = getNodeInjectorTNode(injector);
12552    lView = getNodeInjectorLView(injector);
12553  } else if (injector instanceof NullInjector) {
12554    return null;
12555  } else if (injector instanceof ChainedInjector) {
12556    return injector.parentInjector;
12557  } else {
12558    throwError("getInjectorParent only support injectors of type R3Injector, NodeInjector, NullInjector");
12559  }
12560  const parentLocation = getParentInjectorLocation(tNode, lView);
12561  if (hasParentInjector(parentLocation)) {
12562    const parentInjectorIndex = getParentInjectorIndex(parentLocation);
12563    const parentLView = getParentInjectorView(parentLocation, lView);
12564    const parentTView = parentLView[TVIEW];
12565    const parentTNode = parentTView.data[
12566      parentInjectorIndex + 8
12567      /* NodeInjectorOffset.TNODE */
12568    ];
12569    return new NodeInjector(parentTNode, parentLView);
12570  } else {
12571    const chainedInjector = lView[INJECTOR];
12572    const injectorParent = chainedInjector.injector?.parent;
12573    if (injectorParent instanceof NodeInjector) {
12574      return injectorParent;
12575    }
12576  }
12577  return null;
12578}
12579function getModuleInjectorOfNodeInjector(injector) {
12580  let lView;
12581  if (injector instanceof NodeInjector) {
12582    lView = getNodeInjectorLView(injector);
12583  } else {
12584    throwError("getModuleInjectorOfNodeInjector must be called with a NodeInjector");
12585  }
12586  const inj = lView[INJECTOR];
12587  const moduleInjector = inj instanceof ChainedInjector ? inj.parentInjector : inj.parent;
12588  if (!moduleInjector) {
12589    throwError("NodeInjector must have some connection to the module injector tree");
12590  }
12591  return moduleInjector;
12592}
12593function isComputedNode(node) {
12594  return node.kind === "computed";
12595}
12596function isTemplateEffectNode(node) {
12597  return node.kind === "template";
12598}
12599function isSignalNode(node) {
12600  return node.kind === "signal";
12601}
12602function getTemplateConsumer(injector) {
12603  const tNode = getNodeInjectorTNode(injector);
12604  assertTNode(tNode);
12605  const lView = getNodeInjectorLView(injector);
12606  assertLView(lView);
12607  const templateLView = lView[tNode.index];
12608  if (isLView(templateLView)) {
12609    return templateLView[REACTIVE_TEMPLATE_CONSUMER] ?? null;
12610  }
12611  return null;
12612}
12613function getNodesAndEdgesFromSignalMap(signalMap) {
12614  const nodes = Array.from(signalMap.keys());
12615  const debugSignalGraphNodes = [];
12616  const edges = [];
12617  for (const [consumer, producers] of signalMap.entries()) {
12618    const consumerIndex = nodes.indexOf(consumer);
12619    let id = signalDebugMap.get(consumer);
12620    if (!id) {
12621      counter$1++;
12622      id = counter$1.toString();
12623      signalDebugMap.set(consumer, id);
12624    }
12625    if (isComputedNode(consumer)) {
12626      debugSignalGraphNodes.push({
12627        label: consumer.debugName,
12628        value: consumer.value,
12629        kind: consumer.kind,
12630        epoch: consumer.version,
12631        debuggableFn: consumer.computation,
12632        id
12633      });
12634    } else if (isSignalNode(consumer)) {
12635      debugSignalGraphNodes.push({
12636        label: consumer.debugName,
12637        value: consumer.value,
12638        kind: consumer.kind,
12639        epoch: consumer.version,
12640        id
12641      });
12642    } else if (isTemplateEffectNode(consumer)) {
12643      debugSignalGraphNodes.push({
12644        label: consumer.debugName ?? consumer.lView?.[HOST]?.tagName?.toLowerCase?.(),
12645        kind: consumer.kind,
12646        epoch: consumer.version,
12647        // The `lView[CONTEXT]` is a reference to an instance of the component's class.
12648        // We get the constructor so that `inspect(.constructor)` shows the component class.
12649        debuggableFn: consumer.lView?.[CONTEXT]?.constructor,
12650        id
12651      });
12652    } else {
12653      debugSignalGraphNodes.push({
12654        label: consumer.debugName,
12655        kind: consumer.kind,
12656        epoch: consumer.version,
12657        id
12658      });
12659    }
12660    for (const producer of producers) {
12661      edges.push({ consumer: consumerIndex, producer: nodes.indexOf(producer) });
12662    }
12663  }
12664  return { nodes: debugSignalGraphNodes, edges };
12665}
12666function extractEffectsFromInjector(injector) {
12667  let diResolver = injector;
12668  if (injector instanceof NodeInjector) {
12669    const lView = getNodeInjectorLView(injector);
12670    diResolver = lView;
12671  }
12672  const resolverToEffects = getFrameworkDIDebugData().resolverToEffects;
12673  const effects = resolverToEffects.get(diResolver) ?? [];
12674  return effects.map((effect2) => effect2[SIGNAL]);
12675}
12676function extractSignalNodesAndEdgesFromRoots(nodes, signalDependenciesMap = /* @__PURE__ */ new Map()) {
12677  for (const node of nodes) {
12678    if (signalDependenciesMap.has(node)) {
12679      continue;
12680    }
12681    const producerNodes = [];
12682    for (let link = node.producers; link !== void 0; link = link.nextProducer) {
12683      const producer = link.producer;
12684      producerNodes.push(producer);
12685    }
12686    signalDependenciesMap.set(node, producerNodes);
12687    extractSignalNodesAndEdgesFromRoots(producerNodes, signalDependenciesMap);
12688  }
12689  return signalDependenciesMap;
12690}
12691function getSignalGraph(injector) {
12692  let templateConsumer = null;
12693  if (!(injector instanceof NodeInjector) && !(injector instanceof R3Injector)) {
12694    return throwError("getSignalGraph must be called with a NodeInjector or R3Injector");
12695  }
12696  if (injector instanceof NodeInjector) {
12697    templateConsumer = getTemplateConsumer(injector);
12698  }
12699  const nonTemplateEffectNodes = extractEffectsFromInjector(injector);
12700  const signalNodes = templateConsumer ? [templateConsumer, ...nonTemplateEffectNodes] : nonTemplateEffectNodes;
12701  const signalDependenciesMap = extractSignalNodesAndEdgesFromRoots(signalNodes);
12702  return getNodesAndEdgesFromSignalMap(signalDependenciesMap);
12703}
12704function measureStart(startEvent) {
12705  eventsStack.push([startEvent, counter]);
12706  console.timeStamp("Event_" + startEvent + "_" + counter++);
12707}
12708function measureEnd(startEvent, entryName, color) {
12709  const top = eventsStack.pop();
12710  assertDefined(top, "Profiling error: could not find start event entry " + startEvent);
12711  assertEqual(top[0], startEvent, `Profiling error: expected to see ${startEvent} event but got ${top[0]}`);
12712  console.timeStamp(entryName, "Event_" + top[0] + "_" + top[1], void 0, "\u{1F170}\uFE0F Angular", void 0, color);
12713}
12714function getComponentMeasureName(instance) {
12715  return instance.constructor.name;
12716}
12717function getProviderTokenMeasureName(token) {
12718  if (isTypeProvider(token)) {
12719    return token.name;
12720  } else if (token.provide != null) {
12721    return getProviderTokenMeasureName(token.provide);
12722  }
12723  return token.toString();
12724}
12725function enableProfiling() {
12726  performanceMarkFeature("Chrome DevTools profiling");
12727  if (typeof ngDevMode !== "undefined" && ngDevMode) {
12728    const removeInjectorProfiler = setInjectorProfiler(chromeDevToolsInjectorProfiler);
12729    const removeProfiler3 = setProfiler(devToolsProfiler);
12730    return () => {
12731      removeInjectorProfiler();
12732      removeProfiler3();
12733    };
12734  }
12735  return () => {
12736  };
12737}
12738function getTransferState(injector) {
12739  const doc = getDocument();
12740  const appId = injector.get(APP_ID);
12741  const transferState = retrieveTransferredState(doc, appId);
12742  const filteredEntries = {};
12743  for (const [key, value] of Object.entries(transferState)) {
12744    if (!isInternalHydrationTransferStateKey(key)) {
12745      filteredEntries[key] = value;
12746    }
12747  }
12748  return filteredEntries;
12749}
12750function publishDefaultGlobalUtils$1() {
12751  if (!_published) {
12752    _published = true;
12753    if (typeof window !== "undefined") {
12754      setupFrameworkInjectorProfiler();
12755    }
12756    for (const [methodName, method] of Object.entries(globalUtilsFunctions)) {
12757      publishGlobalUtil(methodName, method);
12758    }
12759  }
12760}
12761function publishGlobalUtil(name, fn) {
12762  publishUtil(name, fn);
12763}
12764function publishUtil(name, fn) {
12765  if (typeof COMPILED === "undefined" || !COMPILED) {
12766    const w = _global;
12767    ngDevMode && assertDefined(fn, "function not defined");
12768    w[GLOBAL_PUBLISH_EXPANDO_KEY] ??= {};
12769    w[GLOBAL_PUBLISH_EXPANDO_KEY][name] = fn;
12770  }
12771}
12772function setTestabilityGetter(getter) {
12773  _testabilityGetter = getter;
12774}
12775function isPromise2(obj) {
12776  return !!obj && typeof obj.then === "function";
12777}
12778function isSubscribable(obj) {
12779  return !!obj && typeof obj.subscribe === "function";
12780}
12781function publishDefaultGlobalUtils() {
12782  ngDevMode && publishDefaultGlobalUtils$1();
12783}
12784function publishSignalConfiguration() {
12785  setThrowInvalidWriteToSignalError(() => {
12786    let errorMessage = "";
12787    if (ngDevMode) {
12788      const activeConsumer2 = getActiveConsumer();
12789      errorMessage = activeConsumer2 && isReactiveLViewConsumer(activeConsumer2) ? "Writing to signals is not allowed while Angular renders the template (eg. interpolations)" : "Writing to signals is not allowed in a `computed`";
12790    }
12791    throw new RuntimeError(600, errorMessage);
12792  });
12793}
12794function isBoundToModule(cf) {
12795  return cf.isBoundToModule;
12796}
12797function optionsReducer(dst, objs) {
12798  if (Array.isArray(objs)) {
12799    return objs.reduce(optionsReducer, dst);
12800  }
12801  return __spreadValues(__spreadValues({}, dst), objs);
12802}
12803function warnIfDestroyed(destroyed) {
12804  if (destroyed) {
12805    console.warn(formatRuntimeError(406, "This instance of the `ApplicationRef` has already been destroyed."));
12806  }
12807}
12808function remove(list, el) {
12809  const index = list.indexOf(el);
12810  if (index > -1) {
12811    list.splice(index, 1);
12812  }
12813}
12814function promiseWithResolvers() {
12815  let resolve;
12816  let reject;
12817  const promise = new Promise((res, rej) => {
12818    resolve = res;
12819    reject = rej;
12820  });
12821  return { promise, resolve, reject };
12822}
12823function scheduleDelayedTrigger(scheduleFn) {
12824  const lView = getLView();
12825  const tNode = getCurrentTNode();
12826  renderPlaceholder(lView, tNode);
12827  if (!shouldTriggerDeferBlock(0, lView))
12828    return;
12829  const injector = lView[INJECTOR];
12830  const lDetails = getLDeferBlockDetails(lView, tNode);
12831  const cleanupFn = scheduleFn(() => triggerDeferBlock(0, lView, tNode), injector);
12832  storeTriggerCleanupFn(0, lDetails, cleanupFn);
12833}
12834function scheduleDelayedPrefetching(scheduleFn) {
12835  if (false)
12836    return;
12837  const lView = getLView();
12838  const injector = lView[INJECTOR];
12839  const tNode = getCurrentTNode();
12840  const tView = lView[TVIEW];
12841  const tDetails = getTDeferBlockDetails(tView, tNode);
12842  if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {
12843    const lDetails = getLDeferBlockDetails(lView, tNode);
12844    const prefetch = () => triggerPrefetching(tDetails, lView, tNode);
12845    const cleanupFn = scheduleFn(prefetch, injector);
12846    storeTriggerCleanupFn(1, lDetails, cleanupFn);
12847  }
12848}
12849function scheduleDelayedHydrating(scheduleFn, lView, tNode) {
12850  if (false)
12851    return;
12852  const injector = lView[INJECTOR];
12853  const lDetails = getLDeferBlockDetails(lView, tNode);
12854  const ssrUniqueId = lDetails[SSR_UNIQUE_ID];
12855  ngDevMode && assertSsrIdDefined(ssrUniqueId);
12856  const cleanupFn = scheduleFn(() => triggerHydrationFromBlockName(injector, ssrUniqueId), injector);
12857  storeTriggerCleanupFn(2, lDetails, cleanupFn);
12858}
12859function triggerPrefetching(tDetails, lView, tNode) {
12860  triggerResourceLoading(tDetails, lView, tNode);
12861}
12862function triggerResourceLoading(tDetails, lView, tNode) {
12863  const injector = lView[INJECTOR];
12864  const tView = lView[TVIEW];
12865  if (tDetails.loadingState !== DeferDependenciesLoadingState.NOT_STARTED) {
12866    return tDetails.loadingPromise ?? Promise.resolve();
12867  }
12868  const lDetails = getLDeferBlockDetails(lView, tNode);
12869  const primaryBlockTNode = getPrimaryBlockTNode(tView, tDetails);
12870  tDetails.loadingState = DeferDependenciesLoadingState.IN_PROGRESS;
12871  invokeTriggerCleanupFns(1, lDetails);
12872  let dependenciesFn = tDetails.dependencyResolverFn;
12873  if (ngDevMode) {
12874    const deferDependencyInterceptor = injector.get(DEFER_BLOCK_DEPENDENCY_INTERCEPTOR, null, {
12875      optional: true
12876    });
12877    if (deferDependencyInterceptor) {
12878      dependenciesFn = deferDependencyInterceptor.intercept(dependenciesFn);
12879    }
12880  }
12881  const removeTask = injector.get(PendingTasks).add();
12882  if (!dependenciesFn) {
12883    tDetails.loadingPromise = Promise.resolve().then(() => {
12884      tDetails.loadingPromise = null;
12885      tDetails.loadingState = DeferDependenciesLoadingState.COMPLETE;
12886      removeTask();
12887    });
12888    return tDetails.loadingPromise;
12889  }
12890  tDetails.loadingPromise = Promise.allSettled(dependenciesFn()).then((results) => {
12891    let failed = false;
12892    const directiveDefs = [];
12893    const pipeDefs = [];
12894    for (const result of results) {
12895      if (result.status === "fulfilled") {
12896        const dependency = result.value;
12897        const directiveDef = getComponentDef(dependency) || getDirectiveDef(dependency);
12898        if (directiveDef) {
12899          directiveDefs.push(directiveDef);
12900        } else {
12901          const pipeDef = getPipeDef(dependency);
12902          if (pipeDef) {
12903            pipeDefs.push(pipeDef);
12904          }
12905        }
12906      } else {
12907        failed = true;
12908        break;
12909      }
12910    }
12911    if (failed) {
12912      tDetails.loadingState = DeferDependenciesLoadingState.FAILED;
12913      if (tDetails.errorTmplIndex === null) {
12914        const templateLocation = ngDevMode ? getTemplateLocationDetails(lView) : "";
12915        const error = new RuntimeError(-750, ngDevMode && `Loading dependencies for \`@defer\` block failed, but no \`@error\` block was configured${templateLocation}. Consider using the \`@error\` block to render an error state.`);
12916        handleUncaughtError(lView, error);
12917      }
12918    } else {
12919      tDetails.loadingState = DeferDependenciesLoadingState.COMPLETE;
12920      const primaryBlockTView = primaryBlockTNode.tView;
12921      if (directiveDefs.length > 0) {
12922        primaryBlockTView.directiveRegistry = addDepsToRegistry(primaryBlockTView.directiveRegistry, directiveDefs);
12923        const directiveTypes = directiveDefs.map((def) => def.type);
12924        const providers = internalImportProvidersFrom(false, ...directiveTypes);
12925        tDetails.providers = providers;
12926      }
12927      if (pipeDefs.length > 0) {
12928        primaryBlockTView.pipeRegistry = addDepsToRegistry(primaryBlockTView.pipeRegistry, pipeDefs);
12929      }
12930    }
12931  });
12932  return tDetails.loadingPromise.finally(() => {
12933    tDetails.loadingPromise = null;
12934    removeTask();
12935  });
12936}
12937function shouldTriggerDeferBlock(triggerType, lView) {
12938  if (triggerType === 0 && true && false) {
12939    return false;
12940  }
12941  const injector = lView[INJECTOR];
12942  const config2 = injector.get(DEFER_BLOCK_CONFIG, null, { optional: true });
12943  if (config2?.behavior === DeferBlockBehavior.Manual) {
12944    return false;
12945  }
12946  return true;
12947}
12948function triggerDeferBlock(triggerType, lView, tNode) {
12949  const tView = lView[TVIEW];
12950  const lContainer = lView[tNode.index];
12951  ngDevMode && assertLContainer(lContainer);
12952  if (!shouldTriggerDeferBlock(triggerType, lView))
12953    return;
12954  const lDetails = getLDeferBlockDetails(lView, tNode);
12955  const tDetails = getTDeferBlockDetails(tView, tNode);
12956  invokeAllTriggerCleanupFns(lDetails);
12957  switch (tDetails.loadingState) {
12958    case DeferDependenciesLoadingState.NOT_STARTED:
12959      renderDeferBlockState(DeferBlockState.Loading, tNode, lContainer);
12960      triggerResourceLoading(tDetails, lView, tNode);
12961      if (tDetails.loadingState === DeferDependenciesLoadingState.IN_PROGRESS) {
12962        renderDeferStateAfterResourceLoading(tDetails, tNode, lContainer);
12963      }
12964      break;
12965    case DeferDependenciesLoadingState.IN_PROGRESS:
12966      renderDeferBlockState(DeferBlockState.Loading, tNode, lContainer);
12967      renderDeferStateAfterResourceLoading(tDetails, tNode, lContainer);
12968      break;
12969    case DeferDependenciesLoadingState.COMPLETE:
12970      ngDevMode && assertDeferredDependenciesLoaded(tDetails);
12971      renderDeferBlockState(DeferBlockState.Complete, tNode, lContainer);
12972      break;
12973    case DeferDependenciesLoadingState.FAILED:
12974      renderDeferBlockState(DeferBlockState.Error, tNode, lContainer);
12975      break;
12976    default:
12977      if (ngDevMode) {
12978        throwError("Unknown defer block state");
12979      }
12980  }
12981}
12982function triggerHydrationFromBlockName(injector, blockName, replayQueuedEventsFn) {
12983  return __async(this, null, function* () {
12984    const dehydratedBlockRegistry = injector.get(DEHYDRATED_BLOCK_REGISTRY);
12985    const blocksBeingHydrated = dehydratedBlockRegistry.hydrating;
12986    if (blocksBeingHydrated.has(blockName)) {
12987      return;
12988    }
12989    const { parentBlockPromise, hydrationQueue } = getParentBlockHydrationQueue(blockName, injector);
12990    if (hydrationQueue.length === 0)
12991      return;
12992    if (parentBlockPromise !== null) {
12993      hydrationQueue.shift();
12994    }
12995    populateHydratingStateForQueue(dehydratedBlockRegistry, hydrationQueue);
12996    if (parentBlockPromise !== null) {
12997      yield parentBlockPromise;
12998    }
12999    const topmostParentBlock = hydrationQueue[0];
13000    if (dehydratedBlockRegistry.has(topmostParentBlock)) {
13001      yield triggerHydrationForBlockQueue(injector, hydrationQueue, replayQueuedEventsFn);
13002    } else {
13003      dehydratedBlockRegistry.awaitParentBlock(topmostParentBlock, () => __async(null, null, function* () {
13004        return yield triggerHydrationForBlockQueue(injector, hydrationQueue, replayQueuedEventsFn);
13005      }));
13006    }
13007  });
13008}
13009function triggerHydrationForBlockQueue(injector, hydrationQueue, replayQueuedEventsFn) {
13010  return __async(this, null, function* () {
13011    const dehydratedBlockRegistry = injector.get(DEHYDRATED_BLOCK_REGISTRY);
13012    const blocksBeingHydrated = dehydratedBlockRegistry.hydrating;
13013    const pendingTasks = injector.get(PendingTasksInternal);
13014    const taskId = pendingTasks.add();
13015    for (let blockQueueIdx = 0; blockQueueIdx < hydrationQueue.length; blockQueueIdx++) {
13016      const dehydratedBlockId = hydrationQueue[blockQueueIdx];
13017      const dehydratedDeferBlock = dehydratedBlockRegistry.get(dehydratedBlockId);
13018      if (dehydratedDeferBlock != null) {
13019        yield triggerResourceLoadingForHydration(dehydratedDeferBlock);
13020        yield nextRender(injector);
13021        if (deferBlockHasErrored(dehydratedDeferBlock)) {
13022          removeDehydratedViewList(dehydratedDeferBlock);
13023          cleanupRemainingHydrationQueue(hydrationQueue.slice(blockQueueIdx), dehydratedBlockRegistry);
13024          break;
13025        }
13026        blocksBeingHydrated.get(dehydratedBlockId).resolve();
13027      } else {
13028        cleanupParentContainer(blockQueueIdx, hydrationQueue, dehydratedBlockRegistry);
13029        cleanupRemainingHydrationQueue(hydrationQueue.slice(blockQueueIdx), dehydratedBlockRegistry);
13030        break;
13031      }
13032    }
13033    const lastBlockName = hydrationQueue[hydrationQueue.length - 1];
13034    yield blocksBeingHydrated.get(lastBlockName)?.promise;
13035    pendingTasks.remove(taskId);
13036    if (replayQueuedEventsFn) {
13037      replayQueuedEventsFn(hydrationQueue);
13038    }
13039    cleanupHydratedDeferBlocks(dehydratedBlockRegistry.get(lastBlockName), hydrationQueue, dehydratedBlockRegistry, injector.get(ApplicationRef));
13040  });
13041}
13042function deferBlockHasErrored(deferBlock) {
13043  return getLDeferBlockDetails(deferBlock.lView, deferBlock.tNode)[DEFER_BLOCK_STATE] === DeferBlockState.Error;
13044}
13045function cleanupParentContainer(currentBlockIdx, hydrationQueue, dehydratedBlockRegistry) {
13046  const parentDeferBlockIdx = currentBlockIdx - 1;
13047  const parentDeferBlock = parentDeferBlockIdx > -1 ? dehydratedBlockRegistry.get(hydrationQueue[parentDeferBlockIdx]) : null;
13048  if (parentDeferBlock) {
13049    cleanupLContainer(parentDeferBlock.lContainer);
13050  }
13051}
13052function cleanupRemainingHydrationQueue(hydrationQueue, dehydratedBlockRegistry) {
13053  const blocksBeingHydrated = dehydratedBlockRegistry.hydrating;
13054  for (const dehydratedBlockId in hydrationQueue) {
13055    blocksBeingHydrated.get(dehydratedBlockId)?.reject();
13056  }
13057  dehydratedBlockRegistry.cleanup(hydrationQueue);
13058}
13059function populateHydratingStateForQueue(registry, queue) {
13060  for (let blockId of queue) {
13061    registry.hydrating.set(blockId, promiseWithResolvers());
13062  }
13063}
13064function nextRender(injector) {
13065  return new Promise((resolveFn) => afterNextRender(resolveFn, { injector }));
13066}
13067function triggerResourceLoadingForHydration(dehydratedBlock) {
13068  return __async(this, null, function* () {
13069    const { tNode, lView } = dehydratedBlock;
13070    const lDetails = getLDeferBlockDetails(lView, tNode);
13071    return new Promise((resolve) => {
13072      onDeferBlockCompletion(lDetails, resolve);
13073      triggerDeferBlock(2, lView, tNode);
13074    });
13075  });
13076}
13077function onDeferBlockCompletion(lDetails, callback) {
13078  if (!Array.isArray(lDetails[ON_COMPLETE_FNS])) {
13079    lDetails[ON_COMPLETE_FNS] = [];
13080  }
13081  lDetails[ON_COMPLETE_FNS].push(callback);
13082}
13083function shouldAttachTrigger(triggerType, lView, tNode) {
13084  if (triggerType === 0) {
13085    return shouldAttachRegularTrigger(lView, tNode);
13086  } else if (triggerType === 2) {
13087    return !shouldAttachRegularTrigger(lView, tNode);
13088  }
13089  return true;
13090}
13091function hasHydrateTriggers(flags) {
13092  return flags != null && (flags & 1) === 1;
13093}
13094function shouldAttachRegularTrigger(lView, tNode) {
13095  const injector = lView[INJECTOR];
13096  const tDetails = getTDeferBlockDetails(lView[TVIEW], tNode);
13097  const incrementalHydrationEnabled = isIncrementalHydrationEnabled(injector);
13098  const _hasHydrateTriggers = hasHydrateTriggers(tDetails.flags);
13099  if (false) {
13100    return !incrementalHydrationEnabled || !_hasHydrateTriggers;
13101  }
13102  const lDetails = getLDeferBlockDetails(lView, tNode);
13103  const wasServerSideRendered = lDetails[SSR_UNIQUE_ID] !== null;
13104  if (_hasHydrateTriggers && wasServerSideRendered && incrementalHydrationEnabled) {
13105    return false;
13106  }
13107  return true;
13108}
13109function getHydrateTriggers(tView, tNode) {
13110  const tDetails = getTDeferBlockDetails(tView, tNode);
13111  return tDetails.hydrateTriggers ??= /* @__PURE__ */ new Map();
13112}
13113function \u0275\u0275defer(index, primaryTmplIndex, dependencyResolverFn, loadingTmplIndex, placeholderTmplIndex, errorTmplIndex, loadingConfigIndex, placeholderConfigIndex, enableTimerScheduling, flags) {
13114  const lView = getLView();
13115  const tView = getTView();
13116  const adjustedIndex = index + HEADER_OFFSET;
13117  const tNode = declareNoDirectiveHostTemplate(lView, tView, index, null, 0, 0);
13118  const injector = lView[INJECTOR];
13119  const incrementalHydrationEnabled = isIncrementalHydrationEnabled(injector);
13120  if (tView.firstCreatePass) {
13121    performanceMarkFeature("NgDefer");
13122    if (ngDevMode) {
13123      if (false) {
13124        logHmrWarning(injector);
13125      }
13126      if (hasHydrateTriggers(flags) && !incrementalHydrationEnabled) {
13127        warnIncrementalHydrationNotConfigured();
13128      }
13129    }
13130    const tDetails = {
13131      primaryTmplIndex,
13132      loadingTmplIndex: loadingTmplIndex ?? null,
13133      placeholderTmplIndex: placeholderTmplIndex ?? null,
13134      errorTmplIndex: errorTmplIndex ?? null,
13135      placeholderBlockConfig: null,
13136      loadingBlockConfig: null,
13137      dependencyResolverFn: dependencyResolverFn ?? null,
13138      loadingState: DeferDependenciesLoadingState.NOT_STARTED,
13139      loadingPromise: null,
13140      providers: null,
13141      hydrateTriggers: null,
13142      debug: null,
13143      flags: flags ?? 0
13144    };
13145    enableTimerScheduling?.(tView, tDetails, placeholderConfigIndex, loadingConfigIndex);
13146    setTDeferBlockDetails(tView, adjustedIndex, tDetails);
13147  }
13148  const lContainer = lView[adjustedIndex];
13149  populateDehydratedViewsInLContainer(lContainer, tNode, lView);
13150  let ssrBlockState = null;
13151  let ssrUniqueId = null;
13152  if (lContainer[DEHYDRATED_VIEWS]?.length > 0) {
13153    const info = lContainer[DEHYDRATED_VIEWS][0].data;
13154    ssrUniqueId = info[DEFER_BLOCK_ID] ?? null;
13155    ssrBlockState = info[DEFER_BLOCK_STATE$1];
13156  }
13157  const lDetails = [
13158    null,
13159    // NEXT_DEFER_BLOCK_STATE
13160    DeferBlockInternalState.Initial,
13161    // DEFER_BLOCK_STATE
13162    null,
13163    // STATE_IS_FROZEN_UNTIL
13164    null,
13165    // LOADING_AFTER_CLEANUP_FN
13166    null,
13167    // TRIGGER_CLEANUP_FNS
13168    null,
13169    // PREFETCH_TRIGGER_CLEANUP_FNS
13170    ssrUniqueId,
13171    // SSR_UNIQUE_ID
13172    ssrBlockState,
13173    // SSR_BLOCK_STATE
13174    null,
13175    // ON_COMPLETE_FNS
13176    null
13177    // HYDRATE_TRIGGER_CLEANUP_FNS
13178  ];
13179  setLDeferBlockDetails(lView, adjustedIndex, lDetails);
13180  let registry = null;
13181  if (ssrUniqueId !== null && incrementalHydrationEnabled) {
13182    registry = injector.get(DEHYDRATED_BLOCK_REGISTRY);
13183    registry.add(ssrUniqueId, { lView, tNode, lContainer });
13184  }
13185  const onLViewDestroy = () => {
13186    invokeAllTriggerCleanupFns(lDetails);
13187    if (ssrUniqueId !== null) {
13188      registry?.cleanup([ssrUniqueId]);
13189    }
13190  };
13191  storeTriggerCleanupFn(0, lDetails, () => removeLViewOnDestroy(lView, onLViewDestroy));
13192  storeLViewOnDestroy(lView, onLViewDestroy);
13193}
13194function \u0275\u0275deferWhen(rawValue) {
13195  const lView = getLView();
13196  const tNode = getSelectedTNode();
13197  if (ngDevMode) {
13198    trackTriggerForDebugging(lView[TVIEW], tNode, "when <expression>");
13199  }
13200  if (!shouldAttachTrigger(0, lView, tNode))
13201    return;
13202  const bindingIndex = nextBindingIndex();
13203  if (bindingUpdated(lView, bindingIndex, rawValue)) {
13204    const prevConsumer = setActiveConsumer(null);
13205    try {
13206      const value = Boolean(rawValue);
13207      const lDetails = getLDeferBlockDetails(lView, tNode);
13208      const renderedState = lDetails[DEFER_BLOCK_STATE];
13209      if (value === false && renderedState === DeferBlockInternalState.Initial) {
13210        renderPlaceholder(lView, tNode);
13211      } else if (value === true && (renderedState === DeferBlockInternalState.Initial || renderedState === DeferBlockState.Placeholder)) {
13212        triggerDeferBlock(0, lView, tNode);
13213      }
13214    } finally {
13215      setActiveConsumer(prevConsumer);
13216    }
13217  }
13218}
13219function \u0275\u0275deferPrefetchWhen(rawValue) {
13220  const lView = getLView();
13221  const tNode = getSelectedTNode();
13222  if (ngDevMode) {
13223    trackTriggerForDebugging(lView[TVIEW], tNode, "prefetch when <expression>");
13224  }
13225  if (!shouldAttachTrigger(1, lView, tNode))
13226    return;
13227  const bindingIndex = nextBindingIndex();
13228  if (bindingUpdated(lView, bindingIndex, rawValue)) {
13229    const prevConsumer = setActiveConsumer(null);
13230    try {
13231      const value = Boolean(rawValue);
13232      const tView = lView[TVIEW];
13233      const tDetails = getTDeferBlockDetails(tView, tNode);
13234      if (value === true && tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {
13235        triggerPrefetching(tDetails, lView, tNode);
13236      }
13237    } finally {
13238      setActiveConsumer(prevConsumer);
13239    }
13240  }
13241}
13242function \u0275\u0275deferHydrateWhen(rawValue) {
13243  const lView = getLView();
13244  const tNode = getSelectedTNode();
13245  if (ngDevMode) {
13246    trackTriggerForDebugging(lView[TVIEW], tNode, "hydrate when <expression>");
13247  }
13248  if (!shouldAttachTrigger(2, lView, tNode))
13249    return;
13250  const bindingIndex = nextBindingIndex();
13251  const tView = getTView();
13252  const hydrateTriggers = getHydrateTriggers(tView, tNode);
13253  hydrateTriggers.set(6, null);
13254  if (bindingUpdated(lView, bindingIndex, rawValue)) {
13255    if (false) {
13256      triggerDeferBlock(2, lView, tNode);
13257    } else {
13258      const injector = lView[INJECTOR];
13259      const prevConsumer = setActiveConsumer(null);
13260      try {
13261        const value = Boolean(rawValue);
13262        if (value === true) {
13263          const lDetails = getLDeferBlockDetails(lView, tNode);
13264          const ssrUniqueId = lDetails[SSR_UNIQUE_ID];
13265          ngDevMode && assertSsrIdDefined(ssrUniqueId);
13266          triggerHydrationFromBlockName(injector, ssrUniqueId);
13267        }
13268      } finally {
13269        setActiveConsumer(prevConsumer);
13270      }
13271    }
13272  }
13273}
13274function \u0275\u0275deferHydrateNever() {
13275  const lView = getLView();
13276  const tNode = getCurrentTNode();
13277  if (ngDevMode) {
13278    trackTriggerForDebugging(lView[TVIEW], tNode, "hydrate never");
13279  }
13280  if (!shouldAttachTrigger(2, lView, tNode))
13281    return;
13282  const hydrateTriggers = getHydrateTriggers(getTView(), tNode);
13283  hydrateTriggers.set(7, null);
13284  if (false) {
13285    triggerDeferBlock(2, lView, tNode);
13286  }
13287}
13288function \u0275\u0275deferOnIdle() {
13289  const lView = getLView();
13290  const tNode = getCurrentTNode();
13291  if (ngDevMode) {
13292    trackTriggerForDebugging(lView[TVIEW], tNode, "on idle");
13293  }
13294  if (!shouldAttachTrigger(0, lView, tNode))
13295    return;
13296  scheduleDelayedTrigger(onIdle);
13297}
13298function \u0275\u0275deferPrefetchOnIdle() {
13299  const lView = getLView();
13300  const tNode = getCurrentTNode();
13301  if (ngDevMode) {
13302    trackTriggerForDebugging(lView[TVIEW], tNode, "prefetch on idle");
13303  }
13304  if (!shouldAttachTrigger(1, lView, tNode))
13305    return;
13306  scheduleDelayedPrefetching(onIdle);
13307}
13308function \u0275\u0275deferHydrateOnIdle() {
13309  const lView = getLView();
13310  const tNode = getCurrentTNode();
13311  if (ngDevMode) {
13312    trackTriggerForDebugging(lView[TVIEW], tNode, "hydrate on idle");
13313  }
13314  if (!shouldAttachTrigger(2, lView, tNode))
13315    return;
13316  const hydrateTriggers = getHydrateTriggers(getTView(), tNode);
13317  hydrateTriggers.set(0, null);
13318  if (false) {
13319    triggerDeferBlock(2, lView, tNode);
13320  } else {
13321    scheduleDelayedHydrating(onIdle, lView, tNode);
13322  }
13323}
13324function \u0275\u0275deferOnImmediate() {
13325  const lView = getLView();
13326  const tNode = getCurrentTNode();
13327  if (ngDevMode) {
13328    trackTriggerForDebugging(lView[TVIEW], tNode, "on immediate");
13329  }
13330  if (!shouldAttachTrigger(0, lView, tNode))
13331    return;
13332  const tDetails = getTDeferBlockDetails(lView[TVIEW], tNode);
13333  if (tDetails.loadingTmplIndex === null) {
13334    renderPlaceholder(lView, tNode);
13335  }
13336  triggerDeferBlock(0, lView, tNode);
13337}
13338function \u0275\u0275deferPrefetchOnImmediate() {
13339  const lView = getLView();
13340  const tNode = getCurrentTNode();
13341  if (ngDevMode) {
13342    trackTriggerForDebugging(lView[TVIEW], tNode, "prefetch on immediate");
13343  }
13344  if (!shouldAttachTrigger(1, lView, tNode))
13345    return;
13346  const tView = lView[TVIEW];
13347  const tDetails = getTDeferBlockDetails(tView, tNode);
13348  if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {
13349    triggerResourceLoading(tDetails, lView, tNode);
13350  }
13351}
13352function \u0275\u0275deferHydrateOnImmediate() {
13353  const lView = getLView();
13354  const tNode = getCurrentTNode();
13355  if (ngDevMode) {
13356    trackTriggerForDebugging(lView[TVIEW], tNode, "hydrate on immediate");
13357  }
13358  if (!shouldAttachTrigger(2, lView, tNode))
13359    return;
13360  const hydrateTriggers = getHydrateTriggers(getTView(), tNode);
13361  hydrateTriggers.set(1, null);
13362  if (false) {
13363    triggerDeferBlock(2, lView, tNode);
13364  } else {
13365    const injector = lView[INJECTOR];
13366    const lDetails = getLDeferBlockDetails(lView, tNode);
13367    const ssrUniqueId = lDetails[SSR_UNIQUE_ID];
13368    ngDevMode && assertSsrIdDefined(ssrUniqueId);
13369    triggerHydrationFromBlockName(injector, ssrUniqueId);
13370  }
13371}
13372function \u0275\u0275deferOnTimer(delay) {
13373  const lView = getLView();
13374  const tNode = getCurrentTNode();
13375  if (ngDevMode) {
13376    trackTriggerForDebugging(lView[TVIEW], tNode, `on timer(${delay}ms)`);
13377  }
13378  if (!shouldAttachTrigger(0, lView, tNode))
13379    return;
13380  scheduleDelayedTrigger(onTimer(delay));
13381}
13382function \u0275\u0275deferPrefetchOnTimer(delay) {
13383  const lView = getLView();
13384  const tNode = getCurrentTNode();
13385  if (ngDevMode) {
13386    trackTriggerForDebugging(lView[TVIEW], tNode, `prefetch on timer(${delay}ms)`);
13387  }
13388  if (!shouldAttachTrigger(1, lView, tNode))
13389    return;
13390  scheduleDelayedPrefetching(onTimer(delay));
13391}
13392function \u0275\u0275deferHydrateOnTimer(delay) {
13393  const lView = getLView();
13394  const tNode = getCurrentTNode();
13395  if (ngDevMode) {
13396    trackTriggerForDebugging(lView[TVIEW], tNode, `hydrate on timer(${delay}ms)`);
13397  }
13398  if (!shouldAttachTrigger(2, lView, tNode))
13399    return;
13400  const hydrateTriggers = getHydrateTriggers(getTView(), tNode);
13401  hydrateTriggers.set(5, { delay });
13402  if (false) {
13403    triggerDeferBlock(2, lView, tNode);
13404  } else {
13405    scheduleDelayedHydrating(onTimer(delay), lView, tNode);
13406  }
13407}
13408function \u0275\u0275deferOnHover(triggerIndex, walkUpTimes) {
13409  const lView = getLView();
13410  const tNode = getCurrentTNode();
13411  if (ngDevMode) {
13412    trackTriggerForDebugging(lView[TVIEW], tNode, `on hover${walkUpTimes === -1 ? "" : "(<target>)"}`);
13413  }
13414  if (!shouldAttachTrigger(0, lView, tNode))
13415    return;
13416  renderPlaceholder(lView, tNode);
13417  if (true) {
13418    registerDomTrigger(
13419      lView,
13420      tNode,
13421      triggerIndex,
13422      walkUpTimes,
13423      onHover,
13424      () => triggerDeferBlock(0, lView, tNode),
13425      0
13426      /* TriggerType.Regular */
13427    );
13428  }
13429}
13430function \u0275\u0275deferPrefetchOnHover(triggerIndex, walkUpTimes) {
13431  const lView = getLView();
13432  const tNode = getCurrentTNode();
13433  if (ngDevMode) {
13434    trackTriggerForDebugging(lView[TVIEW], tNode, `prefetch on hover${walkUpTimes === -1 ? "" : "(<target>)"}`);
13435  }
13436  if (!shouldAttachTrigger(1, lView, tNode))
13437    return;
13438  const tView = lView[TVIEW];
13439  const tDetails = getTDeferBlockDetails(tView, tNode);
13440  if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {
13441    registerDomTrigger(
13442      lView,
13443      tNode,
13444      triggerIndex,
13445      walkUpTimes,
13446      onHover,
13447      () => triggerPrefetching(tDetails, lView, tNode),
13448      1
13449      /* TriggerType.Prefetch */
13450    );
13451  }
13452}
13453function \u0275\u0275deferHydrateOnHover() {
13454  const lView = getLView();
13455  const tNode = getCurrentTNode();
13456  if (ngDevMode) {
13457    trackTriggerForDebugging(lView[TVIEW], tNode, "hydrate on hover");
13458  }
13459  if (!shouldAttachTrigger(2, lView, tNode))
13460    return;
13461  const hydrateTriggers = getHydrateTriggers(getTView(), tNode);
13462  hydrateTriggers.set(4, null);
13463  if (false) {
13464    triggerDeferBlock(2, lView, tNode);
13465  }
13466}
13467function \u0275\u0275deferOnInteraction(triggerIndex, walkUpTimes) {
13468  const lView = getLView();
13469  const tNode = getCurrentTNode();
13470  if (ngDevMode) {
13471    trackTriggerForDebugging(lView[TVIEW], tNode, `on interaction${walkUpTimes === -1 ? "" : "(<target>)"}`);
13472  }
13473  if (!shouldAttachTrigger(0, lView, tNode))
13474    return;
13475  renderPlaceholder(lView, tNode);
13476  if (true) {
13477    registerDomTrigger(
13478      lView,
13479      tNode,
13480      triggerIndex,
13481      walkUpTimes,
13482      onInteraction,
13483      () => triggerDeferBlock(0, lView, tNode),
13484      0
13485      /* TriggerType.Regular */
13486    );
13487  }
13488}
13489function \u0275\u0275deferPrefetchOnInteraction(triggerIndex, walkUpTimes) {
13490  const lView = getLView();
13491  const tNode = getCurrentTNode();
13492  if (ngDevMode) {
13493    trackTriggerForDebugging(lView[TVIEW], tNode, `prefetch on interaction${walkUpTimes === -1 ? "" : "(<target>)"}`);
13494  }
13495  if (!shouldAttachTrigger(1, lView, tNode))
13496    return;
13497  const tView = lView[TVIEW];
13498  const tDetails = getTDeferBlockDetails(tView, tNode);
13499  if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {
13500    registerDomTrigger(
13501      lView,
13502      tNode,
13503      triggerIndex,
13504      walkUpTimes,
13505      onInteraction,
13506      () => triggerPrefetching(tDetails, lView, tNode),
13507      1
13508      /* TriggerType.Prefetch */
13509    );
13510  }
13511}
13512function \u0275\u0275deferHydrateOnInteraction() {
13513  const lView = getLView();
13514  const tNode = getCurrentTNode();
13515  if (ngDevMode) {
13516    trackTriggerForDebugging(lView[TVIEW], tNode, "hydrate on interaction");
13517  }
13518  if (!shouldAttachTrigger(2, lView, tNode))
13519    return;
13520  const hydrateTriggers = getHydrateTriggers(getTView(), tNode);
13521  hydrateTriggers.set(3, null);
13522  if (false) {
13523    triggerDeferBlock(2, lView, tNode);
13524  }
13525}
13526function \u0275\u0275deferOnViewport(triggerIndex, walkUpTimes) {
13527  const lView = getLView();
13528  const tNode = getCurrentTNode();
13529  if (ngDevMode) {
13530    trackTriggerForDebugging(lView[TVIEW], tNode, `on viewport${walkUpTimes === -1 ? "" : "(<target>)"}`);
13531  }
13532  if (!shouldAttachTrigger(0, lView, tNode))
13533    return;
13534  renderPlaceholder(lView, tNode);
13535  if (true) {
13536    registerDomTrigger(
13537      lView,
13538      tNode,
13539      triggerIndex,
13540      walkUpTimes,
13541      onViewportWrapper,
13542      () => triggerDeferBlock(0, lView, tNode),
13543      0
13544      /* TriggerType.Regular */
13545    );
13546  }
13547}
13548function \u0275\u0275deferPrefetchOnViewport(triggerIndex, walkUpTimes) {
13549  const lView = getLView();
13550  const tNode = getCurrentTNode();
13551  if (ngDevMode) {
13552    trackTriggerForDebugging(lView[TVIEW], tNode, `prefetch on viewport${walkUpTimes === -1 ? "" : "(<target>)"}`);
13553  }
13554  if (!shouldAttachTrigger(1, lView, tNode))
13555    return;
13556  const tView = lView[TVIEW];
13557  const tDetails = getTDeferBlockDetails(tView, tNode);
13558  if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {
13559    registerDomTrigger(
13560      lView,
13561      tNode,
13562      triggerIndex,
13563      walkUpTimes,
13564      onViewportWrapper,
13565      () => triggerPrefetching(tDetails, lView, tNode),
13566      1
13567      /* TriggerType.Prefetch */
13568    );
13569  }
13570}
13571function \u0275\u0275deferHydrateOnViewport() {
13572  const lView = getLView();
13573  const tNode = getCurrentTNode();
13574  if (ngDevMode) {
13575    trackTriggerForDebugging(lView[TVIEW], tNode, "hydrate on viewport");
13576  }
13577  if (!shouldAttachTrigger(2, lView, tNode))
13578    return;
13579  const hydrateTriggers = getHydrateTriggers(getTView(), tNode);
13580  hydrateTriggers.set(2, null);
13581  if (false) {
13582    triggerDeferBlock(2, lView, tNode);
13583  }
13584}
13585function \u0275\u0275ariaProperty(name, value) {
13586  const lView = getLView();
13587  const bindingIndex = nextBindingIndex();
13588  if (bindingUpdated(lView, bindingIndex, value)) {
13589    const tView = getTView();
13590    const tNode = getSelectedTNode();
13591    const hasSetInput = setAllInputsForProperty(tNode, tView, lView, name, value);
13592    if (hasSetInput) {
13593      isComponentHost(tNode) && markDirtyIfOnPush(lView, tNode.index);
13594      ngDevMode && setNgReflectProperties(lView, tView, tNode, name, value);
13595    } else {
13596      ngDevMode && assertTNodeType(
13597        tNode,
13598        2
13599        /* TNodeType.Element */
13600      );
13601      const element = getNativeByTNode(tNode, lView);
13602      setElementAttribute(lView[RENDERER], element, null, tNode.value, name, value, null);
13603    }
13604    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, name, bindingIndex);
13605  }
13606  return \u0275\u0275ariaProperty;
13607}
13608function \u0275\u0275attribute(name, value, sanitizer, namespace) {
13609  const lView = getLView();
13610  const bindingIndex = nextBindingIndex();
13611  if (bindingUpdated(lView, bindingIndex, value)) {
13612    const tView = getTView();
13613    const tNode = getSelectedTNode();
13614    elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace);
13615    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, "attr." + name, bindingIndex);
13616  }
13617  return \u0275\u0275attribute;
13618}
13619function areAnimationsDisabled(lView) {
13620  const injector = lView[INJECTOR];
13621  return injector.get(ANIMATIONS_DISABLED, DEFAULT_ANIMATIONS_DISABLED);
13622}
13623function assertAnimationTypes(value, instruction) {
13624  if (value == null || typeof value !== "string" && typeof value !== "function") {
13625    throw new RuntimeError(650, `'${instruction}' value must be a string of CSS classes or an animation function, got ${stringify(value)}`);
13626  }
13627}
13628function assertElementNodes(nativeElement, instruction) {
13629  if (nativeElement.nodeType !== Node.ELEMENT_NODE) {
13630    throw new RuntimeError(650, `'${instruction}' can only be used on an element node, got ${stringify(nativeElement.nodeType)}`);
13631  }
13632}
13633function trackEnterClasses(el, classList, cleanupFns) {
13634  const elementData = enterClassMap.get(el);
13635  if (elementData) {
13636    for (const klass of classList) {
13637      elementData.classList.push(klass);
13638    }
13639    for (const fn of cleanupFns) {
13640      elementData.cleanupFns.push(fn);
13641    }
13642  } else {
13643    enterClassMap.set(el, { classList, cleanupFns });
13644  }
13645}
13646function cleanupEnterClassData(element) {
13647  const elementData = enterClassMap.get(element);
13648  if (elementData) {
13649    for (const fn of elementData.cleanupFns) {
13650      fn();
13651    }
13652    enterClassMap.delete(element);
13653  }
13654  longestAnimations.delete(element);
13655}
13656function clearLeavingNodes(tNode, el) {
13657  const nodes = leavingNodes.get(tNode);
13658  if (nodes && nodes.length > 0) {
13659    const ix = nodes.findIndex((node) => node === el);
13660    if (ix > -1)
13661      nodes.splice(ix, 1);
13662  }
13663  if (nodes?.length === 0) {
13664    leavingNodes.delete(tNode);
13665  }
13666}
13667function cancelLeavingNodes(tNode, lView) {
13668  const leavingEl = leavingNodes.get(tNode)?.shift();
13669  const lContainer = lView[DECLARATION_LCONTAINER];
13670  if (lContainer) {
13671    const beforeNode = getBeforeNodeForView(tNode.index, lContainer);
13672    const previousNode = beforeNode?.previousSibling;
13673    if (leavingEl && previousNode && leavingEl === previousNode) {
13674      leavingEl.dispatchEvent(new CustomEvent("animationend", { detail: { cancel: true } }));
13675    }
13676  }
13677}
13678function trackLeavingNodes(tNode, el) {
13679  if (leavingNodes.has(tNode)) {
13680    leavingNodes.get(tNode)?.push(el);
13681  } else {
13682    leavingNodes.set(tNode, [el]);
13683  }
13684}
13685function getLViewEnterAnimations(lView) {
13686  const animationData = lView[ANIMATIONS] ??= {};
13687  return animationData.enter ??= /* @__PURE__ */ new Map();
13688}
13689function getLViewLeaveAnimations(lView) {
13690  const animationData = lView[ANIMATIONS] ??= {};
13691  return animationData.leave ??= /* @__PURE__ */ new Map();
13692}
13693function getClassListFromValue(value) {
13694  const classes = typeof value === "function" ? value() : value;
13695  let classList = Array.isArray(classes) ? classes : null;
13696  if (typeof classes === "string") {
13697    classList = classes.trim().split(/\s+/).filter((k) => k);
13698  }
13699  return classList;
13700}
13701function cancelAnimationsIfRunning(element, renderer) {
13702  if (!areAnimationSupported)
13703    return;
13704  const elementData = enterClassMap.get(element);
13705  if (elementData && elementData.classList.length > 0 && elementHasClassList(element, elementData.classList)) {
13706    for (const klass of elementData.classList) {
13707      renderer.removeClass(element, klass);
13708    }
13709  }
13710  cleanupEnterClassData(element);
13711}
13712function elementHasClassList(element, classList) {
13713  for (const className of classList) {
13714    if (element.classList.contains(className))
13715      return true;
13716  }
13717  return false;
13718}
13719function isLongestAnimation(event, nativeElement) {
13720  const longestAnimation = longestAnimations.get(nativeElement);
13721  if (longestAnimation === void 0)
13722    return true;
13723  return nativeElement === event.target && (longestAnimation.animationName !== void 0 && event.animationName === longestAnimation.animationName || longestAnimation.propertyName !== void 0 && event.propertyName === longestAnimation.propertyName);
13724}
13725function addAnimationToLView(animations, tNode, fn) {
13726  const nodeAnimations = animations.get(tNode.index) ?? { animateFns: [] };
13727  nodeAnimations.animateFns.push(fn);
13728  animations.set(tNode.index, nodeAnimations);
13729}
13730function cleanupAfterLeaveAnimations(resolvers, cleanupFns) {
13731  if (resolvers) {
13732    for (const fn of resolvers) {
13733      fn();
13734    }
13735  }
13736  for (const fn of cleanupFns) {
13737    fn();
13738  }
13739}
13740function clearLViewNodeAnimationResolvers(lView, tNode) {
13741  const nodeAnimations = getLViewLeaveAnimations(lView).get(tNode.index);
13742  if (nodeAnimations)
13743    nodeAnimations.resolvers = void 0;
13744}
13745function leaveAnimationFunctionCleanup(lView, tNode, nativeElement, resolvers, cleanupFns) {
13746  clearLeavingNodes(tNode, nativeElement);
13747  cleanupAfterLeaveAnimations(resolvers, cleanupFns);
13748  clearLViewNodeAnimationResolvers(lView, tNode);
13749}
13750function \u0275\u0275animateEnter(value) {
13751  performanceMarkFeature("NgAnimateEnter");
13752  if (!areAnimationSupported) {
13753    return \u0275\u0275animateEnter;
13754  }
13755  ngDevMode && assertAnimationTypes(value, "animate.enter");
13756  const lView = getLView();
13757  if (areAnimationsDisabled(lView)) {
13758    return \u0275\u0275animateEnter;
13759  }
13760  const tNode = getCurrentTNode();
13761  cancelLeavingNodes(tNode, lView);
13762  addAnimationToLView(getLViewEnterAnimations(lView), tNode, () => runEnterAnimation(lView, tNode, value));
13763  initializeAnimationQueueScheduler(lView[INJECTOR]);
13764  queueEnterAnimations(lView[INJECTOR], getLViewEnterAnimations(lView));
13765  return \u0275\u0275animateEnter;
13766}
13767function runEnterAnimation(lView, tNode, value) {
13768  const nativeElement = getNativeByTNode(tNode, lView);
13769  ngDevMode && assertElementNodes(nativeElement, "animate.enter");
13770  const renderer = lView[RENDERER];
13771  const ngZone = lView[INJECTOR].get(NgZone);
13772  const activeClasses = getClassListFromValue(value);
13773  const cleanupFns = [];
13774  const handleEnterAnimationStart = (event) => {
13775    if (event.target !== nativeElement)
13776      return;
13777    const eventName = event instanceof AnimationEvent ? "animationend" : "transitionend";
13778    ngZone.runOutsideAngular(() => {
13779      renderer.listen(nativeElement, eventName, handleEnterAnimationEnd);
13780    });
13781  };
13782  const handleEnterAnimationEnd = (event) => {
13783    if (event.target !== nativeElement)
13784      return;
13785    enterAnimationEnd(event, nativeElement, renderer);
13786  };
13787  if (activeClasses && activeClasses.length > 0) {
13788    ngZone.runOutsideAngular(() => {
13789      cleanupFns.push(renderer.listen(nativeElement, "animationstart", handleEnterAnimationStart));
13790      cleanupFns.push(renderer.listen(nativeElement, "transitionstart", handleEnterAnimationStart));
13791    });
13792    trackEnterClasses(nativeElement, activeClasses, cleanupFns);
13793    for (const klass of activeClasses) {
13794      renderer.addClass(nativeElement, klass);
13795    }
13796    ngZone.runOutsideAngular(() => {
13797      requestAnimationFrame(() => {
13798        determineLongestAnimation(nativeElement, longestAnimations, areAnimationSupported);
13799        if (!longestAnimations.has(nativeElement)) {
13800          for (const klass of activeClasses) {
13801            renderer.removeClass(nativeElement, klass);
13802          }
13803          cleanupEnterClassData(nativeElement);
13804        }
13805      });
13806    });
13807  }
13808}
13809function enterAnimationEnd(event, nativeElement, renderer) {
13810  const elementData = enterClassMap.get(nativeElement);
13811  if (event.target !== nativeElement || !elementData)
13812    return;
13813  if (isLongestAnimation(event, nativeElement)) {
13814    event.stopImmediatePropagation();
13815    for (const klass of elementData.classList) {
13816      renderer.removeClass(nativeElement, klass);
13817    }
13818    cleanupEnterClassData(nativeElement);
13819  }
13820}
13821function \u0275\u0275animateEnterListener(value) {
13822  performanceMarkFeature("NgAnimateEnter");
13823  if (!areAnimationSupported) {
13824    return \u0275\u0275animateEnterListener;
13825  }
13826  ngDevMode && assertAnimationTypes(value, "animate.enter");
13827  const lView = getLView();
13828  if (areAnimationsDisabled(lView)) {
13829    return \u0275\u0275animateEnterListener;
13830  }
13831  const tNode = getCurrentTNode();
13832  cancelLeavingNodes(tNode, lView);
13833  addAnimationToLView(getLViewEnterAnimations(lView), tNode, () => runEnterAnimationFunction(lView, tNode, value));
13834  initializeAnimationQueueScheduler(lView[INJECTOR]);
13835  queueEnterAnimations(lView[INJECTOR], getLViewEnterAnimations(lView));
13836  return \u0275\u0275animateEnterListener;
13837}
13838function runEnterAnimationFunction(lView, tNode, value) {
13839  const nativeElement = getNativeByTNode(tNode, lView);
13840  ngDevMode && assertElementNodes(nativeElement, "animate.enter");
13841  value.call(lView[CONTEXT], { target: nativeElement, animationComplete: noOpAnimationComplete });
13842}
13843function \u0275\u0275animateLeave(value) {
13844  performanceMarkFeature("NgAnimateLeave");
13845  if (!areAnimationSupported) {
13846    return \u0275\u0275animateLeave;
13847  }
13848  ngDevMode && assertAnimationTypes(value, "animate.leave");
13849  const lView = getLView();
13850  const animationsDisabled = areAnimationsDisabled(lView);
13851  if (animationsDisabled) {
13852    return \u0275\u0275animateLeave;
13853  }
13854  const tNode = getCurrentTNode();
13855  cancelLeavingNodes(tNode, lView);
13856  addAnimationToLView(getLViewLeaveAnimations(lView), tNode, () => runLeaveAnimations(lView, tNode, value));
13857  initializeAnimationQueueScheduler(lView[INJECTOR]);
13858  return \u0275\u0275animateLeave;
13859}
13860function runLeaveAnimations(lView, tNode, value) {
13861  const { promise, resolve } = promiseWithResolvers();
13862  const nativeElement = getNativeByTNode(tNode, lView);
13863  ngDevMode && assertElementNodes(nativeElement, "animate.leave");
13864  const renderer = lView[RENDERER];
13865  const ngZone = lView[INJECTOR].get(NgZone);
13866  allLeavingAnimations.add(lView);
13867  (getLViewLeaveAnimations(lView).get(tNode.index).resolvers ??= []).push(resolve);
13868  const activeClasses = getClassListFromValue(value);
13869  if (activeClasses && activeClasses.length > 0) {
13870    animateLeaveClassRunner(nativeElement, tNode, lView, activeClasses, renderer, ngZone);
13871  } else {
13872    resolve();
13873  }
13874  return { promise, resolve };
13875}
13876function animateLeaveClassRunner(el, tNode, lView, classList, renderer, ngZone) {
13877  cancelAnimationsIfRunning(el, renderer);
13878  const cleanupFns = [];
13879  const resolvers = getLViewLeaveAnimations(lView).get(tNode.index)?.resolvers;
13880  const handleOutAnimationEnd = (event) => {
13881    if (event.target !== el)
13882      return;
13883    if (event instanceof CustomEvent || isLongestAnimation(event, el)) {
13884      event.stopImmediatePropagation();
13885      longestAnimations.delete(el);
13886      clearLeavingNodes(tNode, el);
13887      if (Array.isArray(tNode.projection)) {
13888        for (const item of classList) {
13889          renderer.removeClass(el, item);
13890        }
13891      }
13892      cleanupAfterLeaveAnimations(resolvers, cleanupFns);
13893      clearLViewNodeAnimationResolvers(lView, tNode);
13894    }
13895  };
13896  ngZone.runOutsideAngular(() => {
13897    cleanupFns.push(renderer.listen(el, "animationend", handleOutAnimationEnd));
13898    cleanupFns.push(renderer.listen(el, "transitionend", handleOutAnimationEnd));
13899  });
13900  trackLeavingNodes(tNode, el);
13901  for (const item of classList) {
13902    renderer.addClass(el, item);
13903  }
13904  ngZone.runOutsideAngular(() => {
13905    requestAnimationFrame(() => {
13906      determineLongestAnimation(el, longestAnimations, areAnimationSupported);
13907      if (!longestAnimations.has(el)) {
13908        clearLeavingNodes(tNode, el);
13909        cleanupAfterLeaveAnimations(resolvers, cleanupFns);
13910        clearLViewNodeAnimationResolvers(lView, tNode);
13911      }
13912    });
13913  });
13914}
13915function \u0275\u0275animateLeaveListener(value) {
13916  performanceMarkFeature("NgAnimateLeave");
13917  if (!areAnimationSupported) {
13918    return \u0275\u0275animateLeaveListener;
13919  }
13920  ngDevMode && assertAnimationTypes(value, "animate.leave");
13921  const lView = getLView();
13922  const tNode = getCurrentTNode();
13923  cancelLeavingNodes(tNode, lView);
13924  allLeavingAnimations.add(lView);
13925  addAnimationToLView(getLViewLeaveAnimations(lView), tNode, () => runLeaveAnimationFunction(lView, tNode, value));
13926  initializeAnimationQueueScheduler(lView[INJECTOR]);
13927  return \u0275\u0275animateLeaveListener;
13928}
13929function runLeaveAnimationFunction(lView, tNode, value) {
13930  const { promise, resolve } = promiseWithResolvers();
13931  const nativeElement = getNativeByTNode(tNode, lView);
13932  ngDevMode && assertElementNodes(nativeElement, "animate.leave");
13933  const cleanupFns = [];
13934  const renderer = lView[RENDERER];
13935  const animationsDisabled = areAnimationsDisabled(lView);
13936  const ngZone = lView[INJECTOR].get(NgZone);
13937  const maxAnimationTimeout = lView[INJECTOR].get(MAX_ANIMATION_TIMEOUT);
13938  (getLViewLeaveAnimations(lView).get(tNode.index).resolvers ??= []).push(resolve);
13939  const resolvers = getLViewLeaveAnimations(lView).get(tNode.index)?.resolvers;
13940  if (animationsDisabled) {
13941    leaveAnimationFunctionCleanup(lView, tNode, nativeElement, resolvers, cleanupFns);
13942  } else {
13943    const timeoutId = setTimeout(() => leaveAnimationFunctionCleanup(lView, tNode, nativeElement, resolvers, cleanupFns), maxAnimationTimeout);
13944    const event = {
13945      target: nativeElement,
13946      animationComplete: () => {
13947        leaveAnimationFunctionCleanup(lView, tNode, nativeElement, resolvers, cleanupFns);
13948        clearTimeout(timeoutId);
13949      }
13950    };
13951    trackLeavingNodes(tNode, nativeElement);
13952    ngZone.runOutsideAngular(() => {
13953      cleanupFns.push(renderer.listen(nativeElement, "animationend", () => {
13954        leaveAnimationFunctionCleanup(lView, tNode, nativeElement, resolvers, cleanupFns);
13955        clearTimeout(timeoutId);
13956      }, { once: true }));
13957    });
13958    value.call(lView[CONTEXT], event);
13959  }
13960  return { promise, resolve };
13961}
13962function \u0275\u0275componentInstance() {
13963  const instance = getLView()[DECLARATION_COMPONENT_VIEW][CONTEXT];
13964  ngDevMode && assertDefined(instance, "Expected component instance to be defined");
13965  return instance;
13966}
13967function valuesMatching(liveIdx, liveValue, newIdx, newValue, trackBy) {
13968  if (liveIdx === newIdx && Object.is(liveValue, newValue)) {
13969    return 1;
13970  } else if (Object.is(trackBy(liveIdx, liveValue), trackBy(newIdx, newValue))) {
13971    return -1;
13972  }
13973  return 0;
13974}
13975function recordDuplicateKeys(keyToIdx, key, idx) {
13976  const idxSoFar = keyToIdx.get(key);
13977  if (idxSoFar !== void 0) {
13978    idxSoFar.add(idx);
13979  } else {
13980    keyToIdx.set(key, /* @__PURE__ */ new Set([idx]));
13981  }
13982}
13983function reconcile(liveCollection, newCollection, trackByFn) {
13984  let detachedItems = void 0;
13985  let liveKeysInTheFuture = void 0;
13986  let liveStartIdx = 0;
13987  let liveEndIdx = liveCollection.length - 1;
13988  const duplicateKeys = ngDevMode ? /* @__PURE__ */ new Map() : void 0;
13989  if (Array.isArray(newCollection)) {
13990    let newEndIdx = newCollection.length - 1;
13991    while (liveStartIdx <= liveEndIdx && liveStartIdx <= newEndIdx) {
13992      const liveStartValue = liveCollection.at(liveStartIdx);
13993      const newStartValue = newCollection[liveStartIdx];
13994      if (ngDevMode) {
13995        recordDuplicateKeys(duplicateKeys, trackByFn(liveStartIdx, newStartValue), liveStartIdx);
13996      }
13997      const isStartMatching = valuesMatching(liveStartIdx, liveStartValue, liveStartIdx, newStartValue, trackByFn);
13998      if (isStartMatching !== 0) {
13999        if (isStartMatching < 0) {
14000          liveCollection.updateValue(liveStartIdx, newStartValue);
14001        }
14002        liveStartIdx++;
14003        continue;
14004      }
14005      const liveEndValue = liveCollection.at(liveEndIdx);
14006      const newEndValue = newCollection[newEndIdx];
14007      if (ngDevMode) {
14008        recordDuplicateKeys(duplicateKeys, trackByFn(newEndIdx, newEndValue), newEndIdx);
14009      }
14010      const isEndMatching = valuesMatching(liveEndIdx, liveEndValue, newEndIdx, newEndValue, trackByFn);
14011      if (isEndMatching !== 0) {
14012        if (isEndMatching < 0) {
14013          liveCollection.updateValue(liveEndIdx, newEndValue);
14014        }
14015        liveEndIdx--;
14016        newEndIdx--;
14017        continue;
14018      }
14019      const liveStartKey = trackByFn(liveStartIdx, liveStartValue);
14020      const liveEndKey = trackByFn(liveEndIdx, liveEndValue);
14021      const newStartKey = trackByFn(liveStartIdx, newStartValue);
14022      if (Object.is(newStartKey, liveEndKey)) {
14023        const newEndKey = trackByFn(newEndIdx, newEndValue);
14024        if (Object.is(newEndKey, liveStartKey)) {
14025          liveCollection.swap(liveStartIdx, liveEndIdx);
14026          liveCollection.updateValue(liveEndIdx, newEndValue);
14027          newEndIdx--;
14028          liveEndIdx--;
14029        } else {
14030          liveCollection.move(liveEndIdx, liveStartIdx);
14031        }
14032        liveCollection.updateValue(liveStartIdx, newStartValue);
14033        liveStartIdx++;
14034        continue;
14035      }
14036      detachedItems ??= new UniqueValueMultiKeyMap();
14037      liveKeysInTheFuture ??= initLiveItemsInTheFuture(liveCollection, liveStartIdx, liveEndIdx, trackByFn);
14038      if (attachPreviouslyDetached(liveCollection, detachedItems, liveStartIdx, newStartKey)) {
14039        liveCollection.updateValue(liveStartIdx, newStartValue);
14040        liveStartIdx++;
14041        liveEndIdx++;
14042      } else if (!liveKeysInTheFuture.has(newStartKey)) {
14043        const newItem = liveCollection.create(liveStartIdx, newCollection[liveStartIdx]);
14044        liveCollection.attach(liveStartIdx, newItem);
14045        liveStartIdx++;
14046        liveEndIdx++;
14047      } else {
14048        detachedItems.set(liveStartKey, liveCollection.detach(liveStartIdx));
14049        liveEndIdx--;
14050      }
14051    }
14052    while (liveStartIdx <= newEndIdx) {
14053      createOrAttach(liveCollection, detachedItems, trackByFn, liveStartIdx, newCollection[liveStartIdx]);
14054      liveStartIdx++;
14055    }
14056  } else if (newCollection != null) {
14057    const newCollectionIterator = newCollection[Symbol.iterator]();
14058    let newIterationResult = newCollectionIterator.next();
14059    while (!newIterationResult.done && liveStartIdx <= liveEndIdx) {
14060      const liveValue = liveCollection.at(liveStartIdx);
14061      const newValue = newIterationResult.value;
14062      if (ngDevMode) {
14063        recordDuplicateKeys(duplicateKeys, trackByFn(liveStartIdx, newValue), liveStartIdx);
14064      }
14065      const isStartMatching = valuesMatching(liveStartIdx, liveValue, liveStartIdx, newValue, trackByFn);
14066      if (isStartMatching !== 0) {
14067        if (isStartMatching < 0) {
14068          liveCollection.updateValue(liveStartIdx, newValue);
14069        }
14070        liveStartIdx++;
14071        newIterationResult = newCollectionIterator.next();
14072      } else {
14073        detachedItems ??= new UniqueValueMultiKeyMap();
14074        liveKeysInTheFuture ??= initLiveItemsInTheFuture(liveCollection, liveStartIdx, liveEndIdx, trackByFn);
14075        const newKey = trackByFn(liveStartIdx, newValue);
14076        if (attachPreviouslyDetached(liveCollection, detachedItems, liveStartIdx, newKey)) {
14077          liveCollection.updateValue(liveStartIdx, newValue);
14078          liveStartIdx++;
14079          liveEndIdx++;
14080          newIterationResult = newCollectionIterator.next();
14081        } else if (!liveKeysInTheFuture.has(newKey)) {
14082          liveCollection.attach(liveStartIdx, liveCollection.create(liveStartIdx, newValue));
14083          liveStartIdx++;
14084          liveEndIdx++;
14085          newIterationResult = newCollectionIterator.next();
14086        } else {
14087          const liveKey = trackByFn(liveStartIdx, liveValue);
14088          detachedItems.set(liveKey, liveCollection.detach(liveStartIdx));
14089          liveEndIdx--;
14090        }
14091      }
14092    }
14093    while (!newIterationResult.done) {
14094      createOrAttach(liveCollection, detachedItems, trackByFn, liveCollection.length, newIterationResult.value);
14095      newIterationResult = newCollectionIterator.next();
14096    }
14097  }
14098  while (liveStartIdx <= liveEndIdx) {
14099    liveCollection.destroy(liveCollection.detach(liveEndIdx--));
14100  }
14101  detachedItems?.forEach((item) => {
14102    liveCollection.destroy(item);
14103  });
14104  if (ngDevMode) {
14105    let duplicatedKeysMsg = [];
14106    for (const [key, idxSet] of duplicateKeys) {
14107      if (idxSet.size > 1) {
14108        const idx = [...idxSet].sort((a, b) => a - b);
14109        for (let i = 1; i < idx.length; i++) {
14110          duplicatedKeysMsg.push(`key "${stringifyForError(key)}" at index "${idx[i - 1]}" and "${idx[i]}"`);
14111        }
14112      }
14113    }
14114    if (duplicatedKeysMsg.length > 0) {
14115      const message = formatRuntimeError(-955, "The provided track expression resulted in duplicated keys for a given collection. Adjust the tracking expression such that it uniquely identifies all the items in the collection. Duplicated keys were: \n" + duplicatedKeysMsg.join(", \n") + ".");
14116      console.warn(message);
14117    }
14118  }
14119}
14120function attachPreviouslyDetached(prevCollection, detachedItems, index, key) {
14121  if (detachedItems !== void 0 && detachedItems.has(key)) {
14122    prevCollection.attach(index, detachedItems.get(key));
14123    detachedItems.delete(key);
14124    return true;
14125  }
14126  return false;
14127}
14128function createOrAttach(liveCollection, detachedItems, trackByFn, index, value) {
14129  if (!attachPreviouslyDetached(liveCollection, detachedItems, index, trackByFn(index, value))) {
14130    const newItem = liveCollection.create(index, value);
14131    liveCollection.attach(index, newItem);
14132  } else {
14133    liveCollection.updateValue(index, value);
14134  }
14135}
14136function initLiveItemsInTheFuture(liveCollection, start, end, trackByFn) {
14137  const keys = /* @__PURE__ */ new Set();
14138  for (let i = start; i <= end; i++) {
14139    keys.add(trackByFn(i, liveCollection.at(i)));
14140  }
14141  return keys;
14142}
14143function \u0275\u0275conditionalCreate(index, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex, localRefExtractor) {
14144  performanceMarkFeature("NgControlFlow");
14145  const lView = getLView();
14146  const tView = getTView();
14147  const attrs = getConstant(tView.consts, attrsIndex);
14148  declareNoDirectiveHostTemplate(lView, tView, index, templateFn, decls, vars, tagName, attrs, 256, localRefsIndex, localRefExtractor);
14149  return \u0275\u0275conditionalBranchCreate;
14150}
14151function \u0275\u0275conditionalBranchCreate(index, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex, localRefExtractor) {
14152  performanceMarkFeature("NgControlFlow");
14153  const lView = getLView();
14154  const tView = getTView();
14155  const attrs = getConstant(tView.consts, attrsIndex);
14156  declareNoDirectiveHostTemplate(lView, tView, index, templateFn, decls, vars, tagName, attrs, 512, localRefsIndex, localRefExtractor);
14157  return \u0275\u0275conditionalBranchCreate;
14158}
14159function \u0275\u0275conditional(matchingTemplateIndex, contextValue) {
14160  performanceMarkFeature("NgControlFlow");
14161  const hostLView = getLView();
14162  const bindingIndex = nextBindingIndex();
14163  const prevMatchingTemplateIndex = hostLView[bindingIndex] !== NO_CHANGE ? hostLView[bindingIndex] : -1;
14164  const prevContainer = prevMatchingTemplateIndex !== -1 ? getLContainer(hostLView, HEADER_OFFSET + prevMatchingTemplateIndex) : void 0;
14165  const viewInContainerIdx = 0;
14166  if (bindingUpdated(hostLView, bindingIndex, matchingTemplateIndex)) {
14167    const prevConsumer = setActiveConsumer(null);
14168    try {
14169      if (prevContainer !== void 0) {
14170        removeLViewFromLContainer(prevContainer, viewInContainerIdx);
14171      }
14172      if (matchingTemplateIndex !== -1) {
14173        const nextLContainerIndex = HEADER_OFFSET + matchingTemplateIndex;
14174        const nextContainer = getLContainer(hostLView, nextLContainerIndex);
14175        const templateTNode = getExistingTNode(hostLView[TVIEW], nextLContainerIndex);
14176        const dehydratedView = findAndReconcileMatchingDehydratedViews(nextContainer, templateTNode, hostLView);
14177        const embeddedLView = createAndRenderEmbeddedLView(hostLView, templateTNode, contextValue, {
14178          dehydratedView
14179        });
14180        addLViewToLContainer(nextContainer, embeddedLView, viewInContainerIdx, shouldAddViewToDom(templateTNode, dehydratedView));
14181      }
14182    } finally {
14183      setActiveConsumer(prevConsumer);
14184    }
14185  } else if (prevContainer !== void 0) {
14186    const lView = getLViewFromLContainer(prevContainer, viewInContainerIdx);
14187    if (lView !== void 0) {
14188      lView[CONTEXT] = contextValue;
14189    }
14190  }
14191}
14192function \u0275\u0275repeaterTrackByIndex(index) {
14193  return index;
14194}
14195function \u0275\u0275repeaterTrackByIdentity(_, value) {
14196  return value;
14197}
14198function \u0275\u0275repeaterCreate(index, templateFn, decls, vars, tagName, attrsIndex, trackByFn, trackByUsesComponentInstance, emptyTemplateFn, emptyDecls, emptyVars, emptyTagName, emptyAttrsIndex) {
14199  performanceMarkFeature("NgControlFlow");
14200  ngDevMode && assertFunction(trackByFn, `A track expression must be a function, was ${typeof trackByFn} instead.`);
14201  const lView = getLView();
14202  const tView = getTView();
14203  const hasEmptyBlock = emptyTemplateFn !== void 0;
14204  const hostLView = getLView();
14205  const boundTrackBy = trackByUsesComponentInstance ? (
14206    // We only want to bind when necessary, because it produces a
14207    // new function. For pure functions it's not necessary.
14208    trackByFn.bind(hostLView[DECLARATION_COMPONENT_VIEW][CONTEXT])
14209  ) : trackByFn;
14210  const metadata = new RepeaterMetadata(hasEmptyBlock, boundTrackBy);
14211  hostLView[HEADER_OFFSET + index] = metadata;
14212  declareNoDirectiveHostTemplate(
14213    lView,
14214    tView,
14215    index + 1,
14216    templateFn,
14217    decls,
14218    vars,
14219    tagName,
14220    getConstant(tView.consts, attrsIndex),
14221    256
14222    /* TNodeFlags.isControlFlowStart */
14223  );
14224  if (hasEmptyBlock) {
14225    ngDevMode && assertDefined(emptyDecls, "Missing number of declarations for the empty repeater block.");
14226    ngDevMode && assertDefined(emptyVars, "Missing number of bindings for the empty repeater block.");
14227    declareNoDirectiveHostTemplate(
14228      lView,
14229      tView,
14230      index + 2,
14231      emptyTemplateFn,
14232      emptyDecls,
14233      emptyVars,
14234      emptyTagName,
14235      getConstant(tView.consts, emptyAttrsIndex),
14236      512
14237      /* TNodeFlags.isInControlFlow */
14238    );
14239  }
14240}
14241function isViewExpensiveToRecreate(lView) {
14242  return lView.length - HEADER_OFFSET > 2;
14243}
14244function \u0275\u0275repeater(collection) {
14245  const prevConsumer = setActiveConsumer(null);
14246  const metadataSlotIdx = getSelectedIndex();
14247  try {
14248    const hostLView = getLView();
14249    const hostTView = hostLView[TVIEW];
14250    const metadata = hostLView[metadataSlotIdx];
14251    const containerIndex = metadataSlotIdx + 1;
14252    const lContainer = getLContainer(hostLView, containerIndex);
14253    if (metadata.liveCollection === void 0) {
14254      const itemTemplateTNode = getExistingTNode(hostTView, containerIndex);
14255      metadata.liveCollection = new LiveCollectionLContainerImpl(lContainer, hostLView, itemTemplateTNode);
14256    } else {
14257      metadata.liveCollection.reset();
14258    }
14259    const liveCollection = metadata.liveCollection;
14260    reconcile(liveCollection, collection, metadata.trackByFn);
14261    if (ngDevMode && metadata.trackByFn === \u0275\u0275repeaterTrackByIdentity && liveCollection.operationsCounter?.wasReCreated(liveCollection.length) && isViewExpensiveToRecreate(getExistingLViewFromLContainer(lContainer, 0))) {
14262      const message = formatRuntimeError(-956, `The configured tracking expression (track by identity) caused re-creation of the entire collection of size ${liveCollection.length}. This is an expensive operation requiring destruction and subsequent creation of DOM nodes, directives, components etc. Please review the "track expression" and make sure that it uniquely identifies items in a collection.`);
14263      console.warn(message);
14264    }
14265    liveCollection.updateIndexes();
14266    if (metadata.hasEmptyBlock) {
14267      const bindingIndex = nextBindingIndex();
14268      const isCollectionEmpty = liveCollection.length === 0;
14269      if (bindingUpdated(hostLView, bindingIndex, isCollectionEmpty)) {
14270        const emptyTemplateIndex = metadataSlotIdx + 2;
14271        const lContainerForEmpty = getLContainer(hostLView, emptyTemplateIndex);
14272        if (isCollectionEmpty) {
14273          const emptyTemplateTNode = getExistingTNode(hostTView, emptyTemplateIndex);
14274          const dehydratedView = findAndReconcileMatchingDehydratedViews(lContainerForEmpty, emptyTemplateTNode, hostLView);
14275          const embeddedLView = createAndRenderEmbeddedLView(hostLView, emptyTemplateTNode, void 0, { dehydratedView });
14276          addLViewToLContainer(lContainerForEmpty, embeddedLView, 0, shouldAddViewToDom(emptyTemplateTNode, dehydratedView));
14277        } else {
14278          if (hostTView.firstUpdatePass) {
14279            removeDehydratedViews(lContainerForEmpty);
14280          }
14281          removeLViewFromLContainer(lContainerForEmpty, 0);
14282        }
14283      }
14284    }
14285  } finally {
14286    setActiveConsumer(prevConsumer);
14287  }
14288}
14289function getLContainer(lView, index) {
14290  const lContainer = lView[index];
14291  ngDevMode && assertLContainer(lContainer);
14292  return lContainer;
14293}
14294function clearDetachAnimationList(lContainer, index) {
14295  if (lContainer.length <= CONTAINER_HEADER_OFFSET)
14296    return;
14297  const indexInContainer = CONTAINER_HEADER_OFFSET + index;
14298  const viewToDetach = lContainer[indexInContainer];
14299  const animations = viewToDetach ? viewToDetach[ANIMATIONS] : void 0;
14300  if (viewToDetach && animations && animations.detachedLeaveAnimationFns && animations.detachedLeaveAnimationFns.length > 0) {
14301    const injector = viewToDetach[INJECTOR];
14302    removeFromAnimationQueue(injector, animations);
14303    allLeavingAnimations.delete(viewToDetach);
14304    animations.detachedLeaveAnimationFns = void 0;
14305  }
14306}
14307function maybeInitDetachAnimationList(lContainer, index) {
14308  if (lContainer.length <= CONTAINER_HEADER_OFFSET)
14309    return;
14310  const indexInContainer = CONTAINER_HEADER_OFFSET + index;
14311  const viewToDetach = lContainer[indexInContainer];
14312  const animations = viewToDetach ? viewToDetach[ANIMATIONS] : void 0;
14313  if (animations && animations.leave && animations.leave.size > 0) {
14314    animations.detachedLeaveAnimationFns = [];
14315  }
14316}
14317function detachExistingView(lContainer, index) {
14318  const existingLView = detachView(lContainer, index);
14319  ngDevMode && assertLView(existingLView);
14320  return existingLView;
14321}
14322function getExistingLViewFromLContainer(lContainer, index) {
14323  const existingLView = getLViewFromLContainer(lContainer, index);
14324  ngDevMode && assertLView(existingLView);
14325  return existingLView;
14326}
14327function getExistingTNode(tView, index) {
14328  const tNode = getTNode(tView, index);
14329  ngDevMode && assertTNode(tNode);
14330  return tNode;
14331}
14332function \u0275\u0275property(propName, value, sanitizer) {
14333  const lView = getLView();
14334  const bindingIndex = nextBindingIndex();
14335  if (bindingUpdated(lView, bindingIndex, value)) {
14336    const tView = getTView();
14337    const tNode = getSelectedTNode();
14338    setPropertyAndInputs(tNode, lView, propName, value, lView[RENDERER], sanitizer);
14339    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);
14340  }
14341  return \u0275\u0275property;
14342}
14343function setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased) {
14344  setAllInputsForProperty(tNode, tView, lView, isClassBased ? "class" : "style", value);
14345}
14346function \u0275\u0275elementStart(index, name, attrsIndex, localRefsIndex) {
14347  const lView = getLView();
14348  ngDevMode && assertTNodeCreationIndex(lView, index);
14349  const tView = lView[TVIEW];
14350  const adjustedIndex = index + HEADER_OFFSET;
14351  const tNode = tView.firstCreatePass ? directiveHostFirstCreatePass(adjustedIndex, lView, 2, name, findDirectiveDefMatches, getBindingsEnabled(), attrsIndex, localRefsIndex) : tView.data[adjustedIndex];
14352  elementLikeStartShared(tNode, lView, index, name, _locateOrCreateElementNode);
14353  if (isDirectiveHost(tNode)) {
14354    const tView2 = lView[TVIEW];
14355    createDirectivesInstances(tView2, lView, tNode);
14356    executeContentQueries(tView2, tNode, lView);
14357  }
14358  if (localRefsIndex != null) {
14359    saveResolvedLocalsInData(lView, tNode);
14360  }
14361  if (ngDevMode && lView[TVIEW].firstCreatePass) {
14362    validateElementIsKnown(lView, tNode);
14363  }
14364  return \u0275\u0275elementStart;
14365}
14366function \u0275\u0275elementEnd() {
14367  const tView = getTView();
14368  const initialTNode = getCurrentTNode();
14369  ngDevMode && assertDefined(initialTNode, "No parent node to close.");
14370  const currentTNode = elementLikeEndShared(initialTNode);
14371  ngDevMode && assertTNodeType(
14372    currentTNode,
14373    3
14374    /* TNodeType.AnyRNode */
14375  );
14376  if (tView.firstCreatePass) {
14377    directiveHostEndFirstCreatePass(tView, currentTNode);
14378  }
14379  if (isSkipHydrationRootTNode(currentTNode)) {
14380    leaveSkipHydrationBlock();
14381  }
14382  decreaseElementDepthCount();
14383  if (currentTNode.classesWithoutHost != null && hasClassInput(currentTNode)) {
14384    setDirectiveInputsWhichShadowsStyling(tView, currentTNode, getLView(), currentTNode.classesWithoutHost, true);
14385  }
14386  if (currentTNode.stylesWithoutHost != null && hasStyleInput(currentTNode)) {
14387    setDirectiveInputsWhichShadowsStyling(tView, currentTNode, getLView(), currentTNode.stylesWithoutHost, false);
14388  }
14389  return \u0275\u0275elementEnd;
14390}
14391function \u0275\u0275element(index, name, attrsIndex, localRefsIndex) {
14392  \u0275\u0275elementStart(index, name, attrsIndex, localRefsIndex);
14393  \u0275\u0275elementEnd();
14394  return \u0275\u0275element;
14395}
14396function \u0275\u0275domElementStart(index, name, attrsIndex, localRefsIndex) {
14397  const lView = getLView();
14398  ngDevMode && assertTNodeCreationIndex(lView, index);
14399  const tView = lView[TVIEW];
14400  const adjustedIndex = index + HEADER_OFFSET;
14401  const tNode = tView.firstCreatePass ? domOnlyFirstCreatePass(adjustedIndex, tView, 2, name, attrsIndex, localRefsIndex) : tView.data[adjustedIndex];
14402  elementLikeStartShared(tNode, lView, index, name, _locateOrCreateElementNode);
14403  if (localRefsIndex != null) {
14404    saveResolvedLocalsInData(lView, tNode);
14405  }
14406  if (ngDevMode && lView[TVIEW].firstCreatePass) {
14407    validateElementIsKnown(lView, tNode);
14408  }
14409  return \u0275\u0275domElementStart;
14410}
14411function \u0275\u0275domElementEnd() {
14412  const initialTNode = getCurrentTNode();
14413  ngDevMode && assertDefined(initialTNode, "No parent node to close.");
14414  const currentTNode = elementLikeEndShared(initialTNode);
14415  ngDevMode && assertTNodeType(
14416    currentTNode,
14417    3
14418    /* TNodeType.AnyRNode */
14419  );
14420  if (isSkipHydrationRootTNode(currentTNode)) {
14421    leaveSkipHydrationBlock();
14422  }
14423  decreaseElementDepthCount();
14424  return \u0275\u0275domElementEnd;
14425}
14426function \u0275\u0275domElement(index, name, attrsIndex, localRefsIndex) {
14427  \u0275\u0275domElementStart(index, name, attrsIndex, localRefsIndex);
14428  \u0275\u0275domElementEnd();
14429  return \u0275\u0275domElement;
14430}
14431function \u0275\u0275elementContainerStart(index, attrsIndex, localRefsIndex) {
14432  const lView = getLView();
14433  ngDevMode && assertTNodeCreationIndex(lView, index);
14434  const tView = lView[TVIEW];
14435  const adjustedIndex = index + HEADER_OFFSET;
14436  const tNode = tView.firstCreatePass ? directiveHostFirstCreatePass(adjustedIndex, lView, 8, "ng-container", findDirectiveDefMatches, getBindingsEnabled(), attrsIndex, localRefsIndex) : tView.data[adjustedIndex];
14437  elementLikeStartShared(tNode, lView, index, "ng-container", _locateOrCreateElementContainerNode);
14438  if (isDirectiveHost(tNode)) {
14439    const tView2 = lView[TVIEW];
14440    createDirectivesInstances(tView2, lView, tNode);
14441    executeContentQueries(tView2, tNode, lView);
14442  }
14443  if (localRefsIndex != null) {
14444    saveResolvedLocalsInData(lView, tNode);
14445  }
14446  return \u0275\u0275elementContainerStart;
14447}
14448function \u0275\u0275elementContainerEnd() {
14449  const tView = getTView();
14450  const initialTNode = getCurrentTNode();
14451  ngDevMode && assertDefined(initialTNode, "No parent node to close.");
14452  const currentTNode = elementLikeEndShared(initialTNode);
14453  if (tView.firstCreatePass) {
14454    directiveHostEndFirstCreatePass(tView, currentTNode);
14455  }
14456  ngDevMode && assertTNodeType(
14457    currentTNode,
14458    8
14459    /* TNodeType.ElementContainer */
14460  );
14461  return \u0275\u0275elementContainerEnd;
14462}
14463function \u0275\u0275elementContainer(index, attrsIndex, localRefsIndex) {
14464  \u0275\u0275elementContainerStart(index, attrsIndex, localRefsIndex);
14465  \u0275\u0275elementContainerEnd();
14466  return \u0275\u0275elementContainer;
14467}
14468function \u0275\u0275domElementContainerStart(index, attrsIndex, localRefsIndex) {
14469  const lView = getLView();
14470  ngDevMode && assertTNodeCreationIndex(lView, index);
14471  const tView = lView[TVIEW];
14472  const adjustedIndex = index + HEADER_OFFSET;
14473  const tNode = tView.firstCreatePass ? domOnlyFirstCreatePass(adjustedIndex, tView, 8, "ng-container", attrsIndex, localRefsIndex) : tView.data[adjustedIndex];
14474  elementLikeStartShared(tNode, lView, index, "ng-container", _locateOrCreateElementContainerNode);
14475  if (localRefsIndex != null) {
14476    saveResolvedLocalsInData(lView, tNode);
14477  }
14478  return \u0275\u0275domElementContainerStart;
14479}
14480function \u0275\u0275domElementContainerEnd() {
14481  const initialTNode = getCurrentTNode();
14482  ngDevMode && assertDefined(initialTNode, "No parent node to close.");
14483  const currentTNode = elementLikeEndShared(initialTNode);
14484  ngDevMode && assertTNodeType(
14485    currentTNode,
14486    8
14487    /* TNodeType.ElementContainer */
14488  );
14489  return \u0275\u0275elementContainerEnd;
14490}
14491function \u0275\u0275domElementContainer(index, attrsIndex, localRefsIndex) {
14492  \u0275\u0275domElementContainerStart(index, attrsIndex, localRefsIndex);
14493  \u0275\u0275domElementContainerEnd();
14494  return \u0275\u0275domElementContainer;
14495}
14496function \u0275\u0275getCurrentView() {
14497  return getLView();
14498}
14499function \u0275\u0275domProperty(propName, value, sanitizer) {
14500  const lView = getLView();
14501  const bindingIndex = nextBindingIndex();
14502  if (bindingUpdated(lView, bindingIndex, value)) {
14503    const tView = getTView();
14504    const tNode = getSelectedTNode();
14505    setDomProperty(tNode, lView, propName, value, lView[RENDERER], sanitizer);
14506    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);
14507  }
14508  return \u0275\u0275domProperty;
14509}
14510function \u0275\u0275syntheticHostProperty(propName, value, sanitizer) {
14511  const lView = getLView();
14512  const bindingIndex = nextBindingIndex();
14513  if (bindingUpdated(lView, bindingIndex, value)) {
14514    const tView = getTView();
14515    const tNode = getSelectedTNode();
14516    const currentDef = getCurrentDirectiveDef(tView.data);
14517    const renderer = loadComponentRenderer(currentDef, tNode, lView);
14518    setDomProperty(tNode, lView, propName, value, renderer, sanitizer);
14519    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);
14520  }
14521  return \u0275\u0275syntheticHostProperty;
14522}
14523function plural(val) {
14524  const i = Math.floor(Math.abs(val)), v = val.toString().replace(/^[^.]*\.?/, "").length;
14525  if (i === 1 && v === 0)
14526    return 1;
14527  return 5;
14528}
14529function findLocaleData(locale) {
14530  const normalizedLocale = normalizeLocale(locale);
14531  let match = getLocaleData(normalizedLocale);
14532  if (match) {
14533    return match;
14534  }
14535  const parentLocale = normalizedLocale.split("-")[0];
14536  match = getLocaleData(parentLocale);
14537  if (match) {
14538    return match;
14539  }
14540  if (parentLocale === "en") {
14541    return localeEn;
14542  }
14543  throw new RuntimeError(701, ngDevMode && `Missing locale data for the locale "${locale}".`);
14544}
14545function getLocalePluralCase(locale) {
14546  const data = findLocaleData(locale);
14547  return data[LocaleDataIndex.PluralCase];
14548}
14549function getLocaleData(normalizedLocale) {
14550  if (!(normalizedLocale in LOCALE_DATA)) {
14551    LOCALE_DATA[normalizedLocale] = _global.ng && _global.ng.common && _global.ng.common.locales && _global.ng.common.locales[normalizedLocale];
14552  }
14553  return LOCALE_DATA[normalizedLocale];
14554}
14555function normalizeLocale(locale) {
14556  return locale.toLowerCase().replace(/_/g, "-");
14557}
14558function getPluralCase(value, locale) {
14559  const plural2 = getLocalePluralCase(locale)(parseInt(value, 10));
14560  const result = pluralMapping[plural2];
14561  return result !== void 0 ? result : "other";
14562}
14563function setLocaleId(localeId) {
14564  ngDevMode && assertDefined(localeId, `Expected localeId to be defined`);
14565  if (typeof localeId === "string") {
14566    LOCALE_ID$1 = localeId.toLowerCase().replace(/_/g, "-");
14567  }
14568}
14569function getLocaleId() {
14570  return LOCALE_ID$1;
14571}
14572function setMaskBit(hasChange) {
14573  if (hasChange) {
14574    changeMask = changeMask | 1 << Math.min(changeMaskCounter, 31);
14575  }
14576  changeMaskCounter++;
14577}
14578function applyI18n(tView, lView, index) {
14579  if (changeMaskCounter > 0) {
14580    ngDevMode && assertDefined(tView, `tView should be defined`);
14581    const tI18n = tView.data[index];
14582    const updateOpCodes = Array.isArray(tI18n) ? tI18n : tI18n.update;
14583    const bindingsStartIndex = getBindingIndex() - changeMaskCounter - 1;
14584    applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask);
14585  }
14586  changeMask = 0;
14587  changeMaskCounter = 0;
14588}
14589function createNodeWithoutHydration(lView, textOrName, nodeType) {
14590  const renderer = lView[RENDERER];
14591  switch (nodeType) {
14592    case Node.COMMENT_NODE:
14593      return createCommentNode(renderer, textOrName);
14594    case Node.TEXT_NODE:
14595      return createTextNode(renderer, textOrName);
14596    case Node.ELEMENT_NODE:
14597      return createElementNode(renderer, textOrName, null);
14598  }
14599}
14600function applyCreateOpCodes(lView, createOpCodes, parentRNode, insertInFrontOf) {
14601  const renderer = lView[RENDERER];
14602  for (let i = 0; i < createOpCodes.length; i++) {
14603    const opCode = createOpCodes[i++];
14604    const text = createOpCodes[i];
14605    const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;
14606    const appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;
14607    const index = opCode >>> I18nCreateOpCode.SHIFT;
14608    let rNode = lView[index];
14609    let lastNodeWasCreated2 = false;
14610    if (rNode === null) {
14611      rNode = lView[index] = _locateOrCreateNode(lView, index, text, isComment ? Node.COMMENT_NODE : Node.TEXT_NODE);
14612      lastNodeWasCreated2 = wasLastNodeCreated();
14613    }
14614    if (appendNow && parentRNode !== null && lastNodeWasCreated2) {
14615      nativeInsertBefore(renderer, parentRNode, rNode, insertInFrontOf, false);
14616    }
14617  }
14618}
14619function applyMutableOpCodes(tView, mutableOpCodes, lView, anchorRNode) {
14620  ngDevMode && assertDomNode(anchorRNode);
14621  const renderer = lView[RENDERER];
14622  let rootIdx = null;
14623  let rootRNode;
14624  for (let i = 0; i < mutableOpCodes.length; i++) {
14625    const opCode = mutableOpCodes[i];
14626    if (typeof opCode == "string") {
14627      const textNodeIndex = mutableOpCodes[++i];
14628      if (lView[textNodeIndex] === null) {
14629        ngDevMode && assertIndexInRange(lView, textNodeIndex);
14630        lView[textNodeIndex] = _locateOrCreateNode(lView, textNodeIndex, opCode, Node.TEXT_NODE);
14631      }
14632    } else if (typeof opCode == "number") {
14633      switch (opCode & 1) {
14634        case 0:
14635          const parentIdx = getParentFromIcuCreateOpCode(opCode);
14636          if (rootIdx === null) {
14637            rootIdx = parentIdx;
14638            rootRNode = renderer.parentNode(anchorRNode);
14639          }
14640          let insertInFrontOf;
14641          let parentRNode;
14642          if (parentIdx === rootIdx) {
14643            insertInFrontOf = anchorRNode;
14644            parentRNode = rootRNode;
14645          } else {
14646            insertInFrontOf = null;
14647            parentRNode = unwrapRNode(lView[parentIdx]);
14648          }
14649          if (parentRNode !== null) {
14650            ngDevMode && assertDomNode(parentRNode);
14651            const refIdx = getRefFromIcuCreateOpCode(opCode);
14652            ngDevMode && assertGreaterThan(refIdx, HEADER_OFFSET, "Missing ref");
14653            const child = lView[refIdx];
14654            ngDevMode && assertDomNode(child);
14655            nativeInsertBefore(renderer, parentRNode, child, insertInFrontOf, false);
14656            const tIcu = getTIcu(tView, refIdx);
14657            if (tIcu !== null && typeof tIcu === "object") {
14658              ngDevMode && assertTIcu(tIcu);
14659              const caseIndex = getCurrentICUCaseIndex(tIcu, lView);
14660              if (caseIndex !== null) {
14661                applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, lView[tIcu.anchorIdx]);
14662              }
14663            }
14664          }
14665          break;
14666        case 1:
14667          const elementNodeIndex = opCode >>> 1;
14668          const attrName = mutableOpCodes[++i];
14669          const attrValue = mutableOpCodes[++i];
14670          setElementAttribute(renderer, getNativeByIndex(elementNodeIndex, lView), null, null, attrName, attrValue, null);
14671          break;
14672        default:
14673          if (ngDevMode) {
14674            throw new RuntimeError(700, `Unable to determine the type of mutate operation for "${opCode}"`);
14675          }
14676      }
14677    } else {
14678      switch (opCode) {
14679        case ICU_MARKER:
14680          const commentValue = mutableOpCodes[++i];
14681          const commentNodeIndex = mutableOpCodes[++i];
14682          if (lView[commentNodeIndex] === null) {
14683            ngDevMode && assertEqual(typeof commentValue, "string", `Expected "${commentValue}" to be a comment node value`);
14684            ngDevMode && assertIndexInExpandoRange(lView, commentNodeIndex);
14685            const commentRNode = lView[commentNodeIndex] = _locateOrCreateNode(lView, commentNodeIndex, commentValue, Node.COMMENT_NODE);
14686            attachPatchData(commentRNode, lView);
14687          }
14688          break;
14689        case ELEMENT_MARKER:
14690          const tagName = mutableOpCodes[++i];
14691          const elementNodeIndex = mutableOpCodes[++i];
14692          if (lView[elementNodeIndex] === null) {
14693            ngDevMode && assertEqual(typeof tagName, "string", `Expected "${tagName}" to be an element node tag name`);
14694            ngDevMode && assertIndexInExpandoRange(lView, elementNodeIndex);
14695            const elementRNode = lView[elementNodeIndex] = _locateOrCreateNode(lView, elementNodeIndex, tagName, Node.ELEMENT_NODE);
14696            attachPatchData(elementRNode, lView);
14697          }
14698          break;
14699        default:
14700          ngDevMode && throwError(`Unable to determine the type of mutate operation for "${opCode}"`);
14701      }
14702    }
14703  }
14704}
14705function applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask2) {
14706  for (let i = 0; i < updateOpCodes.length; i++) {
14707    const checkBit = updateOpCodes[i];
14708    const skipCodes = updateOpCodes[++i];
14709    if (checkBit & changeMask2) {
14710      let value = "";
14711      for (let j = i + 1; j <= i + skipCodes; j++) {
14712        const opCode = updateOpCodes[j];
14713        if (typeof opCode == "string") {
14714          value += opCode;
14715        } else if (typeof opCode == "number") {
14716          if (opCode < 0) {
14717            value += renderStringify(lView[bindingsStartIndex - opCode]);
14718          } else {
14719            const nodeIndex = opCode >>> 2;
14720            switch (opCode & 3) {
14721              case 1:
14722                const propName = updateOpCodes[++j];
14723                const sanitizeFn = updateOpCodes[++j];
14724                const tNodeOrTagName = tView.data[nodeIndex];
14725                ngDevMode && assertDefined(tNodeOrTagName, "Experting TNode or string");
14726                if (typeof tNodeOrTagName === "string") {
14727                  setElementAttribute(lView[RENDERER], lView[nodeIndex], null, tNodeOrTagName, propName, value, sanitizeFn);
14728                } else {
14729                  setPropertyAndInputs(tNodeOrTagName, lView, propName, value, lView[RENDERER], sanitizeFn);
14730                }
14731                break;
14732              case 0:
14733                const rText = lView[nodeIndex];
14734                rText !== null && updateTextNode(lView[RENDERER], rText, value);
14735                break;
14736              case 2:
14737                applyIcuSwitchCase(tView, getTIcu(tView, nodeIndex), lView, value);
14738                break;
14739              case 3:
14740                applyIcuUpdateCase(tView, getTIcu(tView, nodeIndex), bindingsStartIndex, lView);
14741                break;
14742            }
14743          }
14744        }
14745      }
14746    } else {
14747      const opCode = updateOpCodes[i + 1];
14748      if (opCode > 0 && (opCode & 3) === 3) {
14749        const nodeIndex = opCode >>> 2;
14750        const tIcu = getTIcu(tView, nodeIndex);
14751        const currentIndex = lView[tIcu.currentCaseLViewIndex];
14752        if (currentIndex < 0) {
14753          applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView);
14754        }
14755      }
14756    }
14757    i += skipCodes;
14758  }
14759}
14760function applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView) {
14761  ngDevMode && assertIndexInRange(lView, tIcu.currentCaseLViewIndex);
14762  let activeCaseIndex = lView[tIcu.currentCaseLViewIndex];
14763  if (activeCaseIndex !== null) {
14764    let mask = changeMask;
14765    if (activeCaseIndex < 0) {
14766      activeCaseIndex = lView[tIcu.currentCaseLViewIndex] = ~activeCaseIndex;
14767      mask = -1;
14768    }
14769    applyUpdateOpCodes(tView, lView, tIcu.update[activeCaseIndex], bindingsStartIndex, mask);
14770  }
14771}
14772function applyIcuSwitchCase(tView, tIcu, lView, value) {
14773  const caseIndex = getCaseIndex(tIcu, value);
14774  let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);
14775  if (activeCaseIndex !== caseIndex) {
14776    applyIcuSwitchCaseRemove(tView, tIcu, lView);
14777    lView[tIcu.currentCaseLViewIndex] = caseIndex === null ? null : ~caseIndex;
14778    if (caseIndex !== null) {
14779      const anchorRNode = lView[tIcu.anchorIdx];
14780      if (anchorRNode) {
14781        ngDevMode && assertDomNode(anchorRNode);
14782        applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, anchorRNode);
14783      }
14784      claimDehydratedIcuCase(lView, tIcu.anchorIdx, caseIndex);
14785    }
14786  }
14787}
14788function applyIcuSwitchCaseRemove(tView, tIcu, lView) {
14789  let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);
14790  if (activeCaseIndex !== null) {
14791    const removeCodes = tIcu.remove[activeCaseIndex];
14792    for (let i = 0; i < removeCodes.length; i++) {
14793      const nodeOrIcuIndex = removeCodes[i];
14794      if (nodeOrIcuIndex > 0) {
14795        const rNode = getNativeByIndex(nodeOrIcuIndex, lView);
14796        rNode !== null && nativeRemoveNode(lView[RENDERER], rNode);
14797      } else {
14798        applyIcuSwitchCaseRemove(tView, getTIcu(tView, ~nodeOrIcuIndex), lView);
14799      }
14800    }
14801  }
14802}
14803function getCaseIndex(icuExpression, bindingValue) {
14804  let index = icuExpression.cases.indexOf(bindingValue);
14805  if (index === -1) {
14806    switch (icuExpression.type) {
14807      case 1: {
14808        const resolvedCase = getPluralCase(bindingValue, getLocaleId());
14809        index = icuExpression.cases.indexOf(resolvedCase);
14810        if (index === -1 && resolvedCase !== "other") {
14811          index = icuExpression.cases.indexOf("other");
14812        }
14813        break;
14814      }
14815      case 0: {
14816        index = icuExpression.cases.indexOf("other");
14817        break;
14818      }
14819    }
14820  }
14821  return index === -1 ? null : index;
14822}
14823function i18nCreateOpCodesToString(opcodes) {
14824  const createOpCodes = opcodes || (Array.isArray(this) ? this : []);
14825  let lines = [];
14826  for (let i = 0; i < createOpCodes.length; i++) {
14827    const opCode = createOpCodes[i++];
14828    const text = createOpCodes[i];
14829    const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;
14830    const appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;
14831    const index = opCode >>> I18nCreateOpCode.SHIFT;
14832    lines.push(`lView[${index}] = document.${isComment ? "createComment" : "createText"}(${JSON.stringify(text)});`);
14833    if (appendNow) {
14834      lines.push(`parent.appendChild(lView[${index}]);`);
14835    }
14836  }
14837  return lines;
14838}
14839function i18nUpdateOpCodesToString(opcodes) {
14840  const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));
14841  let lines = [];
14842  function consumeOpCode(value) {
14843    const ref = value >>> 2;
14844    const opCode = value & 3;
14845    switch (opCode) {
14846      case 0:
14847        return `(lView[${ref}] as Text).textContent = $$$`;
14848      case 1:
14849        const attrName = parser.consumeString();
14850        const sanitizationFn = parser.consumeFunction();
14851        const value2 = sanitizationFn ? `(${sanitizationFn})($$$)` : "$$$";
14852        return `(lView[${ref}] as Element).setAttribute('${attrName}', ${value2})`;
14853      case 2:
14854        return `icuSwitchCase(${ref}, $$$)`;
14855      case 3:
14856        return `icuUpdateCase(${ref})`;
14857    }
14858    throw new Error("unexpected OpCode");
14859  }
14860  while (parser.hasMore()) {
14861    let mask = parser.consumeNumber();
14862    let size = parser.consumeNumber();
14863    const end = parser.i + size;
14864    const statements = [];
14865    let statement = "";
14866    while (parser.i < end) {
14867      let value = parser.consumeNumberOrString();
14868      if (typeof value === "string") {
14869        statement += value;
14870      } else if (value < 0) {
14871        statement += "${lView[i" + value + "]}";
14872      } else {
14873        const opCodeText = consumeOpCode(value);
14874        statements.push(opCodeText.replace("$$$", "`" + statement + "`") + ";");
14875        statement = "";
14876      }
14877    }
14878    lines.push(`if (mask & 0b${mask.toString(2)}) { ${statements.join(" ")} }`);
14879  }
14880  return lines;
14881}
14882function icuCreateOpCodesToString(opcodes) {
14883  const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));
14884  let lines = [];
14885  function consumeOpCode(opCode) {
14886    const parent = getParentFromIcuCreateOpCode(opCode);
14887    const ref = getRefFromIcuCreateOpCode(opCode);
14888    switch (getInstructionFromIcuCreateOpCode(opCode)) {
14889      case 0:
14890        return `(lView[${parent}] as Element).appendChild(lView[${lastRef}])`;
14891      case 1:
14892        return `(lView[${ref}] as Element).setAttribute("${parser.consumeString()}", "${parser.consumeString()}")`;
14893    }
14894    throw new Error("Unexpected OpCode: " + getInstructionFromIcuCreateOpCode(opCode));
14895  }
14896  let lastRef = -1;
14897  while (parser.hasMore()) {
14898    let value = parser.consumeNumberStringOrMarker();
14899    if (value === ICU_MARKER) {
14900      const text = parser.consumeString();
14901      lastRef = parser.consumeNumber();
14902      lines.push(`lView[${lastRef}] = document.createComment("${text}")`);
14903    } else if (value === ELEMENT_MARKER) {
14904      const text = parser.consumeString();
14905      lastRef = parser.consumeNumber();
14906      lines.push(`lView[${lastRef}] = document.createElement("${text}")`);
14907    } else if (typeof value === "string") {
14908      lastRef = parser.consumeNumber();
14909      lines.push(`lView[${lastRef}] = document.createTextNode("${value}")`);
14910    } else if (typeof value === "number") {
14911      const line = consumeOpCode(value);
14912      line && lines.push(line);
14913    } else {
14914      throw new Error("Unexpected value");
14915    }
14916  }
14917  return lines;
14918}
14919function i18nRemoveOpCodesToString(opcodes) {
14920  const removeCodes = opcodes || (Array.isArray(this) ? this : []);
14921  let lines = [];
14922  for (let i = 0; i < removeCodes.length; i++) {
14923    const nodeOrIcuIndex = removeCodes[i];
14924    if (nodeOrIcuIndex > 0) {
14925      lines.push(`remove(lView[${nodeOrIcuIndex}])`);
14926    } else {
14927      lines.push(`removeNestedICU(${~nodeOrIcuIndex})`);
14928    }
14929  }
14930  return lines;
14931}
14932function replaceNgsp(value) {
14933  return value.replace(NGSP_UNICODE_REGEXP, " ");
14934}
14935function attachDebugGetter(obj, debugGetter) {
14936  if (ngDevMode) {
14937    Object.defineProperty(obj, "debug", { get: debugGetter, enumerable: false });
14938  } else {
14939    throw new Error("This method should be guarded with `ngDevMode` so that it can be tree shaken in production!");
14940  }
14941}
14942function i18nStartFirstCreatePass(tView, parentTNodeIndex, lView, index, message, subTemplateIndex) {
14943  const rootTNode = getCurrentParentTNode();
14944  const createOpCodes = [];
14945  const updateOpCodes = [];
14946  const existingTNodeStack = [[]];
14947  const astStack = [[]];
14948  if (ngDevMode) {
14949    attachDebugGetter(createOpCodes, i18nCreateOpCodesToString);
14950    attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);
14951  }
14952  message = getTranslationForTemplate(message, subTemplateIndex);
14953  const msgParts = replaceNgsp(message).split(PH_REGEXP);
14954  for (let i = 0; i < msgParts.length; i++) {
14955    let value = msgParts[i];
14956    if ((i & 1) === 0) {
14957      const parts = i18nParseTextIntoPartsAndICU(value);
14958      for (let j = 0; j < parts.length; j++) {
14959        let part = parts[j];
14960        if ((j & 1) === 0) {
14961          const text = part;
14962          ngDevMode && assertString(text, "Parsed ICU part should be string");
14963          if (text !== "") {
14964            i18nStartFirstCreatePassProcessTextNode(astStack[0], tView, rootTNode, existingTNodeStack[0], createOpCodes, updateOpCodes, lView, text);
14965          }
14966        } else {
14967          const icuExpression = part;
14968          if (typeof icuExpression !== "object") {
14969            throw new Error(`Unable to parse ICU expression in "${message}" message.`);
14970          }
14971          const icuContainerTNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodeStack[0], lView, createOpCodes, ngDevMode ? `ICU ${index}:${icuExpression.mainBinding}` : "", true);
14972          const icuNodeIndex = icuContainerTNode.index;
14973          ngDevMode && assertGreaterThanOrEqual(icuNodeIndex, HEADER_OFFSET, "Index must be in absolute LView offset");
14974          icuStart(astStack[0], tView, lView, updateOpCodes, parentTNodeIndex, icuExpression, icuNodeIndex);
14975        }
14976      }
14977    } else {
14978      const isClosing = value.charCodeAt(0) === 47;
14979      const type = value.charCodeAt(isClosing ? 1 : 0);
14980      ngDevMode && assertOneOf(
14981        type,
14982        42,
14983        35
14984        /* CharCode.HASH */
14985      );
14986      const index2 = HEADER_OFFSET + Number.parseInt(value.substring(isClosing ? 2 : 1));
14987      if (isClosing) {
14988        existingTNodeStack.shift();
14989        astStack.shift();
14990        setCurrentTNode(getCurrentParentTNode(), false);
14991      } else {
14992        const tNode = createTNodePlaceholder(tView, existingTNodeStack[0], index2);
14993        existingTNodeStack.unshift([]);
14994        setCurrentTNode(tNode, true);
14995        const placeholderNode = {
14996          kind: 2,
14997          index: index2,
14998          children: [],
14999          type: type === 35 ? 0 : 1
15000        };
15001        astStack[0].push(placeholderNode);
15002        astStack.unshift(placeholderNode.children);
15003      }
15004    }
15005  }
15006  tView.data[index] = {
15007    create: createOpCodes,
15008    update: updateOpCodes,
15009    ast: astStack[0],
15010    parentTNodeIndex
15011  };
15012}
15013function createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, text, isICU) {
15014  const i18nNodeIdx = allocExpando(tView, lView, 1, null);
15015  let opCode = i18nNodeIdx << I18nCreateOpCode.SHIFT;
15016  let parentTNode = getCurrentParentTNode();
15017  if (rootTNode === parentTNode) {
15018    parentTNode = null;
15019  }
15020  if (parentTNode === null) {
15021    opCode |= I18nCreateOpCode.APPEND_EAGERLY;
15022  }
15023  if (isICU) {
15024    opCode |= I18nCreateOpCode.COMMENT;
15025    ensureIcuContainerVisitorLoaded(loadIcuContainerVisitor);
15026  }
15027  createOpCodes.push(opCode, text === null ? "" : text);
15028  const tNode = createTNodeAtIndex(tView, i18nNodeIdx, isICU ? 32 : 1, text === null ? ngDevMode ? "{{?}}" : "" : text, null);
15029  addTNodeAndUpdateInsertBeforeIndex(existingTNodes, tNode);
15030  const tNodeIdx = tNode.index;
15031  setCurrentTNode(
15032    tNode,
15033    false
15034    /* Text nodes are self closing */
15035  );
15036  if (parentTNode !== null && rootTNode !== parentTNode) {
15037    setTNodeInsertBeforeIndex(parentTNode, tNodeIdx);
15038  }
15039  return tNode;
15040}
15041function i18nStartFirstCreatePassProcessTextNode(ast, tView, rootTNode, existingTNodes, createOpCodes, updateOpCodes, lView, text) {
15042  const hasBinding = text.match(BINDING_REGEXP);
15043  const tNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, hasBinding ? null : text, false);
15044  const index = tNode.index;
15045  if (hasBinding) {
15046    generateBindingUpdateOpCodes(updateOpCodes, text, index, null, 0, null);
15047  }
15048  ast.push({ kind: 0, index });
15049}
15050function i18nAttributesFirstPass(tView, index, values) {
15051  const previousElement = getCurrentTNode();
15052  const previousElementIndex = previousElement.index;
15053  const updateOpCodes = [];
15054  if (ngDevMode) {
15055    attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);
15056  }
15057  if (tView.firstCreatePass && tView.data[index] === null) {
15058    for (let i = 0; i < values.length; i += 2) {
15059      const attrName = values[i];
15060      const message = values[i + 1];
15061      if (message !== "") {
15062        if (ICU_REGEXP.test(message)) {
15063          throw new Error(`ICU expressions are not supported in attributes. Message: "${message}".`);
15064        }
15065        generateBindingUpdateOpCodes(updateOpCodes, message, previousElementIndex, attrName, countBindings(updateOpCodes), null);
15066      }
15067    }
15068    tView.data[index] = updateOpCodes;
15069  }
15070}
15071function generateBindingUpdateOpCodes(updateOpCodes, str, destinationNode, attrName, bindingStart, sanitizeFn) {
15072  ngDevMode && assertGreaterThanOrEqual(destinationNode, HEADER_OFFSET, "Index must be in absolute LView offset");
15073  const maskIndex = updateOpCodes.length;
15074  const sizeIndex = maskIndex + 1;
15075  updateOpCodes.push(null, null);
15076  const startIndex = maskIndex + 2;
15077  if (ngDevMode) {
15078    attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);
15079  }
15080  const textParts = str.split(BINDING_REGEXP);
15081  let mask = 0;
15082  for (let j = 0; j < textParts.length; j++) {
15083    const textValue = textParts[j];
15084    if (j & 1) {
15085      const bindingIndex = bindingStart + parseInt(textValue, 10);
15086      updateOpCodes.push(-1 - bindingIndex);
15087      mask = mask | toMaskBit(bindingIndex);
15088    } else if (textValue !== "") {
15089      updateOpCodes.push(textValue);
15090    }
15091  }
15092  updateOpCodes.push(destinationNode << 2 | (attrName ? 1 : 0));
15093  if (attrName) {
15094    updateOpCodes.push(attrName, sanitizeFn);
15095  }
15096  updateOpCodes[maskIndex] = mask;
15097  updateOpCodes[sizeIndex] = updateOpCodes.length - startIndex;
15098  return mask;
15099}
15100function countBindings(opCodes) {
15101  let count = 0;
15102  for (let i = 0; i < opCodes.length; i++) {
15103    const opCode = opCodes[i];
15104    if (typeof opCode === "number" && opCode < 0) {
15105      count++;
15106    }
15107  }
15108  return count;
15109}
15110function toMaskBit(bindingIndex) {
15111  return 1 << Math.min(bindingIndex, 31);
15112}
15113function removeInnerTemplateTranslation(message) {
15114  let match;
15115  let res = "";
15116  let index = 0;
15117  let inTemplate = false;
15118  let tagMatched;
15119  while ((match = SUBTEMPLATE_REGEXP.exec(message)) !== null) {
15120    if (!inTemplate) {
15121      res += message.substring(index, match.index + match[0].length);
15122      tagMatched = match[1];
15123      inTemplate = true;
15124    } else {
15125      if (match[0] === `${MARKER}/*${tagMatched}${MARKER}`) {
15126        index = match.index;
15127        inTemplate = false;
15128      }
15129    }
15130  }
15131  ngDevMode && assertEqual(inTemplate, false, `Tag mismatch: unable to find the end of the sub-template in the translation "${message}"`);
15132  res += message.slice(index);
15133  return res;
15134}
15135function getTranslationForTemplate(message, subTemplateIndex) {
15136  if (isRootTemplateMessage(subTemplateIndex)) {
15137    return removeInnerTemplateTranslation(message);
15138  } else {
15139    const start = message.indexOf(`:${subTemplateIndex}${MARKER}`) + 2 + subTemplateIndex.toString().length;
15140    const end = message.search(new RegExp(`${MARKER}\\/\\*\\d+:${subTemplateIndex}${MARKER}`));
15141    return removeInnerTemplateTranslation(message.substring(start, end));
15142  }
15143}
15144function icuStart(ast, tView, lView, updateOpCodes, parentIdx, icuExpression, anchorIdx) {
15145  ngDevMode && assertDefined(icuExpression, "ICU expression must be defined");
15146  let bindingMask = 0;
15147  const tIcu = {
15148    type: icuExpression.type,
15149    currentCaseLViewIndex: allocExpando(tView, lView, 1, null),
15150    anchorIdx,
15151    cases: [],
15152    create: [],
15153    remove: [],
15154    update: []
15155  };
15156  addUpdateIcuSwitch(updateOpCodes, icuExpression, anchorIdx);
15157  setTIcu(tView, anchorIdx, tIcu);
15158  const values = icuExpression.values;
15159  const cases = [];
15160  for (let i = 0; i < values.length; i++) {
15161    const valueArr = values[i];
15162    const nestedIcus = [];
15163    for (let j = 0; j < valueArr.length; j++) {
15164      const value = valueArr[j];
15165      if (typeof value !== "string") {
15166        const icuIndex = nestedIcus.push(value) - 1;
15167        valueArr[j] = `<!--\uFFFD${icuIndex}\uFFFD-->`;
15168      }
15169    }
15170    const caseAst = [];
15171    cases.push(caseAst);
15172    bindingMask = parseIcuCase(caseAst, tView, tIcu, lView, updateOpCodes, parentIdx, icuExpression.cases[i], valueArr.join(""), nestedIcus) | bindingMask;
15173  }
15174  if (bindingMask) {
15175    addUpdateIcuUpdate(updateOpCodes, bindingMask, anchorIdx);
15176  }
15177  ast.push({
15178    kind: 3,
15179    index: anchorIdx,
15180    cases,
15181    currentCaseLViewIndex: tIcu.currentCaseLViewIndex
15182  });
15183}
15184function parseICUBlock(pattern) {
15185  const cases = [];
15186  const values = [];
15187  let icuType = 1;
15188  let mainBinding = 0;
15189  pattern = pattern.replace(ICU_BLOCK_REGEXP, function(str, binding, type) {
15190    if (type === "select") {
15191      icuType = 0;
15192    } else {
15193      icuType = 1;
15194    }
15195    mainBinding = parseInt(binding.slice(1), 10);
15196    return "";
15197  });
15198  const parts = i18nParseTextIntoPartsAndICU(pattern);
15199  for (let pos = 0; pos < parts.length; ) {
15200    let key = parts[pos++].trim();
15201    if (icuType === 1) {
15202      key = key.replace(/\s*(?:=)?(\w+)\s*/, "$1");
15203    }
15204    if (key.length) {
15205      cases.push(key);
15206    }
15207    const blocks = i18nParseTextIntoPartsAndICU(parts[pos++]);
15208    if (cases.length > values.length) {
15209      values.push(blocks);
15210    }
15211  }
15212  return { type: icuType, mainBinding, cases, values };
15213}
15214function i18nParseTextIntoPartsAndICU(pattern) {
15215  if (!pattern) {
15216    return [];
15217  }
15218  let prevPos = 0;
15219  const braceStack = [];
15220  const results = [];
15221  const braces = /[{}]/g;
15222  braces.lastIndex = 0;
15223  let match;
15224  while (match = braces.exec(pattern)) {
15225    const pos = match.index;
15226    if (match[0] == "}") {
15227      braceStack.pop();
15228      if (braceStack.length == 0) {
15229        const block = pattern.substring(prevPos, pos);
15230        if (ICU_BLOCK_REGEXP.test(block)) {
15231          results.push(parseICUBlock(block));
15232        } else {
15233          results.push(block);
15234        }
15235        prevPos = pos + 1;
15236      }
15237    } else {
15238      if (braceStack.length == 0) {
15239        const substring2 = pattern.substring(prevPos, pos);
15240        results.push(substring2);
15241        prevPos = pos + 1;
15242      }
15243      braceStack.push("{");
15244    }
15245  }
15246  const substring = pattern.substring(prevPos);
15247  results.push(substring);
15248  return results;
15249}
15250function parseIcuCase(ast, tView, tIcu, lView, updateOpCodes, parentIdx, caseName, unsafeCaseHtml, nestedIcus) {
15251  const create = [];
15252  const remove2 = [];
15253  const update = [];
15254  if (ngDevMode) {
15255    attachDebugGetter(create, icuCreateOpCodesToString);
15256    attachDebugGetter(remove2, i18nRemoveOpCodesToString);
15257    attachDebugGetter(update, i18nUpdateOpCodesToString);
15258  }
15259  tIcu.cases.push(caseName);
15260  tIcu.create.push(create);
15261  tIcu.remove.push(remove2);
15262  tIcu.update.push(update);
15263  const inertBodyHelper2 = getInertBodyHelper(getDocument());
15264  const inertBodyElement = inertBodyHelper2.getInertBodyElement(unsafeCaseHtml);
15265  ngDevMode && assertDefined(inertBodyElement, "Unable to generate inert body element");
15266  const inertRootNode = getTemplateContent(inertBodyElement) || inertBodyElement;
15267  if (inertRootNode) {
15268    return walkIcuTree(ast, tView, tIcu, lView, updateOpCodes, create, remove2, update, inertRootNode, parentIdx, nestedIcus, 0);
15269  } else {
15270    return 0;
15271  }
15272}
15273function walkIcuTree(ast, tView, tIcu, lView, sharedUpdateOpCodes, create, remove2, update, parentNode, parentIdx, nestedIcus, depth) {
15274  let bindingMask = 0;
15275  let currentNode = parentNode.firstChild;
15276  while (currentNode) {
15277    const newIndex = allocExpando(tView, lView, 1, null);
15278    switch (currentNode.nodeType) {
15279      case Node.ELEMENT_NODE:
15280        const element = currentNode;
15281        const tagName = element.tagName.toLowerCase();
15282        if (VALID_ELEMENTS.hasOwnProperty(tagName)) {
15283          addCreateNodeAndAppend(create, ELEMENT_MARKER, tagName, parentIdx, newIndex);
15284          tView.data[newIndex] = tagName;
15285          const elAttrs = element.attributes;
15286          for (let i = 0; i < elAttrs.length; i++) {
15287            const attr = elAttrs.item(i);
15288            const lowerAttrName = attr.name.toLowerCase();
15289            const hasBinding2 = !!attr.value.match(BINDING_REGEXP);
15290            if (hasBinding2) {
15291              if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {
15292                if (URI_ATTRS[lowerAttrName]) {
15293                  generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, _sanitizeUrl);
15294                } else {
15295                  generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, null);
15296                }
15297              } else {
15298                ngDevMode && console.warn(`WARNING: ignoring unsafe attribute value ${lowerAttrName} on element ${tagName} (see ${XSS_SECURITY_URL})`);
15299              }
15300            } else {
15301              addCreateAttribute(create, newIndex, attr);
15302            }
15303          }
15304          const elementNode = {
15305            kind: 1,
15306            index: newIndex,
15307            children: []
15308          };
15309          ast.push(elementNode);
15310          bindingMask = walkIcuTree(elementNode.children, tView, tIcu, lView, sharedUpdateOpCodes, create, remove2, update, currentNode, newIndex, nestedIcus, depth + 1) | bindingMask;
15311          addRemoveNode(remove2, newIndex, depth);
15312        }
15313        break;
15314      case Node.TEXT_NODE:
15315        const value = currentNode.textContent || "";
15316        const hasBinding = value.match(BINDING_REGEXP);
15317        addCreateNodeAndAppend(create, null, hasBinding ? "" : value, parentIdx, newIndex);
15318        addRemoveNode(remove2, newIndex, depth);
15319        if (hasBinding) {
15320          bindingMask = generateBindingUpdateOpCodes(update, value, newIndex, null, 0, null) | bindingMask;
15321        }
15322        ast.push({
15323          kind: 0,
15324          index: newIndex
15325        });
15326        break;
15327      case Node.COMMENT_NODE:
15328        const isNestedIcu = NESTED_ICU.exec(currentNode.textContent || "");
15329        if (isNestedIcu) {
15330          const nestedIcuIndex = parseInt(isNestedIcu[1], 10);
15331          const icuExpression = nestedIcus[nestedIcuIndex];
15332          addCreateNodeAndAppend(create, ICU_MARKER, ngDevMode ? `nested ICU ${nestedIcuIndex}` : "", parentIdx, newIndex);
15333          icuStart(ast, tView, lView, sharedUpdateOpCodes, parentIdx, icuExpression, newIndex);
15334          addRemoveNestedIcu(remove2, newIndex, depth);
15335        }
15336        break;
15337    }
15338    currentNode = currentNode.nextSibling;
15339  }
15340  return bindingMask;
15341}
15342function addRemoveNode(remove2, index, depth) {
15343  if (depth === 0) {
15344    remove2.push(index);
15345  }
15346}
15347function addRemoveNestedIcu(remove2, index, depth) {
15348  if (depth === 0) {
15349    remove2.push(~index);
15350    remove2.push(index);
15351  }
15352}
15353function addUpdateIcuSwitch(update, icuExpression, index) {
15354  update.push(
15355    toMaskBit(icuExpression.mainBinding),
15356    2,
15357    -1 - icuExpression.mainBinding,
15358    index << 2 | 2
15359    /* I18nUpdateOpCode.IcuSwitch */
15360  );
15361}
15362function addUpdateIcuUpdate(update, bindingMask, index) {
15363  update.push(
15364    bindingMask,
15365    1,
15366    index << 2 | 3
15367    /* I18nUpdateOpCode.IcuUpdate */
15368  );
15369}
15370function addCreateNodeAndAppend(create, marker, text, appendToParentIdx, createAtIdx) {
15371  if (marker !== null) {
15372    create.push(marker);
15373  }
15374  create.push(text, createAtIdx, icuCreateOpCode(0, appendToParentIdx, createAtIdx));
15375}
15376function addCreateAttribute(create, newIndex, attr) {
15377  create.push(newIndex << 1 | 1, attr.name, attr.value);
15378}
15379function i18nPostprocess(message, replacements = {}) {
15380  let result = message;
15381  if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) {
15382    const matches = {};
15383    const templateIdsStack = [ROOT_TEMPLATE_ID];
15384    result = result.replace(PP_PLACEHOLDERS_REGEXP, (m, phs, tmpl) => {
15385      const content = phs || tmpl;
15386      const placeholders = matches[content] || [];
15387      if (!placeholders.length) {
15388        content.split("|").forEach((placeholder2) => {
15389          const match = placeholder2.match(PP_TEMPLATE_ID_REGEXP);
15390          const templateId2 = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID;
15391          const isCloseTemplateTag2 = PP_CLOSE_TEMPLATE_REGEXP.test(placeholder2);
15392          placeholders.push([templateId2, isCloseTemplateTag2, placeholder2]);
15393        });
15394        matches[content] = placeholders;
15395      }
15396      if (!placeholders.length) {
15397        throw new Error(`i18n postprocess: unmatched placeholder - ${content}`);
15398      }
15399      const currentTemplateId = templateIdsStack[templateIdsStack.length - 1];
15400      let idx = 0;
15401      for (let i = 0; i < placeholders.length; i++) {
15402        if (placeholders[i][0] === currentTemplateId) {
15403          idx = i;
15404          break;
15405        }
15406      }
15407      const [templateId, isCloseTemplateTag, placeholder] = placeholders[idx];
15408      if (isCloseTemplateTag) {
15409        templateIdsStack.pop();
15410      } else if (currentTemplateId !== templateId) {
15411        templateIdsStack.push(templateId);
15412      }
15413      placeholders.splice(idx, 1);
15414      return placeholder;
15415    });
15416  }
15417  if (!Object.keys(replacements).length) {
15418    return result;
15419  }
15420  result = result.replace(PP_ICU_VARS_REGEXP, (match, start, key, _type, _idx, end) => {
15421    return replacements.hasOwnProperty(key) ? `${start}${replacements[key]}${end}` : match;
15422  });
15423  result = result.replace(PP_ICU_PLACEHOLDERS_REGEXP, (match, key) => {
15424    return replacements.hasOwnProperty(key) ? replacements[key] : match;
15425  });
15426  result = result.replace(PP_ICUS_REGEXP, (match, key) => {
15427    if (replacements.hasOwnProperty(key)) {
15428      const list = replacements[key];
15429      if (!list.length) {
15430        throw new Error(`i18n postprocess: unmatched ICU - ${match} with key: ${key}`);
15431      }
15432      return list.shift();
15433    }
15434    return match;
15435  });
15436  return result;
15437}
15438function \u0275\u0275i18nStart(index, messageIndex, subTemplateIndex = -1) {
15439  const tView = getTView();
15440  const lView = getLView();
15441  const adjustedIndex = HEADER_OFFSET + index;
15442  ngDevMode && assertDefined(tView, `tView should be defined`);
15443  const message = getConstant(tView.consts, messageIndex);
15444  const parentTNode = getCurrentParentTNode();
15445  if (tView.firstCreatePass) {
15446    i18nStartFirstCreatePass(tView, parentTNode === null ? 0 : parentTNode.index, lView, adjustedIndex, message, subTemplateIndex);
15447  }
15448  if (tView.type === 2) {
15449    const componentLView = lView[DECLARATION_COMPONENT_VIEW];
15450    componentLView[FLAGS] |= 32;
15451  } else {
15452    lView[FLAGS] |= 32;
15453  }
15454  const tI18n = tView.data[adjustedIndex];
15455  const sameViewParentTNode = parentTNode === lView[T_HOST] ? null : parentTNode;
15456  const parentRNode = getClosestRElement(tView, sameViewParentTNode, lView);
15457  const insertInFrontOf = parentTNode && parentTNode.type & 8 ? lView[parentTNode.index] : null;
15458  prepareI18nBlockForHydration(lView, adjustedIndex, parentTNode, subTemplateIndex);
15459  applyCreateOpCodes(lView, tI18n.create, parentRNode, insertInFrontOf);
15460  setInI18nBlock(true);
15461}
15462function \u0275\u0275i18nEnd() {
15463  setInI18nBlock(false);
15464}
15465function \u0275\u0275i18n(index, messageIndex, subTemplateIndex) {
15466  \u0275\u0275i18nStart(index, messageIndex, subTemplateIndex);
15467  \u0275\u0275i18nEnd();
15468}
15469function \u0275\u0275i18nAttributes(index, attrsIndex) {
15470  const tView = getTView();
15471  ngDevMode && assertDefined(tView, `tView should be defined`);
15472  const attrs = getConstant(tView.consts, attrsIndex);
15473  i18nAttributesFirstPass(tView, index + HEADER_OFFSET, attrs);
15474}
15475function \u0275\u0275i18nExp(value) {
15476  const lView = getLView();
15477  setMaskBit(bindingUpdated(lView, nextBindingIndex(), value));
15478  return \u0275\u0275i18nExp;
15479}
15480function \u0275\u0275i18nApply(index) {
15481  applyI18n(getTView(), getLView(), index + HEADER_OFFSET);
15482}
15483function \u0275\u0275i18nPostprocess(message, replacements = {}) {
15484  return i18nPostprocess(message, replacements);
15485}
15486function \u0275\u0275listener(eventName, listenerFn, eventTargetResolver) {
15487  const lView = getLView();
15488  const tView = getTView();
15489  const tNode = getCurrentTNode();
15490  listenerInternal(tView, lView, lView[RENDERER], tNode, eventName, listenerFn, eventTargetResolver);
15491  return \u0275\u0275listener;
15492}
15493function \u0275\u0275syntheticHostListener(eventName, listenerFn) {
15494  const tNode = getCurrentTNode();
15495  const lView = getLView();
15496  const tView = getTView();
15497  const currentDef = getCurrentDirectiveDef(tView.data);
15498  const renderer = loadComponentRenderer(currentDef, tNode, lView);
15499  listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn);
15500  return \u0275\u0275syntheticHostListener;
15501}
15502function \u0275\u0275domListener(eventName, listenerFn, eventTargetResolver) {
15503  const lView = getLView();
15504  const tView = getTView();
15505  const tNode = getCurrentTNode();
15506  if (tNode.type & 3 || eventTargetResolver) {
15507    listenToDomEvent(tNode, tView, lView, eventTargetResolver, lView[RENDERER], eventName, listenerFn, wrapListener(tNode, lView, listenerFn));
15508  }
15509  return \u0275\u0275domListener;
15510}
15511function listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, eventTargetResolver) {
15512  ngDevMode && assertTNodeType(
15513    tNode,
15514    3 | 12
15515    /* TNodeType.AnyContainer */
15516  );
15517  let processOutputs = true;
15518  let wrappedListener = null;
15519  if (tNode.type & 3 || eventTargetResolver) {
15520    wrappedListener ??= wrapListener(tNode, lView, listenerFn);
15521    const hasCoalescedDomEvent = listenToDomEvent(tNode, tView, lView, eventTargetResolver, renderer, eventName, listenerFn, wrappedListener);
15522    if (hasCoalescedDomEvent) {
15523      processOutputs = false;
15524    }
15525  }
15526  if (processOutputs) {
15527    const outputConfig = tNode.outputs?.[eventName];
15528    const hostDirectiveOutputConfig = tNode.hostDirectiveOutputs?.[eventName];
15529    if (hostDirectiveOutputConfig && hostDirectiveOutputConfig.length) {
15530      for (let i = 0; i < hostDirectiveOutputConfig.length; i += 2) {
15531        const index = hostDirectiveOutputConfig[i];
15532        const lookupName = hostDirectiveOutputConfig[i + 1];
15533        wrappedListener ??= wrapListener(tNode, lView, listenerFn);
15534        listenToOutput(tNode, lView, index, lookupName, eventName, wrappedListener);
15535      }
15536    }
15537    if (outputConfig && outputConfig.length) {
15538      for (const index of outputConfig) {
15539        wrappedListener ??= wrapListener(tNode, lView, listenerFn);
15540        listenToOutput(tNode, lView, index, eventName, eventName, wrappedListener);
15541      }
15542    }
15543  }
15544}
15545function \u0275\u0275nextContext(level = 1) {
15546  return nextContextImpl(level);
15547}
15548function matchingProjectionSlotIndex(tNode, projectionSlots) {
15549  let wildcardNgContentIndex = null;
15550  const ngProjectAsAttrVal = getProjectAsAttrValue(tNode);
15551  for (let i = 0; i < projectionSlots.length; i++) {
15552    const slotValue = projectionSlots[i];
15553    if (slotValue === "*") {
15554      wildcardNgContentIndex = i;
15555      continue;
15556    }
15557    if (ngProjectAsAttrVal === null ? isNodeMatchingSelectorList(
15558      tNode,
15559      slotValue,
15560      /* isProjectionMode */
15561      true
15562    ) : isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) {
15563      return i;
15564    }
15565  }
15566  return wildcardNgContentIndex;
15567}
15568function \u0275\u0275projectionDef(projectionSlots) {
15569  const componentNode = getLView()[DECLARATION_COMPONENT_VIEW][T_HOST];
15570  if (!componentNode.projection) {
15571    const numProjectionSlots = projectionSlots ? projectionSlots.length : 1;
15572    const projectionHeads = componentNode.projection = newArray(numProjectionSlots, null);
15573    const tails = projectionHeads.slice();
15574    let componentChild = componentNode.child;
15575    while (componentChild !== null) {
15576      if (componentChild.type !== 128) {
15577        const slotIndex = projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0;
15578        if (slotIndex !== null) {
15579          if (tails[slotIndex]) {
15580            tails[slotIndex].projectionNext = componentChild;
15581          } else {
15582            projectionHeads[slotIndex] = componentChild;
15583          }
15584          tails[slotIndex] = componentChild;
15585        }
15586      }
15587      componentChild = componentChild.next;
15588    }
15589  }
15590}
15591function \u0275\u0275projection(nodeIndex, selectorIndex = 0, attrs, fallbackTemplateFn, fallbackDecls, fallbackVars) {
15592  const lView = getLView();
15593  const tView = getTView();
15594  const fallbackIndex = fallbackTemplateFn ? nodeIndex + 1 : null;
15595  if (fallbackIndex !== null) {
15596    declareNoDirectiveHostTemplate(lView, tView, fallbackIndex, fallbackTemplateFn, fallbackDecls, fallbackVars, null, attrs);
15597  }
15598  const tProjectionNode = getOrCreateTNode(tView, HEADER_OFFSET + nodeIndex, 16, null, attrs || null);
15599  if (tProjectionNode.projection === null) {
15600    tProjectionNode.projection = selectorIndex;
15601  }
15602  setCurrentTNodeAsNotParent();
15603  const hydrationInfo = lView[HYDRATION];
15604  const isNodeCreationMode = !hydrationInfo || isInSkipHydrationBlock();
15605  const componentHostNode = lView[DECLARATION_COMPONENT_VIEW][T_HOST];
15606  const isEmpty = componentHostNode.projection[tProjectionNode.projection] === null;
15607  if (isEmpty && fallbackIndex !== null) {
15608    insertFallbackContent(lView, tView, fallbackIndex);
15609  } else if (isNodeCreationMode && !isDetachedByI18n(tProjectionNode)) {
15610    applyProjection(tView, lView, tProjectionNode);
15611  }
15612}
15613function insertFallbackContent(lView, tView, fallbackIndex) {
15614  const adjustedIndex = HEADER_OFFSET + fallbackIndex;
15615  const fallbackTNode = tView.data[adjustedIndex];
15616  const fallbackLContainer = lView[adjustedIndex];
15617  ngDevMode && assertTNode(fallbackTNode);
15618  ngDevMode && assertLContainer(fallbackLContainer);
15619  const dehydratedView = findMatchingDehydratedView(fallbackLContainer, fallbackTNode.tView.ssrId);
15620  const fallbackLView = createAndRenderEmbeddedLView(lView, fallbackTNode, void 0, {
15621    dehydratedView
15622  });
15623  addLViewToLContainer(fallbackLContainer, fallbackLView, 0, shouldAddViewToDom(fallbackTNode, dehydratedView));
15624}
15625function \u0275\u0275contentQuery(directiveIndex, predicate, flags, read) {
15626  createContentQuery(directiveIndex, predicate, flags, read);
15627}
15628function \u0275\u0275viewQuery(predicate, flags, read) {
15629  createViewQuery(predicate, flags, read);
15630}
15631function \u0275\u0275queryRefresh(queryList) {
15632  const lView = getLView();
15633  const tView = getTView();
15634  const queryIndex = getCurrentQueryIndex();
15635  setCurrentQueryIndex(queryIndex + 1);
15636  const tQuery = getTQuery(tView, queryIndex);
15637  if (queryList.dirty && isCreationMode(lView) === ((tQuery.metadata.flags & 2) === 2)) {
15638    if (tQuery.matches === null) {
15639      queryList.reset([]);
15640    } else {
15641      const result = getQueryResults(lView, queryIndex);
15642      queryList.reset(result, unwrapElementRef);
15643      queryList.notifyOnChanges();
15644    }
15645    return true;
15646  }
15647  return false;
15648}
15649function \u0275\u0275loadQuery() {
15650  return loadQueryInternal(getLView(), getCurrentQueryIndex());
15651}
15652function \u0275\u0275contentQuerySignal(directiveIndex, target, predicate, flags, read) {
15653  bindQueryToSignal(target, createContentQuery(directiveIndex, predicate, flags, read));
15654}
15655function \u0275\u0275viewQuerySignal(target, predicate, flags, read) {
15656  bindQueryToSignal(target, createViewQuery(predicate, flags, read));
15657}
15658function \u0275\u0275queryAdvance(indexOffset = 1) {
15659  setCurrentQueryIndex(getCurrentQueryIndex() + indexOffset);
15660}
15661function \u0275\u0275reference(index) {
15662  const contextLView = getContextLView();
15663  return load(contextLView, HEADER_OFFSET + index);
15664}
15665function toTStylingRange(prev, next) {
15666  ngDevMode && assertNumberInRange(
15667    prev,
15668    0,
15669    32767
15670    /* StylingRange.UNSIGNED_MASK */
15671  );
15672  ngDevMode && assertNumberInRange(
15673    next,
15674    0,
15675    32767
15676    /* StylingRange.UNSIGNED_MASK */
15677  );
15678  return prev << 17 | next << 2;
15679}
15680function getTStylingRangePrev(tStylingRange) {
15681  ngDevMode && assertNumber(tStylingRange, "expected number");
15682  return tStylingRange >> 17 & 32767;
15683}
15684function getTStylingRangePrevDuplicate(tStylingRange) {
15685  ngDevMode && assertNumber(tStylingRange, "expected number");
15686  return (tStylingRange & 2) == 2;
15687}
15688function setTStylingRangePrev(tStylingRange, previous) {
15689  ngDevMode && assertNumber(tStylingRange, "expected number");
15690  ngDevMode && assertNumberInRange(
15691    previous,
15692    0,
15693    32767
15694    /* StylingRange.UNSIGNED_MASK */
15695  );
15696  return tStylingRange & ~4294836224 | previous << 17;
15697}
15698function setTStylingRangePrevDuplicate(tStylingRange) {
15699  ngDevMode && assertNumber(tStylingRange, "expected number");
15700  return tStylingRange | 2;
15701}
15702function getTStylingRangeNext(tStylingRange) {
15703  ngDevMode && assertNumber(tStylingRange, "expected number");
15704  return (tStylingRange & 131068) >> 2;
15705}
15706function setTStylingRangeNext(tStylingRange, next) {
15707  ngDevMode && assertNumber(tStylingRange, "expected number");
15708  ngDevMode && assertNumberInRange(
15709    next,
15710    0,
15711    32767
15712    /* StylingRange.UNSIGNED_MASK */
15713  );
15714  return tStylingRange & ~131068 | //
15715  next << 2;
15716}
15717function getTStylingRangeNextDuplicate(tStylingRange) {
15718  ngDevMode && assertNumber(tStylingRange, "expected number");
15719  return (tStylingRange & 1) === 1;
15720}
15721function setTStylingRangeNextDuplicate(tStylingRange) {
15722  ngDevMode && assertNumber(tStylingRange, "expected number");
15723  return tStylingRange | 1;
15724}
15725function insertTStylingBinding(tData, tNode, tStylingKeyWithStatic, index, isHostBinding, isClassBinding) {
15726  ngDevMode && assertFirstUpdatePass(getTView());
15727  let tBindings = isClassBinding ? tNode.classBindings : tNode.styleBindings;
15728  let tmplHead = getTStylingRangePrev(tBindings);
15729  let tmplTail = getTStylingRangeNext(tBindings);
15730  tData[index] = tStylingKeyWithStatic;
15731  let isKeyDuplicateOfStatic = false;
15732  let tStylingKey;
15733  if (Array.isArray(tStylingKeyWithStatic)) {
15734    const staticKeyValueArray = tStylingKeyWithStatic;
15735    tStylingKey = staticKeyValueArray[1];
15736    if (tStylingKey === null || keyValueArrayIndexOf(staticKeyValueArray, tStylingKey) > 0) {
15737      isKeyDuplicateOfStatic = true;
15738    }
15739  } else {
15740    tStylingKey = tStylingKeyWithStatic;
15741  }
15742  if (isHostBinding) {
15743    const hasTemplateBindings = tmplTail !== 0;
15744    if (hasTemplateBindings) {
15745      const previousNode = getTStylingRangePrev(tData[tmplHead + 1]);
15746      tData[index + 1] = toTStylingRange(previousNode, tmplHead);
15747      if (previousNode !== 0) {
15748        tData[previousNode + 1] = setTStylingRangeNext(tData[previousNode + 1], index);
15749      }
15750      tData[tmplHead + 1] = setTStylingRangePrev(tData[tmplHead + 1], index);
15751    } else {
15752      tData[index + 1] = toTStylingRange(tmplHead, 0);
15753      if (tmplHead !== 0) {
15754        tData[tmplHead + 1] = setTStylingRangeNext(tData[tmplHead + 1], index);
15755      }
15756      tmplHead = index;
15757    }
15758  } else {
15759    tData[index + 1] = toTStylingRange(tmplTail, 0);
15760    ngDevMode && assertEqual(tmplHead !== 0 && tmplTail === 0, false, "Adding template bindings after hostBindings is not allowed.");
15761    if (tmplHead === 0) {
15762      tmplHead = index;
15763    } else {
15764      tData[tmplTail + 1] = setTStylingRangeNext(tData[tmplTail + 1], index);
15765    }
15766    tmplTail = index;
15767  }
15768  if (isKeyDuplicateOfStatic) {
15769    tData[index + 1] = setTStylingRangePrevDuplicate(tData[index + 1]);
15770  }
15771  markDuplicates(tData, tStylingKey, index, true);
15772  markDuplicates(tData, tStylingKey, index, false);
15773  markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding);
15774  tBindings = toTStylingRange(tmplHead, tmplTail);
15775  if (isClassBinding) {
15776    tNode.classBindings = tBindings;
15777  } else {
15778    tNode.styleBindings = tBindings;
15779  }
15780}
15781function markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding) {
15782  const residual = isClassBinding ? tNode.residualClasses : tNode.residualStyles;
15783  if (residual != null && typeof tStylingKey == "string" && keyValueArrayIndexOf(residual, tStylingKey) >= 0) {
15784    tData[index + 1] = setTStylingRangeNextDuplicate(tData[index + 1]);
15785  }
15786}
15787function markDuplicates(tData, tStylingKey, index, isPrevDir) {
15788  const tStylingAtIndex = tData[index + 1];
15789  const isMap = tStylingKey === null;
15790  let cursor = isPrevDir ? getTStylingRangePrev(tStylingAtIndex) : getTStylingRangeNext(tStylingAtIndex);
15791  let foundDuplicate = false;
15792  while (cursor !== 0 && (foundDuplicate === false || isMap)) {
15793    ngDevMode && assertIndexInRange(tData, cursor);
15794    const tStylingValueAtCursor = tData[cursor];
15795    const tStyleRangeAtCursor = tData[cursor + 1];
15796    if (isStylingMatch(tStylingValueAtCursor, tStylingKey)) {
15797      foundDuplicate = true;
15798      tData[cursor + 1] = isPrevDir ? setTStylingRangeNextDuplicate(tStyleRangeAtCursor) : setTStylingRangePrevDuplicate(tStyleRangeAtCursor);
15799    }
15800    cursor = isPrevDir ? getTStylingRangePrev(tStyleRangeAtCursor) : getTStylingRangeNext(tStyleRangeAtCursor);
15801  }
15802  if (foundDuplicate) {
15803    tData[index + 1] = isPrevDir ? setTStylingRangePrevDuplicate(tStylingAtIndex) : setTStylingRangeNextDuplicate(tStylingAtIndex);
15804  }
15805}
15806function isStylingMatch(tStylingKeyCursor, tStylingKey) {
15807  ngDevMode && assertNotEqual(Array.isArray(tStylingKey), true, "Expected that 'tStylingKey' has been unwrapped");
15808  if (tStylingKeyCursor === null || // If the cursor is `null` it means that we have map at that
15809  // location so we must assume that we have a match.
15810  tStylingKey == null || // If `tStylingKey` is `null` then it is a map therefor assume that it
15811  // contains a match.
15812  (Array.isArray(tStylingKeyCursor) ? tStylingKeyCursor[1] : tStylingKeyCursor) === tStylingKey) {
15813    return true;
15814  } else if (Array.isArray(tStylingKeyCursor) && typeof tStylingKey === "string") {
15815    return keyValueArrayIndexOf(tStylingKeyCursor, tStylingKey) >= 0;
15816  }
15817  return false;
15818}
15819function getLastParsedKey(text) {
15820  return text.substring(parserState.key, parserState.keyEnd);
15821}
15822function getLastParsedValue(text) {
15823  return text.substring(parserState.value, parserState.valueEnd);
15824}
15825function parseClassName(text) {
15826  resetParserState(text);
15827  return parseClassNameNext(text, consumeWhitespace(text, 0, parserState.textEnd));
15828}
15829function parseClassNameNext(text, index) {
15830  const end = parserState.textEnd;
15831  if (end === index) {
15832    return -1;
15833  }
15834  index = parserState.keyEnd = consumeClassToken(text, parserState.key = index, end);
15835  return consumeWhitespace(text, index, end);
15836}
15837function parseStyle(text) {
15838  resetParserState(text);
15839  return parseStyleNext(text, consumeWhitespace(text, 0, parserState.textEnd));
15840}
15841function parseStyleNext(text, startIndex) {
15842  const end = parserState.textEnd;
15843  let index = parserState.key = consumeWhitespace(text, startIndex, end);
15844  if (end === index) {
15845    return -1;
15846  }
15847  index = parserState.keyEnd = consumeStyleKey(text, index, end);
15848  index = consumeSeparator(
15849    text,
15850    index,
15851    end,
15852    58
15853    /* CharCode.COLON */
15854  );
15855  index = parserState.value = consumeWhitespace(text, index, end);
15856  index = parserState.valueEnd = consumeStyleValue(text, index, end);
15857  return consumeSeparator(
15858    text,
15859    index,
15860    end,
15861    59
15862    /* CharCode.SEMI_COLON */
15863  );
15864}
15865function resetParserState(text) {
15866  parserState.key = 0;
15867  parserState.keyEnd = 0;
15868  parserState.value = 0;
15869  parserState.valueEnd = 0;
15870  parserState.textEnd = text.length;
15871}
15872function consumeWhitespace(text, startIndex, endIndex) {
15873  while (startIndex < endIndex && text.charCodeAt(startIndex) <= 32) {
15874    startIndex++;
15875  }
15876  return startIndex;
15877}
15878function consumeClassToken(text, startIndex, endIndex) {
15879  while (startIndex < endIndex && text.charCodeAt(startIndex) > 32) {
15880    startIndex++;
15881  }
15882  return startIndex;
15883}
15884function consumeStyleKey(text, startIndex, endIndex) {
15885  let ch;
15886  while (startIndex < endIndex && ((ch = text.charCodeAt(startIndex)) === 45 || ch === 95 || (ch & -33) >= 65 && (ch & -33) <= 90 || ch >= 48 && ch <= 57)) {
15887    startIndex++;
15888  }
15889  return startIndex;
15890}
15891function consumeSeparator(text, startIndex, endIndex, separator) {
15892  startIndex = consumeWhitespace(text, startIndex, endIndex);
15893  if (startIndex < endIndex) {
15894    if (ngDevMode && text.charCodeAt(startIndex) !== separator) {
15895      malformedStyleError(text, String.fromCharCode(separator), startIndex);
15896    }
15897    startIndex++;
15898  }
15899  return startIndex;
15900}
15901function consumeStyleValue(text, startIndex, endIndex) {
15902  let ch1 = -1;
15903  let ch2 = -1;
15904  let ch3 = -1;
15905  let i = startIndex;
15906  let lastChIndex = i;
15907  while (i < endIndex) {
15908    const ch = text.charCodeAt(i++);
15909    if (ch === 59) {
15910      return lastChIndex;
15911    } else if (ch === 34 || ch === 39) {
15912      lastChIndex = i = consumeQuotedText(text, ch, i, endIndex);
15913    } else if (startIndex === i - 4 && // We have seen only 4 characters so far "URL(" (Ignore "foo_URL()")
15914    ch3 === 85 && ch2 === 82 && ch1 === 76 && ch === 40) {
15915      lastChIndex = i = consumeQuotedText(text, 41, i, endIndex);
15916    } else if (ch > 32) {
15917      lastChIndex = i;
15918    }
15919    ch3 = ch2;
15920    ch2 = ch1;
15921    ch1 = ch & -33;
15922  }
15923  return lastChIndex;
15924}
15925function consumeQuotedText(text, quoteCharCode, startIndex, endIndex) {
15926  let ch1 = -1;
15927  let index = startIndex;
15928  while (index < endIndex) {
15929    const ch = text.charCodeAt(index++);
15930    if (ch == quoteCharCode && ch1 !== 92) {
15931      return index;
15932    }
15933    if (ch == 92 && ch1 === 92) {
15934      ch1 = 0;
15935    } else {
15936      ch1 = ch;
15937    }
15938  }
15939  throw ngDevMode ? malformedStyleError(text, String.fromCharCode(quoteCharCode), endIndex) : new Error();
15940}
15941function malformedStyleError(text, expecting, index) {
15942  ngDevMode && assertEqual(typeof text === "string", true, "String expected here");
15943  throw throwError(`Malformed style at location ${index} in string '` + text.substring(0, index) + "[>>" + text.substring(index, index + 1) + "<<]" + text.slice(index + 1) + `'. Expecting '${expecting}'.`);
15944}
15945function \u0275\u0275styleProp(prop, value, suffix) {
15946  checkStylingProperty(prop, value, suffix, false);
15947  return \u0275\u0275styleProp;
15948}
15949function \u0275\u0275classProp(className, value) {
15950  checkStylingProperty(className, value, null, true);
15951  return \u0275\u0275classProp;
15952}
15953function \u0275\u0275styleMap(styles) {
15954  checkStylingMap(styleKeyValueArraySet, styleStringParser, styles, false);
15955}
15956function styleStringParser(keyValueArray, text) {
15957  for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i)) {
15958    styleKeyValueArraySet(keyValueArray, getLastParsedKey(text), getLastParsedValue(text));
15959  }
15960}
15961function \u0275\u0275classMap(classes) {
15962  checkStylingMap(classKeyValueArraySet, classStringParser, classes, true);
15963}
15964function classStringParser(keyValueArray, text) {
15965  for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {
15966    keyValueArraySet(keyValueArray, getLastParsedKey(text), true);
15967  }
15968}
15969function checkStylingProperty(prop, value, suffix, isClassBased) {
15970  const lView = getLView();
15971  const tView = getTView();
15972  const bindingIndex = incrementBindingIndex(2);
15973  if (tView.firstUpdatePass) {
15974    stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased);
15975  }
15976  if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {
15977    const tNode = tView.data[getSelectedIndex()];
15978    updateStyling(tView, tNode, lView, lView[RENDERER], prop, lView[bindingIndex + 1] = normalizeSuffix(value, suffix), isClassBased, bindingIndex);
15979  }
15980}
15981function checkStylingMap(keyValueArraySet2, stringParser, value, isClassBased) {
15982  const tView = getTView();
15983  const bindingIndex = incrementBindingIndex(2);
15984  if (tView.firstUpdatePass) {
15985    stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased);
15986  }
15987  const lView = getLView();
15988  if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {
15989    const tNode = tView.data[getSelectedIndex()];
15990    if (hasStylingInputShadow(tNode, isClassBased) && !isInHostBindings(tView, bindingIndex)) {
15991      if (ngDevMode) {
15992        const tStylingKey = tView.data[bindingIndex];
15993        assertEqual(Array.isArray(tStylingKey) ? tStylingKey[1] : tStylingKey, false, "Styling linked list shadow input should be marked as 'false'");
15994      }
15995      let staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost;
15996      ngDevMode && isClassBased === false && staticPrefix !== null && assertEqual(staticPrefix.endsWith(";"), true, "Expecting static portion to end with ';'");
15997      if (staticPrefix !== null) {
15998        value = concatStringsWithSpace(staticPrefix, value ? value : "");
15999      }
16000      setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased);
16001    } else {
16002      updateStylingMap(tView, tNode, lView, lView[RENDERER], lView[bindingIndex + 1], lView[bindingIndex + 1] = toStylingKeyValueArray(keyValueArraySet2, stringParser, value), isClassBased, bindingIndex);
16003    }
16004  }
16005}
16006function isInHostBindings(tView, bindingIndex) {
16007  return bindingIndex >= tView.expandoStartIndex;
16008}
16009function stylingFirstUpdatePass(tView, tStylingKey, bindingIndex, isClassBased) {
16010  ngDevMode && assertFirstUpdatePass(tView);
16011  const tData = tView.data;
16012  if (tData[bindingIndex + 1] === null) {
16013    const tNode = tData[getSelectedIndex()];
16014    ngDevMode && assertDefined(tNode, "TNode expected");
16015    const isHostBindings = isInHostBindings(tView, bindingIndex);
16016    if (hasStylingInputShadow(tNode, isClassBased) && tStylingKey === null && !isHostBindings) {
16017      tStylingKey = false;
16018    }
16019    tStylingKey = wrapInStaticStylingKey(tData, tNode, tStylingKey, isClassBased);
16020    insertTStylingBinding(tData, tNode, tStylingKey, bindingIndex, isHostBindings, isClassBased);
16021  }
16022}
16023function wrapInStaticStylingKey(tData, tNode, stylingKey, isClassBased) {
16024  const hostDirectiveDef = getCurrentDirectiveDef(tData);
16025  let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;
16026  if (hostDirectiveDef === null) {
16027    const isFirstStylingInstructionInTemplate = (isClassBased ? tNode.classBindings : tNode.styleBindings) === 0;
16028    if (isFirstStylingInstructionInTemplate) {
16029      stylingKey = collectStylingFromDirectives(null, tData, tNode, stylingKey, isClassBased);
16030      stylingKey = collectStylingFromTAttrs(stylingKey, tNode.attrs, isClassBased);
16031      residual = null;
16032    }
16033  } else {
16034    const directiveStylingLast = tNode.directiveStylingLast;
16035    const isFirstStylingInstructionInHostBinding = directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef;
16036    if (isFirstStylingInstructionInHostBinding) {
16037      stylingKey = collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased);
16038      if (residual === null) {
16039        let templateStylingKey = getTemplateHeadTStylingKey(tData, tNode, isClassBased);
16040        if (templateStylingKey !== void 0 && Array.isArray(templateStylingKey)) {
16041          templateStylingKey = collectStylingFromDirectives(null, tData, tNode, templateStylingKey[1], isClassBased);
16042          templateStylingKey = collectStylingFromTAttrs(templateStylingKey, tNode.attrs, isClassBased);
16043          setTemplateHeadTStylingKey(tData, tNode, isClassBased, templateStylingKey);
16044        }
16045      } else {
16046        residual = collectResidual(tData, tNode, isClassBased);
16047      }
16048    }
16049  }
16050  if (residual !== void 0) {
16051    isClassBased ? tNode.residualClasses = residual : tNode.residualStyles = residual;
16052  }
16053  return stylingKey;
16054}
16055function getTemplateHeadTStylingKey(tData, tNode, isClassBased) {
16056  const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;
16057  if (getTStylingRangeNext(bindings) === 0) {
16058    return void 0;
16059  }
16060  return tData[getTStylingRangePrev(bindings)];
16061}
16062function setTemplateHeadTStylingKey(tData, tNode, isClassBased, tStylingKey) {
16063  const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;
16064  ngDevMode && assertNotEqual(getTStylingRangeNext(bindings), 0, "Expecting to have at least one template styling binding.");
16065  tData[getTStylingRangePrev(bindings)] = tStylingKey;
16066}
16067function collectResidual(tData, tNode, isClassBased) {
16068  let residual = void 0;
16069  const directiveEnd = tNode.directiveEnd;
16070  ngDevMode && assertNotEqual(tNode.directiveStylingLast, -1, "By the time this function gets called at least one hostBindings-node styling instruction must have executed.");
16071  for (let i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) {
16072    const attrs = tData[i].hostAttrs;
16073    residual = collectStylingFromTAttrs(residual, attrs, isClassBased);
16074  }
16075  return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased);
16076}
16077function collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased) {
16078  let currentDirective = null;
16079  const directiveEnd = tNode.directiveEnd;
16080  let directiveStylingLast = tNode.directiveStylingLast;
16081  if (directiveStylingLast === -1) {
16082    directiveStylingLast = tNode.directiveStart;
16083  } else {
16084    directiveStylingLast++;
16085  }
16086  while (directiveStylingLast < directiveEnd) {
16087    currentDirective = tData[directiveStylingLast];
16088    ngDevMode && assertDefined(currentDirective, "expected to be defined");
16089    stylingKey = collectStylingFromTAttrs(stylingKey, currentDirective.hostAttrs, isClassBased);
16090    if (currentDirective === hostDirectiveDef)
16091      break;
16092    directiveStylingLast++;
16093  }
16094  if (hostDirectiveDef !== null) {
16095    tNode.directiveStylingLast = directiveStylingLast;
16096  }
16097  return stylingKey;
16098}
16099function collectStylingFromTAttrs(stylingKey, attrs, isClassBased) {
16100  const desiredMarker = isClassBased ? 1 : 2;
16101  let currentMarker = -1;
16102  if (attrs !== null) {
16103    for (let i = 0; i < attrs.length; i++) {
16104      const item = attrs[i];
16105      if (typeof item === "number") {
16106        currentMarker = item;
16107      } else {
16108        if (currentMarker === desiredMarker) {
16109          if (!Array.isArray(stylingKey)) {
16110            stylingKey = stylingKey === void 0 ? [] : ["", stylingKey];
16111          }
16112          keyValueArraySet(stylingKey, item, isClassBased ? true : attrs[++i]);
16113        }
16114      }
16115    }
16116  }
16117  return stylingKey === void 0 ? null : stylingKey;
16118}
16119function toStylingKeyValueArray(keyValueArraySet2, stringParser, value) {
16120  if (value == null || value === "")
16121    return EMPTY_ARRAY;
16122  const styleKeyValueArray = [];
16123  const unwrappedValue = unwrapSafeValue(value);
16124  if (Array.isArray(unwrappedValue)) {
16125    for (let i = 0; i < unwrappedValue.length; i++) {
16126      keyValueArraySet2(styleKeyValueArray, unwrappedValue[i], true);
16127    }
16128  } else if (typeof unwrappedValue === "object") {
16129    for (const key in unwrappedValue) {
16130      if (unwrappedValue.hasOwnProperty(key)) {
16131        keyValueArraySet2(styleKeyValueArray, key, unwrappedValue[key]);
16132      }
16133    }
16134  } else if (typeof unwrappedValue === "string") {
16135    stringParser(styleKeyValueArray, unwrappedValue);
16136  } else {
16137    ngDevMode && throwError("Unsupported styling type: " + typeof unwrappedValue + " (" + unwrappedValue + ")");
16138  }
16139  return styleKeyValueArray;
16140}
16141function styleKeyValueArraySet(keyValueArray, key, value) {
16142  keyValueArraySet(keyValueArray, key, unwrapSafeValue(value));
16143}
16144function classKeyValueArraySet(keyValueArray, key, value) {
16145  const stringKey = String(key);
16146  if (stringKey !== "" && !stringKey.includes(" ")) {
16147    keyValueArraySet(keyValueArray, stringKey, value);
16148  }
16149}
16150function updateStylingMap(tView, tNode, lView, renderer, oldKeyValueArray, newKeyValueArray, isClassBased, bindingIndex) {
16151  if (oldKeyValueArray === NO_CHANGE) {
16152    oldKeyValueArray = EMPTY_ARRAY;
16153  }
16154  let oldIndex = 0;
16155  let newIndex = 0;
16156  let oldKey = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null;
16157  let newKey = 0 < newKeyValueArray.length ? newKeyValueArray[0] : null;
16158  while (oldKey !== null || newKey !== null) {
16159    ngDevMode && assertLessThan(oldIndex, 999, "Are we stuck in infinite loop?");
16160    ngDevMode && assertLessThan(newIndex, 999, "Are we stuck in infinite loop?");
16161    const oldValue = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : void 0;
16162    const newValue = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : void 0;
16163    let setKey = null;
16164    let setValue = void 0;
16165    if (oldKey === newKey) {
16166      oldIndex += 2;
16167      newIndex += 2;
16168      if (oldValue !== newValue) {
16169        setKey = newKey;
16170        setValue = newValue;
16171      }
16172    } else if (newKey === null || oldKey !== null && oldKey < newKey) {
16173      oldIndex += 2;
16174      setKey = oldKey;
16175    } else {
16176      ngDevMode && assertDefined(newKey, "Expecting to have a valid key");
16177      newIndex += 2;
16178      setKey = newKey;
16179      setValue = newValue;
16180    }
16181    if (setKey !== null) {
16182      updateStyling(tView, tNode, lView, renderer, setKey, setValue, isClassBased, bindingIndex);
16183    }
16184    oldKey = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex] : null;
16185    newKey = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex] : null;
16186  }
16187}
16188function updateStyling(tView, tNode, lView, renderer, prop, value, isClassBased, bindingIndex) {
16189  if (!(tNode.type & 3)) {
16190    return;
16191  }
16192  const tData = tView.data;
16193  const tRange = tData[bindingIndex + 1];
16194  const higherPriorityValue = getTStylingRangeNextDuplicate(tRange) ? findStylingValue(tData, tNode, lView, prop, getTStylingRangeNext(tRange), isClassBased) : void 0;
16195  if (!isStylingValuePresent(higherPriorityValue)) {
16196    if (!isStylingValuePresent(value)) {
16197      if (getTStylingRangePrevDuplicate(tRange)) {
16198        value = findStylingValue(tData, null, lView, prop, bindingIndex, isClassBased);
16199      }
16200    }
16201    const rNode = getNativeByIndex(getSelectedIndex(), lView);
16202    applyStyling(renderer, isClassBased, rNode, prop, value);
16203  }
16204}
16205function findStylingValue(tData, tNode, lView, prop, index, isClassBased) {
16206  const isPrevDirection = tNode === null;
16207  let value = void 0;
16208  while (index > 0) {
16209    const rawKey = tData[index];
16210    const containsStatics = Array.isArray(rawKey);
16211    const key = containsStatics ? rawKey[1] : rawKey;
16212    const isStylingMap = key === null;
16213    let valueAtLViewIndex = lView[index + 1];
16214    if (valueAtLViewIndex === NO_CHANGE) {
16215      valueAtLViewIndex = isStylingMap ? EMPTY_ARRAY : void 0;
16216    }
16217    let currentValue = isStylingMap ? keyValueArrayGet(valueAtLViewIndex, prop) : key === prop ? valueAtLViewIndex : void 0;
16218    if (containsStatics && !isStylingValuePresent(currentValue)) {
16219      currentValue = keyValueArrayGet(rawKey, prop);
16220    }
16221    if (isStylingValuePresent(currentValue)) {
16222      value = currentValue;
16223      if (isPrevDirection) {
16224        return value;
16225      }
16226    }
16227    const tRange = tData[index + 1];
16228    index = isPrevDirection ? getTStylingRangePrev(tRange) : getTStylingRangeNext(tRange);
16229  }
16230  if (tNode !== null) {
16231    let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;
16232    if (residual != null) {
16233      value = keyValueArrayGet(residual, prop);
16234    }
16235  }
16236  return value;
16237}
16238function isStylingValuePresent(value) {
16239  return value !== void 0;
16240}
16241function normalizeSuffix(value, suffix) {
16242  if (value == null || value === "") ;
16243  else if (typeof suffix === "string") {
16244    value = value + suffix;
16245  } else if (typeof value === "object") {
16246    value = stringify(unwrapSafeValue(value));
16247  }
16248  return value;
16249}
16250function hasStylingInputShadow(tNode, isClassBased) {
16251  return (tNode.flags & (isClassBased ? 8 : 16)) !== 0;
16252}
16253function \u0275\u0275text(index, value = "") {
16254  const lView = getLView();
16255  const tView = getTView();
16256  const adjustedIndex = index + HEADER_OFFSET;
16257  ngDevMode && assertTNodeCreationIndex(lView, index);
16258  const tNode = tView.firstCreatePass ? getOrCreateTNode(tView, adjustedIndex, 1, value, null) : tView.data[adjustedIndex];
16259  const textNative = _locateOrCreateTextNode(tView, lView, tNode, value, index);
16260  lView[adjustedIndex] = textNative;
16261  if (wasLastNodeCreated()) {
16262    appendChild(tView, lView, textNative, tNode);
16263  }
16264  setCurrentTNode(tNode, false);
16265}
16266function interpolationV(lView, values) {
16267  ngDevMode && assertLessThan(2, values.length, "should have at least 3 values");
16268  let isBindingUpdated = false;
16269  let bindingIndex = getBindingIndex();
16270  for (let i = 1; i < values.length; i += 2) {
16271    isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[i]) || isBindingUpdated;
16272  }
16273  setBindingIndex(bindingIndex);
16274  if (!isBindingUpdated) {
16275    return NO_CHANGE;
16276  }
16277  let content = values[0];
16278  for (let i = 1; i < values.length; i += 2) {
16279    content += renderStringify(values[i]) + (i + 1 !== values.length ? values[i + 1] : "");
16280  }
16281  return content;
16282}
16283function interpolation1(lView, prefix, v0, suffix = "") {
16284  const different = bindingUpdated(lView, nextBindingIndex(), v0);
16285  return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;
16286}
16287function interpolation2(lView, prefix, v0, i0, v1, suffix = "") {
16288  const bindingIndex = getBindingIndex();
16289  const different = bindingUpdated2(lView, bindingIndex, v0, v1);
16290  incrementBindingIndex(2);
16291  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;
16292}
16293function interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix = "") {
16294  const bindingIndex = getBindingIndex();
16295  const different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);
16296  incrementBindingIndex(3);
16297  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix : NO_CHANGE;
16298}
16299function interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix = "") {
16300  const bindingIndex = getBindingIndex();
16301  const different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);
16302  incrementBindingIndex(4);
16303  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + suffix : NO_CHANGE;
16304}
16305function interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix = "") {
16306  const bindingIndex = getBindingIndex();
16307  let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);
16308  different = bindingUpdated(lView, bindingIndex + 4, v4) || different;
16309  incrementBindingIndex(5);
16310  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + suffix : NO_CHANGE;
16311}
16312function interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix = "") {
16313  const bindingIndex = getBindingIndex();
16314  let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);
16315  different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;
16316  incrementBindingIndex(6);
16317  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + suffix : NO_CHANGE;
16318}
16319function interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix = "") {
16320  const bindingIndex = getBindingIndex();
16321  let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);
16322  different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;
16323  incrementBindingIndex(7);
16324  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 + renderStringify(v6) + suffix : NO_CHANGE;
16325}
16326function interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix = "") {
16327  const bindingIndex = getBindingIndex();
16328  let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);
16329  different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;
16330  incrementBindingIndex(8);
16331  return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 + renderStringify(v6) + i6 + renderStringify(v7) + suffix : NO_CHANGE;
16332}
16333function \u0275\u0275textInterpolate(v0) {
16334  \u0275\u0275textInterpolate1("", v0);
16335  return \u0275\u0275textInterpolate;
16336}
16337function \u0275\u0275textInterpolate1(prefix, v0, suffix) {
16338  const lView = getLView();
16339  const interpolated = interpolation1(lView, prefix, v0, suffix);
16340  if (interpolated !== NO_CHANGE) {
16341    textBindingInternal(lView, getSelectedIndex(), interpolated);
16342  }
16343  return \u0275\u0275textInterpolate1;
16344}
16345function \u0275\u0275textInterpolate2(prefix, v0, i0, v1, suffix) {
16346  const lView = getLView();
16347  const interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix);
16348  if (interpolated !== NO_CHANGE) {
16349    textBindingInternal(lView, getSelectedIndex(), interpolated);
16350  }
16351  return \u0275\u0275textInterpolate2;
16352}
16353function \u0275\u0275textInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {
16354  const lView = getLView();
16355  const interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);
16356  if (interpolated !== NO_CHANGE) {
16357    textBindingInternal(lView, getSelectedIndex(), interpolated);
16358  }
16359  return \u0275\u0275textInterpolate3;
16360}
16361function \u0275\u0275textInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {
16362  const lView = getLView();
16363  const interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);
16364  if (interpolated !== NO_CHANGE) {
16365    textBindingInternal(lView, getSelectedIndex(), interpolated);
16366  }
16367  return \u0275\u0275textInterpolate4;
16368}
16369function \u0275\u0275textInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {
16370  const lView = getLView();
16371  const interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);
16372  if (interpolated !== NO_CHANGE) {
16373    textBindingInternal(lView, getSelectedIndex(), interpolated);
16374  }
16375  return \u0275\u0275textInterpolate5;
16376}
16377function \u0275\u0275textInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {
16378  const lView = getLView();
16379  const interpolated = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);
16380  if (interpolated !== NO_CHANGE) {
16381    textBindingInternal(lView, getSelectedIndex(), interpolated);
16382  }
16383  return \u0275\u0275textInterpolate6;
16384}
16385function \u0275\u0275textInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {
16386  const lView = getLView();
16387  const interpolated = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);
16388  if (interpolated !== NO_CHANGE) {
16389    textBindingInternal(lView, getSelectedIndex(), interpolated);
16390  }
16391  return \u0275\u0275textInterpolate7;
16392}
16393function \u0275\u0275textInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {
16394  const lView = getLView();
16395  const interpolated = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);
16396  if (interpolated !== NO_CHANGE) {
16397    textBindingInternal(lView, getSelectedIndex(), interpolated);
16398  }
16399  return \u0275\u0275textInterpolate8;
16400}
16401function \u0275\u0275textInterpolateV(values) {
16402  const lView = getLView();
16403  const interpolated = interpolationV(lView, values);
16404  if (interpolated !== NO_CHANGE) {
16405    textBindingInternal(lView, getSelectedIndex(), interpolated);
16406  }
16407  return \u0275\u0275textInterpolateV;
16408}
16409function textBindingInternal(lView, index, value) {
16410  ngDevMode && assertString(value, "Value should be a string");
16411  ngDevMode && assertNotSame(value, NO_CHANGE, "value should not be NO_CHANGE");
16412  ngDevMode && assertIndexInRange(lView, index);
16413  const element = getNativeByIndex(index, lView);
16414  ngDevMode && assertDefined(element, "native element should exist");
16415  updateTextNode(lView[RENDERER], element, value);
16416}
16417function \u0275\u0275twoWayProperty(propName, value, sanitizer) {
16418  if (isWritableSignal(value)) {
16419    value = value();
16420  }
16421  const lView = getLView();
16422  const bindingIndex = nextBindingIndex();
16423  if (bindingUpdated(lView, bindingIndex, value)) {
16424    const tView = getTView();
16425    const tNode = getSelectedTNode();
16426    setPropertyAndInputs(tNode, lView, propName, value, lView[RENDERER], sanitizer);
16427    ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);
16428  }
16429  return \u0275\u0275twoWayProperty;
16430}
16431function \u0275\u0275twoWayBindingSet(target, value) {
16432  const canWrite = isWritableSignal(target);
16433  canWrite && target.set(value);
16434  return canWrite;
16435}
16436function \u0275\u0275twoWayListener(eventName, listenerFn) {
16437  const lView = getLView();
16438  const tView = getTView();
16439  const tNode = getCurrentTNode();
16440  listenerInternal(tView, lView, lView[RENDERER], tNode, eventName, listenerFn);
16441  return \u0275\u0275twoWayListener;
16442}
16443function \u0275\u0275declareLet(index) {
16444  const tView = getTView();
16445  const lView = getLView();
16446  const adjustedIndex = index + HEADER_OFFSET;
16447  const tNode = getOrCreateTNode(tView, adjustedIndex, 128, null, null);
16448  setCurrentTNode(tNode, false);
16449  store(tView, lView, adjustedIndex, UNINITIALIZED_LET);
16450  return \u0275\u0275declareLet;
16451}
16452function \u0275\u0275storeLet(value) {
16453  performanceMarkFeature("NgLet");
16454  const tView = getTView();
16455  const lView = getLView();
16456  const index = getSelectedIndex();
16457  store(tView, lView, index, value);
16458  return value;
16459}
16460function \u0275\u0275readContextLet(index) {
16461  const contextLView = getContextLView();
16462  const value = load(contextLView, HEADER_OFFSET + index);
16463  if (value === UNINITIALIZED_LET) {
16464    throw new RuntimeError(314, ngDevMode && "Attempting to access a @let declaration whose value is not available yet");
16465  }
16466  return value;
16467}
16468function \u0275\u0275attachSourceLocations(templatePath, locations) {
16469  const tView = getTView();
16470  const lView = getLView();
16471  const renderer = lView[RENDERER];
16472  const attributeName2 = "data-ng-source-location";
16473  for (const [index, offset, line, column] of locations) {
16474    const tNode = getTNode(tView, index + HEADER_OFFSET);
16475    ngDevMode && assertTNodeType(
16476      tNode,
16477      2
16478      /* TNodeType.Element */
16479    );
16480    const node = getNativeByIndex(index + HEADER_OFFSET, lView);
16481    if (!node.hasAttribute(attributeName2)) {
16482      const attributeValue = `${templatePath}@o:${offset},l:${line},c:${column}`;
16483      renderer.setAttribute(node, attributeName2, attributeValue);
16484    }
16485  }
16486}
16487function \u0275\u0275interpolate(v0) {
16488  return bindingUpdated(getLView(), nextBindingIndex(), v0) ? renderStringify(v0) : NO_CHANGE;
16489}
16490function \u0275\u0275interpolate1(prefix, v0, suffix = "") {
16491  return interpolation1(getLView(), prefix, v0, suffix);
16492}
16493function \u0275\u0275interpolate2(prefix, v0, i0, v1, suffix = "") {
16494  return interpolation2(getLView(), prefix, v0, i0, v1, suffix);
16495}
16496function \u0275\u0275interpolate3(prefix, v0, i0, v1, i1, v2, suffix = "") {
16497  return interpolation3(getLView(), prefix, v0, i0, v1, i1, v2, suffix);
16498}
16499function \u0275\u0275interpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix = "") {
16500  return interpolation4(getLView(), prefix, v0, i0, v1, i1, v2, i2, v3, suffix);
16501}
16502function \u0275\u0275interpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix = "") {
16503  return interpolation5(getLView(), prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);
16504}
16505function \u0275\u0275interpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix = "") {
16506  return interpolation6(getLView(), prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);
16507}
16508function \u0275\u0275interpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix = "") {
16509  return interpolation7(getLView(), prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);
16510}
16511function \u0275\u0275interpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix = "") {
16512  return interpolation8(getLView(), prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);
16513}
16514function \u0275\u0275interpolateV(values) {
16515  return interpolationV(getLView(), values);
16516}
16517function providersResolver(def, providers, viewProviders) {
16518  const tView = getTView();
16519  if (tView.firstCreatePass) {
16520    const isComponent2 = isComponentDef(def);
16521    resolveProvider(viewProviders, tView.data, tView.blueprint, isComponent2, true);
16522    resolveProvider(providers, tView.data, tView.blueprint, isComponent2, false);
16523  }
16524}
16525function resolveProvider(provider, tInjectables, lInjectablesBlueprint, isComponent2, isViewProvider) {
16526  provider = resolveForwardRef(provider);
16527  if (Array.isArray(provider)) {
16528    for (let i = 0; i < provider.length; i++) {
16529      resolveProvider(provider[i], tInjectables, lInjectablesBlueprint, isComponent2, isViewProvider);
16530    }
16531  } else {
16532    const tView = getTView();
16533    const lView = getLView();
16534    const tNode = getCurrentTNode();
16535    let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);
16536    const providerFactory = providerToFactory(provider);
16537    if (ngDevMode) {
16538      const injector = new NodeInjector(tNode, lView);
16539      runInInjectorProfilerContext(injector, token, () => {
16540        emitProviderConfiguredEvent(provider, isViewProvider);
16541      });
16542    }
16543    const beginIndex = tNode.providerIndexes & 1048575;
16544    const endIndex = tNode.directiveStart;
16545    const cptViewProvidersCount = tNode.providerIndexes >> 20;
16546    if (isTypeProvider(provider) || !provider.multi) {
16547      const factory = new NodeInjectorFactory(providerFactory, isViewProvider, \u0275\u0275directiveInject, ngDevMode ? providerName(provider) : null);
16548      const existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex);
16549      if (existingFactoryIndex === -1) {
16550        diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);
16551        registerDestroyHooksIfSupported(tView, provider, tInjectables.length);
16552        tInjectables.push(token);
16553        tNode.directiveStart++;
16554        tNode.directiveEnd++;
16555        if (isViewProvider) {
16556          tNode.providerIndexes += 1048576;
16557        }
16558        lInjectablesBlueprint.push(factory);
16559        lView.push(factory);
16560      } else {
16561        lInjectablesBlueprint[existingFactoryIndex] = factory;
16562        lView[existingFactoryIndex] = factory;
16563      }
16564    } else {
16565      const existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);
16566      const existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);
16567      const doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingProvidersFactoryIndex];
16568      const doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingViewProvidersFactoryIndex];
16569      if (isViewProvider && !doesViewProvidersFactoryExist || !isViewProvider && !doesProvidersFactoryExist) {
16570        diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);
16571        const factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent2, providerFactory, provider);
16572        if (!isViewProvider && doesViewProvidersFactoryExist) {
16573          lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;
16574        }
16575        registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);
16576        tInjectables.push(token);
16577        tNode.directiveStart++;
16578        tNode.directiveEnd++;
16579        if (isViewProvider) {
16580          tNode.providerIndexes += 1048576;
16581        }
16582        lInjectablesBlueprint.push(factory);
16583        lView.push(factory);
16584      } else {
16585        const indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent2);
16586        registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex : existingViewProvidersFactoryIndex, indexInFactory);
16587      }
16588      if (!isViewProvider && isComponent2 && doesViewProvidersFactoryExist) {
16589        lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;
16590      }
16591    }
16592  }
16593}
16594function registerDestroyHooksIfSupported(tView, provider, contextIndex, indexInFactory) {
16595  const providerIsTypeProvider = isTypeProvider(provider);
16596  const providerIsClassProvider = isClassProvider(provider);
16597  if (providerIsTypeProvider || providerIsClassProvider) {
16598    const classToken = providerIsClassProvider ? resolveForwardRef(provider.useClass) : provider;
16599    const prototype = classToken.prototype;
16600    const ngOnDestroy = prototype.ngOnDestroy;
16601    if (ngOnDestroy) {
16602      const hooks = tView.destroyHooks || (tView.destroyHooks = []);
16603      if (!providerIsTypeProvider && provider.multi) {
16604        ngDevMode && assertDefined(indexInFactory, "indexInFactory when registering multi factory destroy hook");
16605        const existingCallbacksIndex = hooks.indexOf(contextIndex);
16606        if (existingCallbacksIndex === -1) {
16607          hooks.push(contextIndex, [indexInFactory, ngOnDestroy]);
16608        } else {
16609          hooks[existingCallbacksIndex + 1].push(indexInFactory, ngOnDestroy);
16610        }
16611      } else {
16612        hooks.push(contextIndex, ngOnDestroy);
16613      }
16614    }
16615  }
16616}
16617function multiFactoryAdd(multiFactory2, factory, isComponentProvider) {
16618  if (isComponentProvider) {
16619    multiFactory2.componentProviders++;
16620  }
16621  return multiFactory2.multi.push(factory) - 1;
16622}
16623function indexOf(item, arr, begin, end) {
16624  for (let i = begin; i < end; i++) {
16625    if (arr[i] === item)
16626      return i;
16627  }
16628  return -1;
16629}
16630function multiProvidersFactoryResolver(_, flags, tData, lData, tNode) {
16631  return multiResolve(this.multi, []);
16632}
16633function multiViewProvidersFactoryResolver(_, _flags, _tData, lView, tNode) {
16634  const factories = this.multi;
16635  let result;
16636  if (this.providerFactory) {
16637    const componentCount = this.providerFactory.componentProviders;
16638    const multiProviders = getNodeInjectable(lView, lView[TVIEW], this.providerFactory.index, tNode);
16639    result = multiProviders.slice(0, componentCount);
16640    multiResolve(factories, result);
16641    for (let i = componentCount; i < multiProviders.length; i++) {
16642      result.push(multiProviders[i]);
16643    }
16644  } else {
16645    result = [];
16646    multiResolve(factories, result);
16647  }
16648  return result;
16649}
16650function multiResolve(factories, result) {
16651  for (let i = 0; i < factories.length; i++) {
16652    const factory = factories[i];
16653    result.push(factory());
16654  }
16655  return result;
16656}
16657function multiFactory(factoryFn, index, isViewProvider, isComponent2, f, provider) {
16658  const factory = new NodeInjectorFactory(factoryFn, isViewProvider, \u0275\u0275directiveInject, ngDevMode ? providerName(provider) : null);
16659  factory.multi = [];
16660  factory.index = index;
16661  factory.componentProviders = 0;
16662  multiFactoryAdd(factory, f, isComponent2 && !isViewProvider);
16663  return factory;
16664}
16665function providerName(provider) {
16666  if (Array.isArray(provider)) {
16667    return null;
16668  }
16669  if (isTypeProvider(provider)) {
16670    return provider.name;
16671  } else if (isClassProvider(provider)) {
16672    if (provider.provide instanceof InjectionToken) {
16673      return `('${provider.provide.toString()}':${provider.useClass.name})`;
16674    }
16675    return provider.useClass.name;
16676  } else if (provider.provide instanceof InjectionToken) {
16677    return provider.provide.toString();
16678  } else if (typeof provider.provide === "string") {
16679    return provider.provide;
16680  } else {
16681    return null;
16682  }
16683}
16684function \u0275\u0275ProvidersFeature(providers, viewProviders = []) {
16685  return (definition) => {
16686    definition.providersResolver = (def, processProvidersFn) => {
16687      return providersResolver(
16688        def,
16689        //
16690        processProvidersFn ? processProvidersFn(providers) : providers,
16691        //
16692        viewProviders
16693      );
16694    };
16695  };
16696}
16697function \u0275\u0275ExternalStylesFeature(styleUrls) {
16698  return (definition) => {
16699    if (styleUrls.length < 1) {
16700      return;
16701    }
16702    definition.getExternalStyles = (encapsulationId) => {
16703      const urls = styleUrls.map((value) => value + "?ngcomp" + (encapsulationId ? "=" + encodeURIComponent(encapsulationId) : "") + "&e=" + definition.encapsulation);
16704      return urls;
16705    };
16706  };
16707}
16708function \u0275\u0275setComponentScope(type, directives, pipes) {
16709  const def = type.\u0275cmp;
16710  def.directiveDefs = extractDefListOrFactory(directives, extractDirectiveDef);
16711  def.pipeDefs = extractDefListOrFactory(pipes, getPipeDef);
16712}
16713function \u0275\u0275setNgModuleScope(type, scope) {
16714  return noSideEffects(() => {
16715    const ngModuleDef = getNgModuleDefOrThrow(type);
16716    ngModuleDef.declarations = convertToTypeArray(scope.declarations || EMPTY_ARRAY);
16717    ngModuleDef.imports = convertToTypeArray(scope.imports || EMPTY_ARRAY);
16718    ngModuleDef.exports = convertToTypeArray(scope.exports || EMPTY_ARRAY);
16719    if (scope.bootstrap) {
16720      ngModuleDef.bootstrap = convertToTypeArray(scope.bootstrap);
16721    }
16722    depsTracker.registerNgModule(type, scope);
16723  });
16724}
16725function convertToTypeArray(values) {
16726  if (typeof values === "function") {
16727    return values;
16728  }
16729  const flattenValues = flatten(values);
16730  if (flattenValues.some(isForwardRef)) {
16731    return () => flattenValues.map(resolveForwardRef).map(maybeUnwrapModuleWithProviders);
16732  } else {
16733    return flattenValues.map(maybeUnwrapModuleWithProviders);
16734  }
16735}
16736function maybeUnwrapModuleWithProviders(value) {
16737  return isModuleWithProviders(value) ? value.ngModule : value;
16738}
16739function \u0275\u0275pureFunction0(slotOffset, pureFn, thisArg) {
16740  const bindingIndex = getBindingRoot() + slotOffset;
16741  const lView = getLView();
16742  return lView[bindingIndex] === NO_CHANGE ? updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) : getBinding(lView, bindingIndex);
16743}
16744function \u0275\u0275pureFunction1(slotOffset, pureFn, exp, thisArg) {
16745  return pureFunction1Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp, thisArg);
16746}
16747function \u0275\u0275pureFunction2(slotOffset, pureFn, exp1, exp2, thisArg) {
16748  return pureFunction2Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, thisArg);
16749}
16750function \u0275\u0275pureFunction3(slotOffset, pureFn, exp1, exp2, exp3, thisArg) {
16751  return pureFunction3Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, thisArg);
16752}
16753function \u0275\u0275pureFunction4(slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {
16754  return pureFunction4Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg);
16755}
16756function \u0275\u0275pureFunction5(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) {
16757  const bindingIndex = getBindingRoot() + slotOffset;
16758  const lView = getLView();
16759  const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);
16760  return bindingUpdated(lView, bindingIndex + 4, exp5) || different ? updateBinding(lView, bindingIndex + 5, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) : pureFn(exp1, exp2, exp3, exp4, exp5)) : getBinding(lView, bindingIndex + 5);
16761}
16762function \u0275\u0275pureFunction6(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) {
16763  const bindingIndex = getBindingRoot() + slotOffset;
16764  const lView = getLView();
16765  const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);
16766  return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different ? updateBinding(lView, bindingIndex + 6, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) : pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) : getBinding(lView, bindingIndex + 6);
16767}
16768function \u0275\u0275pureFunction7(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {
16769  const bindingIndex = getBindingRoot() + slotOffset;
16770  const lView = getLView();
16771  let different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);
16772  return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different ? updateBinding(lView, bindingIndex + 7, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) : pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) : getBinding(lView, bindingIndex + 7);
16773}
16774function \u0275\u0275pureFunction8(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {
16775  const bindingIndex = getBindingRoot() + slotOffset;
16776  const lView = getLView();
16777  const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);
16778  return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different ? updateBinding(lView, bindingIndex + 8, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) : pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) : getBinding(lView, bindingIndex + 8);
16779}
16780function \u0275\u0275pureFunctionV(slotOffset, pureFn, exps, thisArg) {
16781  return pureFunctionVInternal(getLView(), getBindingRoot(), slotOffset, pureFn, exps, thisArg);
16782}
16783function getPureFunctionReturnValue(lView, returnValueIndex) {
16784  ngDevMode && assertIndexInRange(lView, returnValueIndex);
16785  const lastReturnValue = lView[returnValueIndex];
16786  return lastReturnValue === NO_CHANGE ? void 0 : lastReturnValue;
16787}
16788function pureFunction1Internal(lView, bindingRoot, slotOffset, pureFn, exp, thisArg) {
16789  const bindingIndex = bindingRoot + slotOffset;
16790  return bindingUpdated(lView, bindingIndex, exp) ? updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) : getPureFunctionReturnValue(lView, bindingIndex + 1);
16791}
16792function pureFunction2Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, thisArg) {
16793  const bindingIndex = bindingRoot + slotOffset;
16794  return bindingUpdated2(lView, bindingIndex, exp1, exp2) ? updateBinding(lView, bindingIndex + 2, thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) : getPureFunctionReturnValue(lView, bindingIndex + 2);
16795}
16796function pureFunction3Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, thisArg) {
16797  const bindingIndex = bindingRoot + slotOffset;
16798  return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) ? updateBinding(lView, bindingIndex + 3, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) : getPureFunctionReturnValue(lView, bindingIndex + 3);
16799}
16800function pureFunction4Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {
16801  const bindingIndex = bindingRoot + slotOffset;
16802  return bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) ? updateBinding(lView, bindingIndex + 4, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) : getPureFunctionReturnValue(lView, bindingIndex + 4);
16803}
16804function pureFunctionVInternal(lView, bindingRoot, slotOffset, pureFn, exps, thisArg) {
16805  let bindingIndex = bindingRoot + slotOffset;
16806  let different = false;
16807  for (let i = 0; i < exps.length; i++) {
16808    bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);
16809  }
16810  return different ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps)) : getPureFunctionReturnValue(lView, bindingIndex);
16811}
16812function \u0275\u0275pipe(index, pipeName) {
16813  const tView = getTView();
16814  let pipeDef;
16815  const adjustedIndex = index + HEADER_OFFSET;
16816  if (tView.firstCreatePass) {
16817    pipeDef = getPipeDef2(pipeName, tView.pipeRegistry);
16818    tView.data[adjustedIndex] = pipeDef;
16819    if (pipeDef.onDestroy) {
16820      (tView.destroyHooks ??= []).push(adjustedIndex, pipeDef.onDestroy);
16821    }
16822  } else {
16823    pipeDef = tView.data[adjustedIndex];
16824  }
16825  const pipeFactory = pipeDef.factory || (pipeDef.factory = getFactoryDef(pipeDef.type, true));
16826  let previousInjectorProfilerContext;
16827  if (ngDevMode) {
16828    previousInjectorProfilerContext = setInjectorProfilerContext({
16829      injector: new NodeInjector(getCurrentTNode(), getLView()),
16830      token: pipeDef.type
16831    });
16832  }
16833  const previousInjectImplementation = setInjectImplementation(\u0275\u0275directiveInject);
16834  try {
16835    const previousIncludeViewProviders = setIncludeViewProviders(false);
16836    const pipeInstance = pipeFactory();
16837    setIncludeViewProviders(previousIncludeViewProviders);
16838    store(tView, getLView(), adjustedIndex, pipeInstance);
16839    return pipeInstance;
16840  } finally {
16841    setInjectImplementation(previousInjectImplementation);
16842    ngDevMode && setInjectorProfilerContext(previousInjectorProfilerContext);
16843  }
16844}
16845function getPipeDef2(name, registry) {
16846  if (registry) {
16847    if (ngDevMode) {
16848      const pipes = registry.filter((pipe) => pipe.name === name);
16849      if (pipes.length > 1) {
16850        console.warn(formatRuntimeError(313, getMultipleMatchingPipesMessage(name)));
16851      }
16852    }
16853    for (let i = registry.length - 1; i >= 0; i--) {
16854      const pipeDef = registry[i];
16855      if (name === pipeDef.name) {
16856        return pipeDef;
16857      }
16858    }
16859  }
16860  if (ngDevMode) {
16861    throw new RuntimeError(-302, getPipeNotFoundErrorMessage(name));
16862  }
16863  return;
16864}
16865function getMultipleMatchingPipesMessage(name) {
16866  const lView = getLView();
16867  const declarationLView = lView[DECLARATION_COMPONENT_VIEW];
16868  const context2 = declarationLView[CONTEXT];
16869  const hostIsStandalone = isHostComponentStandalone(lView);
16870  const componentInfoMessage = context2 ? ` in the '${context2.constructor.name}' component` : "";
16871  const verifyMessage = `check ${hostIsStandalone ? "'@Component.imports' of this component" : "the imports of this module"}`;
16872  const errorMessage = `Multiple pipes match the name \`${name}\`${componentInfoMessage}. ${verifyMessage}`;
16873  return errorMessage;
16874}
16875function getPipeNotFoundErrorMessage(name) {
16876  const lView = getLView();
16877  const declarationLView = lView[DECLARATION_COMPONENT_VIEW];
16878  const context2 = declarationLView[CONTEXT];
16879  const hostIsStandalone = isHostComponentStandalone(lView);
16880  const componentInfoMessage = context2 ? ` in the '${context2.constructor.name}' component` : "";
16881  const verifyMessage = `Verify that it is ${hostIsStandalone ? "included in the '@Component.imports' of this component" : "declared or imported in this module"}`;
16882  const errorMessage = `The pipe '${name}' could not be found${componentInfoMessage}. ${verifyMessage}`;
16883  return errorMessage;
16884}
16885function \u0275\u0275pipeBind1(index, offset, v1) {
16886  const adjustedIndex = index + HEADER_OFFSET;
16887  const lView = getLView();
16888  const pipeInstance = load(lView, adjustedIndex);
16889  return isPure(lView, adjustedIndex) ? pureFunction1Internal(lView, getBindingRoot(), offset, pipeInstance.transform, v1, pipeInstance) : pipeInstance.transform(v1);
16890}
16891function \u0275\u0275pipeBind2(index, slotOffset, v1, v2) {
16892  const adjustedIndex = index + HEADER_OFFSET;
16893  const lView = getLView();
16894  const pipeInstance = load(lView, adjustedIndex);
16895  return isPure(lView, adjustedIndex) ? pureFunction2Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, pipeInstance) : pipeInstance.transform(v1, v2);
16896}
16897function \u0275\u0275pipeBind3(index, slotOffset, v1, v2, v3) {
16898  const adjustedIndex = index + HEADER_OFFSET;
16899  const lView = getLView();
16900  const pipeInstance = load(lView, adjustedIndex);
16901  return isPure(lView, adjustedIndex) ? pureFunction3Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) : pipeInstance.transform(v1, v2, v3);
16902}
16903function \u0275\u0275pipeBind4(index, slotOffset, v1, v2, v3, v4) {
16904  const adjustedIndex = index + HEADER_OFFSET;
16905  const lView = getLView();
16906  const pipeInstance = load(lView, adjustedIndex);
16907  return isPure(lView, adjustedIndex) ? pureFunction4Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) : pipeInstance.transform(v1, v2, v3, v4);
16908}
16909function \u0275\u0275pipeBindV(index, slotOffset, values) {
16910  const adjustedIndex = index + HEADER_OFFSET;
16911  const lView = getLView();
16912  const pipeInstance = load(lView, adjustedIndex);
16913  return isPure(lView, adjustedIndex) ? pureFunctionVInternal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, values, pipeInstance) : pipeInstance.transform.apply(pipeInstance, values);
16914}
16915function isPure(lView, index) {
16916  return lView[TVIEW].data[index].pure;
16917}
16918function \u0275\u0275templateRefExtractor(tNode, lView) {
16919  return createTemplateRef(tNode, lView);
16920}
16921function \u0275\u0275getComponentDepsFactory(type, rawImports) {
16922  return () => {
16923    try {
16924      return depsTracker.getComponentDependencies(type, rawImports).dependencies;
16925    } catch (e) {
16926      console.error(`Computing dependencies in local compilation mode for the component "${type.name}" failed with the exception:`, e);
16927      throw e;
16928    }
16929  };
16930}
16931function \u0275setClassDebugInfo(type, debugInfo) {
16932  const def = getComponentDef(type);
16933  if (def !== null) {
16934    def.debugInfo = debugInfo;
16935  }
16936}
16937function \u0275\u0275getReplaceMetadataURL(id, timestamp, base) {
16938  const url = `./@ng/component?c=${id}&t=${encodeURIComponent(timestamp)}`;
16939  return new URL(url, base).href;
16940}
16941function \u0275\u0275replaceMetadata(type, applyMetadata, namespaces, locals, importMeta = null, id = null) {
16942  ngDevMode && assertComponentDef(type);
16943  const currentDef = getComponentDef(type);
16944  applyMetadata.apply(null, [type, namespaces, ...locals]);
16945  const { newDef, oldDef } = mergeWithExistingDefinition(currentDef, getComponentDef(type));
16946  type[NG_COMP_DEF] = newDef;
16947  if (oldDef.tView) {
16948    const trackedViews = getTrackedLViews().values();
16949    for (const root of trackedViews) {
16950      if (isRootView(root) && root[PARENT] === null) {
16951        recreateMatchingLViews(importMeta, id, newDef, oldDef, root);
16952      }
16953    }
16954  }
16955}
16956function mergeWithExistingDefinition(currentDef, newDef) {
16957  const clone = __spreadValues({}, currentDef);
16958  const replacement = Object.assign(currentDef, newDef, {
16959    // We need to keep the existing directive and pipe defs, because they can get patched on
16960    // by a call to `setComponentScope` from a module file. That call won't make it into the
16961    // HMR replacement function, because it lives in an entirely different file.
16962    directiveDefs: clone.directiveDefs,
16963    pipeDefs: clone.pipeDefs,
16964    // Preserve the old `setInput` function, because it has some state.
16965    // This is fine, because the component instance is preserved as well.
16966    setInput: clone.setInput,
16967    // Externally this is redundant since we redeclare the definition using the original type.
16968    // Internally we may receive a definition with an alternate, but identical, type so we have
16969    // to ensure that the original one is preserved.
16970    type: clone.type
16971  });
16972  ngDevMode && assertEqual(replacement, currentDef, "Expected definition to be merged in place");
16973  return { newDef: replacement, oldDef: clone };
16974}
16975function recreateMatchingLViews(importMeta, id, newDef, oldDef, rootLView) {
16976  ngDevMode && assertDefined(oldDef.tView, "Expected a component definition that has been instantiated at least once");
16977  const tView = rootLView[TVIEW];
16978  if (tView === oldDef.tView) {
16979    ngDevMode && assertComponentDef(oldDef.type);
16980    recreateLView(importMeta, id, newDef, oldDef, rootLView);
16981    return;
16982  }
16983  for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {
16984    const current = rootLView[i];
16985    if (isLContainer(current)) {
16986      if (isLView(current[HOST])) {
16987        recreateMatchingLViews(importMeta, id, newDef, oldDef, current[HOST]);
16988      }
16989      for (let j = CONTAINER_HEADER_OFFSET; j < current.length; j++) {
16990        recreateMatchingLViews(importMeta, id, newDef, oldDef, current[j]);
16991      }
16992    } else if (isLView(current)) {
16993      recreateMatchingLViews(importMeta, id, newDef, oldDef, current);
16994    }
16995  }
16996}
16997function clearRendererCache(factory, def) {
16998  factory.componentReplaced?.(def.id);
16999}
17000function recreateLView(importMeta, id, newDef, oldDef, lView) {
17001  const instance = lView[CONTEXT];
17002  let host = lView[HOST];
17003  const parentLView = lView[PARENT];
17004  ngDevMode && assertLView(parentLView);
17005  const tNode = lView[T_HOST];
17006  ngDevMode && assertTNodeType(
17007    tNode,
17008    2
17009    /* TNodeType.Element */
17010  );
17011  ngDevMode && assertNotEqual(newDef, oldDef, "Expected different component definition");
17012  const zone = lView[INJECTOR].get(NgZone, null);
17013  const recreate = () => {
17014    if (oldDef.encapsulation === ViewEncapsulation.ShadowDom) {
17015      const newHost = host.cloneNode(false);
17016      host.replaceWith(newHost);
17017      host = newHost;
17018    }
17019    const newTView = getOrCreateComponentTView(newDef);
17020    const newLView = createLView(
17021      parentLView,
17022      newTView,
17023      instance,
17024      getInitialLViewFlagsFromDef(newDef),
17025      host,
17026      tNode,
17027      null,
17028      null,
17029      // The renderer will be created a bit further down once the old one is destroyed.
17030      null,
17031      null,
17032      null
17033    );
17034    replaceLViewInTree(parentLView, lView, newLView, tNode.index);
17035    destroyLView(lView[TVIEW], lView);
17036    const rendererFactory = lView[ENVIRONMENT].rendererFactory;
17037    clearRendererCache(rendererFactory, oldDef);
17038    newLView[RENDERER] = rendererFactory.createRenderer(host, newDef);
17039    removeViewFromDOM(lView[TVIEW], lView);
17040    resetProjectionState(tNode);
17041    renderView(newTView, newLView, instance);
17042    refreshView(newTView, newLView, newTView.template, instance);
17043  };
17044  if (zone === null) {
17045    executeWithInvalidateFallback(importMeta, id, recreate);
17046  } else {
17047    zone.run(() => executeWithInvalidateFallback(importMeta, id, recreate));
17048  }
17049}
17050function executeWithInvalidateFallback(importMeta, id, callback) {
17051  try {
17052    callback();
17053  } catch (e) {
17054    const error = e;
17055    if (id !== null && error.message) {
17056      const toLog = error.message + (error.stack ? "\n" + error.stack : "");
17057      importMeta?.hot?.send?.("angular:invalidate", { id, message: toLog, error: true });
17058    }
17059    throw e;
17060  }
17061}
17062function replaceLViewInTree(parentLView, oldLView, newLView, index) {
17063  for (let i = HEADER_OFFSET; i < parentLView[TVIEW].bindingStartIndex; i++) {
17064    const current = parentLView[i];
17065    if ((isLView(current) || isLContainer(current)) && current[NEXT] === oldLView) {
17066      current[NEXT] = newLView;
17067      break;
17068    }
17069  }
17070  if (parentLView[CHILD_HEAD] === oldLView) {
17071    parentLView[CHILD_HEAD] = newLView;
17072  }
17073  if (parentLView[CHILD_TAIL] === oldLView) {
17074    parentLView[CHILD_TAIL] = newLView;
17075  }
17076  newLView[NEXT] = oldLView[NEXT];
17077  oldLView[NEXT] = null;
17078  parentLView[index] = newLView;
17079}
17080function resetProjectionState(tNode) {
17081  if (tNode.projection !== null) {
17082    for (const current of tNode.projection) {
17083      if (isTNodeShape(current)) {
17084        current.projectionNext = null;
17085        current.flags &= ~2;
17086      }
17087    }
17088    tNode.projection = null;
17089  }
17090}
17091function setJitOptions(options) {
17092  if (jitOptions !== null) {
17093    if (options.defaultEncapsulation !== jitOptions.defaultEncapsulation) {
17094      ngDevMode && console.error("Provided value for `defaultEncapsulation` can not be changed once it has been set.");
17095      return;
17096    }
17097    if (options.preserveWhitespaces !== jitOptions.preserveWhitespaces) {
17098      ngDevMode && console.error("Provided value for `preserveWhitespaces` can not be changed once it has been set.");
17099      return;
17100    }
17101  }
17102  jitOptions = options;
17103}
17104function getJitOptions() {
17105  return jitOptions;
17106}
17107function enqueueModuleForDelayedScoping(moduleType, ngModule) {
17108  moduleQueue.push({ moduleType, ngModule });
17109}
17110function flushModuleScopingQueueAsMuchAsPossible() {
17111  if (!flushingModuleQueue) {
17112    flushingModuleQueue = true;
17113    try {
17114      for (let i = moduleQueue.length - 1; i >= 0; i--) {
17115        const { moduleType, ngModule } = moduleQueue[i];
17116        if (ngModule.declarations && ngModule.declarations.every(isResolvedDeclaration)) {
17117          moduleQueue.splice(i, 1);
17118          setScopeOnDeclaredComponents(moduleType, ngModule);
17119        }
17120      }
17121    } finally {
17122      flushingModuleQueue = false;
17123    }
17124  }
17125}
17126function isResolvedDeclaration(declaration) {
17127  if (Array.isArray(declaration)) {
17128    return declaration.every(isResolvedDeclaration);
17129  }
17130  return !!resolveForwardRef(declaration);
17131}
17132function compileNgModule(moduleType, ngModule = {}) {
17133  compileNgModuleDefs(moduleType, ngModule);
17134  if (ngModule.id !== void 0) {
17135    registerNgModuleType(moduleType, ngModule.id);
17136  }
17137  enqueueModuleForDelayedScoping(moduleType, ngModule);
17138}
17139function compileNgModuleDefs(moduleType, ngModule, allowDuplicateDeclarationsInRoot = false) {
17140  ngDevMode && assertDefined(moduleType, "Required value moduleType");
17141  ngDevMode && assertDefined(ngModule, "Required value ngModule");
17142  const declarations = flatten(ngModule.declarations || EMPTY_ARRAY);
17143  let ngModuleDef = null;
17144  Object.defineProperty(moduleType, NG_MOD_DEF, {
17145    configurable: true,
17146    get: () => {
17147      if (ngModuleDef === null) {
17148        if (ngDevMode && ngModule.imports && ngModule.imports.indexOf(moduleType) > -1) {
17149          throw new Error(`'${stringifyForError(moduleType)}' module can't import itself`);
17150        }
17151        const compiler = getCompilerFacade({
17152          usage: 0,
17153          kind: "NgModule",
17154          type: moduleType
17155        });
17156        ngModuleDef = compiler.compileNgModule(angularCoreEnv, `ng:///${moduleType.name}/\u0275mod.js`, {
17157          type: moduleType,
17158          bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY).map(resolveForwardRef),
17159          declarations: declarations.map(resolveForwardRef),
17160          imports: flatten(ngModule.imports || EMPTY_ARRAY).map(resolveForwardRef).map(expandModuleWithProviders),
17161          exports: flatten(ngModule.exports || EMPTY_ARRAY).map(resolveForwardRef).map(expandModuleWithProviders),
17162          schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,
17163          id: ngModule.id || null
17164        });
17165        if (!ngModuleDef.schemas) {
17166          ngModuleDef.schemas = [];
17167        }
17168      }
17169      return ngModuleDef;
17170    }
17171  });
17172  let ngFactoryDef = null;
17173  Object.defineProperty(moduleType, NG_FACTORY_DEF, {
17174    get: () => {
17175      if (ngFactoryDef === null) {
17176        const compiler = getCompilerFacade({
17177          usage: 0,
17178          kind: "NgModule",
17179          type: moduleType
17180        });
17181        ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${moduleType.name}/\u0275fac.js`, {
17182          name: moduleType.name,
17183          type: moduleType,
17184          deps: reflectDependencies(moduleType),
17185          target: compiler.FactoryTarget.NgModule,
17186          typeArgumentCount: 0
17187        });
17188      }
17189      return ngFactoryDef;
17190    },
17191    // Make the property configurable in dev mode to allow overriding in tests
17192    configurable: !!ngDevMode
17193  });
17194  let ngInjectorDef = null;
17195  Object.defineProperty(moduleType, NG_INJ_DEF, {
17196    get: () => {
17197      if (ngInjectorDef === null) {
17198        ngDevMode && verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot);
17199        const meta = {
17200          name: moduleType.name,
17201          type: moduleType,
17202          providers: ngModule.providers || EMPTY_ARRAY,
17203          imports: [
17204            (ngModule.imports || EMPTY_ARRAY).map(resolveForwardRef),
17205            (ngModule.exports || EMPTY_ARRAY).map(resolveForwardRef)
17206          ]
17207        };
17208        const compiler = getCompilerFacade({
17209          usage: 0,
17210          kind: "NgModule",
17211          type: moduleType
17212        });
17213        ngInjectorDef = compiler.compileInjector(angularCoreEnv, `ng:///${moduleType.name}/\u0275inj.js`, meta);
17214      }
17215      return ngInjectorDef;
17216    },
17217    // Make the property configurable in dev mode to allow overriding in tests
17218    configurable: !!ngDevMode
17219  });
17220}
17221function generateStandaloneInDeclarationsError(type, location2) {
17222  const prefix = `Unexpected "${stringifyForError(type)}" found in the "declarations" array of the`;
17223  const suffix = `"${stringifyForError(type)}" is marked as standalone and can't be declared in any NgModule - did you intend to import it instead (by adding it to the "imports" array)?`;
17224  return `${prefix} ${location2}, ${suffix}`;
17225}
17226function verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot, importingModule) {
17227  if (verifiedNgModule.get(moduleType))
17228    return;
17229  if (isStandalone(moduleType))
17230    return;
17231  verifiedNgModule.set(moduleType, true);
17232  moduleType = resolveForwardRef(moduleType);
17233  let ngModuleDef;
17234  if (importingModule) {
17235    ngModuleDef = getNgModuleDef(moduleType);
17236    if (!ngModuleDef) {
17237      throw new Error(`Unexpected value '${moduleType.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);
17238    }
17239  } else {
17240    ngModuleDef = getNgModuleDefOrThrow(moduleType);
17241  }
17242  const errors = [];
17243  const declarations = maybeUnwrapFn(ngModuleDef.declarations);
17244  const imports = maybeUnwrapFn(ngModuleDef.imports);
17245  flatten(imports).map(unwrapModuleWithProvidersImports).forEach((modOrStandaloneCmpt) => {
17246    verifySemanticsOfNgModuleImport(modOrStandaloneCmpt, moduleType);
17247    verifySemanticsOfNgModuleDef(modOrStandaloneCmpt, false, moduleType);
17248  });
17249  const exports = maybeUnwrapFn(ngModuleDef.exports);
17250  declarations.forEach(verifyDeclarationsHaveDefinitions);
17251  declarations.forEach(verifyDirectivesHaveSelector);
17252  declarations.forEach((declarationType) => verifyNotStandalone(declarationType, moduleType));
17253  const combinedDeclarations = [
17254    ...declarations.map(resolveForwardRef),
17255    ...flatten(imports.map(computeCombinedExports)).map(resolveForwardRef)
17256  ];
17257  exports.forEach(verifyExportsAreDeclaredOrReExported);
17258  declarations.forEach((decl) => verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot));
17259  const ngModule = getAnnotation(moduleType, "NgModule");
17260  if (ngModule) {
17261    ngModule.imports && flatten(ngModule.imports).map(unwrapModuleWithProvidersImports).forEach((mod) => {
17262      verifySemanticsOfNgModuleImport(mod, moduleType);
17263      verifySemanticsOfNgModuleDef(mod, false, moduleType);
17264    });
17265    ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyCorrectBootstrapType);
17266    ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyComponentIsPartOfNgModule);
17267  }
17268  if (errors.length) {
17269    throw new Error(errors.join("\n"));
17270  }
17271  function verifyDeclarationsHaveDefinitions(type) {
17272    type = resolveForwardRef(type);
17273    const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);
17274    if (!def) {
17275      errors.push(`Unexpected value '${stringifyForError(type)}' declared by the module '${stringifyForError(moduleType)}'. Please add a @Pipe/@Directive/@Component annotation.`);
17276    }
17277  }
17278  function verifyDirectivesHaveSelector(type) {
17279    type = resolveForwardRef(type);
17280    const def = getDirectiveDef(type);
17281    if (!getComponentDef(type) && def && def.selectors.length == 0) {
17282      errors.push(`Directive ${stringifyForError(type)} has no selector, please add it!`);
17283    }
17284  }
17285  function verifyNotStandalone(type, moduleType2) {
17286    type = resolveForwardRef(type);
17287    const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);
17288    if (def?.standalone) {
17289      const location2 = `"${stringifyForError(moduleType2)}" NgModule`;
17290      errors.push(generateStandaloneInDeclarationsError(type, location2));
17291    }
17292  }
17293  function verifyExportsAreDeclaredOrReExported(type) {
17294    type = resolveForwardRef(type);
17295    const kind = getComponentDef(type) && "component" || getDirectiveDef(type) && "directive" || getPipeDef(type) && "pipe";
17296    if (kind) {
17297      if (combinedDeclarations.lastIndexOf(type) === -1) {
17298        errors.push(`Can't export ${kind} ${stringifyForError(type)} from ${stringifyForError(moduleType)} as it was neither declared nor imported!`);
17299      }
17300    }
17301  }
17302  function verifyDeclarationIsUnique(type, suppressErrors) {
17303    type = resolveForwardRef(type);
17304    const existingModule = ownerNgModule.get(type);
17305    if (existingModule && existingModule !== moduleType) {
17306      if (!suppressErrors) {
17307        const modules2 = [existingModule, moduleType].map(stringifyForError).sort();
17308        errors.push(`Type ${stringifyForError(type)} is part of the declarations of 2 modules: ${modules2[0]} and ${modules2[1]}! Please consider moving ${stringifyForError(type)} to a higher module that imports ${modules2[0]} and ${modules2[1]}. You can also create a new NgModule that exports and includes ${stringifyForError(type)} then import that NgModule in ${modules2[0]} and ${modules2[1]}.`);
17309      }
17310    } else {
17311      ownerNgModule.set(type, moduleType);
17312    }
17313  }
17314  function verifyComponentIsPartOfNgModule(type) {
17315    type = resolveForwardRef(type);
17316    const existingModule = ownerNgModule.get(type);
17317    if (!existingModule && !isStandalone(type)) {
17318      errors.push(`Component ${stringifyForError(type)} is not part of any NgModule or the module has not been imported into your module.`);
17319    }
17320  }
17321  function verifyCorrectBootstrapType(type) {
17322    type = resolveForwardRef(type);
17323    if (!getComponentDef(type)) {
17324      errors.push(`${stringifyForError(type)} cannot be used as an entry component.`);
17325    }
17326    if (isStandalone(type)) {
17327      errors.push(`The \`${stringifyForError(type)}\` class is a standalone component, which can not be used in the \`@NgModule.bootstrap\` array. Use the \`bootstrapApplication\` function for bootstrap instead.`);
17328    }
17329  }
17330  function verifySemanticsOfNgModuleImport(type, importingModule2) {
17331    type = resolveForwardRef(type);
17332    const directiveDef = getComponentDef(type) || getDirectiveDef(type);
17333    if (directiveDef !== null && !directiveDef.standalone) {
17334      throw new Error(`Unexpected directive '${type.name}' imported by the module '${importingModule2.name}'. Please add an @NgModule annotation.`);
17335    }
17336    const pipeDef = getPipeDef(type);
17337    if (pipeDef !== null && !pipeDef.standalone) {
17338      throw new Error(`Unexpected pipe '${type.name}' imported by the module '${importingModule2.name}'. Please add an @NgModule annotation.`);
17339    }
17340  }
17341}
17342function unwrapModuleWithProvidersImports(typeOrWithProviders) {
17343  typeOrWithProviders = resolveForwardRef(typeOrWithProviders);
17344  return typeOrWithProviders.ngModule || typeOrWithProviders;
17345}
17346function getAnnotation(type, name) {
17347  let annotation = null;
17348  collect(type.__annotations__);
17349  collect(type.decorators);
17350  return annotation;
17351  function collect(annotations) {
17352    if (annotations) {
17353      annotations.forEach(readAnnotation);
17354    }
17355  }
17356  function readAnnotation(decorator) {
17357    if (!annotation) {
17358      const proto = Object.getPrototypeOf(decorator);
17359      if (proto.ngMetadataName == name) {
17360        annotation = decorator;
17361      } else if (decorator.type) {
17362        const proto2 = Object.getPrototypeOf(decorator.type);
17363        if (proto2.ngMetadataName == name) {
17364          annotation = decorator.args[0];
17365        }
17366      }
17367    }
17368  }
17369}
17370function computeCombinedExports(type) {
17371  type = resolveForwardRef(type);
17372  const ngModuleDef = getNgModuleDef(type);
17373  if (ngModuleDef === null) {
17374    return [type];
17375  }
17376  return flatten(maybeUnwrapFn(ngModuleDef.exports).map((type2) => {
17377    const ngModuleDef2 = getNgModuleDef(type2);
17378    if (ngModuleDef2) {
17379      verifySemanticsOfNgModuleDef(type2, false);
17380      return computeCombinedExports(type2);
17381    } else {
17382      return type2;
17383    }
17384  }));
17385}
17386function setScopeOnDeclaredComponents(moduleType, ngModule) {
17387  const declarations = flatten(ngModule.declarations || EMPTY_ARRAY);
17388  const transitiveScopes = transitiveScopesFor(moduleType);
17389  declarations.forEach((declaration) => {
17390    declaration = resolveForwardRef(declaration);
17391    if (declaration.hasOwnProperty(NG_COMP_DEF)) {
17392      const component = declaration;
17393      const componentDef = getComponentDef(component);
17394      patchComponentDefWithScope(componentDef, transitiveScopes);
17395    } else if (!declaration.hasOwnProperty(NG_DIR_DEF) && !declaration.hasOwnProperty(NG_PIPE_DEF)) {
17396      declaration.ngSelectorScope = moduleType;
17397    }
17398  });
17399}
17400function patchComponentDefWithScope(componentDef, transitiveScopes) {
17401  componentDef.directiveDefs = () => Array.from(transitiveScopes.compilation.directives).map((dir) => dir.hasOwnProperty(NG_COMP_DEF) ? getComponentDef(dir) : getDirectiveDef(dir)).filter((def) => !!def);
17402  componentDef.pipeDefs = () => Array.from(transitiveScopes.compilation.pipes).map((pipe) => getPipeDef(pipe));
17403  componentDef.schemas = transitiveScopes.schemas;
17404  componentDef.tView = null;
17405}
17406function transitiveScopesFor(type) {
17407  if (isNgModule(type)) {
17408    const scope = depsTracker.getNgModuleScope(type);
17409    const def = getNgModuleDefOrThrow(type);
17410    return __spreadValues({
17411      schemas: def.schemas || null
17412    }, scope);
17413  } else if (isStandalone(type)) {
17414    const directiveDef = getComponentDef(type) || getDirectiveDef(type);
17415    if (directiveDef !== null) {
17416      return {
17417        schemas: null,
17418        compilation: {
17419          directives: /* @__PURE__ */ new Set(),
17420          pipes: /* @__PURE__ */ new Set()
17421        },
17422        exported: {
17423          directives: /* @__PURE__ */ new Set([type]),
17424          pipes: /* @__PURE__ */ new Set()
17425        }
17426      };
17427    }
17428    const pipeDef = getPipeDef(type);
17429    if (pipeDef !== null) {
17430      return {
17431        schemas: null,
17432        compilation: {
17433          directives: /* @__PURE__ */ new Set(),
17434          pipes: /* @__PURE__ */ new Set()
17435        },
17436        exported: {
17437          directives: /* @__PURE__ */ new Set(),
17438          pipes: /* @__PURE__ */ new Set([type])
17439        }
17440      };
17441    }
17442  }
17443  throw new Error(`${type.name} does not have a module def (\u0275mod property)`);
17444}
17445function expandModuleWithProviders(value) {
17446  if (isModuleWithProviders(value)) {
17447    return value.ngModule;
17448  }
17449  return value;
17450}
17451function compileComponent(type, metadata) {
17452  (typeof ngDevMode === "undefined" || ngDevMode) && initNgDevMode();
17453  let ngComponentDef = null;
17454  maybeQueueResolutionOfComponentResources(type, metadata);
17455  addDirectiveFactoryDef(type, metadata);
17456  Object.defineProperty(type, NG_COMP_DEF, {
17457    get: () => {
17458      if (ngComponentDef === null) {
17459        const compiler = getCompilerFacade({
17460          usage: 0,
17461          kind: "component",
17462          type
17463        });
17464        if (componentNeedsResolution(metadata)) {
17465          const error = [`Component '${type.name}' is not resolved:`];
17466          if (metadata.templateUrl) {
17467            error.push(` - templateUrl: ${metadata.templateUrl}`);
17468          }
17469          if (metadata.styleUrls && metadata.styleUrls.length) {
17470            error.push(` - styleUrls: ${JSON.stringify(metadata.styleUrls)}`);
17471          }
17472          if (metadata.styleUrl) {
17473            error.push(` - styleUrl: ${metadata.styleUrl}`);
17474          }
17475          error.push(`Did you run and wait for 'resolveComponentResources()'?`);
17476          throw new Error(error.join("\n"));
17477        }
17478        const options = getJitOptions();
17479        let preserveWhitespaces = metadata.preserveWhitespaces;
17480        if (preserveWhitespaces === void 0) {
17481          if (options !== null && options.preserveWhitespaces !== void 0) {
17482            preserveWhitespaces = options.preserveWhitespaces;
17483          } else {
17484            preserveWhitespaces = false;
17485          }
17486        }
17487        let encapsulation = metadata.encapsulation;
17488        if (encapsulation === void 0) {
17489          if (options !== null && options.defaultEncapsulation !== void 0) {
17490            encapsulation = options.defaultEncapsulation;
17491          } else {
17492            encapsulation = ViewEncapsulation.Emulated;
17493          }
17494        }
17495        const templateUrl = metadata.templateUrl || `ng:///${type.name}/template.html`;
17496        const baseMeta = directiveMetadata(type, metadata);
17497        const meta = __spreadProps(__spreadValues({}, baseMeta), {
17498          typeSourceSpan: compiler.createParseSourceSpan("Component", type.name, templateUrl),
17499          template: metadata.template || "",
17500          preserveWhitespaces,
17501          styles: typeof metadata.styles === "string" ? [metadata.styles] : metadata.styles || EMPTY_ARRAY,
17502          animations: metadata.animations,
17503          // JIT components are always compiled against an empty set of `declarations`. Instead, the
17504          // `directiveDefs` and `pipeDefs` are updated at a later point:
17505          //  * for NgModule-based components, they're set when the NgModule which declares the
17506          //    component resolves in the module scoping queue
17507          //  * for standalone components, they're set just below, after `compileComponent`.
17508          declarations: [],
17509          changeDetection: metadata.changeDetection,
17510          encapsulation,
17511          interpolation: metadata.interpolation,
17512          viewProviders: metadata.viewProviders || null,
17513          // We can't inspect whether any of the dependencies are actually directives, because they
17514          // get patched on after compilation. That's why in JIT mode we consider that any
17515          // dependency might be a directive dependency.
17516          hasDirectiveDependencies: !baseMeta.isStandalone || metadata.imports != null && metadata.imports.length > 0
17517        });
17518        compilationDepth++;
17519        try {
17520          if (meta.usesInheritance) {
17521            addDirectiveDefToUndecoratedParents(type);
17522          }
17523          ngComponentDef = compiler.compileComponent(angularCoreEnv, templateUrl, meta);
17524          if (meta.isStandalone) {
17525            const imports = flatten(metadata.imports || EMPTY_ARRAY);
17526            const { directiveDefs, pipeDefs } = getStandaloneDefFunctions(type, imports);
17527            ngComponentDef.directiveDefs = directiveDefs;
17528            ngComponentDef.pipeDefs = pipeDefs;
17529            ngComponentDef.dependencies = () => imports.map(resolveForwardRef);
17530          }
17531        } finally {
17532          compilationDepth--;
17533        }
17534        if (compilationDepth === 0) {
17535          flushModuleScopingQueueAsMuchAsPossible();
17536        }
17537        if (hasSelectorScope(type)) {
17538          const scopes = transitiveScopesFor(type.ngSelectorScope);
17539          patchComponentDefWithScope(ngComponentDef, scopes);
17540        }
17541        if (metadata.schemas) {
17542          if (meta.isStandalone) {
17543            ngComponentDef.schemas = metadata.schemas;
17544          } else {
17545            throw new Error(`The 'schemas' was specified for the ${stringifyForError(type)} but is only valid on a component that is standalone.`);
17546          }
17547        } else if (meta.isStandalone) {
17548          ngComponentDef.schemas = [];
17549        }
17550      }
17551      return ngComponentDef;
17552    },
17553    set: (def) => {
17554      ngComponentDef = def;
17555    },
17556    // Make the property configurable in dev mode to allow overriding in tests
17557    configurable: !!ngDevMode
17558  });
17559}
17560function getStandaloneDefFunctions(type, imports) {
17561  const directiveDefs = () => {
17562    if (ngDevMode) {
17563      for (const rawDep of imports) {
17564        verifyStandaloneImport(rawDep, type);
17565      }
17566    }
17567    if (!isComponent(type)) {
17568      return [];
17569    }
17570    const scope = depsTracker.getStandaloneComponentScope(type, imports);
17571    return [...scope.compilation.directives].map((p) => getComponentDef(p) || getDirectiveDef(p)).filter((d) => d !== null);
17572  };
17573  const pipeDefs = () => {
17574    if (ngDevMode) {
17575      for (const rawDep of imports) {
17576        verifyStandaloneImport(rawDep, type);
17577      }
17578    }
17579    if (!isComponent(type)) {
17580      return [];
17581    }
17582    const scope = depsTracker.getStandaloneComponentScope(type, imports);
17583    return [...scope.compilation.pipes].map((p) => getPipeDef(p)).filter((d) => d !== null);
17584  };
17585  return {
17586    directiveDefs,
17587    pipeDefs
17588  };
17589}
17590function hasSelectorScope(component) {
17591  return component.ngSelectorScope !== void 0;
17592}
17593function compileDirective(type, directive) {
17594  let ngDirectiveDef = null;
17595  addDirectiveFactoryDef(type, directive || {});
17596  Object.defineProperty(type, NG_DIR_DEF, {
17597    get: () => {
17598      if (ngDirectiveDef === null) {
17599        const meta = getDirectiveMetadata(type, directive || {});
17600        const compiler = getCompilerFacade({
17601          usage: 0,
17602          kind: "directive",
17603          type
17604        });
17605        ngDirectiveDef = compiler.compileDirective(angularCoreEnv, meta.sourceMapUrl, meta.metadata);
17606      }
17607      return ngDirectiveDef;
17608    },
17609    // Make the property configurable in dev mode to allow overriding in tests
17610    configurable: !!ngDevMode
17611  });
17612}
17613function getDirectiveMetadata(type, metadata) {
17614  const name = type && type.name;
17615  const sourceMapUrl = `ng:///${name}/\u0275dir.js`;
17616  const compiler = getCompilerFacade({ usage: 0, kind: "directive", type });
17617  const facade = directiveMetadata(type, metadata);
17618  facade.typeSourceSpan = compiler.createParseSourceSpan("Directive", name, sourceMapUrl);
17619  if (facade.usesInheritance) {
17620    addDirectiveDefToUndecoratedParents(type);
17621  }
17622  return { metadata: facade, sourceMapUrl };
17623}
17624function addDirectiveFactoryDef(type, metadata) {
17625  let ngFactoryDef = null;
17626  Object.defineProperty(type, NG_FACTORY_DEF, {
17627    get: () => {
17628      if (ngFactoryDef === null) {
17629        const meta = getDirectiveMetadata(type, metadata);
17630        const compiler = getCompilerFacade({
17631          usage: 0,
17632          kind: "directive",
17633          type
17634        });
17635        ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${type.name}/\u0275fac.js`, {
17636          name: meta.metadata.name,
17637          type: meta.metadata.type,
17638          typeArgumentCount: 0,
17639          deps: reflectDependencies(type),
17640          target: compiler.FactoryTarget.Directive
17641        });
17642      }
17643      return ngFactoryDef;
17644    },
17645    // Make the property configurable in dev mode to allow overriding in tests
17646    configurable: !!ngDevMode
17647  });
17648}
17649function extendsDirectlyFromObject(type) {
17650  return Object.getPrototypeOf(type.prototype) === Object.prototype;
17651}
17652function directiveMetadata(type, metadata) {
17653  const reflect = getReflect();
17654  const propMetadata = reflect.ownPropMetadata(type);
17655  return {
17656    name: type.name,
17657    type,
17658    selector: metadata.selector !== void 0 ? metadata.selector : null,
17659    host: metadata.host || EMPTY_OBJ,
17660    propMetadata,
17661    inputs: metadata.inputs || EMPTY_ARRAY,
17662    outputs: metadata.outputs || EMPTY_ARRAY,
17663    queries: extractQueriesMetadata(type, propMetadata, isContentQuery),
17664    lifecycle: { usesOnChanges: reflect.hasLifecycleHook(type, "ngOnChanges") },
17665    typeSourceSpan: null,
17666    usesInheritance: !extendsDirectlyFromObject(type),
17667    exportAs: extractExportAs(metadata.exportAs),
17668    providers: metadata.providers || null,
17669    viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery),
17670    isStandalone: metadata.standalone === void 0 ? true : !!metadata.standalone,
17671    isSignal: !!metadata.signals,
17672    hostDirectives: metadata.hostDirectives?.map((directive) => typeof directive === "function" ? { directive } : directive) || null
17673  };
17674}
17675function addDirectiveDefToUndecoratedParents(type) {
17676  const objPrototype = Object.prototype;
17677  let parent = Object.getPrototypeOf(type.prototype).constructor;
17678  while (parent && parent !== objPrototype) {
17679    if (!getDirectiveDef(parent) && !getComponentDef(parent) && shouldAddAbstractDirective(parent)) {
17680      compileDirective(parent, null);
17681    }
17682    parent = Object.getPrototypeOf(parent);
17683  }
17684}
17685function convertToR3QueryPredicate(selector) {
17686  return typeof selector === "string" ? splitByComma(selector) : resolveForwardRef(selector);
17687}
17688function convertToR3QueryMetadata(propertyName, ann) {
17689  return {
17690    propertyName,
17691    predicate: convertToR3QueryPredicate(ann.selector),
17692    descendants: ann.descendants,
17693    first: ann.first,
17694    read: ann.read ? ann.read : null,
17695    static: !!ann.static,
17696    emitDistinctChangesOnly: !!ann.emitDistinctChangesOnly,
17697    isSignal: !!ann.isSignal
17698  };
17699}
17700function extractQueriesMetadata(type, propMetadata, isQueryAnn) {
17701  const queriesMeta = [];
17702  for (const field in propMetadata) {
17703    if (propMetadata.hasOwnProperty(field)) {
17704      const annotations = propMetadata[field];
17705      annotations.forEach((ann) => {
17706        if (isQueryAnn(ann)) {
17707          if (!ann.selector) {
17708            throw new Error(`Can't construct a query for the property "${field}" of "${stringifyForError(type)}" since the query selector wasn't defined.`);
17709          }
17710          if (annotations.some(isInputAnnotation)) {
17711            throw new Error(`Cannot combine @Input decorators with query decorators`);
17712          }
17713          queriesMeta.push(convertToR3QueryMetadata(field, ann));
17714        }
17715      });
17716    }
17717  }
17718  return queriesMeta;
17719}
17720function extractExportAs(exportAs) {
17721  return exportAs === void 0 ? null : splitByComma(exportAs);
17722}
17723function isContentQuery(value) {
17724  const name = value.ngMetadataName;
17725  return name === "ContentChild" || name === "ContentChildren";
17726}
17727function isViewQuery(value) {
17728  const name = value.ngMetadataName;
17729  return name === "ViewChild" || name === "ViewChildren";
17730}
17731function isInputAnnotation(value) {
17732  return value.ngMetadataName === "Input";
17733}
17734function splitByComma(value) {
17735  return value.split(",").map((piece) => piece.trim());
17736}
17737function shouldAddAbstractDirective(type) {
17738  const reflect = getReflect();
17739  if (LIFECYCLE_HOOKS.some((hookName) => reflect.hasLifecycleHook(type, hookName))) {
17740    return true;
17741  }
17742  const propMetadata = reflect.propMetadata(type);
17743  for (const field in propMetadata) {
17744    const annotations = propMetadata[field];
17745    for (let i = 0; i < annotations.length; i++) {
17746      const current = annotations[i];
17747      const metadataName = current.ngMetadataName;
17748      if (isInputAnnotation(current) || isContentQuery(current) || isViewQuery(current) || metadataName === "Output" || metadataName === "HostBinding" || metadataName === "HostListener") {
17749        return true;
17750      }
17751    }
17752  }
17753  return false;
17754}
17755function compilePipe(type, meta) {
17756  let ngPipeDef = null;
17757  let ngFactoryDef = null;
17758  Object.defineProperty(type, NG_FACTORY_DEF, {
17759    get: () => {
17760      if (ngFactoryDef === null) {
17761        const metadata = getPipeMetadata(type, meta);
17762        const compiler = getCompilerFacade({
17763          usage: 0,
17764          kind: "pipe",
17765          type: metadata.type
17766        });
17767        ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${metadata.name}/\u0275fac.js`, {
17768          name: metadata.name,
17769          type: metadata.type,
17770          typeArgumentCount: 0,
17771          deps: reflectDependencies(type),
17772          target: compiler.FactoryTarget.Pipe
17773        });
17774      }
17775      return ngFactoryDef;
17776    },
17777    // Make the property configurable in dev mode to allow overriding in tests
17778    configurable: !!ngDevMode
17779  });
17780  Object.defineProperty(type, NG_PIPE_DEF, {
17781    get: () => {
17782      if (ngPipeDef === null) {
17783        const metadata = getPipeMetadata(type, meta);
17784        const compiler = getCompilerFacade({
17785          usage: 0,
17786          kind: "pipe",
17787          type: metadata.type
17788        });
17789        ngPipeDef = compiler.compilePipe(angularCoreEnv, `ng:///${metadata.name}/\u0275pipe.js`, metadata);
17790      }
17791      return ngPipeDef;
17792    },
17793    // Make the property configurable in dev mode to allow overriding in tests
17794    configurable: !!ngDevMode
17795  });
17796}
17797function getPipeMetadata(type, meta) {
17798  return {
17799    type,
17800    name: type.name,
17801    pipeName: meta.name,
17802    pure: meta.pure !== void 0 ? meta.pure : true,
17803    isStandalone: meta.standalone === void 0 ? true : !!meta.standalone
17804  };
17805}
17806function internalProvideZoneChangeDetection({ ngZoneFactory, ignoreChangesOutsideZone, scheduleInRootZone }) {
17807  ngZoneFactory ??= () => new NgZone(__spreadProps(__spreadValues({}, getNgZoneOptions()), { scheduleInRootZone }));
17808  return [
17809    { provide: NgZone, useFactory: ngZoneFactory },
17810    {
17811      provide: ENVIRONMENT_INITIALIZER,
17812      multi: true,
17813      useFactory: () => {
17814        const ngZoneChangeDetectionScheduler = inject2(NgZoneChangeDetectionScheduler, {
17815          optional: true
17816        });
17817        if ((typeof ngDevMode === "undefined" || ngDevMode) && ngZoneChangeDetectionScheduler === null) {
17818          throw new RuntimeError(402, `A required Injectable was not found in the dependency injection tree. If you are bootstrapping an NgModule, make sure that the \`BrowserModule\` is imported.`);
17819        }
17820        return () => ngZoneChangeDetectionScheduler.initialize();
17821      }
17822    },
17823    {
17824      provide: ENVIRONMENT_INITIALIZER,
17825      multi: true,
17826      useFactory: () => {
17827        const service = inject2(ZoneStablePendingTask);
17828        return () => {
17829          service.initialize();
17830        };
17831      }
17832    },
17833    // Always disable scheduler whenever explicitly disabled, even if another place called
17834    // `provideZoneChangeDetection` without the 'ignore' option.
17835    ignoreChangesOutsideZone === true ? { provide: ZONELESS_SCHEDULER_DISABLED, useValue: true } : [],
17836    {
17837      provide: SCHEDULE_IN_ROOT_ZONE,
17838      useValue: scheduleInRootZone ?? SCHEDULE_IN_ROOT_ZONE_DEFAULT
17839    },
17840    {
17841      provide: INTERNAL_APPLICATION_ERROR_HANDLER,
17842      useFactory: () => {
17843        const zone = inject2(NgZone);
17844        const injector = inject2(EnvironmentInjector);
17845        let userErrorHandler;
17846        return (e) => {
17847          zone.runOutsideAngular(() => {
17848            if (injector.destroyed && !userErrorHandler) {
17849              setTimeout(() => {
17850                throw e;
17851              });
17852            } else {
17853              userErrorHandler ??= injector.get(ErrorHandler);
17854              userErrorHandler.handleError(e);
17855            }
17856          });
17857        };
17858      }
17859    }
17860  ];
17861}
17862function getNgZoneOptions(options) {
17863  return {
17864    enableLongStackTrace: typeof ngDevMode === "undefined" ? false : !!ngDevMode,
17865    shouldCoalesceEventChangeDetection: options?.eventCoalescing ?? false,
17866    shouldCoalesceRunChangeDetection: options?.runCoalescing ?? false
17867  };
17868}
17869function trackMicrotaskNotificationForDebugging() {
17870  consecutiveMicrotaskNotifications++;
17871  if (CONSECUTIVE_MICROTASK_NOTIFICATION_LIMIT - consecutiveMicrotaskNotifications < 5) {
17872    const stack = new Error().stack;
17873    if (stack) {
17874      stackFromLastFewNotifications.push(stack);
17875    }
17876  }
17877  if (consecutiveMicrotaskNotifications === CONSECUTIVE_MICROTASK_NOTIFICATION_LIMIT) {
17878    throw new RuntimeError(103, "Angular could not stabilize because there were endless change notifications within the browser event loop. The stack from the last several notifications: \n" + stackFromLastFewNotifications.join("\n"));
17879  }
17880}
17881function getGlobalLocale() {
17882  if (false) {
17883    return goog.LOCALE;
17884  } else {
17885    return typeof $localize !== "undefined" && $localize.locale || DEFAULT_LOCALE_ID;
17886  }
17887}
17888var ANNOTATIONS, PARAMETERS, PROP_METADATA, Inject, Optional, Self, SkipSelf, Host, angularCoreDiEnv, Type, ES5_DELEGATE_CTOR, ES2015_INHERITED_CLASS, ES2015_INHERITED_CLASS_WITH_CTOR, ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR, ReflectionCapabilities, SimpleChange, \u0275\u0275NgOnChangesFeature, SIMPLE_CHANGES_STORE, profilerCallbacks, NOOP_PROFILER_REMOVAL2, profiler, NO_PARENT_INJECTOR, NodeInjectorFactory, includeViewProviders, BLOOM_SIZE, BLOOM_MASK, BLOOM_BUCKET_BITS, nextNgElementId, NOT_FOUND2, injectionPath, NodeInjector, Attribute, _reflect, USE_VALUE2, Injectable, ElementRef, QueryList, ChangeDetectionStrategy, TRACKED_LVIEWS, uniqueIdCounter, LContext, MONKEY_PATCH_KEY_NAME, Framework, AcxChangeDetectionStrategy, AcxViewEncapsulation, DOCUMENT2, APP_ID, DEFAULT_APP_ID, PLATFORM_INITIALIZER, PLATFORM_ID, PACKAGE_ROOT_URL, ANIMATION_MODULE_TYPE, CSP_NONCE, IMAGE_CONFIG_DEFAULTS, IMAGE_CONFIG, TransferState, REFERENCE_NODE_HOST, REFERENCE_NODE_BODY, NUM_ROOT_NODES, DEFER_BLOCK_ID, DEFER_BLOCK_STATE$1, DEFER_PARENT_BLOCK_ID, IS_HYDRATION_DOM_REUSE_ENABLED, PRESERVE_HOST_CONTENT_DEFAULT, PRESERVE_HOST_CONTENT, IS_I18N_HYDRATION_ENABLED, IS_EVENT_REPLAY_ENABLED, IS_INCREMENTAL_HYDRATION_ENABLED, JSACTION_BLOCK_ELEMENT_MAP, IS_ENABLED_BLOCKING_INITIAL_NAVIGATION, eventListenerOptions, hoverTriggers, interactionTriggers, viewportTriggers, interactionEventNames, hoverEventNames, intersectionObserver, observedViewportElements, DeferEventEntry, JSACTION_EVENT_CONTRACT, _stashEventListenerImpl, DEHYDRATED_BLOCK_REGISTRY, TRANSFER_STATE_TOKEN_ID, NGH_DATA_KEY, TRANSFER_STATE_DEFER_BLOCKS_INFO, NGH_DEFER_BLOCKS_KEY, _retrieveHydrationInfoImpl, HydrationStatus, HYDRATION_INFO_KEY, incrementalHydrationEnabledWarned, ViewEncapsulation, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, shouldThrowErrorOnUnknownElement, shouldThrowErrorOnUnknownProperty, KNOWN_CONTROL_FLOW_DIRECTIVES, policy$1, policy, SafeValueImpl, SafeHtmlImpl, SafeStyleImpl, SafeScriptImpl, SafeUrlImpl, SafeResourceUrlImpl, DOMParserHelper, InertDocumentHelper, SAFE_URL_PATTERN, VOID_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS, OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, VALID_ELEMENTS, URI_ATTRS, HTML_ATTRS, ARIA_ATTRS, VALID_ATTRS, SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS, SanitizingHtmlSerializer, SURROGATE_PAIR_REGEXP, NON_ALPHANUMERIC_REGEXP, inertBodyHelper, COMMENT_DISALLOWED, COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED, SecurityContext, attributeName, SECURITY_SENSITIVE_ELEMENTS, NG_REFLECT_ATTRS_FLAG_DEFAULT, NG_REFLECT_ATTRS_FLAG, CAMEL_CASE_REGEXP, INTERPOLATION_DELIMITER, VALUE_STRING_LENGTH_LIMIT, NG_TEMPLATE_SELECTOR, NO_CHANGE, InputFlags, RendererStyleFlags2, _icuContainerIterate, allLeavingAnimations, TracingAction, TracingService, markedFeatures, SCHEDULE_IN_ROOT_ZONE_DEFAULT, EventEmitter_, EventEmitter, AsyncStackTaggingZoneSpec, isAngularZoneProperty, angularZoneInstanceIdProperty, ngZoneInstanceId, NgZone, EMPTY_PAYLOAD, NoopNgZone, AfterRenderManager, AFTER_RENDER_PHASES, AfterRenderImpl, AfterRenderSequence, ANIMATION_QUEUE, _getInsertInFrontOfRNodeWithI18n, _processI18nInsertBefore, _applyRootElementTransformImpl, USE_EXHAUSTIVE_CHECK_NO_CHANGES_DEFAULT, UseExhaustiveCheckNoChanges, freeConsumers, REACTIVE_LVIEW_CONSUMER_NODE, TEMPORARY_CONSUMER_NODE, MAXIMUM_REFRESH_RERUNS$1, ViewRef, TemplateRef, AT_THIS_LOCATION, internalAttrs, REF_EXTRACTOR_REGEXP, _prepareI18nBlockForHydrationImpl, _claimDehydratedIcuCaseImpl, _findMatchingDehydratedViewImpl, _findAndReconcileMatchingDehydratedViewsImpl, ComponentRef$1, ComponentFactory$1, _NullComponentFactoryResolver, ComponentFactoryResolver$1, RendererFactory2, Renderer2, Sanitizer, DepsTracker, depsTracker, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, ChainedInjector, BINDING, ComponentFactoryResolver2, ComponentFactory2, ComponentRef2, ViewContainerRef, VE_ViewContainerRef, R3ViewContainerRef, _locateOrCreateAnchorNode, _populateDehydratedViewsInLContainer, LQuery_, LQueries_, TQueryMetadata_, TQueries_, TQuery_, componentResourceResolutionQueue, componentDefPendingResolution, modules, checkForDuplicateNgModules, NgModuleRef$1, NgModuleFactory$1, NgModuleRef2, NgModuleFactory2, EnvironmentNgModuleRefAdapter, StandaloneService, GENERATED_COMP_IDS, COPY_DIRECTIVE_FIELDS, COPY_COMPONENT_FIELDS, _locateOrCreateContainerAnchor, DeferDependenciesLoadingState, MINIMUM_SLOT, LOADING_AFTER_SLOT, DeferBlockState, DeferBlockInternalState, NEXT_DEFER_BLOCK_STATE, DEFER_BLOCK_STATE, STATE_IS_FROZEN_UNTIL, LOADING_AFTER_CLEANUP_FN, TRIGGER_CLEANUP_FNS, PREFETCH_TRIGGER_CLEANUP_FNS, SSR_UNIQUE_ID, SSR_BLOCK_STATE, ON_COMPLETE_FNS, HYDRATE_TRIGGER_CLEANUP_FNS, DeferBlockBehavior, _requestIdleCallback, _cancelIdleCallback, IdleScheduler, TimerScheduler, CachedInjectorService, DEFER_BLOCK_DEPENDENCY_INTERCEPTOR, DEFER_BLOCK_CONFIG, applyDeferBlockStateWithSchedulingImpl, Console, DIDebugData, frameworkDIDebugData, signalDebugMap, counter$1, changeDetectionRuns, changeDetectionSyncRuns, counter, eventsStack, chromeDevToolsInjectorProfiler, devToolsProfiler, GLOBAL_PUBLISH_EXPANDO_KEY, globalUtilsFunctions, _published, TESTABILITY, TESTABILITY_GETTER, Testability, TestabilityRegistry, _testabilityGetter, APP_INITIALIZER, ApplicationInitStatus, APP_BOOTSTRAP_LISTENER, MAXIMUM_REFRESH_RERUNS, ApplicationRef, ANIMATIONS_DISABLED, MAX_ANIMATION_TIMEOUT, MAX_ANIMATION_TIMEOUT_DEFAULT, DEFAULT_ANIMATIONS_DISABLED, areAnimationSupported, noOpAnimationComplete, enterClassMap, longestAnimations, leavingNodes, LiveCollection, UniqueValueMultiKeyMap, RepeaterContext, RepeaterMetadata, OperationsCounter, LiveCollectionLContainerImpl, _locateOrCreateElementNode, _locateOrCreateElementContainerNode, u, localeEn, LOCALE_DATA, LocaleDataIndex, pluralMapping, DEFAULT_LOCALE_ID, USD_CURRENCY_CODE, ELEMENT_MARKER, ICU_MARKER, I18nCreateOpCode, LOCALE_ID$1, changeMask, changeMaskCounter, _locateOrCreateNode, OpCodeParser, BINDING_REGEXP, ICU_REGEXP, NESTED_ICU, ICU_BLOCK_REGEXP, MARKER, SUBTEMPLATE_REGEXP, PH_REGEXP, NGSP_UNICODE_REGEXP, ROOT_TEMPLATE_ID, PP_MULTI_VALUE_PLACEHOLDERS_REGEXP, PP_PLACEHOLDERS_REGEXP, PP_ICU_VARS_REGEXP, PP_ICU_PLACEHOLDERS_REGEXP, PP_ICUS_REGEXP, PP_CLOSE_TEMPLATE_REGEXP, PP_TEMPLATE_ID_REGEXP, parserState, _locateOrCreateTextNode, UNINITIALIZED_LET, angularCoreEnv, jitOptions, moduleQueue, flushingModuleQueue, ownerNgModule, verifiedNgModule, compilationDepth, LIFECYCLE_HOOKS, Directive, Component, Pipe, Input, Output, HostBinding, HostListener, NgModule, ModuleWithComponentFactories, Compiler, COMPILER_OPTIONS, NgZoneChangeDetectionScheduler, PROVIDED_NG_ZONE, ZoneStablePendingTask, CONSECUTIVE_MICROTASK_NOTIFICATION_LIMIT, consecutiveMicrotaskNotifications, stackFromLastFewNotifications, ChangeDetectionSchedulerImpl, LOCALE_ID, DEFAULT_CURRENCY_CODE, TRANSLATIONS, TRANSLATIONS_FORMAT, MissingTranslationStrategy;
17889var init_debug_node = __esm({
17890  "node_modules/@angular/core/fesm2022/debug_node.mjs"() {
17891    "use strict";
17892    init_root_effect_scheduler();
17893    init_signal();
17894    init_esm();
17895    init_signals();
17896    init_operators();
17897    ANNOTATIONS = "__annotations__";
17898    PARAMETERS = "__parameters__";
17899    PROP_METADATA = "__prop__metadata__";
17900    Inject = attachInjectFlag(
17901      // Disable tslint because `DecoratorFlags` is a const enum which gets inlined.
17902      makeParamDecorator("Inject", (token) => ({ token })),
17903      -1
17904      /* DecoratorFlags.Inject */
17905    );
17906    Optional = // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.
17907    // tslint:disable-next-line: no-toplevel-property-access
17908    attachInjectFlag(
17909      makeParamDecorator("Optional"),
17910      8
17911      /* InternalInjectFlags.Optional */
17912    );
17913    Self = // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.
17914    // tslint:disable-next-line: no-toplevel-property-access
17915    attachInjectFlag(
17916      makeParamDecorator("Self"),
17917      2
17918      /* InternalInjectFlags.Self */
17919    );
17920    SkipSelf = // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.
17921    // tslint:disable-next-line: no-toplevel-property-access
17922    attachInjectFlag(
17923      makeParamDecorator("SkipSelf"),
17924      4
17925      /* InternalInjectFlags.SkipSelf */
17926    );
17927    Host = // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.
17928    // tslint:disable-next-line: no-toplevel-property-access
17929    attachInjectFlag(
17930      makeParamDecorator("Host"),
17931      1
17932      /* InternalInjectFlags.Host */
17933    );
17934    angularCoreDiEnv = {
17935      "\u0275\u0275defineInjectable": \u0275\u0275defineInjectable,
17936      "\u0275\u0275defineInjector": \u0275\u0275defineInjector,
17937      "\u0275\u0275inject": \u0275\u0275inject,
17938      "\u0275\u0275invalidFactoryDep": \u0275\u0275invalidFactoryDep,
17939      "resolveForwardRef": resolveForwardRef
17940    };
17941    Type = Function;
17942    ES5_DELEGATE_CTOR = /^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*(arguments|(?:[^()]+\(\[\],)?[^()]+\(arguments\).*)\)/;
17943    ES2015_INHERITED_CLASS = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/;
17944    ES2015_INHERITED_CLASS_WITH_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/;
17945    ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{[^}]*super\(\.\.\.arguments\)/;
17946    ReflectionCapabilities = class {
17947      _reflect;
17948      constructor(reflect) {
17949        this._reflect = reflect || _global["Reflect"];
17950      }
17951      factory(t) {
17952        return (...args) => new t(...args);
17953      }
17954      /** @internal */
17955      _zipTypesAndAnnotations(paramTypes, paramAnnotations) {
17956        let result;
17957        if (typeof paramTypes === "undefined") {
17958          result = newArray(paramAnnotations.length);
17959        } else {
17960          result = newArray(paramTypes.length);
17961        }
17962        for (let i = 0; i < result.length; i++) {
17963          if (typeof paramTypes === "undefined") {
17964            result[i] = [];
17965          } else if (paramTypes[i] && paramTypes[i] != Object) {
17966            result[i] = [paramTypes[i]];
17967          } else {
17968            result[i] = [];
17969          }
17970          if (paramAnnotations && paramAnnotations[i] != null) {
17971            result[i] = result[i].concat(paramAnnotations[i]);
17972          }
17973        }
17974        return result;
17975      }
17976      _ownParameters(type, parentCtor) {
17977        const typeStr = type.toString();
17978        if (isDelegateCtor(typeStr)) {
17979          return null;
17980        }
17981        if (type.parameters && type.parameters !== parentCtor.parameters) {
17982          return type.parameters;
17983        }
17984        const tsickleCtorParams = type.ctorParameters;
17985        if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {
17986          const ctorParameters = typeof tsickleCtorParams === "function" ? tsickleCtorParams() : tsickleCtorParams;
17987          const paramTypes2 = ctorParameters.map((ctorParam) => ctorParam && ctorParam.type);
17988          const paramAnnotations2 = ctorParameters.map((ctorParam) => ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators));
17989          return this._zipTypesAndAnnotations(paramTypes2, paramAnnotations2);
17990        }
17991        const paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];
17992        const paramTypes = this._reflect && this._reflect.getOwnMetadata && this._reflect.getOwnMetadata("design:paramtypes", type);
17993        if (paramTypes || paramAnnotations) {
17994          return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);
17995        }
17996        return newArray(type.length);
17997      }
17998      parameters(type) {
17999        if (!isType(type)) {
18000          return [];
18001        }
18002        const parentCtor = getParentCtor(type);
18003        let parameters = this._ownParameters(type, parentCtor);
18004        if (!parameters && parentCtor !== Object) {
18005          parameters = this.parameters(parentCtor);
18006        }
18007        return parameters || [];
18008      }
18009      _ownAnnotations(typeOrFunc, parentCtor) {
18010        if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {
18011          let annotations = typeOrFunc.annotations;
18012          if (typeof annotations === "function" && annotations.annotations) {
18013            annotations = annotations.annotations;
18014          }
18015          return annotations;
18016        }
18017        if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) {
18018          return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators);
18019        }
18020        if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {
18021          return typeOrFunc[ANNOTATIONS];
18022        }
18023        return null;
18024      }
18025      annotations(typeOrFunc) {
18026        if (!isType(typeOrFunc)) {
18027          return [];
18028        }
18029        const parentCtor = getParentCtor(typeOrFunc);
18030        const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];
18031        const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];
18032        return parentAnnotations.concat(ownAnnotations);
18033      }
18034      _ownPropMetadata(typeOrFunc, parentCtor) {
18035        if (typeOrFunc.propMetadata && typeOrFunc.propMetadata !== parentCtor.propMetadata) {
18036          let propMetadata = typeOrFunc.propMetadata;
18037          if (typeof propMetadata === "function" && propMetadata.propMetadata) {
18038            propMetadata = propMetadata.propMetadata;
18039          }
18040          return propMetadata;
18041        }
18042        if (typeOrFunc.propDecorators && typeOrFunc.propDecorators !== parentCtor.propDecorators) {
18043          const propDecorators = typeOrFunc.propDecorators;
18044          const propMetadata = {};
18045          Object.keys(propDecorators).forEach((prop) => {
18046            propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);
18047          });
18048          return propMetadata;
18049        }
18050        if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {
18051          return typeOrFunc[PROP_METADATA];
18052        }
18053        return null;
18054      }
18055      propMetadata(typeOrFunc) {
18056        if (!isType(typeOrFunc)) {
18057          return {};
18058        }
18059        const parentCtor = getParentCtor(typeOrFunc);
18060        const propMetadata = {};
18061        if (parentCtor !== Object) {
18062          const parentPropMetadata = this.propMetadata(parentCtor);
18063          Object.keys(parentPropMetadata).forEach((propName) => {
18064            propMetadata[propName] = parentPropMetadata[propName];
18065          });
18066        }
18067        const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);
18068        if (ownPropMetadata) {
18069          Object.keys(ownPropMetadata).forEach((propName) => {
18070            const decorators = [];
18071            if (propMetadata.hasOwnProperty(propName)) {
18072              decorators.push(...propMetadata[propName]);
18073            }
18074            decorators.push(...ownPropMetadata[propName]);
18075            propMetadata[propName] = decorators;
18076          });
18077        }
18078        return propMetadata;
18079      }
18080      ownPropMetadata(typeOrFunc) {
18081        if (!isType(typeOrFunc)) {
18082          return {};
18083        }
18084        return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};
18085      }
18086      hasLifecycleHook(type, lcProperty) {
18087        return type instanceof Type && lcProperty in type.prototype;
18088      }
18089    };
18090    SimpleChange = class {
18091      previousValue;
18092      currentValue;
18093      firstChange;
18094      constructor(previousValue, currentValue, firstChange) {
18095        this.previousValue = previousValue;
18096        this.currentValue = currentValue;
18097        this.firstChange = firstChange;
18098      }
18099      /**
18100       * Check whether the new value is the first value assigned.
18101       */
18102      isFirstChange() {
18103        return this.firstChange;
18104      }
18105    };
18106    \u0275\u0275NgOnChangesFeature = /* @__PURE__ */ (() => {
18107      const \u0275\u0275NgOnChangesFeatureImpl = () => NgOnChangesFeatureImpl;
18108      \u0275\u0275NgOnChangesFeatureImpl.ngInherit = true;
18109      return \u0275\u0275NgOnChangesFeatureImpl;
18110    })();
18111    SIMPLE_CHANGES_STORE = "__ngSimpleChanges__";
18112    profilerCallbacks = [];
18113    NOOP_PROFILER_REMOVAL2 = () => {
18114    };
18115    profiler = function(event, instance = null, eventFn) {
18116      for (let i = 0; i < profilerCallbacks.length; i++) {
18117        const profilerCallback = profilerCallbacks[i];
18118        profilerCallback(event, instance, eventFn);
18119      }
18120    };
18121    NO_PARENT_INJECTOR = -1;
18122    NodeInjectorFactory = class {
18123      factory;
18124      name;
18125      /**
18126       * The inject implementation to be activated when using the factory.
18127       */
18128      injectImpl;
18129      /**
18130       * Marker set to true during factory invocation to see if we get into recursive loop.
18131       * Recursive loop causes an error to be displayed.
18132       */
18133      resolving = false;
18134      /**
18135       * Marks that the token can see other Tokens declared in `viewProviders` on the same node.
18136       */
18137      canSeeViewProviders;
18138      /**
18139       * An array of factories to use in case of `multi` provider.
18140       */
18141      multi;
18142      /**
18143       * Number of `multi`-providers which belong to the component.
18144       *
18145       * This is needed because when multiple components and directives declare the `multi` provider
18146       * they have to be concatenated in the correct order.
18147       *
18148       * Example:
18149       *
18150       * If we have a component and directive active an a single element as declared here
18151       * ```ts
18152       * component:
18153       *   providers: [ {provide: String, useValue: 'component', multi: true} ],
18154       *   viewProviders: [ {provide: String, useValue: 'componentView', multi: true} ],
18155       *
18156       * directive:
18157       *   providers: [ {provide: String, useValue: 'directive', multi: true} ],
18158       * ```
18159       *
18160       * Then the expected results are:
18161       *
18162       * ```ts
18163       * providers: ['component', 'directive']
18164       * viewProviders: ['component', 'componentView', 'directive']
18165       * ```
18166       *
18167       * The way to think about it is that the `viewProviders` have been inserted after the component
18168       * but before the directives, which is why we need to know how many `multi`s have been declared by
18169       * the component.
18170       */
18171      componentProviders;
18172      /**
18173       * Current index of the Factory in the `data`. Needed for `viewProviders` and `providers` merging.
18174       * See `providerFactory`.
18175       */
18176      index;
18177      /**
18178       * Because the same `multi` provider can be declared in `providers` and `viewProviders` it is
18179       * possible for `viewProviders` to shadow the `providers`. For this reason we store the
18180       * `provideFactory` of the `providers` so that `providers` can be extended with `viewProviders`.
18181       *
18182       * Example:
18183       *
18184       * Given:
18185       * ```ts
18186       * providers: [ {provide: String, useValue: 'all', multi: true} ],
18187       * viewProviders: [ {provide: String, useValue: 'viewOnly', multi: true} ],
18188       * ```
18189       *
18190       * We have to return `['all']` in case of content injection, but `['all', 'viewOnly']` in case
18191       * of view injection. We further have to make sure that the shared instances (in our case
18192       * `all`) are the exact same instance in both the content as well as the view injection. (We
18193       * have to make sure that we don't double instantiate.) For this reason the `viewProviders`
18194       * `Factory` has a pointer to the shadowed `providers` factory so that it can instantiate the
18195       * `providers` (`['all']`) and then extend it with `viewProviders` (`['all'] + ['viewOnly'] =
18196       * ['all', 'viewOnly']`).
18197       */
18198      providerFactory;
18199      constructor(factory, isViewProvider, injectImplementation, name) {
18200        this.factory = factory;
18201        this.name = name;
18202        ngDevMode && assertDefined(factory, "Factory not specified");
18203        ngDevMode && assertEqual(typeof factory, "function", "Expected factory function.");
18204        this.canSeeViewProviders = isViewProvider;
18205        this.injectImpl = injectImplementation;
18206      }
18207    };
18208    includeViewProviders = true;
18209    BLOOM_SIZE = 256;
18210    BLOOM_MASK = BLOOM_SIZE - 1;
18211    BLOOM_BUCKET_BITS = 5;
18212    nextNgElementId = 0;
18213    NOT_FOUND2 = {};
18214    injectionPath = [];
18215    NodeInjector = class {
18216      _tNode;
18217      _lView;
18218      constructor(_tNode, _lView) {
18219        this._tNode = _tNode;
18220        this._lView = _lView;
18221      }
18222      get(token, notFoundValue, flags) {
18223        return getOrCreateInjectable(this._tNode, this._lView, token, convertToBitFlags(flags), notFoundValue);
18224      }
18225    };
18226    Attribute = makeParamDecorator("Attribute", (attributeName2) => ({
18227      attributeName: attributeName2,
18228      __NG_ELEMENT_ID__: () => \u0275\u0275injectAttribute(attributeName2)
18229    }));
18230    _reflect = null;
18231    USE_VALUE2 = getClosureSafeProperty({
18232      provide: String,
18233      useValue: getClosureSafeProperty
18234    });
18235    Injectable = makeDecorator("Injectable", void 0, void 0, void 0, (type, meta) => compileInjectable(type, meta));
18236    ElementRef = class {
18237      /**
18238       * <div class="docs-alert docs-alert-important">
18239       *   <header>Use with caution</header>
18240       *   <p>
18241       *    Use this API as the last resort when direct access to DOM is needed. Use templating and
18242       *    data-binding provided by Angular instead. If used, it is recommended in combination with
18243       *    {@link /best-practices/security#direct-use-of-the-dom-apis-and-explicit-sanitization-calls DomSanitizer}
18244       *    for maxiumum security;
18245       *   </p>
18246       * </div>
18247       */
18248      nativeElement;
18249      constructor(nativeElement) {
18250        this.nativeElement = nativeElement;
18251      }
18252      /**
18253       * @internal
18254       * @nocollapse
18255       */
18256      static __NG_ELEMENT_ID__ = injectElementRef;
18257    };
18258    QueryList = class {
18259      _emitDistinctChangesOnly;
18260      dirty = true;
18261      _onDirty = void 0;
18262      _results = [];
18263      _changesDetected = false;
18264      _changes = void 0;
18265      length = 0;
18266      first = void 0;
18267      last = void 0;
18268      /**
18269       * Returns `Observable` of `QueryList` notifying the subscriber of changes.
18270       */
18271      get changes() {
18272        return this._changes ??= new Subject();
18273      }
18274      /**
18275       * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change
18276       *     has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in
18277       *     the same result)
18278       */
18279      constructor(_emitDistinctChangesOnly = false) {
18280        this._emitDistinctChangesOnly = _emitDistinctChangesOnly;
18281      }
18282      /**
18283       * Returns the QueryList entry at `index`.
18284       */
18285      get(index) {
18286        return this._results[index];
18287      }
18288      /**
18289       * See
18290       * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
18291       */
18292      map(fn) {
18293        return this._results.map(fn);
18294      }
18295      filter(fn) {
18296        return this._results.filter(fn);
18297      }
18298      /**
18299       * See
18300       * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
18301       */
18302      find(fn) {
18303        return this._results.find(fn);
18304      }
18305      /**
18306       * See
18307       * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
18308       */
18309      reduce(fn, init) {
18310        return this._results.reduce(fn, init);
18311      }
18312      /**
18313       * See
18314       * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
18315       */
18316      forEach(fn) {
18317        this._results.forEach(fn);
18318      }
18319      /**
18320       * See
18321       * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
18322       */
18323      some(fn) {
18324        return this._results.some(fn);
18325      }
18326      /**
18327       * Returns a copy of the internal results list as an Array.
18328       */
18329      toArray() {
18330        return this._results.slice();
18331      }
18332      toString() {
18333        return this._results.toString();
18334      }
18335      /**
18336       * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that
18337       * on change detection, it will not notify of changes to the queries, unless a new change
18338       * occurs.
18339       *
18340       * @param resultsTree The query results to store
18341       * @param identityAccessor Optional function for extracting stable object identity from a value
18342       *    in the array. This function is executed for each element of the query result list while
18343       *    comparing current query list with the new one (provided as a first argument of the `reset`
18344       *    function) to detect if the lists are different. If the function is not provided, elements
18345       *    are compared as is (without any pre-processing).
18346       */
18347      reset(resultsTree, identityAccessor) {
18348        this.dirty = false;
18349        const newResultFlat = flatten(resultsTree);
18350        if (this._changesDetected = !arrayEquals(this._results, newResultFlat, identityAccessor)) {
18351          this._results = newResultFlat;
18352          this.length = newResultFlat.length;
18353          this.last = newResultFlat[this.length - 1];
18354          this.first = newResultFlat[0];
18355        }
18356      }
18357      /**
18358       * Triggers a change event by emitting on the `changes` {@link EventEmitter}.
18359       */
18360      notifyOnChanges() {
18361        if (this._changes !== void 0 && (this._changesDetected || !this._emitDistinctChangesOnly))
18362          this._changes.next(this);
18363      }
18364      /** @internal */
18365      onDirty(cb) {
18366        this._onDirty = cb;
18367      }
18368      /** internal */
18369      setDirty() {
18370        this.dirty = true;
18371        this._onDirty?.();
18372      }
18373      /** internal */
18374      destroy() {
18375        if (this._changes !== void 0) {
18376          this._changes.complete();
18377          this._changes.unsubscribe();
18378        }
18379      }
18380      [Symbol.iterator] = /* @__PURE__ */ (() => symbolIterator)();
18381    };
18382    (function(ChangeDetectionStrategy2) {
18383      ChangeDetectionStrategy2[ChangeDetectionStrategy2["OnPush"] = 0] = "OnPush";
18384      ChangeDetectionStrategy2[ChangeDetectionStrategy2["Default"] = 1] = "Default";
18385    })(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));
18386    TRACKED_LVIEWS = /* @__PURE__ */ new Map();
18387    uniqueIdCounter = 0;
18388    LContext = class {
18389      lViewId;
18390      nodeIndex;
18391      native;
18392      /**
18393       * The instance of the Component node.
18394       */
18395      component;
18396      /**
18397       * The list of active directives that exist on this element.
18398       */
18399      directives;
18400      /**
18401       * The map of local references (local reference name => element or directive instance) that
18402       * exist on this element.
18403       */
18404      localRefs;
18405      /** Component's parent view data. */
18406      get lView() {
18407        return getLViewById(this.lViewId);
18408      }
18409      constructor(lViewId, nodeIndex, native) {
18410        this.lViewId = lViewId;
18411        this.nodeIndex = nodeIndex;
18412        this.native = native;
18413      }
18414    };
18415    MONKEY_PATCH_KEY_NAME = "__ngContext__";
18416    (function(Framework2) {
18417      Framework2["Angular"] = "angular";
18418      Framework2["ACX"] = "acx";
18419      Framework2["Wiz"] = "wiz";
18420    })(Framework || (Framework = {}));
18421    (function(AcxChangeDetectionStrategy2) {
18422      AcxChangeDetectionStrategy2[AcxChangeDetectionStrategy2["Default"] = 0] = "Default";
18423      AcxChangeDetectionStrategy2[AcxChangeDetectionStrategy2["OnPush"] = 1] = "OnPush";
18424    })(AcxChangeDetectionStrategy || (AcxChangeDetectionStrategy = {}));
18425    (function(AcxViewEncapsulation2) {
18426      AcxViewEncapsulation2[AcxViewEncapsulation2["Emulated"] = 0] = "Emulated";
18427      AcxViewEncapsulation2[AcxViewEncapsulation2["None"] = 1] = "None";
18428    })(AcxViewEncapsulation || (AcxViewEncapsulation = {}));
18429    DOCUMENT2 = void 0;
18430    APP_ID = new InjectionToken(ngDevMode ? "AppId" : "", {
18431      providedIn: "root",
18432      factory: () => DEFAULT_APP_ID
18433    });
18434    DEFAULT_APP_ID = "ng";
18435    PLATFORM_INITIALIZER = new InjectionToken(ngDevMode ? "Platform Initializer" : "");
18436    PLATFORM_ID = new InjectionToken(ngDevMode ? "Platform ID" : "", {
18437      providedIn: "platform",
18438      factory: () => "unknown"
18439      // set a default platform name, when none set explicitly
18440    });
18441    PACKAGE_ROOT_URL = new InjectionToken(ngDevMode ? "Application Packages Root URL" : "");
18442    ANIMATION_MODULE_TYPE = new InjectionToken(ngDevMode ? "AnimationModuleType" : "");
18443    CSP_NONCE = new InjectionToken(ngDevMode ? "CSP nonce" : "", {
18444      providedIn: "root",
18445      factory: () => {
18446        return getDocument().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce") || null;
18447      }
18448    });
18449    IMAGE_CONFIG_DEFAULTS = {
18450      breakpoints: [16, 32, 48, 64, 96, 128, 256, 384, 640, 750, 828, 1080, 1200, 1920, 2048, 3840],
18451      placeholderResolution: 30,
18452      disableImageSizeWarning: false,
18453      disableImageLazyLoadWarning: false
18454    };
18455    IMAGE_CONFIG = new InjectionToken(ngDevMode ? "ImageConfig" : "", {
18456      providedIn: "root",
18457      factory: () => IMAGE_CONFIG_DEFAULTS
18458    });
18459    TransferState = class _TransferState {
18460      /** @nocollapse */
18461      static \u0275prov = (
18462        /** @pureOrBreakMyCode */
18463        /* @__PURE__ */ \u0275\u0275defineInjectable({
18464          token: _TransferState,
18465          providedIn: "root",
18466          factory: initTransferState
18467        })
18468      );
18469      /** @internal */
18470      store = {};
18471      onSerializeCallbacks = {};
18472      /**
18473       * Get the value corresponding to a key. Return `defaultValue` if key is not found.
18474       */
18475      get(key, defaultValue) {
18476        return this.store[key] !== void 0 ? this.store[key] : defaultValue;
18477      }
18478      /**
18479       * Set the value corresponding to a key.
18480       */
18481      set(key, value) {
18482        this.store[key] = value;
18483      }
18484      /**
18485       * Remove a key from the store.
18486       */
18487      remove(key) {
18488        delete this.store[key];
18489      }
18490      /**
18491       * Test whether a key exists in the store.
18492       */
18493      hasKey(key) {
18494        return this.store.hasOwnProperty(key);
18495      }
18496      /**
18497       * Indicates whether the state is empty.
18498       */
18499      get isEmpty() {
18500        return Object.keys(this.store).length === 0;
18501      }
18502      /**
18503       * Register a callback to provide the value for a key when `toJson` is called.
18504       */
18505      onSerialize(key, callback) {
18506        this.onSerializeCallbacks[key] = callback;
18507      }
18508      /**
18509       * Serialize the current state of the store to JSON.
18510       */
18511      toJson() {
18512        for (const key in this.onSerializeCallbacks) {
18513          if (this.onSerializeCallbacks.hasOwnProperty(key)) {
18514            try {
18515              this.store[key] = this.onSerializeCallbacks[key]();
18516            } catch (e) {
18517              console.warn("Exception in onSerialize callback: ", e);
18518            }
18519          }
18520        }
18521        return JSON.stringify(this.store).replace(/</g, "\\u003C");
18522      }
18523    };
18524    REFERENCE_NODE_HOST = "h";
18525    REFERENCE_NODE_BODY = "b";
18526    NUM_ROOT_NODES = "r";
18527    DEFER_BLOCK_ID = "di";
18528    DEFER_BLOCK_STATE$1 = "s";
18529    DEFER_PARENT_BLOCK_ID = "p";
18530    IS_HYDRATION_DOM_REUSE_ENABLED = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "IS_HYDRATION_DOM_REUSE_ENABLED" : "");
18531    PRESERVE_HOST_CONTENT_DEFAULT = false;
18532    PRESERVE_HOST_CONTENT = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "PRESERVE_HOST_CONTENT" : "", {
18533      providedIn: "root",
18534      factory: () => PRESERVE_HOST_CONTENT_DEFAULT
18535    });
18536    IS_I18N_HYDRATION_ENABLED = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "IS_I18N_HYDRATION_ENABLED" : "");
18537    IS_EVENT_REPLAY_ENABLED = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "IS_EVENT_REPLAY_ENABLED" : "");
18538    IS_INCREMENTAL_HYDRATION_ENABLED = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "IS_INCREMENTAL_HYDRATION_ENABLED" : "");
18539    JSACTION_BLOCK_ELEMENT_MAP = new InjectionToken(ngDevMode ? "JSACTION_BLOCK_ELEMENT_MAP" : "", {
18540      providedIn: "root",
18541      factory: () => /* @__PURE__ */ new Map()
18542    });
18543    IS_ENABLED_BLOCKING_INITIAL_NAVIGATION = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "IS_ENABLED_BLOCKING_INITIAL_NAVIGATION" : "");
18544    eventListenerOptions = {
18545      passive: true,
18546      capture: true
18547    };
18548    hoverTriggers = /* @__PURE__ */ new WeakMap();
18549    interactionTriggers = /* @__PURE__ */ new WeakMap();
18550    viewportTriggers = /* @__PURE__ */ new WeakMap();
18551    interactionEventNames = ["click", "keydown"];
18552    hoverEventNames = ["mouseenter", "mouseover", "focusin"];
18553    intersectionObserver = null;
18554    observedViewportElements = 0;
18555    DeferEventEntry = class {
18556      callbacks = /* @__PURE__ */ new Set();
18557      listener = () => {
18558        for (const callback of this.callbacks) {
18559          callback();
18560        }
18561      };
18562    };
18563    JSACTION_EVENT_CONTRACT = new InjectionToken(ngDevMode ? "EVENT_CONTRACT_DETAILS" : "", {
18564      providedIn: "root",
18565      factory: () => ({})
18566    });
18567    _stashEventListenerImpl = (lView, target, eventName, wrappedListener) => {
18568    };
18569    DEHYDRATED_BLOCK_REGISTRY = new InjectionToken(ngDevMode ? "DEHYDRATED_BLOCK_REGISTRY" : "");
18570    TRANSFER_STATE_TOKEN_ID = "__nghData__";
18571    NGH_DATA_KEY = makeStateKey(TRANSFER_STATE_TOKEN_ID);
18572    TRANSFER_STATE_DEFER_BLOCKS_INFO = "__nghDeferData__";
18573    NGH_DEFER_BLOCKS_KEY = makeStateKey(TRANSFER_STATE_DEFER_BLOCKS_INFO);
18574    _retrieveHydrationInfoImpl = () => null;
18575    (function(HydrationStatus2) {
18576      HydrationStatus2["Hydrated"] = "hydrated";
18577      HydrationStatus2["Skipped"] = "skipped";
18578      HydrationStatus2["Mismatched"] = "mismatched";
18579    })(HydrationStatus || (HydrationStatus = {}));
18580    HYDRATION_INFO_KEY = "__ngDebugHydrationInfo__";
18581    incrementalHydrationEnabledWarned = false;
18582    (function(ViewEncapsulation3) {
18583      ViewEncapsulation3[ViewEncapsulation3["Emulated"] = 0] = "Emulated";
18584      ViewEncapsulation3[ViewEncapsulation3["None"] = 2] = "None";
18585      ViewEncapsulation3[ViewEncapsulation3["ShadowDom"] = 3] = "ShadowDom";
18586    })(ViewEncapsulation || (ViewEncapsulation = {}));
18587    CUSTOM_ELEMENTS_SCHEMA = {
18588      name: "custom-elements"
18589    };
18590    NO_ERRORS_SCHEMA = {
18591      name: "no-errors-schema"
18592    };
18593    shouldThrowErrorOnUnknownElement = false;
18594    shouldThrowErrorOnUnknownProperty = false;
18595    KNOWN_CONTROL_FLOW_DIRECTIVES = /* @__PURE__ */ new Map([
18596      ["ngIf", "NgIf"],
18597      ["ngFor", "NgFor"],
18598      ["ngSwitchCase", "NgSwitchCase"],
18599      ["ngSwitchDefault", "NgSwitchDefault"]
18600    ]);
18601    SafeValueImpl = class {
18602      changingThisBreaksApplicationSecurity;
18603      constructor(changingThisBreaksApplicationSecurity) {
18604        this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;
18605      }
18606      toString() {
18607        return `SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${XSS_SECURITY_URL})`;
18608      }
18609    };
18610    SafeHtmlImpl = class extends SafeValueImpl {
18611      getTypeName() {
18612        return "HTML";
18613      }
18614    };
18615    SafeStyleImpl = class extends SafeValueImpl {
18616      getTypeName() {
18617        return "Style";
18618      }
18619    };
18620    SafeScriptImpl = class extends SafeValueImpl {
18621      getTypeName() {
18622        return "Script";
18623      }
18624    };
18625    SafeUrlImpl = class extends SafeValueImpl {
18626      getTypeName() {
18627        return "URL";
18628      }
18629    };
18630    SafeResourceUrlImpl = class extends SafeValueImpl {
18631      getTypeName() {
18632        return "ResourceURL";
18633      }
18634    };
18635    DOMParserHelper = class {
18636      inertDocumentHelper;
18637      constructor(inertDocumentHelper) {
18638        this.inertDocumentHelper = inertDocumentHelper;
18639      }
18640      getInertBodyElement(html) {
18641        html = "<body><remove></remove>" + html;
18642        try {
18643          const body = new window.DOMParser().parseFromString(trustedHTMLFromString(html), "text/html").body;
18644          if (body === null) {
18645            return this.inertDocumentHelper.getInertBodyElement(html);
18646          }
18647          body.firstChild?.remove();
18648          return body;
18649        } catch {
18650          return null;
18651        }
18652      }
18653    };
18654    InertDocumentHelper = class {
18655      defaultDoc;
18656      inertDocument;
18657      constructor(defaultDoc) {
18658        this.defaultDoc = defaultDoc;
18659        this.inertDocument = this.defaultDoc.implementation.createHTMLDocument("sanitization-inert");
18660      }
18661      getInertBodyElement(html) {
18662        const templateEl = this.inertDocument.createElement("template");
18663        templateEl.innerHTML = trustedHTMLFromString(html);
18664        return templateEl;
18665      }
18666    };
18667    SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;
18668    VOID_ELEMENTS = tagSet("area,br,col,hr,img,wbr");
18669    OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr");
18670    OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet("rp,rt");
18671    OPTIONAL_END_TAG_ELEMENTS = merge2(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);
18672    BLOCK_ELEMENTS = merge2(OPTIONAL_END_TAG_BLOCK_ELEMENTS, tagSet("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul"));
18673    INLINE_ELEMENTS = merge2(OPTIONAL_END_TAG_INLINE_ELEMENTS, tagSet("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video"));
18674    VALID_ELEMENTS = merge2(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);
18675    URI_ATTRS = tagSet("background,cite,href,itemtype,longdesc,poster,src,xlink:href");
18676    HTML_ATTRS = tagSet("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width");
18677    ARIA_ATTRS = tagSet("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext");
18678    VALID_ATTRS = merge2(URI_ATTRS, HTML_ATTRS, ARIA_ATTRS);
18679    SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet("script,style,template");
18680    SanitizingHtmlSerializer = class {
18681      // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just
18682      // because characters were re-encoded.
18683      sanitizedSomething = false;
18684      buf = [];
18685      sanitizeChildren(el) {
18686        let current = el.firstChild;
18687        let traverseContent = true;
18688        let parentNodes = [];
18689        while (current) {
18690          if (current.nodeType === Node.ELEMENT_NODE) {
18691            traverseContent = this.startElement(current);
18692          } else if (current.nodeType === Node.TEXT_NODE) {
18693            this.chars(current.nodeValue);
18694          } else {
18695            this.sanitizedSomething = true;
18696          }
18697          if (traverseContent && current.firstChild) {
18698            parentNodes.push(current);
18699            current = getFirstChild(current);
18700            continue;
18701          }
18702          while (current) {
18703            if (current.nodeType === Node.ELEMENT_NODE) {
18704              this.endElement(current);
18705            }
18706            let next = getNextSibling(current);
18707            if (next) {
18708              current = next;
18709              break;
18710            }
18711            current = parentNodes.pop();
18712          }
18713        }
18714        return this.buf.join("");
18715      }
18716      /**
18717       * Sanitizes an opening element tag (if valid) and returns whether the element's contents should
18718       * be traversed. Element content must always be traversed (even if the element itself is not
18719       * valid/safe), unless the element is one of `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS`.
18720       *
18721       * @param element The element to sanitize.
18722       * @return True if the element's contents should be traversed.
18723       */
18724      startElement(element) {
18725        const tagName = getNodeName(element).toLowerCase();
18726        if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {
18727          this.sanitizedSomething = true;
18728          return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName);
18729        }
18730        this.buf.push("<");
18731        this.buf.push(tagName);
18732        const elAttrs = element.attributes;
18733        for (let i = 0; i < elAttrs.length; i++) {
18734          const elAttr = elAttrs.item(i);
18735          const attrName = elAttr.name;
18736          const lower = attrName.toLowerCase();
18737          if (!VALID_ATTRS.hasOwnProperty(lower)) {
18738            this.sanitizedSomething = true;
18739            continue;
18740          }
18741          let value = elAttr.value;
18742          if (URI_ATTRS[lower])
18743            value = _sanitizeUrl(value);
18744          this.buf.push(" ", attrName, '="', encodeEntities(value), '"');
18745        }
18746        this.buf.push(">");
18747        return true;
18748      }
18749      endElement(current) {
18750        const tagName = getNodeName(current).toLowerCase();
18751        if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {
18752          this.buf.push("</");
18753          this.buf.push(tagName);
18754          this.buf.push(">");
18755        }
18756      }
18757      chars(chars) {
18758        this.buf.push(encodeEntities(chars));
18759      }
18760    };
18761    SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
18762    NON_ALPHANUMERIC_REGEXP = /([^\#-~ |!])/g;
18763    COMMENT_DISALLOWED = /^>|^->|<!--|-->|--!>|<!-$/g;
18764    COMMENT_DELIMITER = /(<|>)/g;
18765    COMMENT_DELIMITER_ESCAPED = "\u200B$1\u200B";
18766    (function(SecurityContext2) {
18767      SecurityContext2[SecurityContext2["NONE"] = 0] = "NONE";
18768      SecurityContext2[SecurityContext2["HTML"] = 1] = "HTML";
18769      SecurityContext2[SecurityContext2["STYLE"] = 2] = "STYLE";
18770      SecurityContext2[SecurityContext2["SCRIPT"] = 3] = "SCRIPT";
18771      SecurityContext2[SecurityContext2["URL"] = 4] = "URL";
18772      SecurityContext2[SecurityContext2["RESOURCE_URL"] = 5] = "RESOURCE_URL";
18773    })(SecurityContext || (SecurityContext = {}));
18774    attributeName = /* @__PURE__ */ new Set(["attributename"]);
18775    SECURITY_SENSITIVE_ELEMENTS = {
18776      "iframe": /* @__PURE__ */ new Set([
18777        "sandbox",
18778        "allow",
18779        "allowfullscreen",
18780        "referrerpolicy",
18781        "csp",
18782        "fetchpriority"
18783      ]),
18784      "animate": attributeName,
18785      "set": attributeName,
18786      "animatemotion": attributeName,
18787      "animatetransform": attributeName
18788    };
18789    NG_REFLECT_ATTRS_FLAG_DEFAULT = false;
18790    NG_REFLECT_ATTRS_FLAG = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "NG_REFLECT_FLAG" : "", {
18791      providedIn: "root",
18792      factory: () => NG_REFLECT_ATTRS_FLAG_DEFAULT
18793    });
18794    CAMEL_CASE_REGEXP = /([A-Z])/g;
18795    INTERPOLATION_DELIMITER = `\uFFFD`;
18796    VALUE_STRING_LENGTH_LIMIT = 200;
18797    NG_TEMPLATE_SELECTOR = "ng-template";
18798    NO_CHANGE = typeof ngDevMode === "undefined" || ngDevMode ? { __brand__: "NO_CHANGE" } : {};
18799    (function(InputFlags2) {
18800      InputFlags2[InputFlags2["None"] = 0] = "None";
18801      InputFlags2[InputFlags2["SignalBased"] = 1] = "SignalBased";
18802      InputFlags2[InputFlags2["HasDecoratorInputTransform"] = 2] = "HasDecoratorInputTransform";
18803    })(InputFlags || (InputFlags = {}));
18804    (function(RendererStyleFlags22) {
18805      RendererStyleFlags22[RendererStyleFlags22["Important"] = 1] = "Important";
18806      RendererStyleFlags22[RendererStyleFlags22["DashCase"] = 2] = "DashCase";
18807    })(RendererStyleFlags2 || (RendererStyleFlags2 = {}));
18808    allLeavingAnimations = /* @__PURE__ */ new Set();
18809    (function(TracingAction2) {
18810      TracingAction2[TracingAction2["CHANGE_DETECTION"] = 0] = "CHANGE_DETECTION";
18811      TracingAction2[TracingAction2["AFTER_NEXT_RENDER"] = 1] = "AFTER_NEXT_RENDER";
18812    })(TracingAction || (TracingAction = {}));
18813    TracingService = new InjectionToken(ngDevMode ? "TracingService" : "");
18814    markedFeatures = /* @__PURE__ */ new Set();
18815    SCHEDULE_IN_ROOT_ZONE_DEFAULT = false;
18816    EventEmitter_ = class extends Subject {
18817      // tslint:disable-next-line:require-internal-with-underscore
18818      __isAsync;
18819      destroyRef = void 0;
18820      pendingTasks = void 0;
18821      constructor(isAsync = false) {
18822        super();
18823        this.__isAsync = isAsync;
18824        if (isInInjectionContext()) {
18825          this.destroyRef = inject2(DestroyRef, { optional: true }) ?? void 0;
18826          this.pendingTasks = inject2(PendingTasksInternal, { optional: true }) ?? void 0;
18827        }
18828      }
18829      emit(value) {
18830        const prevConsumer = setActiveConsumer(null);
18831        try {
18832          super.next(value);
18833        } finally {
18834          setActiveConsumer(prevConsumer);
18835        }
18836      }
18837      subscribe(observerOrNext, error, complete) {
18838        let nextFn = observerOrNext;
18839        let errorFn = error || (() => null);
18840        let completeFn = complete;
18841        if (observerOrNext && typeof observerOrNext === "object") {
18842          const observer = observerOrNext;
18843          nextFn = observer.next?.bind(observer);
18844          errorFn = observer.error?.bind(observer);
18845          completeFn = observer.complete?.bind(observer);
18846        }
18847        if (this.__isAsync) {
18848          errorFn = this.wrapInTimeout(errorFn);
18849          if (nextFn) {
18850            nextFn = this.wrapInTimeout(nextFn);
18851          }
18852          if (completeFn) {
18853            completeFn = this.wrapInTimeout(completeFn);
18854          }
18855        }
18856        const sink = super.subscribe({ next: nextFn, error: errorFn, complete: completeFn });
18857        if (observerOrNext instanceof Subscription) {
18858          observerOrNext.add(sink);
18859        }
18860        return sink;
18861      }
18862      wrapInTimeout(fn) {
18863        return (value) => {
18864          const taskId = this.pendingTasks?.add();
18865          setTimeout(() => {
18866            try {
18867              fn(value);
18868            } finally {
18869              if (taskId !== void 0) {
18870                this.pendingTasks?.remove(taskId);
18871              }
18872            }
18873          });
18874        };
18875      }
18876    };
18877    EventEmitter = EventEmitter_;
18878    AsyncStackTaggingZoneSpec = class {
18879      createTask;
18880      constructor(namePrefix, consoleAsyncStackTaggingImpl = console) {
18881        this.name = "asyncStackTagging for " + namePrefix;
18882        this.createTask = consoleAsyncStackTaggingImpl?.createTask ?? (() => null);
18883      }
18884      // ZoneSpec implementation below.
18885      name;
18886      onScheduleTask(delegate, _current, target, task) {
18887        task.consoleTask = this.createTask(`Zone - ${task.source || task.type}`);
18888        return delegate.scheduleTask(target, task);
18889      }
18890      onInvokeTask(delegate, _currentZone, targetZone, task, applyThis, applyArgs) {
18891        let ret;
18892        if (task.consoleTask) {
18893          ret = task.consoleTask.run(() => delegate.invokeTask(targetZone, task, applyThis, applyArgs));
18894        } else {
18895          ret = delegate.invokeTask(targetZone, task, applyThis, applyArgs);
18896        }
18897        return ret;
18898      }
18899    };
18900    isAngularZoneProperty = "isAngularZone";
18901    angularZoneInstanceIdProperty = isAngularZoneProperty + "_ID";
18902    ngZoneInstanceId = 0;
18903    NgZone = class _NgZone {
18904      hasPendingMacrotasks = false;
18905      hasPendingMicrotasks = false;
18906      /**
18907       * Whether there are no outstanding microtasks or macrotasks.
18908       */
18909      isStable = true;
18910      /**
18911       * Notifies when code enters Angular Zone. This gets fired first on VM Turn.
18912       */
18913      onUnstable = new EventEmitter(false);
18914      /**
18915       * Notifies when there is no more microtasks enqueued in the current VM Turn.
18916       * This is a hint for Angular to do change detection, which may enqueue more microtasks.
18917       * For this reason this event can fire multiple times per VM Turn.
18918       */
18919      onMicrotaskEmpty = new EventEmitter(false);
18920      /**
18921       * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which
18922       * implies we are about to relinquish VM turn.
18923       * This event gets called just once.
18924       */
18925      onStable = new EventEmitter(false);
18926      /**
18927       * Notifies that an error has been delivered.
18928       */
18929      onError = new EventEmitter(false);
18930      constructor(options) {
18931        const { enableLongStackTrace = false, shouldCoalesceEventChangeDetection = false, shouldCoalesceRunChangeDetection = false, scheduleInRootZone = SCHEDULE_IN_ROOT_ZONE_DEFAULT } = options;
18932        if (typeof Zone == "undefined") {
18933          throw new RuntimeError(908, ngDevMode && `In this configuration Angular requires Zone.js`);
18934        }
18935        Zone.assertZonePatched();
18936        const self = this;
18937        self._nesting = 0;
18938        self._outer = self._inner = Zone.current;
18939        if (ngDevMode) {
18940          self._inner = self._inner.fork(new AsyncStackTaggingZoneSpec("Angular"));
18941        }
18942        if (Zone["TaskTrackingZoneSpec"]) {
18943          self._inner = self._inner.fork(new Zone["TaskTrackingZoneSpec"]());
18944        }
18945        if (enableLongStackTrace && Zone["longStackTraceZoneSpec"]) {
18946          self._inner = self._inner.fork(Zone["longStackTraceZoneSpec"]);
18947        }
18948        self.shouldCoalesceEventChangeDetection = !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection;
18949        self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection;
18950        self.callbackScheduled = false;
18951        self.scheduleInRootZone = scheduleInRootZone;
18952        forkInnerZoneWithAngularBehavior(self);
18953      }
18954      /**
18955        This method checks whether the method call happens within an Angular Zone instance.
18956      */
18957      static isInAngularZone() {
18958        return typeof Zone !== "undefined" && Zone.current.get(isAngularZoneProperty) === true;
18959      }
18960      /**
18961        Assures that the method is called within the Angular Zone, otherwise throws an error.
18962      */
18963      static assertInAngularZone() {
18964        if (!_NgZone.isInAngularZone()) {
18965          throw new RuntimeError(909, ngDevMode && "Expected to be in Angular Zone, but it is not!");
18966        }
18967      }
18968      /**
18969        Assures that the method is called outside of the Angular Zone, otherwise throws an error.
18970      */
18971      static assertNotInAngularZone() {
18972        if (_NgZone.isInAngularZone()) {
18973          throw new RuntimeError(909, ngDevMode && "Expected to not be in Angular Zone, but it is!");
18974        }
18975      }
18976      /**
18977       * Executes the `fn` function synchronously within the Angular zone and returns value returned by
18978       * the function.
18979       *
18980       * Running functions via `run` allows you to reenter Angular zone from a task that was executed
18981       * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
18982       *
18983       * Any future tasks or microtasks scheduled from within this function will continue executing from
18984       * within the Angular zone.
18985       *
18986       * If a synchronous error happens it will be rethrown and not reported via `onError`.
18987       */
18988      run(fn, applyThis, applyArgs) {
18989        return this._inner.run(fn, applyThis, applyArgs);
18990      }
18991      /**
18992       * Executes the `fn` function synchronously within the Angular zone as a task and returns value
18993       * returned by the function.
18994       *
18995       * Running functions via `runTask` allows you to reenter Angular zone from a task that was executed
18996       * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
18997       *
18998       * Any future tasks or microtasks scheduled from within this function will continue executing from
18999       * within the Angular zone.
19000       *
19001       * If a synchronous error happens it will be rethrown and not reported via `onError`.
19002       */
19003      runTask(fn, applyThis, applyArgs, name) {
19004        const zone = this._inner;
19005        const task = zone.scheduleEventTask("NgZoneEvent: " + name, fn, EMPTY_PAYLOAD, noop2, noop2);
19006        try {
19007          return zone.runTask(task, applyThis, applyArgs);
19008        } finally {
19009          zone.cancelTask(task);
19010        }
19011      }
19012      /**
19013       * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
19014       * rethrown.
19015       */
19016      runGuarded(fn, applyThis, applyArgs) {
19017        return this._inner.runGuarded(fn, applyThis, applyArgs);
19018      }
19019      /**
19020       * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
19021       * the function.
19022       *
19023       * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
19024       * work that
19025       * doesn't trigger Angular change-detection or is subject to Angular's error handling.
19026       *
19027       * Any future tasks or microtasks scheduled from within this function will continue executing from
19028       * outside of the Angular zone.
19029       *
19030       * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
19031       */
19032      runOutsideAngular(fn) {
19033        return this._outer.run(fn);
19034      }
19035    };
19036    EMPTY_PAYLOAD = {};
19037    NoopNgZone = class {
19038      hasPendingMicrotasks = false;
19039      hasPendingMacrotasks = false;
19040      isStable = true;
19041      onUnstable = new EventEmitter();
19042      onMicrotaskEmpty = new EventEmitter();
19043      onStable = new EventEmitter();
19044      onError = new EventEmitter();
19045      run(fn, applyThis, applyArgs) {
19046        return fn.apply(applyThis, applyArgs);
19047      }
19048      runGuarded(fn, applyThis, applyArgs) {
19049        return fn.apply(applyThis, applyArgs);
19050      }
19051      runOutsideAngular(fn) {
19052        return fn();
19053      }
19054      runTask(fn, applyThis, applyArgs, name) {
19055        return fn.apply(applyThis, applyArgs);
19056      }
19057    };
19058    AfterRenderManager = class _AfterRenderManager {
19059      impl = null;
19060      execute() {
19061        this.impl?.execute();
19062      }
19063      /** @nocollapse */
19064      static \u0275prov = (
19065        /** @pureOrBreakMyCode */
19066        /* @__PURE__ */ \u0275\u0275defineInjectable({
19067          token: _AfterRenderManager,
19068          providedIn: "root",
19069          factory: () => new _AfterRenderManager()
19070        })
19071      );
19072    };
19073    AFTER_RENDER_PHASES = /* @__PURE__ */ (() => [
19074      0,
19075      1,
19076      2,
19077      3
19078    ])();
19079    AfterRenderImpl = class _AfterRenderImpl {
19080      ngZone = inject2(NgZone);
19081      scheduler = inject2(ChangeDetectionScheduler);
19082      errorHandler = inject2(ErrorHandler, { optional: true });
19083      /** Current set of active sequences. */
19084      sequences = /* @__PURE__ */ new Set();
19085      /** Tracks registrations made during the current set of executions. */
19086      deferredRegistrations = /* @__PURE__ */ new Set();
19087      /** Whether the `AfterRenderManager` is currently executing hooks. */
19088      executing = false;
19089      constructor() {
19090        inject2(TracingService, { optional: true });
19091      }
19092      /**
19093       * Run the sequence of phases of hooks, once through. As a result of executing some hooks, more
19094       * might be scheduled.
19095       */
19096      execute() {
19097        const hasSequencesToExecute = this.sequences.size > 0;
19098        if (hasSequencesToExecute) {
19099          profiler(
19100            16
19101            /* ProfilerEvent.AfterRenderHooksStart */
19102          );
19103        }
19104        this.executing = true;
19105        for (const phase of AFTER_RENDER_PHASES) {
19106          for (const sequence of this.sequences) {
19107            if (sequence.erroredOrDestroyed || !sequence.hooks[phase]) {
19108              continue;
19109            }
19110            try {
19111              sequence.pipelinedValue = this.ngZone.runOutsideAngular(() => this.maybeTrace(() => {
19112                const hookFn = sequence.hooks[phase];
19113                const value = hookFn(sequence.pipelinedValue);
19114                return value;
19115              }, sequence.snapshot));
19116            } catch (err) {
19117              sequence.erroredOrDestroyed = true;
19118              this.errorHandler?.handleError(err);
19119            }
19120          }
19121        }
19122        this.executing = false;
19123        for (const sequence of this.sequences) {
19124          sequence.afterRun();
19125          if (sequence.once) {
19126            this.sequences.delete(sequence);
19127            sequence.destroy();
19128          }
19129        }
19130        for (const sequence of this.deferredRegistrations) {
19131          this.sequences.add(sequence);
19132        }
19133        if (this.deferredRegistrations.size > 0) {
19134          this.scheduler.notify(
19135            7
19136            /* NotificationSource.RenderHook */
19137          );
19138        }
19139        this.deferredRegistrations.clear();
19140        if (hasSequencesToExecute) {
19141          profiler(
19142            17
19143            /* ProfilerEvent.AfterRenderHooksEnd */
19144          );
19145        }
19146      }
19147      register(sequence) {
19148        const { view } = sequence;
19149        if (view !== void 0) {
19150          (view[AFTER_RENDER_SEQUENCES_TO_ADD] ??= []).push(sequence);
19151          markAncestorsForTraversal(view);
19152          view[FLAGS] |= 8192;
19153        } else if (!this.executing) {
19154          this.addSequence(sequence);
19155        } else {
19156          this.deferredRegistrations.add(sequence);
19157        }
19158      }
19159      addSequence(sequence) {
19160        this.sequences.add(sequence);
19161        this.scheduler.notify(
19162          7
19163          /* NotificationSource.RenderHook */
19164        );
19165      }
19166      unregister(sequence) {
19167        if (this.executing && this.sequences.has(sequence)) {
19168          sequence.erroredOrDestroyed = true;
19169          sequence.pipelinedValue = void 0;
19170          sequence.once = true;
19171        } else {
19172          this.sequences.delete(sequence);
19173          this.deferredRegistrations.delete(sequence);
19174        }
19175      }
19176      maybeTrace(fn, snapshot) {
19177        return snapshot ? snapshot.run(TracingAction.AFTER_NEXT_RENDER, fn) : fn();
19178      }
19179      /** @nocollapse */
19180      static \u0275prov = (
19181        /** @pureOrBreakMyCode */
19182        /* @__PURE__ */ \u0275\u0275defineInjectable({
19183          token: _AfterRenderImpl,
19184          providedIn: "root",
19185          factory: () => new _AfterRenderImpl()
19186        })
19187      );
19188    };
19189    AfterRenderSequence = class {
19190      impl;
19191      hooks;
19192      view;
19193      once;
19194      snapshot;
19195      /**
19196       * Whether this sequence errored or was destroyed during this execution, and hooks should no
19197       * longer run for it.
19198       */
19199      erroredOrDestroyed = false;
19200      /**
19201       * The value returned by the last hook execution (if any), ready to be pipelined into the next
19202       * one.
19203       */
19204      pipelinedValue = void 0;
19205      unregisterOnDestroy;
19206      constructor(impl, hooks, view, once, destroyRef, snapshot = null) {
19207        this.impl = impl;
19208        this.hooks = hooks;
19209        this.view = view;
19210        this.once = once;
19211        this.snapshot = snapshot;
19212        this.unregisterOnDestroy = destroyRef?.onDestroy(() => this.destroy());
19213      }
19214      afterRun() {
19215        this.erroredOrDestroyed = false;
19216        this.pipelinedValue = void 0;
19217        this.snapshot?.dispose();
19218        this.snapshot = null;
19219      }
19220      destroy() {
19221        this.impl.unregister(this);
19222        this.unregisterOnDestroy?.();
19223        const scheduled2 = this.view?.[AFTER_RENDER_SEQUENCES_TO_ADD];
19224        if (scheduled2) {
19225          this.view[AFTER_RENDER_SEQUENCES_TO_ADD] = scheduled2.filter((s) => s !== this);
19226        }
19227      }
19228    };
19229    ANIMATION_QUEUE = new InjectionToken(typeof ngDevMode !== "undefined" && ngDevMode ? "AnimationQueue" : "", {
19230      providedIn: "root",
19231      factory: () => {
19232        return {
19233          queue: /* @__PURE__ */ new Set(),
19234          isScheduled: false,
19235          scheduler: null
19236        };
19237      }
19238    });
19239    _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithNoI18n;
19240    _applyRootElementTransformImpl = () => null;
19241    USE_EXHAUSTIVE_CHECK_NO_CHANGES_DEFAULT = false;
19242    UseExhaustiveCheckNoChanges = new InjectionToken(ngDevMode ? "exhaustive checkNoChanges" : "");
19243    freeConsumers = [];
19244    REACTIVE_LVIEW_CONSUMER_NODE = __spreadProps(__spreadValues({}, REACTIVE_NODE), {
19245      consumerIsAlwaysLive: true,
19246      kind: "template",
19247      consumerMarkedDirty: (node) => {
19248        markAncestorsForTraversal(node.lView);
19249      },
19250      consumerOnSignalRead() {
19251        this.lView[REACTIVE_TEMPLATE_CONSUMER] = this;
19252      }
19253    });
19254    TEMPORARY_CONSUMER_NODE = __spreadProps(__spreadValues({}, REACTIVE_NODE), {
19255      consumerIsAlwaysLive: true,
19256      kind: "template",
19257      consumerMarkedDirty: (node) => {
19258        let parent = getLViewParent(node.lView);
19259        while (parent && !viewShouldHaveReactiveConsumer(parent[TVIEW])) {
19260          parent = getLViewParent(parent);
19261        }
19262        if (!parent) {
19263          return;
19264        }
19265        markViewForRefresh(parent);
19266      },
19267      consumerOnSignalRead() {
19268        this.lView[REACTIVE_TEMPLATE_CONSUMER] = this;
19269      }
19270    });
19271    MAXIMUM_REFRESH_RERUNS$1 = 100;
19272    ViewRef = class {
19273      _lView;
19274      _cdRefInjectingView;
19275      _appRef = null;
19276      _attachedToViewContainer = false;
19277      exhaustive;
19278      get rootNodes() {
19279        const lView = this._lView;
19280        const tView = lView[TVIEW];
19281        return collectNativeNodes(tView, lView, tView.firstChild, []);
19282      }
19283      constructor(_lView, _cdRefInjectingView) {
19284        this._lView = _lView;
19285        this._cdRefInjectingView = _cdRefInjectingView;
19286      }
19287      get context() {
19288        return this._lView[CONTEXT];
19289      }
19290      /**
19291       * @deprecated Replacing the full context object is not supported. Modify the context
19292       *   directly, or consider using a `Proxy` if you need to replace the full object.
19293       * // TODO(devversion): Remove this.
19294       */
19295      set context(value) {
19296        if (ngDevMode) {
19297          console.warn("Angular: Replacing the `context` object of an `EmbeddedViewRef` is deprecated.");
19298        }
19299        this._lView[CONTEXT] = value;
19300      }
19301      get destroyed() {
19302        return isDestroyed(this._lView);
19303      }
19304      destroy() {
19305        if (this._appRef) {
19306          this._appRef.detachView(this);
19307        } else if (this._attachedToViewContainer) {
19308          const parent = this._lView[PARENT];
19309          if (isLContainer(parent)) {
19310            const viewRefs = parent[VIEW_REFS];
19311            const index = viewRefs ? viewRefs.indexOf(this) : -1;
19312            if (index > -1) {
19313              ngDevMode && assertEqual(index, parent.indexOf(this._lView) - CONTAINER_HEADER_OFFSET, "An attached view should be in the same position within its container as its ViewRef in the VIEW_REFS array.");
19314              detachView(parent, index);
19315              removeFromArray(viewRefs, index);
19316            }
19317          }
19318          this._attachedToViewContainer = false;
19319        }
19320        destroyLView(this._lView[TVIEW], this._lView);
19321      }
19322      onDestroy(callback) {
19323        storeLViewOnDestroy(this._lView, callback);
19324      }
19325      /**
19326       * Marks a view and all of its ancestors dirty.
19327       *
19328       * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush} component is
19329       * checked when it needs to be re-rendered but the two normal triggers haven't marked it
19330       * dirty (i.e. inputs haven't changed and events haven't fired in the view).
19331       *
19332       * <!-- TODO: Add a link to a chapter on OnPush components -->
19333       *
19334       * @usageNotes
19335       * ### Example
19336       *
19337       * ```ts
19338       * @Component({
19339       *   selector: 'app-root',
19340       *   template: `Number of ticks: {{numberOfTicks}}`
19341       *   changeDetection: ChangeDetectionStrategy.OnPush,
19342       * })
19343       * class AppComponent {
19344       *   numberOfTicks = 0;
19345       *
19346       *   constructor(private ref: ChangeDetectorRef) {
19347       *     setInterval(() => {
19348       *       this.numberOfTicks++;
19349       *       // the following is required, otherwise the view will not be updated
19350       *       this.ref.markForCheck();
19351       *     }, 1000);
19352       *   }
19353       * }
19354       * ```
19355       */
19356      markForCheck() {
19357        markViewDirty(
19358          this._cdRefInjectingView || this._lView,
19359          4
19360          /* NotificationSource.MarkForCheck */
19361        );
19362      }
19363      /**
19364       * Detaches the view from the change detection tree.
19365       *
19366       * Detached views will not be checked during change detection runs until they are
19367       * re-attached, even if they are dirty. `detach` can be used in combination with
19368       * {@link ChangeDetectorRef#detectChanges} to implement local change
19369       * detection checks.
19370       *
19371       * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
19372       * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
19373       *
19374       * @usageNotes
19375       * ### Example
19376       *
19377       * The following example defines a component with a large list of readonly data.
19378       * Imagine the data changes constantly, many times per second. For performance reasons,
19379       * we want to check and update the list every five seconds. We can do that by detaching
19380       * the component's change detector and doing a local check every five seconds.
19381       *
19382       * ```ts
19383       * class DataProvider {
19384       *   // in a real application the returned data will be different every time
19385       *   get data() {
19386       *     return [1,2,3,4,5];
19387       *   }
19388       * }
19389       *
19390       * @Component({
19391       *   selector: 'giant-list',
19392       *   template: `
19393       *     @for(d of dataProvider.data; track $index) {
19394       *        <li>Data {{d}}</li>
19395       *     }
19396       *   `,
19397       * })
19398       * class GiantList {
19399       *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {
19400       *     ref.detach();
19401       *     setInterval(() => {
19402       *       this.ref.detectChanges();
19403       *     }, 5000);
19404       *   }
19405       * }
19406       *
19407       * @Component({
19408       *   selector: 'app',
19409       *   providers: [DataProvider],
19410       *   template: `
19411       *     <giant-list><giant-list>
19412       *   `,
19413       * })
19414       * class App {
19415       * }
19416       * ```
19417       */
19418      detach() {
19419        this._lView[FLAGS] &= ~128;
19420      }
19421      /**
19422       * Re-attaches a view to the change detection tree.
19423       *
19424       * This can be used to re-attach views that were previously detached from the tree
19425       * using {@link ChangeDetectorRef#detach}. Views are attached to the tree by default.
19426       *
19427       * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
19428       *
19429       * @usageNotes
19430       * ### Example
19431       *
19432       * The following example creates a component displaying `live` data. The component will detach
19433       * its change detector from the main change detector tree when the component's live property
19434       * is set to false.
19435       *
19436       * ```ts
19437       * class DataProvider {
19438       *   data = 1;
19439       *
19440       *   constructor() {
19441       *     setInterval(() => {
19442       *       this.data = this.data * 2;
19443       *     }, 500);
19444       *   }
19445       * }
19446       *
19447       * @Component({
19448       *   selector: 'live-data',
19449       *   inputs: ['live'],
19450       *   template: 'Data: {{dataProvider.data}}'
19451       * })
19452       * class LiveData {
19453       *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
19454       *
19455       *   set live(value) {
19456       *     if (value) {
19457       *       this.ref.reattach();
19458       *     } else {
19459       *       this.ref.detach();
19460       *     }
19461       *   }
19462       * }
19463       *
19464       * @Component({
19465       *   selector: 'app-root',
19466       *   providers: [DataProvider],
19467       *   template: `
19468       *     Live Update: <input type="checkbox" [(ngModel)]="live">
19469       *     <live-data [live]="live"><live-data>
19470       *   `,
19471       * })
19472       * class AppComponent {
19473       *   live = true;
19474       * }
19475       * ```
19476       */
19477      reattach() {
19478        updateAncestorTraversalFlagsOnAttach(this._lView);
19479        this._lView[FLAGS] |= 128;
19480      }
19481      /**
19482       * Checks the view and its children.
19483       *
19484       * This can also be used in combination with {@link ChangeDetectorRef#detach} to implement
19485       * local change detection checks.
19486       *
19487       * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
19488       * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
19489       *
19490       * @usageNotes
19491       * ### Example
19492       *
19493       * The following example defines a component with a large list of readonly data.
19494       * Imagine, the data changes constantly, many times per second. For performance reasons,
19495       * we want to check and update the list every five seconds.
19496       *
19497       * We can do that by detaching the component's change detector and doing a local change detection
19498       * check every five seconds.
19499       *
19500       * See {@link ChangeDetectorRef#detach} for more information.
19501       */
19502      detectChanges() {
19503        this._lView[FLAGS] |= 1024;
19504        detectChangesInternal(this._lView);
19505      }
19506      /**
19507       * Checks the change detector and its children, and throws if any changes are detected.
19508       *
19509       * This is used in development mode to verify that running change detection doesn't
19510       * introduce other changes.
19511       */
19512      checkNoChanges() {
19513        if (ngDevMode) {
19514          try {
19515            this.exhaustive ??= this._lView[INJECTOR].get(UseExhaustiveCheckNoChanges, USE_EXHAUSTIVE_CHECK_NO_CHANGES_DEFAULT);
19516          } catch {
19517            this.exhaustive = USE_EXHAUSTIVE_CHECK_NO_CHANGES_DEFAULT;
19518          }
19519          checkNoChangesInternal(this._lView, this.exhaustive);
19520        }
19521      }
19522      attachToViewContainerRef() {
19523        if (this._appRef) {
19524          throw new RuntimeError(902, ngDevMode && "This view is already attached directly to the ApplicationRef!");
19525        }
19526        this._attachedToViewContainer = true;
19527      }
19528      detachFromAppRef() {
19529        this._appRef = null;
19530        const isRoot = isRootView(this._lView);
19531        const declarationContainer = this._lView[DECLARATION_LCONTAINER];
19532        if (declarationContainer !== null && !isRoot) {
19533          detachMovedView(declarationContainer, this._lView);
19534        }
19535        detachViewFromDOM(this._lView[TVIEW], this._lView);
19536      }
19537      attachToAppRef(appRef) {
19538        if (this._attachedToViewContainer) {
19539          throw new RuntimeError(902, ngDevMode && "This view is already attached to a ViewContainer!");
19540        }
19541        this._appRef = appRef;
19542        const isRoot = isRootView(this._lView);
19543        const declarationContainer = this._lView[DECLARATION_LCONTAINER];
19544        if (declarationContainer !== null && !isRoot) {
19545          trackMovedView(declarationContainer, this._lView);
19546        }
19547        updateAncestorTraversalFlagsOnAttach(this._lView);
19548      }
19549    };
19550    TemplateRef = class {
19551      _declarationLView;
19552      _declarationTContainer;
19553      /**
19554       * The anchor element in the parent view for this embedded view.
19555       *
19556       * The data-binding and [injection contexts](guide/di/dependency-injection-context) of embedded
19557       * views created from this `TemplateRef` inherit from the contexts of this location.
19558       *
19559       * Typically new embedded views are attached to the view container of this location, but in
19560       * advanced use-cases, the view can be attached to a different container while keeping the
19561       * data-binding and injection context from the original location.
19562       *
19563       */
19564      elementRef;
19565      /**
19566       * @internal
19567       * @nocollapse
19568       */
19569      static __NG_ELEMENT_ID__ = injectTemplateRef;
19570      /** @internal */
19571      constructor(_declarationLView, _declarationTContainer, elementRef) {
19572        this._declarationLView = _declarationLView;
19573        this._declarationTContainer = _declarationTContainer;
19574        this.elementRef = elementRef;
19575      }
19576      /**
19577       * Returns an `ssrId` associated with a TView, which was used to
19578       * create this instance of the `TemplateRef`.
19579       *
19580       * @internal
19581       */
19582      get ssrId() {
19583        return this._declarationTContainer.tView?.ssrId || null;
19584      }
19585      /**
19586       * Instantiates an unattached embedded view based on this template.
19587       * @param context The data-binding context of the embedded view, as declared
19588       * in the `<ng-template>` usage.
19589       * @param injector Injector to be used within the embedded view.
19590       * @returns The new embedded view object.
19591       */
19592      createEmbeddedView(context2, injector) {
19593        return this.createEmbeddedViewImpl(context2, injector);
19594      }
19595      /**
19596       * Implementation of the `createEmbeddedView` function.
19597       *
19598       * This implementation is internal and allows framework code
19599       * to invoke it with extra parameters (e.g. for hydration) without
19600       * affecting public API.
19601       *
19602       * @internal
19603       */
19604      createEmbeddedViewImpl(context2, injector, dehydratedView) {
19605        const embeddedLView = createAndRenderEmbeddedLView(this._declarationLView, this._declarationTContainer, context2, { embeddedViewInjector: injector, dehydratedView });
19606        return new ViewRef(embeddedLView);
19607      }
19608    };
19609    AT_THIS_LOCATION = "<-- AT THIS LOCATION";
19610    internalAttrs = /* @__PURE__ */ new Set(["ngh", "ng-version", "ng-server-context"]);
19611    REF_EXTRACTOR_REGEXP = /* @__PURE__ */ new RegExp(`^(\\d+)*(${REFERENCE_NODE_BODY}|${REFERENCE_NODE_HOST})*(.*)`);
19612    _prepareI18nBlockForHydrationImpl = () => {
19613    };
19614    _claimDehydratedIcuCaseImpl = () => {
19615    };
19616    _findMatchingDehydratedViewImpl = () => null;
19617    _findAndReconcileMatchingDehydratedViewsImpl = () => null;
19618    ComponentRef$1 = class ComponentRef {
19619    };
19620    ComponentFactory$1 = class ComponentFactory {
19621    };
19622    _NullComponentFactoryResolver = class {
19623      resolveComponentFactory(component) {
19624        throw new RuntimeError(917, typeof ngDevMode !== "undefined" && ngDevMode && `No component factory found for ${stringify(component)}.`);
19625      }
19626    };
19627    ComponentFactoryResolver$1 = class ComponentFactoryResolver {
19628      static NULL = new _NullComponentFactoryResolver();
19629    };
19630    RendererFactory2 = class {
19631    };
19632    Renderer2 = class {
19633      /**
19634       * If null or undefined, the view engine won't call it.
19635       * This is used as a performance optimization for production mode.
19636       */
19637      destroyNode = null;
19638      /**
19639       * @internal
19640       * @nocollapse
19641       */
19642      static __NG_ELEMENT_ID__ = () => injectRenderer2();
19643    };
19644    Sanitizer = class _Sanitizer {
19645      /** @nocollapse */
19646      static \u0275prov = (
19647        /** @pureOrBreakMyCode */
19648        /* @__PURE__ */ \u0275\u0275defineInjectable({
19649          token: _Sanitizer,
19650          providedIn: "root",
19651          factory: () => null
19652        })
19653      );
19654    };
19655    DepsTracker = class {
19656      ownerNgModule = /* @__PURE__ */ new Map();
19657      ngModulesWithSomeUnresolvedDecls = /* @__PURE__ */ new Set();
19658      ngModulesScopeCache = /* @__PURE__ */ new Map();
19659      standaloneComponentsScopeCache = /* @__PURE__ */ new Map();
19660      /**
19661       * Attempts to resolve ng module's forward ref declarations as much as possible and add them to
19662       * the `ownerNgModule` map. This method normally should be called after the initial parsing when
19663       * all the forward refs are resolved (e.g., when trying to render a component)
19664       */
19665      resolveNgModulesDecls() {
19666        if (this.ngModulesWithSomeUnresolvedDecls.size === 0) {
19667          return;
19668        }
19669        for (const moduleType of this.ngModulesWithSomeUnresolvedDecls) {
19670          const def = getNgModuleDef(moduleType);
19671          if (def?.declarations) {
19672            for (const decl of maybeUnwrapFn(def.declarations)) {
19673              if (isComponent(decl)) {
19674                this.ownerNgModule.set(decl, moduleType);
19675              }
19676            }
19677          }
19678        }
19679        this.ngModulesWithSomeUnresolvedDecls.clear();
19680      }
19681      /** @override */
19682      getComponentDependencies(type, rawImports) {
19683        this.resolveNgModulesDecls();
19684        const def = getComponentDef(type);
19685        if (def === null) {
19686          throw new Error(`Attempting to get component dependencies for a type that is not a component: ${type}`);
19687        }
19688        if (def.standalone) {
19689          const scope = this.getStandaloneComponentScope(type, rawImports);
19690          if (scope.compilation.isPoisoned) {
19691            return { dependencies: [] };
19692          }
19693          return {
19694            dependencies: [
19695              ...scope.compilation.directives,
19696              ...scope.compilation.pipes,
19697              ...scope.compilation.ngModules
19698            ]
19699          };
19700        } else {
19701          if (!this.ownerNgModule.has(type)) {
19702            return { dependencies: [] };
19703          }
19704          const scope = this.getNgModuleScope(this.ownerNgModule.get(type));
19705          if (scope.compilation.isPoisoned) {
19706            return { dependencies: [] };
19707          }
19708          return {
19709            dependencies: [...scope.compilation.directives, ...scope.compilation.pipes]
19710          };
19711        }
19712      }
19713      /**
19714       * @override
19715       * This implementation does not make use of param scopeInfo since it assumes the scope info is
19716       * already added to the type itself through methods like {@link ɵɵsetNgModuleScope}
19717       */
19718      registerNgModule(type, scopeInfo) {
19719        if (!isNgModule(type)) {
19720          throw new Error(`Attempting to register a Type which is not NgModule as NgModule: ${type}`);
19721        }
19722        this.ngModulesWithSomeUnresolvedDecls.add(type);
19723      }
19724      /** @override */
19725      clearScopeCacheFor(type) {
19726        this.ngModulesScopeCache.delete(type);
19727        this.standaloneComponentsScopeCache.delete(type);
19728      }
19729      /** @override */
19730      getNgModuleScope(type) {
19731        if (this.ngModulesScopeCache.has(type)) {
19732          return this.ngModulesScopeCache.get(type);
19733        }
19734        const scope = this.computeNgModuleScope(type);
19735        this.ngModulesScopeCache.set(type, scope);
19736        return scope;
19737      }
19738      /** Compute NgModule scope afresh. */
19739      computeNgModuleScope(type) {
19740        const def = getNgModuleDefOrThrow(type);
19741        const scope = {
19742          exported: { directives: /* @__PURE__ */ new Set(), pipes: /* @__PURE__ */ new Set() },
19743          compilation: { directives: /* @__PURE__ */ new Set(), pipes: /* @__PURE__ */ new Set() }
19744        };
19745        for (const imported of maybeUnwrapFn(def.imports)) {
19746          if (isNgModule(imported)) {
19747            const importedScope = this.getNgModuleScope(imported);
19748            addSet(importedScope.exported.directives, scope.compilation.directives);
19749            addSet(importedScope.exported.pipes, scope.compilation.pipes);
19750          } else if (isStandalone(imported)) {
19751            if (isDirective(imported) || isComponent(imported)) {
19752              scope.compilation.directives.add(imported);
19753            } else if (isPipe(imported)) {
19754              scope.compilation.pipes.add(imported);
19755            } else {
19756              throw new RuntimeError(980, "The standalone imported type is neither a component nor a directive nor a pipe");
19757            }
19758          } else {
19759            scope.compilation.isPoisoned = true;
19760            break;
19761          }
19762        }
19763        if (!scope.compilation.isPoisoned) {
19764          for (const decl of maybeUnwrapFn(def.declarations)) {
19765            if (isNgModule(decl) || isStandalone(decl)) {
19766              scope.compilation.isPoisoned = true;
19767              break;
19768            }
19769            if (isPipe(decl)) {
19770              scope.compilation.pipes.add(decl);
19771            } else {
19772              scope.compilation.directives.add(decl);
19773            }
19774          }
19775        }
19776        for (const exported of maybeUnwrapFn(def.exports)) {
19777          if (isNgModule(exported)) {
19778            const exportedScope = this.getNgModuleScope(exported);
19779            addSet(exportedScope.exported.directives, scope.exported.directives);
19780            addSet(exportedScope.exported.pipes, scope.exported.pipes);
19781            addSet(exportedScope.exported.directives, scope.compilation.directives);
19782            addSet(exportedScope.exported.pipes, scope.compilation.pipes);
19783          } else if (isPipe(exported)) {
19784            scope.exported.pipes.add(exported);
19785          } else {
19786            scope.exported.directives.add(exported);
19787          }
19788        }
19789        return scope;
19790      }
19791      /** @override */
19792      getStandaloneComponentScope(type, rawImports) {
19793        if (this.standaloneComponentsScopeCache.has(type)) {
19794          return this.standaloneComponentsScopeCache.get(type);
19795        }
19796        const ans = this.computeStandaloneComponentScope(type, rawImports);
19797        this.standaloneComponentsScopeCache.set(type, ans);
19798        return ans;
19799      }
19800      computeStandaloneComponentScope(type, rawImports) {
19801        const ans = {
19802          compilation: {
19803            // Standalone components are always able to self-reference.
19804            directives: /* @__PURE__ */ new Set([type]),
19805            pipes: /* @__PURE__ */ new Set(),
19806            ngModules: /* @__PURE__ */ new Set()
19807          }
19808        };
19809        for (const rawImport of flatten(rawImports ?? [])) {
19810          const imported = resolveForwardRef(rawImport);
19811          try {
19812            verifyStandaloneImport(imported, type);
19813          } catch (e) {
19814            ans.compilation.isPoisoned = true;
19815            return ans;
19816          }
19817          if (isNgModule(imported)) {
19818            ans.compilation.ngModules.add(imported);
19819            const importedScope = this.getNgModuleScope(imported);
19820            if (importedScope.exported.isPoisoned) {
19821              ans.compilation.isPoisoned = true;
19822              return ans;
19823            }
19824            addSet(importedScope.exported.directives, ans.compilation.directives);
19825            addSet(importedScope.exported.pipes, ans.compilation.pipes);
19826          } else if (isPipe(imported)) {
19827            ans.compilation.pipes.add(imported);
19828          } else if (isDirective(imported) || isComponent(imported)) {
19829            ans.compilation.directives.add(imported);
19830          } else {
19831            ans.compilation.isPoisoned = true;
19832            return ans;
19833          }
19834        }
19835        return ans;
19836      }
19837      /** @override */
19838      isOrphanComponent(cmp) {
19839        const def = getComponentDef(cmp);
19840        if (!def || def.standalone) {
19841          return false;
19842        }
19843        this.resolveNgModulesDecls();
19844        return !this.ownerNgModule.has(cmp);
19845      }
19846    };
19847    depsTracker = new DepsTracker();
19848    NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};
19849    ChainedInjector = class {
19850      injector;
19851      parentInjector;
19852      constructor(injector, parentInjector) {
19853        this.injector = injector;
19854        this.parentInjector = parentInjector;
19855      }
19856      get(token, notFoundValue, options) {
19857        const value = this.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, options);
19858        if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR || notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {
19859          return value;
19860        }
19861        return this.parentInjector.get(token, notFoundValue, options);
19862      }
19863    };
19864    BINDING = /* @__PURE__ */ Symbol("BINDING");
19865    ComponentFactoryResolver2 = class extends ComponentFactoryResolver$1 {
19866      ngModule;
19867      /**
19868       * @param ngModule The NgModuleRef to which all resolved factories are bound.
19869       */
19870      constructor(ngModule) {
19871        super();
19872        this.ngModule = ngModule;
19873      }
19874      resolveComponentFactory(component) {
19875        ngDevMode && assertComponentType(component);
19876        const componentDef = getComponentDef(component);
19877        return new ComponentFactory2(componentDef, this.ngModule);
19878      }
19879    };
19880    ComponentFactory2 = class extends ComponentFactory$1 {
19881      componentDef;
19882      ngModule;
19883      selector;
19884      componentType;
19885      ngContentSelectors;
19886      isBoundToModule;
19887      cachedInputs = null;
19888      cachedOutputs = null;
19889      get inputs() {
19890        this.cachedInputs ??= toInputRefArray(this.componentDef.inputs);
19891        return this.cachedInputs;
19892      }
19893      get outputs() {
19894        this.cachedOutputs ??= toOutputRefArray(this.componentDef.outputs);
19895        return this.cachedOutputs;
19896      }
19897      /**
19898       * @param componentDef The component definition.
19899       * @param ngModule The NgModuleRef to which the factory is bound.
19900       */
19901      constructor(componentDef, ngModule) {
19902        super();
19903        this.componentDef = componentDef;
19904        this.ngModule = ngModule;
19905        this.componentType = componentDef.type;
19906        this.selector = stringifyCSSSelectorList(componentDef.selectors);
19907        this.ngContentSelectors = componentDef.ngContentSelectors ?? [];
19908        this.isBoundToModule = !!ngModule;
19909      }
19910      create(injector, projectableNodes, rootSelectorOrNode, environmentInjector, directives, componentBindings) {
19911        profiler(
19912          22
19913          /* ProfilerEvent.DynamicComponentStart */
19914        );
19915        const prevConsumer = setActiveConsumer(null);
19916        try {
19917          const cmpDef = this.componentDef;
19918          ngDevMode && verifyNotAnOrphanComponent(cmpDef);
19919          const rootTView = createRootTView(rootSelectorOrNode, cmpDef, componentBindings, directives);
19920          const rootViewInjector = createRootViewInjector(cmpDef, environmentInjector || this.ngModule, injector);
19921          const environment = createRootLViewEnvironment(rootViewInjector);
19922          const hostRenderer = environment.rendererFactory.createRenderer(null, cmpDef);
19923          const hostElement = rootSelectorOrNode ? locateHostElement(hostRenderer, rootSelectorOrNode, cmpDef.encapsulation, rootViewInjector) : createHostElement(cmpDef, hostRenderer);
19924          const hasInputBindings = componentBindings?.some(isInputBinding) || directives?.some((d) => typeof d !== "function" && d.bindings.some(isInputBinding));
19925          const rootLView = createLView(null, rootTView, null, 512 | getInitialLViewFlagsFromDef(cmpDef), null, null, environment, hostRenderer, rootViewInjector, null, retrieveHydrationInfo(
19926            hostElement,
19927            rootViewInjector,
19928            true
19929            /* isRootView */
19930          ));
19931          rootLView[HEADER_OFFSET] = hostElement;
19932          enterView(rootLView);
19933          let componentView = null;
19934          try {
19935            const hostTNode = directiveHostFirstCreatePass(HEADER_OFFSET, rootLView, 2, "#host", () => rootTView.directiveRegistry, true, 0);
19936            setupStaticAttributes(hostRenderer, hostElement, hostTNode);
19937            attachPatchData(hostElement, rootLView);
19938            createDirectivesInstances(rootTView, rootLView, hostTNode);
19939            executeContentQueries(rootTView, hostTNode, rootLView);
19940            directiveHostEndFirstCreatePass(rootTView, hostTNode);
19941            if (projectableNodes !== void 0) {
19942              projectNodes(hostTNode, this.ngContentSelectors, projectableNodes);
19943            }
19944            componentView = getComponentLViewByIndex(hostTNode.index, rootLView);
19945            rootLView[CONTEXT] = componentView[CONTEXT];
19946            renderView(rootTView, rootLView, null);
19947          } catch (e) {
19948            if (componentView !== null) {
19949              unregisterLView(componentView);
19950            }
19951            unregisterLView(rootLView);
19952            throw e;
19953          } finally {
19954            profiler(
19955              23
19956              /* ProfilerEvent.DynamicComponentEnd */
19957            );
19958            leaveView();
19959          }
19960          return new ComponentRef2(this.componentType, rootLView, !!hasInputBindings);
19961        } finally {
19962          setActiveConsumer(prevConsumer);
19963        }
19964      }
19965    };
19966    ComponentRef2 = class extends ComponentRef$1 {
19967      _rootLView;
19968      _hasInputBindings;
19969      instance;
19970      hostView;
19971      changeDetectorRef;
19972      componentType;
19973      location;
19974      previousInputValues = null;
19975      _tNode;
19976      constructor(componentType, _rootLView, _hasInputBindings) {
19977        super();
19978        this._rootLView = _rootLView;
19979        this._hasInputBindings = _hasInputBindings;
19980        this._tNode = getTNode(_rootLView[TVIEW], HEADER_OFFSET);
19981        this.location = createElementRef(this._tNode, _rootLView);
19982        this.instance = getComponentLViewByIndex(this._tNode.index, _rootLView)[CONTEXT];
19983        this.hostView = this.changeDetectorRef = new ViewRef(
19984          _rootLView,
19985          void 0
19986          /* _cdRefInjectingView */
19987        );
19988        this.componentType = componentType;
19989      }
19990      setInput(name, value) {
19991        if (this._hasInputBindings && ngDevMode) {
19992          throw new RuntimeError(317, "Cannot call `setInput` on a component that is using the `inputBinding` or `twoWayBinding` functions.");
19993        }
19994        const tNode = this._tNode;
19995        this.previousInputValues ??= /* @__PURE__ */ new Map();
19996        if (this.previousInputValues.has(name) && Object.is(this.previousInputValues.get(name), value)) {
19997          return;
19998        }
19999        const lView = this._rootLView;
20000        const hasSetInput = setAllInputsForProperty(tNode, lView[TVIEW], lView, name, value);
20001        this.previousInputValues.set(name, value);
20002        const childComponentLView = getComponentLViewByIndex(tNode.index, lView);
20003        markViewDirty(
20004          childComponentLView,
20005          1
20006          /* NotificationSource.SetInput */
20007        );
20008        if (ngDevMode && !hasSetInput) {
20009          const cmpNameForError = stringifyForError(this.componentType);
20010          let message = `Can't set value of the '${name}' input on the '${cmpNameForError}' component. `;
20011          message += `Make sure that the '${name}' property is declared as an input using the input() or model() function or the @Input() decorator.`;
20012          reportUnknownPropertyError(message);
20013        }
20014      }
20015      get injector() {
20016        return new NodeInjector(this._tNode, this._rootLView);
20017      }
20018      destroy() {
20019        this.hostView.destroy();
20020      }
20021      onDestroy(callback) {
20022        this.hostView.onDestroy(callback);
20023      }
20024    };
20025    ViewContainerRef = class {
20026      /**
20027       * @internal
20028       * @nocollapse
20029       */
20030      static __NG_ELEMENT_ID__ = injectViewContainerRef;
20031    };
20032    VE_ViewContainerRef = ViewContainerRef;
20033    R3ViewContainerRef = class ViewContainerRef2 extends VE_ViewContainerRef {
20034      _lContainer;
20035      _hostTNode;
20036      _hostLView;
20037      constructor(_lContainer, _hostTNode, _hostLView) {
20038        super();
20039        this._lContainer = _lContainer;
20040        this._hostTNode = _hostTNode;
20041        this._hostLView = _hostLView;
20042      }
20043      get element() {
20044        return createElementRef(this._hostTNode, this._hostLView);
20045      }
20046      get injector() {
20047        return new NodeInjector(this._hostTNode, this._hostLView);
20048      }
20049      /** @deprecated No replacement */
20050      get parentInjector() {
20051        const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostLView);
20052        if (hasParentInjector(parentLocation)) {
20053          const parentView = getParentInjectorView(parentLocation, this._hostLView);
20054          const injectorIndex = getParentInjectorIndex(parentLocation);
20055          ngDevMode && assertNodeInjector(parentView, injectorIndex);
20056          const parentTNode = parentView[TVIEW].data[
20057            injectorIndex + 8
20058            /* NodeInjectorOffset.TNODE */
20059          ];
20060          return new NodeInjector(parentTNode, parentView);
20061        } else {
20062          return new NodeInjector(null, this._hostLView);
20063        }
20064      }
20065      clear() {
20066        while (this.length > 0) {
20067          this.remove(this.length - 1);
20068        }
20069      }
20070      get(index) {
20071        const viewRefs = getViewRefs(this._lContainer);
20072        return viewRefs !== null && viewRefs[index] || null;
20073      }
20074      get length() {
20075        return this._lContainer.length - CONTAINER_HEADER_OFFSET;
20076      }
20077      createEmbeddedView(templateRef, context2, indexOrOptions) {
20078        let index;
20079        let injector;
20080        if (typeof indexOrOptions === "number") {
20081          index = indexOrOptions;
20082        } else if (indexOrOptions != null) {
20083          index = indexOrOptions.index;
20084          injector = indexOrOptions.injector;
20085        }
20086        const dehydratedView = findMatchingDehydratedView(this._lContainer, templateRef.ssrId);
20087        const viewRef = templateRef.createEmbeddedViewImpl(context2 || {}, injector, dehydratedView);
20088        this.insertImpl(viewRef, index, shouldAddViewToDom(this._hostTNode, dehydratedView));
20089        return viewRef;
20090      }
20091      createComponent(componentFactoryOrType, indexOrOptions, injector, projectableNodes, environmentInjector, directives, bindings) {
20092        const isComponentFactory = componentFactoryOrType && !isType(componentFactoryOrType);
20093        let index;
20094        if (isComponentFactory) {
20095          if (ngDevMode) {
20096            assertEqual(typeof indexOrOptions !== "object", true, "It looks like Component factory was provided as the first argument and an options object as the second argument. This combination of arguments is incompatible. You can either change the first argument to provide Component type or change the second argument to be a number (representing an index at which to insert the new component's host view into this container)");
20097          }
20098          index = indexOrOptions;
20099        } else {
20100          if (ngDevMode) {
20101            assertDefined(getComponentDef(componentFactoryOrType), `Provided Component class doesn't contain Component definition. Please check whether provided class has @Component decorator.`);
20102            assertEqual(typeof indexOrOptions !== "number", true, "It looks like Component type was provided as the first argument and a number (representing an index at which to insert the new component's host view into this container as the second argument. This combination of arguments is incompatible. Please use an object as the second argument instead.");
20103          }
20104          const options = indexOrOptions || {};
20105          if (ngDevMode && options.environmentInjector && options.ngModuleRef) {
20106            throwError(`Cannot pass both environmentInjector and ngModuleRef options to createComponent().`);
20107          }
20108          index = options.index;
20109          injector = options.injector;
20110          projectableNodes = options.projectableNodes;
20111          environmentInjector = options.environmentInjector || options.ngModuleRef;
20112          directives = options.directives;
20113          bindings = options.bindings;
20114        }
20115        const componentFactory = isComponentFactory ? componentFactoryOrType : new ComponentFactory2(getComponentDef(componentFactoryOrType));
20116        const contextInjector = injector || this.parentInjector;
20117        if (!environmentInjector && componentFactory.ngModule == null) {
20118          const _injector = isComponentFactory ? contextInjector : this.parentInjector;
20119          const result = _injector.get(EnvironmentInjector, null);
20120          if (result) {
20121            environmentInjector = result;
20122          }
20123        }
20124        const componentDef = getComponentDef(componentFactory.componentType ?? {});
20125        const dehydratedView = findMatchingDehydratedView(this._lContainer, componentDef?.id ?? null);
20126        const rNode = dehydratedView?.firstChild ?? null;
20127        const componentRef = componentFactory.create(contextInjector, projectableNodes, rNode, environmentInjector, directives, bindings);
20128        this.insertImpl(componentRef.hostView, index, shouldAddViewToDom(this._hostTNode, dehydratedView));
20129        return componentRef;
20130      }
20131      insert(viewRef, index) {
20132        return this.insertImpl(viewRef, index, true);
20133      }
20134      insertImpl(viewRef, index, addToDOM) {
20135        const lView = viewRef._lView;
20136        if (ngDevMode && viewRef.destroyed) {
20137          throw new Error("Cannot insert a destroyed View in a ViewContainer!");
20138        }
20139        if (viewAttachedToContainer(lView)) {
20140          const prevIdx = this.indexOf(viewRef);
20141          if (prevIdx !== -1) {
20142            this.detach(prevIdx);
20143          } else {
20144            const prevLContainer = lView[PARENT];
20145            ngDevMode && assertEqual(isLContainer(prevLContainer), true, "An attached view should have its PARENT point to a container.");
20146            const prevVCRef = new R3ViewContainerRef(prevLContainer, prevLContainer[T_HOST], prevLContainer[PARENT]);
20147            prevVCRef.detach(prevVCRef.indexOf(viewRef));
20148          }
20149        }
20150        const adjustedIdx = this._adjustIndex(index);
20151        const lContainer = this._lContainer;
20152        addLViewToLContainer(lContainer, lView, adjustedIdx, addToDOM);
20153        viewRef.attachToViewContainerRef();
20154        addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef);
20155        return viewRef;
20156      }
20157      move(viewRef, newIndex) {
20158        if (ngDevMode && viewRef.destroyed) {
20159          throw new Error("Cannot move a destroyed View in a ViewContainer!");
20160        }
20161        return this.insert(viewRef, newIndex);
20162      }
20163      indexOf(viewRef) {
20164        const viewRefsArr = getViewRefs(this._lContainer);
20165        return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1;
20166      }
20167      remove(index) {
20168        const adjustedIdx = this._adjustIndex(index, -1);
20169        const detachedView = detachView(this._lContainer, adjustedIdx);
20170        if (detachedView) {
20171          removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx);
20172          destroyLView(detachedView[TVIEW], detachedView);
20173        }
20174      }
20175      detach(index) {
20176        const adjustedIdx = this._adjustIndex(index, -1);
20177        const view = detachView(this._lContainer, adjustedIdx);
20178        const wasDetached = view && removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx) != null;
20179        return wasDetached ? new ViewRef(view) : null;
20180      }
20181      _adjustIndex(index, shift = 0) {
20182        if (index == null) {
20183          return this.length + shift;
20184        }
20185        if (ngDevMode) {
20186          assertGreaterThan(index, -1, `ViewRef index must be positive, got ${index}`);
20187          assertLessThan(index, this.length + 1 + shift, "index");
20188        }
20189        return index;
20190      }
20191    };
20192    _locateOrCreateAnchorNode = createAnchorNode;
20193    _populateDehydratedViewsInLContainer = () => false;
20194    LQuery_ = class _LQuery_ {
20195      queryList;
20196      matches = null;
20197      constructor(queryList) {
20198        this.queryList = queryList;
20199      }
20200      clone() {
20201        return new _LQuery_(this.queryList);
20202      }
20203      setDirty() {
20204        this.queryList.setDirty();
20205      }
20206    };
20207    LQueries_ = class _LQueries_ {
20208      queries;
20209      constructor(queries = []) {
20210        this.queries = queries;
20211      }
20212      createEmbeddedView(tView) {
20213        const tQueries = tView.queries;
20214        if (tQueries !== null) {
20215          const noOfInheritedQueries = tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length;
20216          const viewLQueries = [];
20217          for (let i = 0; i < noOfInheritedQueries; i++) {
20218            const tQuery = tQueries.getByIndex(i);
20219            const parentLQuery = this.queries[tQuery.indexInDeclarationView];
20220            viewLQueries.push(parentLQuery.clone());
20221          }
20222          return new _LQueries_(viewLQueries);
20223        }
20224        return null;
20225      }
20226      insertView(tView) {
20227        this.dirtyQueriesWithMatches(tView);
20228      }
20229      detachView(tView) {
20230        this.dirtyQueriesWithMatches(tView);
20231      }
20232      finishViewCreation(tView) {
20233        this.dirtyQueriesWithMatches(tView);
20234      }
20235      dirtyQueriesWithMatches(tView) {
20236        for (let i = 0; i < this.queries.length; i++) {
20237          if (getTQuery(tView, i).matches !== null) {
20238            this.queries[i].setDirty();
20239          }
20240        }
20241      }
20242    };
20243    TQueryMetadata_ = class {
20244      flags;
20245      read;
20246      predicate;
20247      constructor(predicate, flags, read = null) {
20248        this.flags = flags;
20249        this.read = read;
20250        if (typeof predicate === "string") {
20251          this.predicate = splitQueryMultiSelectors(predicate);
20252        } else {
20253          this.predicate = predicate;
20254        }
20255      }
20256    };
20257    TQueries_ = class _TQueries_ {
20258      queries;
20259      constructor(queries = []) {
20260        this.queries = queries;
20261      }
20262      elementStart(tView, tNode) {
20263        ngDevMode && assertFirstCreatePass(tView, "Queries should collect results on the first template pass only");
20264        for (let i = 0; i < this.queries.length; i++) {
20265          this.queries[i].elementStart(tView, tNode);
20266        }
20267      }
20268      elementEnd(tNode) {
20269        for (let i = 0; i < this.queries.length; i++) {
20270          this.queries[i].elementEnd(tNode);
20271        }
20272      }
20273      embeddedTView(tNode) {
20274        let queriesForTemplateRef = null;
20275        for (let i = 0; i < this.length; i++) {
20276          const childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;
20277          const tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex);
20278          if (tqueryClone) {
20279            tqueryClone.indexInDeclarationView = i;
20280            if (queriesForTemplateRef !== null) {
20281              queriesForTemplateRef.push(tqueryClone);
20282            } else {
20283              queriesForTemplateRef = [tqueryClone];
20284            }
20285          }
20286        }
20287        return queriesForTemplateRef !== null ? new _TQueries_(queriesForTemplateRef) : null;
20288      }
20289      template(tView, tNode) {
20290        ngDevMode && assertFirstCreatePass(tView, "Queries should collect results on the first template pass only");
20291        for (let i = 0; i < this.queries.length; i++) {
20292          this.queries[i].template(tView, tNode);
20293        }
20294      }
20295      getByIndex(index) {
20296        ngDevMode && assertIndexInRange(this.queries, index);
20297        return this.queries[index];
20298      }
20299      get length() {
20300        return this.queries.length;
20301      }
20302      track(tquery) {
20303        this.queries.push(tquery);
20304      }
20305    };
20306    TQuery_ = class _TQuery_ {
20307      metadata;
20308      matches = null;
20309      indexInDeclarationView = -1;
20310      crossesNgTemplate = false;
20311      /**
20312       * A node index on which a query was declared (-1 for view queries and ones inherited from the
20313       * declaration template). We use this index (alongside with _appliesToNextNode flag) to know
20314       * when to apply content queries to elements in a template.
20315       */
20316      _declarationNodeIndex;
20317      /**
20318       * A flag indicating if a given query still applies to nodes it is crossing. We use this flag
20319       * (alongside with _declarationNodeIndex) to know when to stop applying content queries to
20320       * elements in a template.
20321       */
20322      _appliesToNextNode = true;
20323      constructor(metadata, nodeIndex = -1) {
20324        this.metadata = metadata;
20325        this._declarationNodeIndex = nodeIndex;
20326      }
20327      elementStart(tView, tNode) {
20328        if (this.isApplyingToNode(tNode)) {
20329          this.matchTNode(tView, tNode);
20330        }
20331      }
20332      elementEnd(tNode) {
20333        if (this._declarationNodeIndex === tNode.index) {
20334          this._appliesToNextNode = false;
20335        }
20336      }
20337      template(tView, tNode) {
20338        this.elementStart(tView, tNode);
20339      }
20340      embeddedTView(tNode, childQueryIndex) {
20341        if (this.isApplyingToNode(tNode)) {
20342          this.crossesNgTemplate = true;
20343          this.addMatch(-tNode.index, childQueryIndex);
20344          return new _TQuery_(this.metadata);
20345        }
20346        return null;
20347      }
20348      isApplyingToNode(tNode) {
20349        if (this._appliesToNextNode && (this.metadata.flags & 1) !== 1) {
20350          const declarationNodeIdx = this._declarationNodeIndex;
20351          let parent = tNode.parent;
20352          while (parent !== null && parent.type & 8 && parent.index !== declarationNodeIdx) {
20353            parent = parent.parent;
20354          }
20355          return declarationNodeIdx === (parent !== null ? parent.index : -1);
20356        }
20357        return this._appliesToNextNode;
20358      }
20359      matchTNode(tView, tNode) {
20360        const predicate = this.metadata.predicate;
20361        if (Array.isArray(predicate)) {
20362          for (let i = 0; i < predicate.length; i++) {
20363            const name = predicate[i];
20364            this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, name));
20365            this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, name, false, false));
20366          }
20367        } else {
20368          if (predicate === TemplateRef) {
20369            if (tNode.type & 4) {
20370              this.matchTNodeWithReadOption(tView, tNode, -1);
20371            }
20372          } else {
20373            this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, predicate, false, false));
20374          }
20375        }
20376      }
20377      matchTNodeWithReadOption(tView, tNode, nodeMatchIdx) {
20378        if (nodeMatchIdx !== null) {
20379          const read = this.metadata.read;
20380          if (read !== null) {
20381            if (read === ElementRef || read === ViewContainerRef || read === TemplateRef && tNode.type & 4) {
20382              this.addMatch(tNode.index, -2);
20383            } else {
20384              const directiveOrProviderIdx = locateDirectiveOrProvider(tNode, tView, read, false, false);
20385              if (directiveOrProviderIdx !== null) {
20386                this.addMatch(tNode.index, directiveOrProviderIdx);
20387              }
20388            }
20389          } else {
20390            this.addMatch(tNode.index, nodeMatchIdx);
20391          }
20392        }
20393      }
20394      addMatch(tNodeIdx, matchIdx) {
20395        if (this.matches === null) {
20396          this.matches = [tNodeIdx, matchIdx];
20397        } else {
20398          this.matches.push(tNodeIdx, matchIdx);
20399        }
20400      }
20401    };
20402    componentResourceResolutionQueue = /* @__PURE__ */ new Map();
20403    componentDefPendingResolution = /* @__PURE__ */ new Set();
20404    modules = /* @__PURE__ */ new Map();
20405    checkForDuplicateNgModules = true;
20406    NgModuleRef$1 = class NgModuleRef {
20407    };
20408    NgModuleFactory$1 = class NgModuleFactory {
20409    };
20410    NgModuleRef2 = class extends NgModuleRef$1 {
20411      ngModuleType;
20412      _parent;
20413      // tslint:disable-next-line:require-internal-with-underscore
20414      _bootstrapComponents = [];
20415      _r3Injector;
20416      instance;
20417      destroyCbs = [];
20418      // When bootstrapping a module we have a dependency graph that looks like this:
20419      // ApplicationRef -> ComponentFactoryResolver -> NgModuleRef. The problem is that if the
20420      // module being resolved tries to inject the ComponentFactoryResolver, it'll create a
20421      // circular dependency which will result in a runtime error, because the injector doesn't
20422      // exist yet. We work around the issue by creating the ComponentFactoryResolver ourselves
20423      // and providing it, rather than letting the injector resolve it.
20424      componentFactoryResolver = new ComponentFactoryResolver2(this);
20425      constructor(ngModuleType, _parent, additionalProviders, runInjectorInitializers = true) {
20426        super();
20427        this.ngModuleType = ngModuleType;
20428        this._parent = _parent;
20429        const ngModuleDef = getNgModuleDef(ngModuleType);
20430        ngDevMode && assertDefined(ngModuleDef, `NgModule '${stringify(ngModuleType)}' is not a subtype of 'NgModuleType'.`);
20431        this._bootstrapComponents = maybeUnwrapFn(ngModuleDef.bootstrap);
20432        this._r3Injector = createInjectorWithoutInjectorInstances(ngModuleType, _parent, [
20433          { provide: NgModuleRef$1, useValue: this },
20434          {
20435            provide: ComponentFactoryResolver$1,
20436            useValue: this.componentFactoryResolver
20437          },
20438          ...additionalProviders
20439        ], stringify(ngModuleType), /* @__PURE__ */ new Set(["environment"]));
20440        if (runInjectorInitializers) {
20441          this.resolveInjectorInitializers();
20442        }
20443      }
20444      resolveInjectorInitializers() {
20445        this._r3Injector.resolveInjectorInitializers();
20446        this.instance = this._r3Injector.get(this.ngModuleType);
20447      }
20448      get injector() {
20449        return this._r3Injector;
20450      }
20451      destroy() {
20452        ngDevMode && assertDefined(this.destroyCbs, "NgModule already destroyed");
20453        const injector = this._r3Injector;
20454        !injector.destroyed && injector.destroy();
20455        this.destroyCbs.forEach((fn) => fn());
20456        this.destroyCbs = null;
20457      }
20458      onDestroy(callback) {
20459        ngDevMode && assertDefined(this.destroyCbs, "NgModule already destroyed");
20460        this.destroyCbs.push(callback);
20461      }
20462    };
20463    NgModuleFactory2 = class extends NgModuleFactory$1 {
20464      moduleType;
20465      constructor(moduleType) {
20466        super();
20467        this.moduleType = moduleType;
20468      }
20469      create(parentInjector) {
20470        return new NgModuleRef2(this.moduleType, parentInjector, []);
20471      }
20472    };
20473    EnvironmentNgModuleRefAdapter = class extends NgModuleRef$1 {
20474      injector;
20475      componentFactoryResolver = new ComponentFactoryResolver2(this);
20476      instance = null;
20477      constructor(config2) {
20478        super();
20479        const injector = new R3Injector([
20480          ...config2.providers,
20481          { provide: NgModuleRef$1, useValue: this },
20482          { provide: ComponentFactoryResolver$1, useValue: this.componentFactoryResolver }
20483        ], config2.parent || getNullInjector(), config2.debugName, /* @__PURE__ */ new Set(["environment"]));
20484        this.injector = injector;
20485        if (config2.runEnvironmentInitializers) {
20486          injector.resolveInjectorInitializers();
20487        }
20488      }
20489      destroy() {
20490        this.injector.destroy();
20491      }
20492      onDestroy(callback) {
20493        this.injector.onDestroy(callback);
20494      }
20495    };
20496    StandaloneService = class _StandaloneService {
20497      _injector;
20498      cachedInjectors = /* @__PURE__ */ new Map();
20499      constructor(_injector) {
20500        this._injector = _injector;
20501      }
20502      getOrCreateStandaloneInjector(componentDef) {
20503        if (!componentDef.standalone) {
20504          return null;
20505        }
20506        if (!this.cachedInjectors.has(componentDef)) {
20507          const providers = internalImportProvidersFrom(false, componentDef.type);
20508          const standaloneInjector = providers.length > 0 ? createEnvironmentInjector([providers], this._injector, `Standalone[${componentDef.type.name}]`) : null;
20509          this.cachedInjectors.set(componentDef, standaloneInjector);
20510        }
20511        return this.cachedInjectors.get(componentDef);
20512      }
20513      ngOnDestroy() {
20514        try {
20515          for (const injector of this.cachedInjectors.values()) {
20516            if (injector !== null) {
20517              injector.destroy();
20518            }
20519          }
20520        } finally {
20521          this.cachedInjectors.clear();
20522        }
20523      }
20524      /** @nocollapse */
20525      static \u0275prov = (
20526        /** @pureOrBreakMyCode */
20527        /* @__PURE__ */ \u0275\u0275defineInjectable({
20528          token: _StandaloneService,
20529          providedIn: "environment",
20530          factory: () => new _StandaloneService(\u0275\u0275inject(EnvironmentInjector))
20531        })
20532      );
20533    };
20534    GENERATED_COMP_IDS = /* @__PURE__ */ new Map();
20535    COPY_DIRECTIVE_FIELDS = [
20536      // The child class should use the providers of its parent.
20537      "providersResolver"
20538      // Not listed here are any fields which are handled by the `ɵɵInheritDefinitionFeature`, such
20539      // as inputs, outputs, and host binding functions.
20540    ];
20541    COPY_COMPONENT_FIELDS = [
20542      // The child class should use the template function of its parent, including all template
20543      // semantics.
20544      "template",
20545      "decls",
20546      "consts",
20547      "vars",
20548      "onPush",
20549      "ngContentSelectors",
20550      // The child class should use the CSS styles of its parent, including all styling semantics.
20551      "styles",
20552      "encapsulation",
20553      // The child class should be checked by the runtime in the same way as its parent.
20554      "schemas"
20555    ];
20556    _locateOrCreateContainerAnchor = createContainerAnchorImpl;
20557    (function(DeferDependenciesLoadingState2) {
20558      DeferDependenciesLoadingState2[DeferDependenciesLoadingState2["NOT_STARTED"] = 0] = "NOT_STARTED";
20559      DeferDependenciesLoadingState2[DeferDependenciesLoadingState2["IN_PROGRESS"] = 1] = "IN_PROGRESS";
20560      DeferDependenciesLoadingState2[DeferDependenciesLoadingState2["COMPLETE"] = 2] = "COMPLETE";
20561      DeferDependenciesLoadingState2[DeferDependenciesLoadingState2["FAILED"] = 3] = "FAILED";
20562    })(DeferDependenciesLoadingState || (DeferDependenciesLoadingState = {}));
20563    MINIMUM_SLOT = 0;
20564    LOADING_AFTER_SLOT = 1;
20565    (function(DeferBlockState2) {
20566      DeferBlockState2[DeferBlockState2["Placeholder"] = 0] = "Placeholder";
20567      DeferBlockState2[DeferBlockState2["Loading"] = 1] = "Loading";
20568      DeferBlockState2[DeferBlockState2["Complete"] = 2] = "Complete";
20569      DeferBlockState2[DeferBlockState2["Error"] = 3] = "Error";
20570    })(DeferBlockState || (DeferBlockState = {}));
20571    (function(DeferBlockInternalState2) {
20572      DeferBlockInternalState2[DeferBlockInternalState2["Initial"] = -1] = "Initial";
20573    })(DeferBlockInternalState || (DeferBlockInternalState = {}));
20574    NEXT_DEFER_BLOCK_STATE = 0;
20575    DEFER_BLOCK_STATE = 1;
20576    STATE_IS_FROZEN_UNTIL = 2;
20577    LOADING_AFTER_CLEANUP_FN = 3;
20578    TRIGGER_CLEANUP_FNS = 4;
20579    PREFETCH_TRIGGER_CLEANUP_FNS = 5;
20580    SSR_UNIQUE_ID = 6;
20581    SSR_BLOCK_STATE = 7;
20582    ON_COMPLETE_FNS = 8;
20583    HYDRATE_TRIGGER_CLEANUP_FNS = 9;
20584    (function(DeferBlockBehavior2) {
20585      DeferBlockBehavior2[DeferBlockBehavior2["Manual"] = 0] = "Manual";
20586      DeferBlockBehavior2[DeferBlockBehavior2["Playthrough"] = 1] = "Playthrough";
20587    })(DeferBlockBehavior || (DeferBlockBehavior = {}));
20588    _requestIdleCallback = () => typeof requestIdleCallback !== "undefined" ? requestIdleCallback : setTimeout;
20589    _cancelIdleCallback = () => typeof requestIdleCallback !== "undefined" ? cancelIdleCallback : clearTimeout;
20590    IdleScheduler = class _IdleScheduler {
20591      // Indicates whether current callbacks are being invoked.
20592      executingCallbacks = false;
20593      // Currently scheduled idle callback id.
20594      idleId = null;
20595      // Set of callbacks to be invoked next.
20596      current = /* @__PURE__ */ new Set();
20597      // Set of callbacks collected while invoking current set of callbacks.
20598      // Those callbacks are scheduled for the next idle period.
20599      deferred = /* @__PURE__ */ new Set();
20600      ngZone = inject2(NgZone);
20601      requestIdleCallbackFn = _requestIdleCallback().bind(globalThis);
20602      cancelIdleCallbackFn = _cancelIdleCallback().bind(globalThis);
20603      add(callback) {
20604        const target = this.executingCallbacks ? this.deferred : this.current;
20605        target.add(callback);
20606        if (this.idleId === null) {
20607          this.scheduleIdleCallback();
20608        }
20609      }
20610      remove(callback) {
20611        const { current, deferred } = this;
20612        current.delete(callback);
20613        deferred.delete(callback);
20614        if (current.size === 0 && deferred.size === 0) {
20615          this.cancelIdleCallback();
20616        }
20617      }
20618      scheduleIdleCallback() {
20619        const callback = () => {
20620          this.cancelIdleCallback();
20621          this.executingCallbacks = true;
20622          for (const callback2 of this.current) {
20623            callback2();
20624          }
20625          this.current.clear();
20626          this.executingCallbacks = false;
20627          if (this.deferred.size > 0) {
20628            for (const callback2 of this.deferred) {
20629              this.current.add(callback2);
20630            }
20631            this.deferred.clear();
20632            this.scheduleIdleCallback();
20633          }
20634        };
20635        this.idleId = this.requestIdleCallbackFn(() => this.ngZone.run(callback));
20636      }
20637      cancelIdleCallback() {
20638        if (this.idleId !== null) {
20639          this.cancelIdleCallbackFn(this.idleId);
20640          this.idleId = null;
20641        }
20642      }
20643      ngOnDestroy() {
20644        this.cancelIdleCallback();
20645        this.current.clear();
20646        this.deferred.clear();
20647      }
20648      /** @nocollapse */
20649      static \u0275prov = (
20650        /** @pureOrBreakMyCode */
20651        /* @__PURE__ */ \u0275\u0275defineInjectable({
20652          token: _IdleScheduler,
20653          providedIn: "root",
20654          factory: () => new _IdleScheduler()
20655        })
20656      );
20657    };
20658    TimerScheduler = class _TimerScheduler {
20659      // Indicates whether current callbacks are being invoked.
20660      executingCallbacks = false;
20661      // Currently scheduled `setTimeout` id.
20662      timeoutId = null;
20663      // When currently scheduled timer would fire.
20664      invokeTimerAt = null;
20665      // List of callbacks to be invoked.
20666      // For each callback we also store a timestamp on when the callback
20667      // should be invoked. We store timestamps and callback functions
20668      // in a flat array to avoid creating new objects for each entry.
20669      // [timestamp1, callback1, timestamp2, callback2, ...]
20670      current = [];
20671      // List of callbacks collected while invoking current set of callbacks.
20672      // Those callbacks are added to the "current" queue at the end of
20673      // the current callback invocation. The shape of this list is the same
20674      // as the shape of the `current` list.
20675      deferred = [];
20676      add(delay, callback, ngZone) {
20677        const target = this.executingCallbacks ? this.deferred : this.current;
20678        this.addToQueue(target, Date.now() + delay, callback);
20679        this.scheduleTimer(ngZone);
20680      }
20681      remove(callback) {
20682        const { current, deferred } = this;
20683        const callbackIndex = this.removeFromQueue(current, callback);
20684        if (callbackIndex === -1) {
20685          this.removeFromQueue(deferred, callback);
20686        }
20687        if (current.length === 0 && deferred.length === 0) {
20688          this.clearTimeout();
20689        }
20690      }
20691      addToQueue(target, invokeAt, callback) {
20692        let insertAtIndex = target.length;
20693        for (let i = 0; i < target.length; i += 2) {
20694          const invokeQueuedCallbackAt = target[i];
20695          if (invokeQueuedCallbackAt > invokeAt) {
20696            insertAtIndex = i;
20697            break;
20698          }
20699        }
20700        arrayInsert2(target, insertAtIndex, invokeAt, callback);
20701      }
20702      removeFromQueue(target, callback) {
20703        let index = -1;
20704        for (let i = 0; i < target.length; i += 2) {
20705          const queuedCallback = target[i + 1];
20706          if (queuedCallback === callback) {
20707            index = i;
20708            break;
20709          }
20710        }
20711        if (index > -1) {
20712          arraySplice(target, index, 2);
20713        }
20714        return index;
20715      }
20716      scheduleTimer(ngZone) {
20717        const callback = () => {
20718          this.clearTimeout();
20719          this.executingCallbacks = true;
20720          const current = [...this.current];
20721          const now = Date.now();
20722          for (let i = 0; i < current.length; i += 2) {
20723            const invokeAt = current[i];
20724            const callback2 = current[i + 1];
20725            if (invokeAt <= now) {
20726              callback2();
20727            } else {
20728              break;
20729            }
20730          }
20731          let lastCallbackIndex = -1;
20732          for (let i = 0; i < this.current.length; i += 2) {
20733            const invokeAt = this.current[i];
20734            if (invokeAt <= now) {
20735              lastCallbackIndex = i + 1;
20736            } else {
20737              break;
20738            }
20739          }
20740          if (lastCallbackIndex >= 0) {
20741            arraySplice(this.current, 0, lastCallbackIndex + 1);
20742          }
20743          this.executingCallbacks = false;
20744          if (this.deferred.length > 0) {
20745            for (let i = 0; i < this.deferred.length; i += 2) {
20746              const invokeAt = this.deferred[i];
20747              const callback2 = this.deferred[i + 1];
20748              this.addToQueue(this.current, invokeAt, callback2);
20749            }
20750            this.deferred.length = 0;
20751          }
20752          this.scheduleTimer(ngZone);
20753        };
20754        const FRAME_DURATION_MS = 16;
20755        if (this.current.length > 0) {
20756          const now = Date.now();
20757          const invokeAt = this.current[0];
20758          if (this.timeoutId === null || // Reschedule a timer in case a queue contains an item with
20759          // an earlier timestamp and the delta is more than an average
20760          // frame duration.
20761          this.invokeTimerAt && this.invokeTimerAt - invokeAt > FRAME_DURATION_MS) {
20762            this.clearTimeout();
20763            const timeout = Math.max(invokeAt - now, FRAME_DURATION_MS);
20764            this.invokeTimerAt = invokeAt;
20765            this.timeoutId = ngZone.runOutsideAngular(() => {
20766              return setTimeout(() => ngZone.run(callback), timeout);
20767            });
20768          }
20769        }
20770      }
20771      clearTimeout() {
20772        if (this.timeoutId !== null) {
20773          clearTimeout(this.timeoutId);
20774          this.timeoutId = null;
20775        }
20776      }
20777      ngOnDestroy() {
20778        this.clearTimeout();
20779        this.current.length = 0;
20780        this.deferred.length = 0;
20781      }
20782      /** @nocollapse */
20783      static \u0275prov = (
20784        /** @pureOrBreakMyCode */
20785        /* @__PURE__ */ \u0275\u0275defineInjectable({
20786          token: _TimerScheduler,
20787          providedIn: "root",
20788          factory: () => new _TimerScheduler()
20789        })
20790      );
20791    };
20792    CachedInjectorService = class _CachedInjectorService {
20793      cachedInjectors = /* @__PURE__ */ new Map();
20794      getOrCreateInjector(key, parentInjector, providers, debugName) {
20795        if (!this.cachedInjectors.has(key)) {
20796          const injector = providers.length > 0 ? createEnvironmentInjector(providers, parentInjector, debugName) : null;
20797          this.cachedInjectors.set(key, injector);
20798        }
20799        return this.cachedInjectors.get(key);
20800      }
20801      ngOnDestroy() {
20802        try {
20803          for (const injector of this.cachedInjectors.values()) {
20804            if (injector !== null) {
20805              injector.destroy();
20806            }
20807          }
20808        } finally {
20809          this.cachedInjectors.clear();
20810        }
20811      }
20812      /** @nocollapse */
20813      static \u0275prov = (
20814        /** @pureOrBreakMyCode */
20815        /* @__PURE__ */ \u0275\u0275defineInjectable({
20816          token: _CachedInjectorService,
20817          providedIn: "environment",
20818          factory: () => new _CachedInjectorService()
20819        })
20820      );
20821    };
20822    DEFER_BLOCK_DEPENDENCY_INTERCEPTOR = /* @__PURE__ */ new InjectionToken("DEFER_BLOCK_DEPENDENCY_INTERCEPTOR");
20823    DEFER_BLOCK_CONFIG = new InjectionToken(ngDevMode ? "DEFER_BLOCK_CONFIG" : "");
20824    applyDeferBlockStateWithSchedulingImpl = null;
20825    Console = class _Console {
20826      log(message) {
20827        console.log(message);
20828      }
20829      // Note: for reporting errors use `DOM.logError()` as it is platform specific
20830      warn(message) {
20831        console.warn(message);
20832      }
20833      static \u0275fac = function Console_Factory(__ngFactoryType__) {
20834        return new (__ngFactoryType__ || _Console)();
20835      };
20836      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _Console, factory: _Console.\u0275fac, providedIn: "platform" });
20837    };
20838    (() => {
20839      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Console, [{
20840        type: Injectable,
20841        args: [{ providedIn: "platform" }]
20842      }], null, null);
20843    })();
20844    DIDebugData = class {
20845      resolverToTokenToDependencies = /* @__PURE__ */ new WeakMap();
20846      resolverToProviders = /* @__PURE__ */ new WeakMap();
20847      resolverToEffects = /* @__PURE__ */ new WeakMap();
20848      standaloneInjectorToComponent = /* @__PURE__ */ new WeakMap();
20849      reset() {
20850        this.resolverToTokenToDependencies = /* @__PURE__ */ new WeakMap();
20851        this.resolverToProviders = /* @__PURE__ */ new WeakMap();
20852        this.standaloneInjectorToComponent = /* @__PURE__ */ new WeakMap();
20853      }
20854    };
20855    frameworkDIDebugData = new DIDebugData();
20856    signalDebugMap = /* @__PURE__ */ new WeakMap();
20857    counter$1 = 0;
20858    changeDetectionRuns = 0;
20859    changeDetectionSyncRuns = 0;
20860    counter = 0;
20861    eventsStack = [];
20862    chromeDevToolsInjectorProfiler = (event) => {
20863      const eventType = event.type;
20864      if (eventType === 4) {
20865        measureStart(
20866          100
20867          /* ProfilerDIEvent.InjectorToCreateInstanceEvent */
20868        );
20869      } else if (eventType === 1) {
20870        const token = event.context.token;
20871        measureEnd(100, getProviderTokenMeasureName(token), "tertiary-dark");
20872      }
20873    };
20874    devToolsProfiler = (event, instance, eventFn) => {
20875      switch (event) {
20876        case 8:
20877        case 10:
20878        case 12:
20879        case 14:
20880        case 16:
20881        case 18:
20882        case 20:
20883        case 22:
20884        case 0:
20885        case 4:
20886        case 2:
20887        case 24:
20888        case 6: {
20889          measureStart(event);
20890          break;
20891        }
20892        case 9: {
20893          measureEnd(8, "Bootstrap application", "primary-dark");
20894          break;
20895        }
20896        case 11: {
20897          measureEnd(10, "Bootstrap component", "primary-dark");
20898          break;
20899        }
20900        case 13: {
20901          changeDetectionSyncRuns = 0;
20902          measureEnd(12, "Change detection " + changeDetectionRuns++, "primary-dark");
20903          break;
20904        }
20905        case 15: {
20906          measureEnd(14, "Synchronization " + changeDetectionSyncRuns++, "primary");
20907          break;
20908        }
20909        case 17: {
20910          measureEnd(16, "After render hooks", "primary");
20911          break;
20912        }
20913        case 19: {
20914          const typeName = getComponentMeasureName(instance);
20915          measureEnd(18, typeName, "primary-light");
20916          break;
20917        }
20918        case 21: {
20919          measureEnd(20, "Defer block", "primary-dark");
20920          break;
20921        }
20922        case 23: {
20923          measureEnd(22, "Dynamic component creation", "primary-dark");
20924          break;
20925        }
20926        case 3: {
20927          measureEnd(2, stringifyForError(eventFn) + " (update)", "secondary-dark");
20928          break;
20929        }
20930        case 1: {
20931          measureEnd(0, stringifyForError(eventFn) + " (create)", "secondary");
20932          break;
20933        }
20934        case 25: {
20935          measureEnd(24, "HostBindings", "secondary-dark");
20936          break;
20937        }
20938        case 5: {
20939          const typeName = getComponentMeasureName(instance);
20940          measureEnd(4, `${typeName}:${stringifyForError(eventFn)}`, "tertiary");
20941          break;
20942        }
20943        case 7: {
20944          measureEnd(6, stringifyForError(eventFn), "tertiary-light");
20945          break;
20946        }
20947        default: {
20948          throw new Error("Unexpected profiling event type: " + event);
20949        }
20950      }
20951    };
20952    GLOBAL_PUBLISH_EXPANDO_KEY = "ng";
20953    globalUtilsFunctions = {
20954      /**
20955       * Warning: functions that start with `ɵ` are considered *INTERNAL* and should not be relied upon
20956       * in application's code. The contract of those functions might be changed in any release and/or a
20957       * function can be removed completely.
20958       */
20959      "\u0275getDependenciesFromInjectable": getDependenciesFromInjectable,
20960      "\u0275getInjectorProviders": getInjectorProviders,
20961      "\u0275getInjectorResolutionPath": getInjectorResolutionPath,
20962      "\u0275getInjectorMetadata": getInjectorMetadata,
20963      "\u0275setProfiler": setProfiler,
20964      "\u0275getSignalGraph": getSignalGraph,
20965      "\u0275getDeferBlocks": getDeferBlocks,
20966      "\u0275getTransferState": getTransferState,
20967      "getDirectiveMetadata": getDirectiveMetadata$1,
20968      "getComponent": getComponent,
20969      "getContext": getContext,
20970      "getListeners": getListeners,
20971      "getOwningComponent": getOwningComponent,
20972      "getHostElement": getHostElement,
20973      "getInjector": getInjector,
20974      "getRootComponents": getRootComponents,
20975      "getDirectives": getDirectives,
20976      "applyChanges": applyChanges,
20977      "isSignal": isSignal2,
20978      "enableProfiling": enableProfiling
20979    };
20980    _published = false;
20981    TESTABILITY = new InjectionToken("");
20982    TESTABILITY_GETTER = new InjectionToken("");
20983    Testability = class _Testability {
20984      _ngZone;
20985      registry;
20986      _isZoneStable = true;
20987      _callbacks = [];
20988      _taskTrackingZone = null;
20989      _destroyRef;
20990      constructor(_ngZone, registry, testabilityGetter) {
20991        this._ngZone = _ngZone;
20992        this.registry = registry;
20993        if (isInInjectionContext()) {
20994          this._destroyRef = inject2(DestroyRef, { optional: true }) ?? void 0;
20995        }
20996        if (!_testabilityGetter) {
20997          setTestabilityGetter(testabilityGetter);
20998          testabilityGetter.addToWindow(registry);
20999        }
21000        this._watchAngularEvents();
21001        _ngZone.run(() => {
21002          this._taskTrackingZone = typeof Zone == "undefined" ? null : Zone.current.get("TaskTrackingZone");
21003        });
21004      }
21005      _watchAngularEvents() {
21006        const onUnstableSubscription = this._ngZone.onUnstable.subscribe({
21007          next: () => {
21008            this._isZoneStable = false;
21009          }
21010        });
21011        const onStableSubscription = this._ngZone.runOutsideAngular(() => this._ngZone.onStable.subscribe({
21012          next: () => {
21013            NgZone.assertNotInAngularZone();
21014            queueMicrotask(() => {
21015              this._isZoneStable = true;
21016              this._runCallbacksIfReady();
21017            });
21018          }
21019        }));
21020        this._destroyRef?.onDestroy(() => {
21021          onUnstableSubscription.unsubscribe();
21022          onStableSubscription.unsubscribe();
21023        });
21024      }
21025      /**
21026       * Whether an associated application is stable
21027       */
21028      isStable() {
21029        return this._isZoneStable && !this._ngZone.hasPendingMacrotasks;
21030      }
21031      _runCallbacksIfReady() {
21032        if (this.isStable()) {
21033          queueMicrotask(() => {
21034            while (this._callbacks.length !== 0) {
21035              let cb = this._callbacks.pop();
21036              clearTimeout(cb.timeoutId);
21037              cb.doneCb();
21038            }
21039          });
21040        } else {
21041          let pending = this.getPendingTasks();
21042          this._callbacks = this._callbacks.filter((cb) => {
21043            if (cb.updateCb && cb.updateCb(pending)) {
21044              clearTimeout(cb.timeoutId);
21045              return false;
21046            }
21047            return true;
21048          });
21049        }
21050      }
21051      getPendingTasks() {
21052        if (!this._taskTrackingZone) {
21053          return [];
21054        }
21055        return this._taskTrackingZone.macroTasks.map((t) => {
21056          return {
21057            source: t.source,
21058            // From TaskTrackingZone:
21059            // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40
21060            creationLocation: t.creationLocation,
21061            data: t.data
21062          };
21063        });
21064      }
21065      addCallback(cb, timeout, updateCb) {
21066        let timeoutId = -1;
21067        if (timeout && timeout > 0) {
21068          timeoutId = setTimeout(() => {
21069            this._callbacks = this._callbacks.filter((cb2) => cb2.timeoutId !== timeoutId);
21070            cb();
21071          }, timeout);
21072        }
21073        this._callbacks.push({ doneCb: cb, timeoutId, updateCb });
21074      }
21075      /**
21076       * Wait for the application to be stable with a timeout. If the timeout is reached before that
21077       * happens, the callback receives a list of the macro tasks that were pending, otherwise null.
21078       *
21079       * @param doneCb The callback to invoke when Angular is stable or the timeout expires
21080       *    whichever comes first.
21081       * @param timeout Optional. The maximum time to wait for Angular to become stable. If not
21082       *    specified, whenStable() will wait forever.
21083       * @param updateCb Optional. If specified, this callback will be invoked whenever the set of
21084       *    pending macrotasks changes. If this callback returns true doneCb will not be invoked
21085       *    and no further updates will be issued.
21086       */
21087      whenStable(doneCb, timeout, updateCb) {
21088        if (updateCb && !this._taskTrackingZone) {
21089          throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');
21090        }
21091        this.addCallback(doneCb, timeout, updateCb);
21092        this._runCallbacksIfReady();
21093      }
21094      /**
21095       * Registers an application with a testability hook so that it can be tracked.
21096       * @param token token of application, root element
21097       *
21098       * @internal
21099       */
21100      registerApplication(token) {
21101        this.registry.registerApplication(token, this);
21102      }
21103      /**
21104       * Unregisters an application.
21105       * @param token token of application, root element
21106       *
21107       * @internal
21108       */
21109      unregisterApplication(token) {
21110        this.registry.unregisterApplication(token);
21111      }
21112      /**
21113       * Find providers by name
21114       * @param using The root element to search from
21115       * @param provider The name of binding variable
21116       * @param exactMatch Whether using exactMatch
21117       */
21118      findProviders(using, provider, exactMatch) {
21119        return [];
21120      }
21121      static \u0275fac = function Testability_Factory(__ngFactoryType__) {
21122        return new (__ngFactoryType__ || _Testability)(\u0275\u0275inject(NgZone), \u0275\u0275inject(TestabilityRegistry), \u0275\u0275inject(TESTABILITY_GETTER));
21123      };
21124      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _Testability, factory: _Testability.\u0275fac });
21125    };
21126    (() => {
21127      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Testability, [{
21128        type: Injectable
21129      }], () => [{ type: NgZone }, { type: TestabilityRegistry }, { type: void 0, decorators: [{
21130        type: Inject,
21131        args: [TESTABILITY_GETTER]
21132      }] }], null);
21133    })();
21134    TestabilityRegistry = class _TestabilityRegistry {
21135      /** @internal */
21136      _applications = /* @__PURE__ */ new Map();
21137      /**
21138       * Registers an application with a testability hook so that it can be tracked
21139       * @param token token of application, root element
21140       * @param testability Testability hook
21141       */
21142      registerApplication(token, testability) {
21143        this._applications.set(token, testability);
21144      }
21145      /**
21146       * Unregisters an application.
21147       * @param token token of application, root element
21148       */
21149      unregisterApplication(token) {
21150        this._applications.delete(token);
21151      }
21152      /**
21153       * Unregisters all applications
21154       */
21155      unregisterAllApplications() {
21156        this._applications.clear();
21157      }
21158      /**
21159       * Get a testability hook associated with the application
21160       * @param elem root element
21161       */
21162      getTestability(elem) {
21163        return this._applications.get(elem) || null;
21164      }
21165      /**
21166       * Get all registered testabilities
21167       */
21168      getAllTestabilities() {
21169        return Array.from(this._applications.values());
21170      }
21171      /**
21172       * Get all registered applications(root elements)
21173       */
21174      getAllRootElements() {
21175        return Array.from(this._applications.keys());
21176      }
21177      /**
21178       * Find testability of a node in the Tree
21179       * @param elem node
21180       * @param findInAncestors whether finding testability in ancestors if testability was not found in
21181       * current node
21182       */
21183      findTestabilityInTree(elem, findInAncestors = true) {
21184        return _testabilityGetter?.findTestabilityInTree(this, elem, findInAncestors) ?? null;
21185      }
21186      static \u0275fac = function TestabilityRegistry_Factory(__ngFactoryType__) {
21187        return new (__ngFactoryType__ || _TestabilityRegistry)();
21188      };
21189      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _TestabilityRegistry, factory: _TestabilityRegistry.\u0275fac, providedIn: "platform" });
21190    };
21191    (() => {
21192      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(TestabilityRegistry, [{
21193        type: Injectable,
21194        args: [{ providedIn: "platform" }]
21195      }], null, null);
21196    })();
21197    APP_INITIALIZER = new InjectionToken(ngDevMode ? "Application Initializer" : "");
21198    ApplicationInitStatus = class _ApplicationInitStatus {
21199      // Using non null assertion, these fields are defined below
21200      // within the `new Promise` callback (synchronously).
21201      resolve;
21202      reject;
21203      initialized = false;
21204      done = false;
21205      donePromise = new Promise((res, rej) => {
21206        this.resolve = res;
21207        this.reject = rej;
21208      });
21209      appInits = inject2(APP_INITIALIZER, { optional: true }) ?? [];
21210      injector = inject2(Injector);
21211      constructor() {
21212        if ((typeof ngDevMode === "undefined" || ngDevMode) && !Array.isArray(this.appInits)) {
21213          throw new RuntimeError(-209, `Unexpected type of the \`APP_INITIALIZER\` token value (expected an array, but got ${typeof this.appInits}). Please check that the \`APP_INITIALIZER\` token is configured as a \`multi: true\` provider.`);
21214        }
21215      }
21216      /** @internal */
21217      runInitializers() {
21218        if (this.initialized) {
21219          return;
21220        }
21221        const asyncInitPromises = [];
21222        for (const appInits of this.appInits) {
21223          const initResult = runInInjectionContext(this.injector, appInits);
21224          if (isPromise2(initResult)) {
21225            asyncInitPromises.push(initResult);
21226          } else if (isSubscribable(initResult)) {
21227            const observableAsPromise = new Promise((resolve, reject) => {
21228              initResult.subscribe({ complete: resolve, error: reject });
21229            });
21230            asyncInitPromises.push(observableAsPromise);
21231          }
21232        }
21233        const complete = () => {
21234          this.done = true;
21235          this.resolve();
21236        };
21237        Promise.all(asyncInitPromises).then(() => {
21238          complete();
21239        }).catch((e) => {
21240          this.reject(e);
21241        });
21242        if (asyncInitPromises.length === 0) {
21243          complete();
21244        }
21245        this.initialized = true;
21246      }
21247      static \u0275fac = function ApplicationInitStatus_Factory(__ngFactoryType__) {
21248        return new (__ngFactoryType__ || _ApplicationInitStatus)();
21249      };
21250      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _ApplicationInitStatus, factory: _ApplicationInitStatus.\u0275fac, providedIn: "root" });
21251    };
21252    (() => {
21253      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{
21254        type: Injectable,
21255        args: [{ providedIn: "root" }]
21256      }], () => [], null);
21257    })();
21258    APP_BOOTSTRAP_LISTENER = new InjectionToken(ngDevMode ? "appBootstrapListener" : "");
21259    MAXIMUM_REFRESH_RERUNS = 10;
21260    ApplicationRef = class _ApplicationRef {
21261      /** @internal */
21262      _runningTick = false;
21263      _destroyed = false;
21264      _destroyListeners = [];
21265      /** @internal */
21266      _views = [];
21267      internalErrorHandler = inject2(INTERNAL_APPLICATION_ERROR_HANDLER);
21268      afterRenderManager = inject2(AfterRenderManager);
21269      zonelessEnabled = inject2(ZONELESS_ENABLED);
21270      rootEffectScheduler = inject2(EffectScheduler);
21271      /**
21272       * Current dirty state of the application across a number of dimensions (views, afterRender hooks,
21273       * etc).
21274       *
21275       * A flag set here means that `tick()` will attempt to resolve the dirtiness when executed.
21276       *
21277       * @internal
21278       */
21279      dirtyFlags = 0;
21280      /**
21281       * Most recent snapshot from the `TracingService`, if any.
21282       *
21283       * This snapshot attempts to capture the context when `tick()` was first
21284       * scheduled. It then runs wrapped in this context.
21285       *
21286       * @internal
21287       */
21288      tracingSnapshot = null;
21289      // Needed for ComponentFixture temporarily during migration of autoDetect behavior
21290      // Eventually the hostView of the fixture should just attach to ApplicationRef.
21291      allTestViews = /* @__PURE__ */ new Set();
21292      autoDetectTestViews = /* @__PURE__ */ new Set();
21293      includeAllTestViews = false;
21294      /** @internal */
21295      afterTick = new Subject();
21296      /** @internal */
21297      get allViews() {
21298        return [
21299          ...(this.includeAllTestViews ? this.allTestViews : this.autoDetectTestViews).keys(),
21300          ...this._views
21301        ];
21302      }
21303      /**
21304       * Indicates whether this instance was destroyed.
21305       */
21306      get destroyed() {
21307        return this._destroyed;
21308      }
21309      /**
21310       * Get a list of component types registered to this application.
21311       * This list is populated even before the component is created.
21312       */
21313      componentTypes = [];
21314      /**
21315       * Get a list of components registered to this application.
21316       */
21317      components = [];
21318      internalPendingTask = inject2(PendingTasksInternal);
21319      /**
21320       * Returns an Observable that indicates when the application is stable or unstable.
21321       */
21322      get isStable() {
21323        return this.internalPendingTask.hasPendingTasksObservable.pipe(map((pending) => !pending));
21324      }
21325      constructor() {
21326        inject2(TracingService, { optional: true });
21327      }
21328      /**
21329       * @returns A promise that resolves when the application becomes stable
21330       */
21331      whenStable() {
21332        let subscription;
21333        return new Promise((resolve) => {
21334          subscription = this.isStable.subscribe({
21335            next: (stable) => {
21336              if (stable) {
21337                resolve();
21338              }
21339            }
21340          });
21341        }).finally(() => {
21342          subscription.unsubscribe();
21343        });
21344      }
21345      _injector = inject2(EnvironmentInjector);
21346      _rendererFactory = null;
21347      /**
21348       * The `EnvironmentInjector` used to create this application.
21349       */
21350      get injector() {
21351        return this._injector;
21352      }
21353      /**
21354       * Bootstrap a component onto the element identified by its selector or, optionally, to a
21355       * specified element.
21356       *
21357       * @usageNotes
21358       * ### Bootstrap process
21359       *
21360       * When bootstrapping a component, Angular mounts it onto a target DOM element
21361       * and kicks off automatic change detection. The target DOM element can be
21362       * provided using the `rootSelectorOrNode` argument.
21363       *
21364       * If the target DOM element is not provided, Angular tries to find one on a page
21365       * using the `selector` of the component that is being bootstrapped
21366       * (first matched element is used).
21367       *
21368       * ### Example
21369       *
21370       * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,
21371       * but it requires us to know the component while writing the application code.
21372       *
21373       * Imagine a situation where we have to wait for an API call to decide about the component to
21374       * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to
21375       * dynamically bootstrap a component.
21376       *
21377       * {@example core/ts/platform/platform.ts region='componentSelector'}
21378       *
21379       * Optionally, a component can be mounted onto a DOM element that does not match the
21380       * selector of the bootstrapped component.
21381       *
21382       * In the following example, we are providing a CSS selector to match the target element.
21383       *
21384       * {@example core/ts/platform/platform.ts region='cssSelector'}
21385       *
21386       * While in this example, we are providing reference to a DOM node.
21387       *
21388       * {@example core/ts/platform/platform.ts region='domNode'}
21389       */
21390      bootstrap(componentOrFactory, rootSelectorOrNode) {
21391        return this.bootstrapImpl(componentOrFactory, rootSelectorOrNode);
21392      }
21393      bootstrapImpl(componentOrFactory, rootSelectorOrNode, injector = Injector.NULL) {
21394        const ngZone = this._injector.get(NgZone);
21395        return ngZone.run(() => {
21396          profiler(
21397            10
21398            /* ProfilerEvent.BootstrapComponentStart */
21399          );
21400          (typeof ngDevMode === "undefined" || ngDevMode) && warnIfDestroyed(this._destroyed);
21401          const isComponentFactory = componentOrFactory instanceof ComponentFactory$1;
21402          const initStatus = this._injector.get(ApplicationInitStatus);
21403          if (!initStatus.done) {
21404            let errorMessage = "";
21405            if (typeof ngDevMode === "undefined" || ngDevMode) {
21406              const standalone = !isComponentFactory && isStandalone(componentOrFactory);
21407              errorMessage = "Cannot bootstrap as there are still asynchronous initializers running." + (standalone ? "" : " Bootstrap components in the `ngDoBootstrap` method of the root module.");
21408            }
21409            throw new RuntimeError(405, errorMessage);
21410          }
21411          let componentFactory;
21412          if (isComponentFactory) {
21413            componentFactory = componentOrFactory;
21414          } else {
21415            const resolver = this._injector.get(ComponentFactoryResolver$1);
21416            componentFactory = resolver.resolveComponentFactory(componentOrFactory);
21417          }
21418          this.componentTypes.push(componentFactory.componentType);
21419          const ngModule = isBoundToModule(componentFactory) ? void 0 : this._injector.get(NgModuleRef$1);
21420          const selectorOrNode = rootSelectorOrNode || componentFactory.selector;
21421          const compRef = componentFactory.create(injector, [], selectorOrNode, ngModule);
21422          const nativeElement = compRef.location.nativeElement;
21423          const testability = compRef.injector.get(TESTABILITY, null);
21424          testability?.registerApplication(nativeElement);
21425          compRef.onDestroy(() => {
21426            this.detachView(compRef.hostView);
21427            remove(this.components, compRef);
21428            testability?.unregisterApplication(nativeElement);
21429          });
21430          this._loadComponent(compRef);
21431          if (typeof ngDevMode === "undefined" || ngDevMode) {
21432            const _console = this._injector.get(Console);
21433            _console.log(`Angular is running in development mode.`);
21434          }
21435          profiler(11, compRef);
21436          return compRef;
21437        });
21438      }
21439      /**
21440       * Invoke this method to explicitly process change detection and its side-effects.
21441       *
21442       * In development mode, `tick()` also performs a second change detection cycle to ensure that no
21443       * further changes are detected. If additional changes are picked up during this second cycle,
21444       * bindings in the app have side-effects that cannot be resolved in a single change detection
21445       * pass.
21446       * In this case, Angular throws an error, since an Angular application can only have one change
21447       * detection pass during which all change detection must complete.
21448       */
21449      tick() {
21450        if (!this.zonelessEnabled) {
21451          this.dirtyFlags |= 1;
21452        }
21453        this._tick();
21454      }
21455      /** @internal */
21456      _tick() {
21457        profiler(
21458          12
21459          /* ProfilerEvent.ChangeDetectionStart */
21460        );
21461        if (this.tracingSnapshot !== null) {
21462          this.tracingSnapshot.run(TracingAction.CHANGE_DETECTION, this.tickImpl);
21463        } else {
21464          this.tickImpl();
21465        }
21466      }
21467      tickImpl = () => {
21468        (typeof ngDevMode === "undefined" || ngDevMode) && warnIfDestroyed(this._destroyed);
21469        if (this._runningTick) {
21470          throw new RuntimeError(101, ngDevMode && "ApplicationRef.tick is called recursively");
21471        }
21472        const prevConsumer = setActiveConsumer(null);
21473        try {
21474          this._runningTick = true;
21475          this.synchronize();
21476          if (typeof ngDevMode === "undefined" || ngDevMode) {
21477            for (let view of this.allViews) {
21478              view.checkNoChanges();
21479            }
21480          }
21481        } finally {
21482          this._runningTick = false;
21483          this.tracingSnapshot?.dispose();
21484          this.tracingSnapshot = null;
21485          setActiveConsumer(prevConsumer);
21486          this.afterTick.next();
21487          profiler(
21488            13
21489            /* ProfilerEvent.ChangeDetectionEnd */
21490          );
21491        }
21492      };
21493      /**
21494       * Performs the core work of synchronizing the application state with the UI, resolving any
21495       * pending dirtiness (potentially in a loop).
21496       */
21497      synchronize() {
21498        if (this._rendererFactory === null && !this._injector.destroyed) {
21499          this._rendererFactory = this._injector.get(RendererFactory2, null, { optional: true });
21500        }
21501        let runs = 0;
21502        while (this.dirtyFlags !== 0 && runs++ < MAXIMUM_REFRESH_RERUNS) {
21503          profiler(
21504            14
21505            /* ProfilerEvent.ChangeDetectionSyncStart */
21506          );
21507          this.synchronizeOnce();
21508          profiler(
21509            15
21510            /* ProfilerEvent.ChangeDetectionSyncEnd */
21511          );
21512        }
21513        if ((typeof ngDevMode === "undefined" || ngDevMode) && runs >= MAXIMUM_REFRESH_RERUNS) {
21514          throw new RuntimeError(103, ngDevMode && "Infinite change detection while refreshing application views. Ensure views are not calling `markForCheck` on every template execution or that afterRender hooks always mark views for check.");
21515        }
21516      }
21517      /**
21518       * Perform a single synchronization pass.
21519       */
21520      synchronizeOnce() {
21521        if (this.dirtyFlags & 16) {
21522          this.dirtyFlags &= ~16;
21523          this.rootEffectScheduler.flush();
21524        }
21525        let ranDetectChanges = false;
21526        if (this.dirtyFlags & 7) {
21527          const useGlobalCheck = Boolean(
21528            this.dirtyFlags & 1
21529            /* ApplicationRefDirtyFlags.ViewTreeGlobal */
21530          );
21531          this.dirtyFlags &= ~7;
21532          this.dirtyFlags |= 8;
21533          for (let { _lView } of this.allViews) {
21534            if (!useGlobalCheck && !requiresRefreshOrTraversal(_lView)) {
21535              continue;
21536            }
21537            const mode = useGlobalCheck && !this.zonelessEnabled ? (
21538              // Global mode includes `CheckAlways` views.
21539              0
21540            ) : (
21541              // Only refresh views with the `RefreshView` flag or views is a changed signal
21542              1
21543            );
21544            detectChangesInternal(_lView, mode);
21545            ranDetectChanges = true;
21546          }
21547          this.dirtyFlags &= ~4;
21548          this.syncDirtyFlagsWithViews();
21549          if (this.dirtyFlags & (7 | 16)) {
21550            return;
21551          }
21552        }
21553        if (!ranDetectChanges) {
21554          this._rendererFactory?.begin?.();
21555          this._rendererFactory?.end?.();
21556        }
21557        if (this.dirtyFlags & 8) {
21558          this.dirtyFlags &= ~8;
21559          this.afterRenderManager.execute();
21560        }
21561        this.syncDirtyFlagsWithViews();
21562      }
21563      /**
21564       * Checks `allViews` for views which require refresh/traversal, and updates `dirtyFlags`
21565       * accordingly, with two potential behaviors:
21566       *
21567       * 1. If any of our views require updating, then this adds the `ViewTreeTraversal` dirty flag.
21568       *    This _should_ be a no-op, since the scheduler should've added the flag at the same time the
21569       *    view was marked as needing updating.
21570       *
21571       *    TODO(alxhub): figure out if this behavior is still needed for edge cases.
21572       *
21573       * 2. If none of our views require updating, then clear the view-related `dirtyFlag`s. This
21574       *    happens when the scheduler is notified of a view becoming dirty, but the view itself isn't
21575       *    reachable through traversal from our roots (e.g. it's detached from the CD tree).
21576       */
21577      syncDirtyFlagsWithViews() {
21578        if (this.allViews.some(({ _lView }) => requiresRefreshOrTraversal(_lView))) {
21579          this.dirtyFlags |= 2;
21580          return;
21581        } else {
21582          this.dirtyFlags &= ~7;
21583        }
21584      }
21585      /**
21586       * Attaches a view so that it will be dirty checked.
21587       * The view will be automatically detached when it is destroyed.
21588       * This will throw if the view is already attached to a ViewContainer.
21589       */
21590      attachView(viewRef) {
21591        (typeof ngDevMode === "undefined" || ngDevMode) && warnIfDestroyed(this._destroyed);
21592        const view = viewRef;
21593        this._views.push(view);
21594        view.attachToAppRef(this);
21595      }
21596      /**
21597       * Detaches a view from dirty checking again.
21598       */
21599      detachView(viewRef) {
21600        (typeof ngDevMode === "undefined" || ngDevMode) && warnIfDestroyed(this._destroyed);
21601        const view = viewRef;
21602        remove(this._views, view);
21603        view.detachFromAppRef();
21604      }
21605      _loadComponent(componentRef) {
21606        this.attachView(componentRef.hostView);
21607        try {
21608          this.tick();
21609        } catch (e) {
21610          this.internalErrorHandler(e);
21611        }
21612        this.components.push(componentRef);
21613        const listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []);
21614        if (ngDevMode && !Array.isArray(listeners)) {
21615          throw new RuntimeError(-209, `Unexpected type of the \`APP_BOOTSTRAP_LISTENER\` token value (expected an array, but got ${typeof listeners}). Please check that the \`APP_BOOTSTRAP_LISTENER\` token is configured as a \`multi: true\` provider.`);
21616        }
21617        listeners.forEach((listener) => listener(componentRef));
21618      }
21619      /** @internal */
21620      ngOnDestroy() {
21621        if (this._destroyed)
21622          return;
21623        try {
21624          this._destroyListeners.forEach((listener) => listener());
21625          this._views.slice().forEach((view) => view.destroy());
21626        } finally {
21627          this._destroyed = true;
21628          this._views = [];
21629          this._destroyListeners = [];
21630        }
21631      }
21632      /**
21633       * Registers a listener to be called when an instance is destroyed.
21634       *
21635       * @param callback A callback function to add as a listener.
21636       * @returns A function which unregisters a listener.
21637       */
21638      onDestroy(callback) {
21639        (typeof ngDevMode === "undefined" || ngDevMode) && warnIfDestroyed(this._destroyed);
21640        this._destroyListeners.push(callback);
21641        return () => remove(this._destroyListeners, callback);
21642      }
21643      /**
21644       * Destroys an Angular application represented by this `ApplicationRef`. Calling this function
21645       * will destroy the associated environment injectors as well as all the bootstrapped components
21646       * with their views.
21647       */
21648      destroy() {
21649        if (this._destroyed) {
21650          throw new RuntimeError(406, ngDevMode && "This instance of the `ApplicationRef` has already been destroyed.");
21651        }
21652        const injector = this._injector;
21653        if (injector.destroy && !injector.destroyed) {
21654          injector.destroy();
21655        }
21656      }
21657      /**
21658       * Returns the number of attached views.
21659       */
21660      get viewCount() {
21661        return this._views.length;
21662      }
21663      static \u0275fac = function ApplicationRef_Factory(__ngFactoryType__) {
21664        return new (__ngFactoryType__ || _ApplicationRef)();
21665      };
21666      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _ApplicationRef, factory: _ApplicationRef.\u0275fac, providedIn: "root" });
21667    };
21668    (() => {
21669      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationRef, [{
21670        type: Injectable,
21671        args: [{ providedIn: "root" }]
21672      }], () => [], null);
21673    })();
21674    ANIMATIONS_DISABLED = new InjectionToken(typeof ngDevMode !== "undefined" && ngDevMode ? "AnimationsDisabled" : "", {
21675      providedIn: "root",
21676      factory: () => false
21677    });
21678    MAX_ANIMATION_TIMEOUT = new InjectionToken(typeof ngDevMode !== "undefined" && ngDevMode ? "MaxAnimationTimeout" : "", {
21679      providedIn: "root",
21680      factory: () => MAX_ANIMATION_TIMEOUT_DEFAULT
21681    });
21682    MAX_ANIMATION_TIMEOUT_DEFAULT = 4e3;
21683    DEFAULT_ANIMATIONS_DISABLED = false;
21684    areAnimationSupported = typeof document !== "undefined" && // tslint:disable-next-line:no-toplevel-property-access
21685    typeof document?.documentElement?.getAnimations === "function";
21686    noOpAnimationComplete = () => {
21687    };
21688    enterClassMap = /* @__PURE__ */ new WeakMap();
21689    longestAnimations = /* @__PURE__ */ new WeakMap();
21690    leavingNodes = /* @__PURE__ */ new WeakMap();
21691    LiveCollection = class {
21692      destroy(item) {
21693      }
21694      updateValue(index, value) {
21695      }
21696      // operations below could be implemented on top of the operations defined so far, but having
21697      // them explicitly allow clear expression of intent and potentially more performant
21698      // implementations
21699      swap(index1, index2) {
21700        const startIdx = Math.min(index1, index2);
21701        const endIdx = Math.max(index1, index2);
21702        const endItem = this.detach(endIdx);
21703        if (endIdx - startIdx > 1) {
21704          const startItem = this.detach(startIdx);
21705          this.attach(startIdx, endItem);
21706          this.attach(endIdx, startItem);
21707        } else {
21708          this.attach(startIdx, endItem);
21709        }
21710      }
21711      move(prevIndex, newIdx) {
21712        this.attach(newIdx, this.detach(prevIndex));
21713      }
21714    };
21715    UniqueValueMultiKeyMap = class {
21716      // A map from a key to the first value corresponding to this key.
21717      kvMap = /* @__PURE__ */ new Map();
21718      // A map that acts as a linked list of values - each value maps to the next value in this "linked
21719      // list" (this only works if values are unique). Allocated lazily to avoid memory consumption when
21720      // there are no duplicated values.
21721      _vMap = void 0;
21722      has(key) {
21723        return this.kvMap.has(key);
21724      }
21725      delete(key) {
21726        if (!this.has(key))
21727          return false;
21728        const value = this.kvMap.get(key);
21729        if (this._vMap !== void 0 && this._vMap.has(value)) {
21730          this.kvMap.set(key, this._vMap.get(value));
21731          this._vMap.delete(value);
21732        } else {
21733          this.kvMap.delete(key);
21734        }
21735        return true;
21736      }
21737      get(key) {
21738        return this.kvMap.get(key);
21739      }
21740      set(key, value) {
21741        if (this.kvMap.has(key)) {
21742          let prevValue = this.kvMap.get(key);
21743          if (ngDevMode && prevValue === value) {
21744            throw new Error(`Detected a duplicated value ${value} for the key ${key}`);
21745          }
21746          if (this._vMap === void 0) {
21747            this._vMap = /* @__PURE__ */ new Map();
21748          }
21749          const vMap = this._vMap;
21750          while (vMap.has(prevValue)) {
21751            prevValue = vMap.get(prevValue);
21752          }
21753          vMap.set(prevValue, value);
21754        } else {
21755          this.kvMap.set(key, value);
21756        }
21757      }
21758      forEach(cb) {
21759        for (let [key, value] of this.kvMap) {
21760          cb(value, key);
21761          if (this._vMap !== void 0) {
21762            const vMap = this._vMap;
21763            while (vMap.has(value)) {
21764              value = vMap.get(value);
21765              cb(value, key);
21766            }
21767          }
21768        }
21769      }
21770    };
21771    RepeaterContext = class {
21772      lContainer;
21773      $implicit;
21774      $index;
21775      constructor(lContainer, $implicit, $index) {
21776        this.lContainer = lContainer;
21777        this.$implicit = $implicit;
21778        this.$index = $index;
21779      }
21780      get $count() {
21781        return this.lContainer.length - CONTAINER_HEADER_OFFSET;
21782      }
21783    };
21784    RepeaterMetadata = class {
21785      hasEmptyBlock;
21786      trackByFn;
21787      liveCollection;
21788      constructor(hasEmptyBlock, trackByFn, liveCollection) {
21789        this.hasEmptyBlock = hasEmptyBlock;
21790        this.trackByFn = trackByFn;
21791        this.liveCollection = liveCollection;
21792      }
21793    };
21794    OperationsCounter = class {
21795      created = 0;
21796      destroyed = 0;
21797      reset() {
21798        this.created = 0;
21799        this.destroyed = 0;
21800      }
21801      recordCreate() {
21802        this.created++;
21803      }
21804      recordDestroy() {
21805        this.destroyed++;
21806      }
21807      /**
21808       * A method indicating if the entire collection was re-created as part of the reconciliation pass.
21809       * Used to warn developers about the usage of a tracking function that might result in excessive
21810       * amount of view creation / destroy operations.
21811       *
21812       * @returns boolean value indicating if a live collection was re-created
21813       */
21814      wasReCreated(collectionLen) {
21815        return collectionLen > 0 && this.created === this.destroyed && this.created === collectionLen;
21816      }
21817    };
21818    LiveCollectionLContainerImpl = class extends LiveCollection {
21819      lContainer;
21820      hostLView;
21821      templateTNode;
21822      operationsCounter = ngDevMode ? new OperationsCounter() : void 0;
21823      /**
21824        Property indicating if indexes in the repeater context need to be updated following the live
21825        collection changes. Index updates are necessary if and only if views are inserted / removed in
21826        the middle of LContainer. Adds and removals at the end don't require index updates.
21827      */
21828      needsIndexUpdate = false;
21829      constructor(lContainer, hostLView, templateTNode) {
21830        super();
21831        this.lContainer = lContainer;
21832        this.hostLView = hostLView;
21833        this.templateTNode = templateTNode;
21834      }
21835      get length() {
21836        return this.lContainer.length - CONTAINER_HEADER_OFFSET;
21837      }
21838      at(index) {
21839        return this.getLView(index)[CONTEXT].$implicit;
21840      }
21841      attach(index, lView) {
21842        const dehydratedView = lView[HYDRATION];
21843        this.needsIndexUpdate ||= index !== this.length;
21844        addLViewToLContainer(this.lContainer, lView, index, shouldAddViewToDom(this.templateTNode, dehydratedView));
21845        clearDetachAnimationList(this.lContainer, index);
21846      }
21847      detach(index) {
21848        this.needsIndexUpdate ||= index !== this.length - 1;
21849        maybeInitDetachAnimationList(this.lContainer, index);
21850        return detachExistingView(this.lContainer, index);
21851      }
21852      create(index, value) {
21853        const dehydratedView = findMatchingDehydratedView(this.lContainer, this.templateTNode.tView.ssrId);
21854        const embeddedLView = createAndRenderEmbeddedLView(this.hostLView, this.templateTNode, new RepeaterContext(this.lContainer, value, index), { dehydratedView });
21855        this.operationsCounter?.recordCreate();
21856        return embeddedLView;
21857      }
21858      destroy(lView) {
21859        destroyLView(lView[TVIEW], lView);
21860        this.operationsCounter?.recordDestroy();
21861      }
21862      updateValue(index, value) {
21863        this.getLView(index)[CONTEXT].$implicit = value;
21864      }
21865      reset() {
21866        this.needsIndexUpdate = false;
21867        this.operationsCounter?.reset();
21868      }
21869      updateIndexes() {
21870        if (this.needsIndexUpdate) {
21871          for (let i = 0; i < this.length; i++) {
21872            this.getLView(i)[CONTEXT].$index = i;
21873          }
21874        }
21875      }
21876      getLView(index) {
21877        return getExistingLViewFromLContainer(this.lContainer, index);
21878      }
21879    };
21880    _locateOrCreateElementNode = (tView, lView, tNode, name, index) => {
21881      lastNodeWasCreated(true);
21882      return createElementNode(lView[RENDERER], name, getNamespace());
21883    };
21884    _locateOrCreateElementContainerNode = (tView, lView, tNode, commentText, index) => {
21885      lastNodeWasCreated(true);
21886      return createCommentNode(lView[RENDERER], ngDevMode ? commentText : "");
21887    };
21888    u = void 0;
21889    localeEn = ["en", [["a", "p"], ["AM", "PM"]], [["AM", "PM"]], [["S", "M", "T", "W", "T", "F", "S"], ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]], u, [["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]], u, [["B", "A"], ["BC", "AD"], ["Before Christ", "Anno Domini"]], 0, [6, 0], ["M/d/yy", "MMM d, y", "MMMM d, y", "EEEE, MMMM d, y"], ["h:mm a", "h:mm:ss a", "h:mm:ss a z", "h:mm:ss a zzzz"], ["{1}, {0}", u, "{1} 'at' {0}", u], [".", ",", ";", "%", "+", "-", "E", "\xD7", "\u2030", "\u221E", "NaN", ":"], ["#,##0.###", "#,##0%", "\xA4#,##0.00", "#E0"], "USD", "$", "US Dollar", {}, "ltr", plural];
21890    LOCALE_DATA = {};
21891    (function(LocaleDataIndex2) {
21892      LocaleDataIndex2[LocaleDataIndex2["LocaleId"] = 0] = "LocaleId";
21893      LocaleDataIndex2[LocaleDataIndex2["DayPeriodsFormat"] = 1] = "DayPeriodsFormat";
21894      LocaleDataIndex2[LocaleDataIndex2["DayPeriodsStandalone"] = 2] = "DayPeriodsStandalone";
21895      LocaleDataIndex2[LocaleDataIndex2["DaysFormat"] = 3] = "DaysFormat";
21896      LocaleDataIndex2[LocaleDataIndex2["DaysStandalone"] = 4] = "DaysStandalone";
21897      LocaleDataIndex2[LocaleDataIndex2["MonthsFormat"] = 5] = "MonthsFormat";
21898      LocaleDataIndex2[LocaleDataIndex2["MonthsStandalone"] = 6] = "MonthsStandalone";
21899      LocaleDataIndex2[LocaleDataIndex2["Eras"] = 7] = "Eras";
21900      LocaleDataIndex2[LocaleDataIndex2["FirstDayOfWeek"] = 8] = "FirstDayOfWeek";
21901      LocaleDataIndex2[LocaleDataIndex2["WeekendRange"] = 9] = "WeekendRange";
21902      LocaleDataIndex2[LocaleDataIndex2["DateFormat"] = 10] = "DateFormat";
21903      LocaleDataIndex2[LocaleDataIndex2["TimeFormat"] = 11] = "TimeFormat";
21904      LocaleDataIndex2[LocaleDataIndex2["DateTimeFormat"] = 12] = "DateTimeFormat";
21905      LocaleDataIndex2[LocaleDataIndex2["NumberSymbols"] = 13] = "NumberSymbols";
21906      LocaleDataIndex2[LocaleDataIndex2["NumberFormats"] = 14] = "NumberFormats";
21907      LocaleDataIndex2[LocaleDataIndex2["CurrencyCode"] = 15] = "CurrencyCode";
21908      LocaleDataIndex2[LocaleDataIndex2["CurrencySymbol"] = 16] = "CurrencySymbol";
21909      LocaleDataIndex2[LocaleDataIndex2["CurrencyName"] = 17] = "CurrencyName";
21910      LocaleDataIndex2[LocaleDataIndex2["Currencies"] = 18] = "Currencies";
21911      LocaleDataIndex2[LocaleDataIndex2["Directionality"] = 19] = "Directionality";
21912      LocaleDataIndex2[LocaleDataIndex2["PluralCase"] = 20] = "PluralCase";
21913      LocaleDataIndex2[LocaleDataIndex2["ExtraData"] = 21] = "ExtraData";
21914    })(LocaleDataIndex || (LocaleDataIndex = {}));
21915    pluralMapping = ["zero", "one", "two", "few", "many"];
21916    DEFAULT_LOCALE_ID = "en-US";
21917    USD_CURRENCY_CODE = "USD";
21918    ELEMENT_MARKER = {
21919      marker: "element"
21920    };
21921    ICU_MARKER = {
21922      marker: "ICU"
21923    };
21924    (function(I18nCreateOpCode2) {
21925      I18nCreateOpCode2[I18nCreateOpCode2["SHIFT"] = 2] = "SHIFT";
21926      I18nCreateOpCode2[I18nCreateOpCode2["APPEND_EAGERLY"] = 1] = "APPEND_EAGERLY";
21927      I18nCreateOpCode2[I18nCreateOpCode2["COMMENT"] = 2] = "COMMENT";
21928    })(I18nCreateOpCode || (I18nCreateOpCode = {}));
21929    LOCALE_ID$1 = DEFAULT_LOCALE_ID;
21930    changeMask = 0;
21931    changeMaskCounter = 0;
21932    _locateOrCreateNode = (lView, index, textOrName, nodeType) => {
21933      lastNodeWasCreated(true);
21934      return createNodeWithoutHydration(lView, textOrName, nodeType);
21935    };
21936    OpCodeParser = class {
21937      i = 0;
21938      codes;
21939      constructor(codes) {
21940        this.codes = codes;
21941      }
21942      hasMore() {
21943        return this.i < this.codes.length;
21944      }
21945      consumeNumber() {
21946        let value = this.codes[this.i++];
21947        assertNumber(value, "expecting number in OpCode");
21948        return value;
21949      }
21950      consumeString() {
21951        let value = this.codes[this.i++];
21952        assertString(value, "expecting string in OpCode");
21953        return value;
21954      }
21955      consumeFunction() {
21956        let value = this.codes[this.i++];
21957        if (value === null || typeof value === "function") {
21958          return value;
21959        }
21960        throw new Error("expecting function in OpCode");
21961      }
21962      consumeNumberOrString() {
21963        let value = this.codes[this.i++];
21964        if (typeof value === "string") {
21965          return value;
21966        }
21967        assertNumber(value, "expecting number or string in OpCode");
21968        return value;
21969      }
21970      consumeNumberStringOrMarker() {
21971        let value = this.codes[this.i++];
21972        if (typeof value === "string" || typeof value === "number" || value == ICU_MARKER || value == ELEMENT_MARKER) {
21973          return value;
21974        }
21975        assertNumber(value, "expecting number, string, ICU_MARKER or ELEMENT_MARKER in OpCode");
21976        return value;
21977      }
21978    };
21979    BINDING_REGEXP = /�(\d+):?\d*�/gi;
21980    ICU_REGEXP = /({\s*�\d+:?\d*�\s*,\s*\S{6}\s*,[\s\S]*})/gi;
21981    NESTED_ICU = /�(\d+)�/;
21982    ICU_BLOCK_REGEXP = /^\s*(�\d+:?\d*�)\s*,\s*(select|plural)\s*,/;
21983    MARKER = `\uFFFD`;
21984    SUBTEMPLATE_REGEXP = /�\/?\*(\d+:\d+)�/gi;
21985    PH_REGEXP = /�(\/?[#*]\d+):?\d*�/gi;
21986    NGSP_UNICODE_REGEXP = /\uE500/g;
21987    ROOT_TEMPLATE_ID = 0;
21988    PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\[(�.+?�?)\]/;
21989    PP_PLACEHOLDERS_REGEXP = /\[(�.+?�?)\]|(�\/?\*\d+:\d+�)/g;
21990    PP_ICU_VARS_REGEXP = /({\s*)(VAR_(PLURAL|SELECT)(_\d+)?)(\s*,)/g;
21991    PP_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/g;
21992    PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\d+)?)�/g;
21993    PP_CLOSE_TEMPLATE_REGEXP = /\/\*/;
21994    PP_TEMPLATE_ID_REGEXP = /\d+\:(\d+)/;
21995    parserState = {
21996      textEnd: 0,
21997      key: 0,
21998      keyEnd: 0,
21999      value: 0,
22000      valueEnd: 0
22001    };
22002    _locateOrCreateTextNode = (tView, lView, tNode, value, index) => {
22003      lastNodeWasCreated(true);
22004      return createTextNode(lView[RENDERER], value);
22005    };
22006    UNINITIALIZED_LET = {};
22007    angularCoreEnv = /* @__PURE__ */ (() => ({
22008      "\u0275\u0275animateEnter": \u0275\u0275animateEnter,
22009      "\u0275\u0275animateEnterListener": \u0275\u0275animateEnterListener,
22010      "\u0275\u0275animateLeave": \u0275\u0275animateLeave,
22011      "\u0275\u0275animateLeaveListener": \u0275\u0275animateLeaveListener,
22012      "\u0275\u0275attribute": \u0275\u0275attribute,
22013      "\u0275\u0275defineComponent": \u0275\u0275defineComponent,
22014      "\u0275\u0275defineDirective": \u0275\u0275defineDirective,
22015      "\u0275\u0275defineInjectable": \u0275\u0275defineInjectable,
22016      "\u0275\u0275defineInjector": \u0275\u0275defineInjector,
22017      "\u0275\u0275defineNgModule": \u0275\u0275defineNgModule,
22018      "\u0275\u0275definePipe": \u0275\u0275definePipe,
22019      "\u0275\u0275directiveInject": \u0275\u0275directiveInject,
22020      "\u0275\u0275getInheritedFactory": \u0275\u0275getInheritedFactory,
22021      "\u0275\u0275inject": \u0275\u0275inject,
22022      "\u0275\u0275injectAttribute": \u0275\u0275injectAttribute,
22023      "\u0275\u0275invalidFactory": \u0275\u0275invalidFactory,
22024      "\u0275\u0275invalidFactoryDep": \u0275\u0275invalidFactoryDep,
22025      "\u0275\u0275templateRefExtractor": \u0275\u0275templateRefExtractor,
22026      "\u0275\u0275resetView": \u0275\u0275resetView,
22027      "\u0275\u0275HostDirectivesFeature": \u0275\u0275HostDirectivesFeature,
22028      "\u0275\u0275NgOnChangesFeature": \u0275\u0275NgOnChangesFeature,
22029      "\u0275\u0275ProvidersFeature": \u0275\u0275ProvidersFeature,
22030      "\u0275\u0275CopyDefinitionFeature": \u0275\u0275CopyDefinitionFeature,
22031      "\u0275\u0275InheritDefinitionFeature": \u0275\u0275InheritDefinitionFeature,
22032      "\u0275\u0275ExternalStylesFeature": \u0275\u0275ExternalStylesFeature,
22033      "\u0275\u0275nextContext": \u0275\u0275nextContext,
22034      "\u0275\u0275namespaceHTML": \u0275\u0275namespaceHTML,
22035      "\u0275\u0275namespaceMathML": \u0275\u0275namespaceMathML,
22036      "\u0275\u0275namespaceSVG": \u0275\u0275namespaceSVG,
22037      "\u0275\u0275enableBindings": \u0275\u0275enableBindings,
22038      "\u0275\u0275disableBindings": \u0275\u0275disableBindings,
22039      "\u0275\u0275elementStart": \u0275\u0275elementStart,
22040      "\u0275\u0275elementEnd": \u0275\u0275elementEnd,
22041      "\u0275\u0275element": \u0275\u0275element,
22042      "\u0275\u0275elementContainerStart": \u0275\u0275elementContainerStart,
22043      "\u0275\u0275elementContainerEnd": \u0275\u0275elementContainerEnd,
22044      "\u0275\u0275domElement": \u0275\u0275domElement,
22045      "\u0275\u0275domElementStart": \u0275\u0275domElementStart,
22046      "\u0275\u0275domElementEnd": \u0275\u0275domElementEnd,
22047      "\u0275\u0275domElementContainer": \u0275\u0275domElementContainer,
22048      "\u0275\u0275domElementContainerStart": \u0275\u0275domElementContainerStart,
22049      "\u0275\u0275domElementContainerEnd": \u0275\u0275domElementContainerEnd,
22050      "\u0275\u0275domTemplate": \u0275\u0275domTemplate,
22051      "\u0275\u0275domListener": \u0275\u0275domListener,
22052      "\u0275\u0275elementContainer": \u0275\u0275elementContainer,
22053      "\u0275\u0275pureFunction0": \u0275\u0275pureFunction0,
22054      "\u0275\u0275pureFunction1": \u0275\u0275pureFunction1,
22055      "\u0275\u0275pureFunction2": \u0275\u0275pureFunction2,
22056      "\u0275\u0275pureFunction3": \u0275\u0275pureFunction3,
22057      "\u0275\u0275pureFunction4": \u0275\u0275pureFunction4,
22058      "\u0275\u0275pureFunction5": \u0275\u0275pureFunction5,
22059      "\u0275\u0275pureFunction6": \u0275\u0275pureFunction6,
22060      "\u0275\u0275pureFunction7": \u0275\u0275pureFunction7,
22061      "\u0275\u0275pureFunction8": \u0275\u0275pureFunction8,
22062      "\u0275\u0275pureFunctionV": \u0275\u0275pureFunctionV,
22063      "\u0275\u0275getCurrentView": \u0275\u0275getCurrentView,
22064      "\u0275\u0275restoreView": \u0275\u0275restoreView,
22065      "\u0275\u0275listener": \u0275\u0275listener,
22066      "\u0275\u0275projection": \u0275\u0275projection,
22067      "\u0275\u0275syntheticHostProperty": \u0275\u0275syntheticHostProperty,
22068      "\u0275\u0275syntheticHostListener": \u0275\u0275syntheticHostListener,
22069      "\u0275\u0275pipeBind1": \u0275\u0275pipeBind1,
22070      "\u0275\u0275pipeBind2": \u0275\u0275pipeBind2,
22071      "\u0275\u0275pipeBind3": \u0275\u0275pipeBind3,
22072      "\u0275\u0275pipeBind4": \u0275\u0275pipeBind4,
22073      "\u0275\u0275pipeBindV": \u0275\u0275pipeBindV,
22074      "\u0275\u0275projectionDef": \u0275\u0275projectionDef,
22075      "\u0275\u0275domProperty": \u0275\u0275domProperty,
22076      "\u0275\u0275ariaProperty": \u0275\u0275ariaProperty,
22077      "\u0275\u0275property": \u0275\u0275property,
22078      "\u0275\u0275pipe": \u0275\u0275pipe,
22079      "\u0275\u0275queryRefresh": \u0275\u0275queryRefresh,
22080      "\u0275\u0275queryAdvance": \u0275\u0275queryAdvance,
22081      "\u0275\u0275viewQuery": \u0275\u0275viewQuery,
22082      "\u0275\u0275viewQuerySignal": \u0275\u0275viewQuerySignal,
22083      "\u0275\u0275loadQuery": \u0275\u0275loadQuery,
22084      "\u0275\u0275contentQuery": \u0275\u0275contentQuery,
22085      "\u0275\u0275contentQuerySignal": \u0275\u0275contentQuerySignal,
22086      "\u0275\u0275reference": \u0275\u0275reference,
22087      "\u0275\u0275classMap": \u0275\u0275classMap,
22088      "\u0275\u0275styleMap": \u0275\u0275styleMap,
22089      "\u0275\u0275styleProp": \u0275\u0275styleProp,
22090      "\u0275\u0275classProp": \u0275\u0275classProp,
22091      "\u0275\u0275advance": \u0275\u0275advance,
22092      "\u0275\u0275template": \u0275\u0275template,
22093      "\u0275\u0275conditional": \u0275\u0275conditional,
22094      "\u0275\u0275conditionalCreate": \u0275\u0275conditionalCreate,
22095      "\u0275\u0275conditionalBranchCreate": \u0275\u0275conditionalBranchCreate,
22096      "\u0275\u0275defer": \u0275\u0275defer,
22097      "\u0275\u0275deferWhen": \u0275\u0275deferWhen,
22098      "\u0275\u0275deferOnIdle": \u0275\u0275deferOnIdle,
22099      "\u0275\u0275deferOnImmediate": \u0275\u0275deferOnImmediate,
22100      "\u0275\u0275deferOnTimer": \u0275\u0275deferOnTimer,
22101      "\u0275\u0275deferOnHover": \u0275\u0275deferOnHover,
22102      "\u0275\u0275deferOnInteraction": \u0275\u0275deferOnInteraction,
22103      "\u0275\u0275deferOnViewport": \u0275\u0275deferOnViewport,
22104      "\u0275\u0275deferPrefetchWhen": \u0275\u0275deferPrefetchWhen,
22105      "\u0275\u0275deferPrefetchOnIdle": \u0275\u0275deferPrefetchOnIdle,
22106      "\u0275\u0275deferPrefetchOnImmediate": \u0275\u0275deferPrefetchOnImmediate,
22107      "\u0275\u0275deferPrefetchOnTimer": \u0275\u0275deferPrefetchOnTimer,
22108      "\u0275\u0275deferPrefetchOnHover": \u0275\u0275deferPrefetchOnHover,
22109      "\u0275\u0275deferPrefetchOnInteraction": \u0275\u0275deferPrefetchOnInteraction,
22110      "\u0275\u0275deferPrefetchOnViewport": \u0275\u0275deferPrefetchOnViewport,
22111      "\u0275\u0275deferHydrateWhen": \u0275\u0275deferHydrateWhen,
22112      "\u0275\u0275deferHydrateNever": \u0275\u0275deferHydrateNever,
22113      "\u0275\u0275deferHydrateOnIdle": \u0275\u0275deferHydrateOnIdle,
22114      "\u0275\u0275deferHydrateOnImmediate": \u0275\u0275deferHydrateOnImmediate,
22115      "\u0275\u0275deferHydrateOnTimer": \u0275\u0275deferHydrateOnTimer,
22116      "\u0275\u0275deferHydrateOnHover": \u0275\u0275deferHydrateOnHover,
22117      "\u0275\u0275deferHydrateOnInteraction": \u0275\u0275deferHydrateOnInteraction,
22118      "\u0275\u0275deferHydrateOnViewport": \u0275\u0275deferHydrateOnViewport,
22119      "\u0275\u0275deferEnableTimerScheduling": \u0275\u0275deferEnableTimerScheduling,
22120      "\u0275\u0275repeater": \u0275\u0275repeater,
22121      "\u0275\u0275repeaterCreate": \u0275\u0275repeaterCreate,
22122      "\u0275\u0275repeaterTrackByIndex": \u0275\u0275repeaterTrackByIndex,
22123      "\u0275\u0275repeaterTrackByIdentity": \u0275\u0275repeaterTrackByIdentity,
22124      "\u0275\u0275componentInstance": \u0275\u0275componentInstance,
22125      "\u0275\u0275text": \u0275\u0275text,
22126      "\u0275\u0275textInterpolate": \u0275\u0275textInterpolate,
22127      "\u0275\u0275textInterpolate1": \u0275\u0275textInterpolate1,
22128      "\u0275\u0275textInterpolate2": \u0275\u0275textInterpolate2,
22129      "\u0275\u0275textInterpolate3": \u0275\u0275textInterpolate3,
22130      "\u0275\u0275textInterpolate4": \u0275\u0275textInterpolate4,
22131      "\u0275\u0275textInterpolate5": \u0275\u0275textInterpolate5,
22132      "\u0275\u0275textInterpolate6": \u0275\u0275textInterpolate6,
22133      "\u0275\u0275textInterpolate7": \u0275\u0275textInterpolate7,
22134      "\u0275\u0275textInterpolate8": \u0275\u0275textInterpolate8,
22135      "\u0275\u0275textInterpolateV": \u0275\u0275textInterpolateV,
22136      "\u0275\u0275i18n": \u0275\u0275i18n,
22137      "\u0275\u0275i18nAttributes": \u0275\u0275i18nAttributes,
22138      "\u0275\u0275i18nExp": \u0275\u0275i18nExp,
22139      "\u0275\u0275i18nStart": \u0275\u0275i18nStart,
22140      "\u0275\u0275i18nEnd": \u0275\u0275i18nEnd,
22141      "\u0275\u0275i18nApply": \u0275\u0275i18nApply,
22142      "\u0275\u0275i18nPostprocess": \u0275\u0275i18nPostprocess,
22143      "\u0275\u0275resolveWindow": \u0275\u0275resolveWindow,
22144      "\u0275\u0275resolveDocument": \u0275\u0275resolveDocument,
22145      "\u0275\u0275resolveBody": \u0275\u0275resolveBody,
22146      "\u0275\u0275setComponentScope": \u0275\u0275setComponentScope,
22147      "\u0275\u0275setNgModuleScope": \u0275\u0275setNgModuleScope,
22148      "\u0275\u0275registerNgModuleType": registerNgModuleType,
22149      "\u0275\u0275getComponentDepsFactory": \u0275\u0275getComponentDepsFactory,
22150      "\u0275setClassDebugInfo": \u0275setClassDebugInfo,
22151      "\u0275\u0275declareLet": \u0275\u0275declareLet,
22152      "\u0275\u0275storeLet": \u0275\u0275storeLet,
22153      "\u0275\u0275readContextLet": \u0275\u0275readContextLet,
22154      "\u0275\u0275attachSourceLocations": \u0275\u0275attachSourceLocations,
22155      "\u0275\u0275interpolate": \u0275\u0275interpolate,
22156      "\u0275\u0275interpolate1": \u0275\u0275interpolate1,
22157      "\u0275\u0275interpolate2": \u0275\u0275interpolate2,
22158      "\u0275\u0275interpolate3": \u0275\u0275interpolate3,
22159      "\u0275\u0275interpolate4": \u0275\u0275interpolate4,
22160      "\u0275\u0275interpolate5": \u0275\u0275interpolate5,
22161      "\u0275\u0275interpolate6": \u0275\u0275interpolate6,
22162      "\u0275\u0275interpolate7": \u0275\u0275interpolate7,
22163      "\u0275\u0275interpolate8": \u0275\u0275interpolate8,
22164      "\u0275\u0275interpolateV": \u0275\u0275interpolateV,
22165      "\u0275\u0275sanitizeHtml": \u0275\u0275sanitizeHtml,
22166      "\u0275\u0275sanitizeStyle": \u0275\u0275sanitizeStyle,
22167      "\u0275\u0275sanitizeResourceUrl": \u0275\u0275sanitizeResourceUrl,
22168      "\u0275\u0275sanitizeScript": \u0275\u0275sanitizeScript,
22169      "\u0275\u0275validateAttribute": \u0275\u0275validateAttribute,
22170      "\u0275\u0275sanitizeUrl": \u0275\u0275sanitizeUrl,
22171      "\u0275\u0275sanitizeUrlOrResourceUrl": \u0275\u0275sanitizeUrlOrResourceUrl,
22172      "\u0275\u0275trustConstantHtml": \u0275\u0275trustConstantHtml,
22173      "\u0275\u0275trustConstantResourceUrl": \u0275\u0275trustConstantResourceUrl,
22174      "forwardRef": forwardRef,
22175      "resolveForwardRef": resolveForwardRef,
22176      "\u0275\u0275twoWayProperty": \u0275\u0275twoWayProperty,
22177      "\u0275\u0275twoWayBindingSet": \u0275\u0275twoWayBindingSet,
22178      "\u0275\u0275twoWayListener": \u0275\u0275twoWayListener,
22179      "\u0275\u0275replaceMetadata": \u0275\u0275replaceMetadata,
22180      "\u0275\u0275getReplaceMetadataURL": \u0275\u0275getReplaceMetadataURL
22181    }))();
22182    jitOptions = null;
22183    moduleQueue = [];
22184    flushingModuleQueue = false;
22185    ownerNgModule = /* @__PURE__ */ new WeakMap();
22186    verifiedNgModule = /* @__PURE__ */ new WeakMap();
22187    compilationDepth = 0;
22188    LIFECYCLE_HOOKS = [
22189      "ngOnChanges",
22190      "ngOnInit",
22191      "ngOnDestroy",
22192      "ngDoCheck",
22193      "ngAfterViewInit",
22194      "ngAfterViewChecked",
22195      "ngAfterContentInit",
22196      "ngAfterContentChecked"
22197    ];
22198    Directive = makeDecorator("Directive", (dir = {}) => dir, void 0, void 0, (type, meta) => compileDirective(type, meta));
22199    Component = makeDecorator("Component", (c = {}) => __spreadValues({ changeDetection: ChangeDetectionStrategy.Default }, c), Directive, void 0, (type, meta) => compileComponent(type, meta));
22200    Pipe = makeDecorator("Pipe", (p) => __spreadValues({ pure: true }, p), void 0, void 0, (type, meta) => compilePipe(type, meta));
22201    Input = makePropDecorator("Input", (arg) => {
22202      if (!arg) {
22203        return {};
22204      }
22205      return typeof arg === "string" ? { alias: arg } : arg;
22206    });
22207    Output = makePropDecorator("Output", (alias) => ({ alias }));
22208    HostBinding = makePropDecorator("HostBinding", (hostPropertyName) => ({ hostPropertyName }));
22209    HostListener = makePropDecorator("HostListener", (eventName, args) => ({ eventName, args }));
22210    NgModule = makeDecorator(
22211      "NgModule",
22212      (ngModule) => ngModule,
22213      void 0,
22214      void 0,
22215      /**
22216       * Decorator that marks the following class as an NgModule, and supplies
22217       * configuration metadata for it.
22218       *
22219       * * The `declarations` option configures the compiler
22220       * with information about what belongs to the NgModule.
22221       * * The `providers` options configures the NgModule's injector to provide
22222       * dependencies the NgModule members.
22223       * * The `imports` and `exports` options bring in members from other modules, and make
22224       * this module's members available to others.
22225       */
22226      (type, meta) => compileNgModule(type, meta)
22227    );
22228    ModuleWithComponentFactories = class {
22229      ngModuleFactory;
22230      componentFactories;
22231      constructor(ngModuleFactory, componentFactories) {
22232        this.ngModuleFactory = ngModuleFactory;
22233        this.componentFactories = componentFactories;
22234      }
22235    };
22236    Compiler = class _Compiler {
22237      /**
22238       * Compiles the given NgModule and all of its components. All templates of the components
22239       * have to be inlined.
22240       */
22241      compileModuleSync(moduleType) {
22242        return new NgModuleFactory2(moduleType);
22243      }
22244      /**
22245       * Compiles the given NgModule and all of its components
22246       */
22247      compileModuleAsync(moduleType) {
22248        return Promise.resolve(this.compileModuleSync(moduleType));
22249      }
22250      /**
22251       * Same as {@link Compiler#compileModuleSync compileModuleSync} but also creates ComponentFactories for all components.
22252       */
22253      compileModuleAndAllComponentsSync(moduleType) {
22254        const ngModuleFactory = this.compileModuleSync(moduleType);
22255        const moduleDef = getNgModuleDef(moduleType);
22256        const componentFactories = maybeUnwrapFn(moduleDef.declarations).reduce((factories, declaration) => {
22257          const componentDef = getComponentDef(declaration);
22258          componentDef && factories.push(new ComponentFactory2(componentDef));
22259          return factories;
22260        }, []);
22261        return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);
22262      }
22263      /**
22264       * Same as {@link Compiler#compileModuleAsync compileModuleAsync} but also creates ComponentFactories for all components.
22265       */
22266      compileModuleAndAllComponentsAsync(moduleType) {
22267        return Promise.resolve(this.compileModuleAndAllComponentsSync(moduleType));
22268      }
22269      /**
22270       * Clears all caches.
22271       */
22272      clearCache() {
22273      }
22274      /**
22275       * Clears the cache for the given component/ngModule.
22276       */
22277      clearCacheFor(type) {
22278      }
22279      /**
22280       * Returns the id for a given NgModule, if one is defined and known to the compiler.
22281       */
22282      getModuleId(moduleType) {
22283        return void 0;
22284      }
22285      static \u0275fac = function Compiler_Factory(__ngFactoryType__) {
22286        return new (__ngFactoryType__ || _Compiler)();
22287      };
22288      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _Compiler, factory: _Compiler.\u0275fac, providedIn: "root" });
22289    };
22290    (() => {
22291      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Compiler, [{
22292        type: Injectable,
22293        args: [{ providedIn: "root" }]
22294      }], null, null);
22295    })();
22296    COMPILER_OPTIONS = new InjectionToken(ngDevMode ? "compilerOptions" : "");
22297    NgZoneChangeDetectionScheduler = class _NgZoneChangeDetectionScheduler {
22298      zone = inject2(NgZone);
22299      changeDetectionScheduler = inject2(ChangeDetectionScheduler);
22300      applicationRef = inject2(ApplicationRef);
22301      applicationErrorHandler = inject2(INTERNAL_APPLICATION_ERROR_HANDLER);
22302      _onMicrotaskEmptySubscription;
22303      initialize() {
22304        if (this._onMicrotaskEmptySubscription) {
22305          return;
22306        }
22307        this._onMicrotaskEmptySubscription = this.zone.onMicrotaskEmpty.subscribe({
22308          next: () => {
22309            if (this.changeDetectionScheduler.runningTick) {
22310              return;
22311            }
22312            this.zone.run(() => {
22313              try {
22314                this.applicationRef.dirtyFlags |= 1;
22315                this.applicationRef._tick();
22316              } catch (e) {
22317                this.applicationErrorHandler(e);
22318              }
22319            });
22320          }
22321        });
22322      }
22323      ngOnDestroy() {
22324        this._onMicrotaskEmptySubscription?.unsubscribe();
22325      }
22326      static \u0275fac = function NgZoneChangeDetectionScheduler_Factory(__ngFactoryType__) {
22327        return new (__ngFactoryType__ || _NgZoneChangeDetectionScheduler)();
22328      };
22329      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _NgZoneChangeDetectionScheduler, factory: _NgZoneChangeDetectionScheduler.\u0275fac, providedIn: "root" });
22330    };
22331    (() => {
22332      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgZoneChangeDetectionScheduler, [{
22333        type: Injectable,
22334        args: [{ providedIn: "root" }]
22335      }], null, null);
22336    })();
22337    PROVIDED_NG_ZONE = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "provideZoneChangeDetection token" : "", { factory: () => false });
22338    ZoneStablePendingTask = class _ZoneStablePendingTask {
22339      subscription = new Subscription();
22340      initialized = false;
22341      zone = inject2(NgZone);
22342      pendingTasks = inject2(PendingTasksInternal);
22343      initialize() {
22344        if (this.initialized) {
22345          return;
22346        }
22347        this.initialized = true;
22348        let task = null;
22349        if (!this.zone.isStable && !this.zone.hasPendingMacrotasks && !this.zone.hasPendingMicrotasks) {
22350          task = this.pendingTasks.add();
22351        }
22352        this.zone.runOutsideAngular(() => {
22353          this.subscription.add(this.zone.onStable.subscribe(() => {
22354            NgZone.assertNotInAngularZone();
22355            queueMicrotask(() => {
22356              if (task !== null && !this.zone.hasPendingMacrotasks && !this.zone.hasPendingMicrotasks) {
22357                this.pendingTasks.remove(task);
22358                task = null;
22359              }
22360            });
22361          }));
22362        });
22363        this.subscription.add(this.zone.onUnstable.subscribe(() => {
22364          NgZone.assertInAngularZone();
22365          task ??= this.pendingTasks.add();
22366        }));
22367      }
22368      ngOnDestroy() {
22369        this.subscription.unsubscribe();
22370      }
22371      static \u0275fac = function ZoneStablePendingTask_Factory(__ngFactoryType__) {
22372        return new (__ngFactoryType__ || _ZoneStablePendingTask)();
22373      };
22374      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _ZoneStablePendingTask, factory: _ZoneStablePendingTask.\u0275fac, providedIn: "root" });
22375    };
22376    (() => {
22377      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ZoneStablePendingTask, [{
22378        type: Injectable,
22379        args: [{ providedIn: "root" }]
22380      }], null, null);
22381    })();
22382    CONSECUTIVE_MICROTASK_NOTIFICATION_LIMIT = 100;
22383    consecutiveMicrotaskNotifications = 0;
22384    stackFromLastFewNotifications = [];
22385    ChangeDetectionSchedulerImpl = class _ChangeDetectionSchedulerImpl {
22386      applicationErrorHandler = inject2(INTERNAL_APPLICATION_ERROR_HANDLER);
22387      appRef = inject2(ApplicationRef);
22388      taskService = inject2(PendingTasksInternal);
22389      ngZone = inject2(NgZone);
22390      zonelessEnabled = inject2(ZONELESS_ENABLED);
22391      tracing = inject2(TracingService, { optional: true });
22392      disableScheduling = inject2(ZONELESS_SCHEDULER_DISABLED, { optional: true }) ?? false;
22393      zoneIsDefined = typeof Zone !== "undefined" && !!Zone.root.run;
22394      schedulerTickApplyArgs = [{ data: { "__scheduler_tick__": true } }];
22395      subscriptions = new Subscription();
22396      angularZoneId = this.zoneIsDefined ? this.ngZone._inner?.get(angularZoneInstanceIdProperty) : null;
22397      scheduleInRootZone = !this.zonelessEnabled && this.zoneIsDefined && (inject2(SCHEDULE_IN_ROOT_ZONE, { optional: true }) ?? false);
22398      cancelScheduledCallback = null;
22399      useMicrotaskScheduler = false;
22400      runningTick = false;
22401      pendingRenderTaskId = null;
22402      constructor() {
22403        this.subscriptions.add(this.appRef.afterTick.subscribe(() => {
22404          if (!this.runningTick) {
22405            this.cleanup();
22406          }
22407        }));
22408        this.subscriptions.add(this.ngZone.onUnstable.subscribe(() => {
22409          if (!this.runningTick) {
22410            this.cleanup();
22411          }
22412        }));
22413        this.disableScheduling ||= !this.zonelessEnabled && // NoopNgZone without enabling zoneless means no scheduling whatsoever
22414        (this.ngZone instanceof NoopNgZone || // The same goes for the lack of Zone without enabling zoneless scheduling
22415        !this.zoneIsDefined);
22416      }
22417      notify(source) {
22418        if (!this.zonelessEnabled && source === 5) {
22419          return;
22420        }
22421        let force = false;
22422        switch (source) {
22423          case 0: {
22424            this.appRef.dirtyFlags |= 2;
22425            break;
22426          }
22427          case 3:
22428          case 2:
22429          case 4:
22430          case 5:
22431          case 1: {
22432            this.appRef.dirtyFlags |= 4;
22433            break;
22434          }
22435          case 6: {
22436            this.appRef.dirtyFlags |= 2;
22437            force = true;
22438            break;
22439          }
22440          case 12: {
22441            this.appRef.dirtyFlags |= 16;
22442            force = true;
22443            break;
22444          }
22445          case 13: {
22446            this.appRef.dirtyFlags |= 2;
22447            force = true;
22448            break;
22449          }
22450          case 11: {
22451            force = true;
22452            break;
22453          }
22454          case 9:
22455          case 8:
22456          case 7:
22457          case 10:
22458          default: {
22459            this.appRef.dirtyFlags |= 8;
22460          }
22461        }
22462        this.appRef.tracingSnapshot = this.tracing?.snapshot(this.appRef.tracingSnapshot) ?? null;
22463        if (!this.shouldScheduleTick(force)) {
22464          return;
22465        }
22466        if (typeof ngDevMode === "undefined" || ngDevMode) {
22467          if (this.useMicrotaskScheduler) {
22468            trackMicrotaskNotificationForDebugging();
22469          } else {
22470            consecutiveMicrotaskNotifications = 0;
22471            stackFromLastFewNotifications.length = 0;
22472          }
22473        }
22474        const scheduleCallback = this.useMicrotaskScheduler ? scheduleCallbackWithMicrotask : scheduleCallbackWithRafRace;
22475        this.pendingRenderTaskId = this.taskService.add();
22476        if (this.scheduleInRootZone) {
22477          this.cancelScheduledCallback = Zone.root.run(() => scheduleCallback(() => this.tick()));
22478        } else {
22479          this.cancelScheduledCallback = this.ngZone.runOutsideAngular(() => scheduleCallback(() => this.tick()));
22480        }
22481      }
22482      shouldScheduleTick(force) {
22483        if (this.disableScheduling && !force || this.appRef.destroyed) {
22484          return false;
22485        }
22486        if (this.pendingRenderTaskId !== null || this.runningTick || this.appRef._runningTick) {
22487          return false;
22488        }
22489        if (!this.zonelessEnabled && this.zoneIsDefined && Zone.current.get(angularZoneInstanceIdProperty + this.angularZoneId)) {
22490          return false;
22491        }
22492        return true;
22493      }
22494      /**
22495       * Calls ApplicationRef._tick inside the `NgZone`.
22496       *
22497       * Calling `tick` directly runs change detection and cancels any change detection that had been
22498       * scheduled previously.
22499       *
22500       * @param shouldRefreshViews Passed directly to `ApplicationRef._tick` and skips straight to
22501       *     render hooks when `false`.
22502       */
22503      tick() {
22504        if (this.runningTick || this.appRef.destroyed) {
22505          return;
22506        }
22507        if (this.appRef.dirtyFlags === 0) {
22508          this.cleanup();
22509          return;
22510        }
22511        if (!this.zonelessEnabled && this.appRef.dirtyFlags & 7) {
22512          this.appRef.dirtyFlags |= 1;
22513        }
22514        const task = this.taskService.add();
22515        try {
22516          this.ngZone.run(() => {
22517            this.runningTick = true;
22518            this.appRef._tick();
22519          }, void 0, this.schedulerTickApplyArgs);
22520        } catch (e) {
22521          this.taskService.remove(task);
22522          this.applicationErrorHandler(e);
22523        } finally {
22524          this.cleanup();
22525        }
22526        this.useMicrotaskScheduler = true;
22527        scheduleCallbackWithMicrotask(() => {
22528          this.useMicrotaskScheduler = false;
22529          this.taskService.remove(task);
22530        });
22531      }
22532      ngOnDestroy() {
22533        this.subscriptions.unsubscribe();
22534        this.cleanup();
22535      }
22536      cleanup() {
22537        this.runningTick = false;
22538        this.cancelScheduledCallback?.();
22539        this.cancelScheduledCallback = null;
22540        if (this.pendingRenderTaskId !== null) {
22541          const taskId = this.pendingRenderTaskId;
22542          this.pendingRenderTaskId = null;
22543          this.taskService.remove(taskId);
22544        }
22545      }
22546      static \u0275fac = function ChangeDetectionSchedulerImpl_Factory(__ngFactoryType__) {
22547        return new (__ngFactoryType__ || _ChangeDetectionSchedulerImpl)();
22548      };
22549      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _ChangeDetectionSchedulerImpl, factory: _ChangeDetectionSchedulerImpl.\u0275fac, providedIn: "root" });
22550    };
22551    (() => {
22552      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ChangeDetectionSchedulerImpl, [{
22553        type: Injectable,
22554        args: [{ providedIn: "root" }]
22555      }], () => [], null);
22556    })();
22557    LOCALE_ID = new InjectionToken(ngDevMode ? "LocaleId" : "", {
22558      providedIn: "root",
22559      factory: () => inject2(LOCALE_ID, { optional: true, skipSelf: true }) || getGlobalLocale()
22560    });
22561    DEFAULT_CURRENCY_CODE = new InjectionToken(ngDevMode ? "DefaultCurrencyCode" : "", {
22562      providedIn: "root",
22563      factory: () => USD_CURRENCY_CODE
22564    });
22565    TRANSLATIONS = new InjectionToken(ngDevMode ? "Translations" : "");
22566    TRANSLATIONS_FORMAT = new InjectionToken(ngDevMode ? "TranslationsFormat" : "");
22567    (function(MissingTranslationStrategy2) {
22568      MissingTranslationStrategy2[MissingTranslationStrategy2["Error"] = 0] = "Error";
22569      MissingTranslationStrategy2[MissingTranslationStrategy2["Warning"] = 1] = "Warning";
22570      MissingTranslationStrategy2[MissingTranslationStrategy2["Ignore"] = 2] = "Ignore";
22571    })(MissingTranslationStrategy || (MissingTranslationStrategy = {}));
22572  }
22573});
22574
vendor: 15,932 bytes, lines 22575-23037
22575// node_modules/@angular/core/fesm2022/resource.mjs
22576function untracked2(nonReactiveReadsFn) {
22577  return untracked(nonReactiveReadsFn);
22578}
22579function computed(computation, options) {
22580  const getter = createComputed(computation, options?.equal);
22581  if (ngDevMode) {
22582    getter.toString = () => `[Computed: ${getter()}]`;
22583    getter[SIGNAL].debugName = options?.debugName;
22584  }
22585  return getter;
22586}
22587function effect(effectFn, options) {
22588  ngDevMode && assertNotInReactiveContext(effect, "Call `effect` outside of a reactive context. For example, schedule the effect inside the component constructor.");
22589  if (ngDevMode && !options?.injector) {
22590    assertInInjectionContext(effect);
22591  }
22592  if (ngDevMode && options?.allowSignalWrites !== void 0) {
22593    console.warn(`The 'allowSignalWrites' flag is deprecated and no longer impacts effect() (writes are always allowed)`);
22594  }
22595  const injector = options?.injector ?? inject2(Injector);
22596  let destroyRef = options?.manualCleanup !== true ? injector.get(DestroyRef) : null;
22597  let node;
22598  const viewContext = injector.get(ViewContext, null, { optional: true });
22599  const notifier = injector.get(ChangeDetectionScheduler);
22600  if (viewContext !== null) {
22601    node = createViewEffect(viewContext.view, notifier, effectFn);
22602    if (destroyRef instanceof NodeInjectorDestroyRef && destroyRef._lView === viewContext.view) {
22603      destroyRef = null;
22604    }
22605  } else {
22606    node = createRootEffect(effectFn, injector.get(EffectScheduler), notifier);
22607  }
22608  node.injector = injector;
22609  if (destroyRef !== null) {
22610    node.onDestroyFn = destroyRef.onDestroy(() => node.destroy());
22611  }
22612  const effectRef = new EffectRefImpl(node);
22613  if (ngDevMode) {
22614    node.debugName = options?.debugName ?? "";
22615    const prevInjectorProfilerContext = setInjectorProfilerContext({ injector, token: null });
22616    try {
22617      emitEffectCreatedEvent(effectRef);
22618    } finally {
22619      setInjectorProfilerContext(prevInjectorProfilerContext);
22620    }
22621  }
22622  return effectRef;
22623}
22624function createViewEffect(view, notifier, fn) {
22625  const node = Object.create(VIEW_EFFECT_NODE);
22626  node.view = view;
22627  node.zone = typeof Zone !== "undefined" ? Zone.current : null;
22628  node.notifier = notifier;
22629  node.fn = createEffectFn(node, fn);
22630  view[EFFECTS] ??= /* @__PURE__ */ new Set();
22631  view[EFFECTS].add(node);
22632  node.consumerMarkedDirty(node);
22633  return node;
22634}
22635function createRootEffect(fn, scheduler2, notifier) {
22636  const node = Object.create(ROOT_EFFECT_NODE);
22637  node.fn = createEffectFn(node, fn);
22638  node.scheduler = scheduler2;
22639  node.notifier = notifier;
22640  node.zone = typeof Zone !== "undefined" ? Zone.current : null;
22641  node.scheduler.add(node);
22642  node.notifier.notify(
22643    12
22644    /* NotificationSource.RootEffect */
22645  );
22646  return node;
22647}
22648function createEffectFn(node, fn) {
22649  return () => {
22650    fn((cleanupFn) => (node.cleanupFns ??= []).push(cleanupFn));
22651  };
22652}
22653function linkedSignal(optionsOrComputation, options) {
22654  if (typeof optionsOrComputation === "function") {
22655    const getter = createLinkedSignal(optionsOrComputation, identityFn, options?.equal);
22656    return upgradeLinkedSignalGetter(getter, options?.debugName);
22657  } else {
22658    const getter = createLinkedSignal(optionsOrComputation.source, optionsOrComputation.computation, optionsOrComputation.equal);
22659    return upgradeLinkedSignalGetter(getter, optionsOrComputation.debugName);
22660  }
22661}
22662function upgradeLinkedSignalGetter(getter, debugName) {
22663  if (ngDevMode) {
22664    getter.toString = () => `[LinkedSignal: ${getter()}]`;
22665    getter[SIGNAL].debugName = debugName;
22666  }
22667  const node = getter[SIGNAL];
22668  const upgradedGetter = getter;
22669  upgradedGetter.set = (newValue) => linkedSignalSetFn(node, newValue);
22670  upgradedGetter.update = (updateFn) => linkedSignalUpdateFn(node, updateFn);
22671  upgradedGetter.asReadonly = signalAsReadonlyFn.bind(getter);
22672  return upgradedGetter;
22673}
22674function projectStatusOfState(state) {
22675  switch (state.status) {
22676    case "loading":
22677      return state.extRequest.reload === 0 ? "loading" : "reloading";
22678    case "resolved":
22679      return isResolved(state.stream()) ? "resolved" : "error";
22680    default:
22681      return state.status;
22682  }
22683}
22684function isResolved(state) {
22685  return state.error === void 0;
22686}
22687function encapsulateResourceError(error) {
22688  if (error instanceof Error) {
22689    return error;
22690  }
22691  return new ResourceWrappedError(error);
22692}
22693var OutputEmitterRef, EffectRefImpl, EFFECT_NODE, ROOT_EFFECT_NODE, VIEW_EFFECT_NODE, identityFn, BaseWritableResource, ResourceImpl, ResourceValueError, ResourceWrappedError;
22694var init_resource = __esm({
22695  "node_modules/@angular/core/fesm2022/resource.mjs"() {
22696    "use strict";
22697    init_root_effect_scheduler();
22698    init_signal();
22699    init_effect();
22700    OutputEmitterRef = class {
22701      destroyed = false;
22702      listeners = null;
22703      errorHandler = inject2(ErrorHandler, { optional: true });
22704      /** @internal */
22705      destroyRef = inject2(DestroyRef);
22706      constructor() {
22707        this.destroyRef.onDestroy(() => {
22708          this.destroyed = true;
22709          this.listeners = null;
22710        });
22711      }
22712      subscribe(callback) {
22713        if (this.destroyed) {
22714          throw new RuntimeError(953, ngDevMode && "Unexpected subscription to destroyed `OutputRef`. The owning directive/component is destroyed.");
22715        }
22716        (this.listeners ??= []).push(callback);
22717        return {
22718          unsubscribe: () => {
22719            const idx = this.listeners?.indexOf(callback);
22720            if (idx !== void 0 && idx !== -1) {
22721              this.listeners?.splice(idx, 1);
22722            }
22723          }
22724        };
22725      }
22726      /** Emits a new value to the output. */
22727      emit(value) {
22728        if (this.destroyed) {
22729          console.warn(formatRuntimeError(953, ngDevMode && "Unexpected emit for destroyed `OutputRef`. The owning directive/component is destroyed."));
22730          return;
22731        }
22732        if (this.listeners === null) {
22733          return;
22734        }
22735        const previousConsumer = setActiveConsumer(null);
22736        try {
22737          for (const listenerFn of this.listeners) {
22738            try {
22739              listenerFn(value);
22740            } catch (err) {
22741              this.errorHandler?.handleError(err);
22742            }
22743          }
22744        } finally {
22745          setActiveConsumer(previousConsumer);
22746        }
22747      }
22748    };
22749    EffectRefImpl = class {
22750      [SIGNAL];
22751      constructor(node) {
22752        this[SIGNAL] = node;
22753      }
22754      destroy() {
22755        this[SIGNAL].destroy();
22756      }
22757    };
22758    EFFECT_NODE = /* @__PURE__ */ (() => __spreadProps(__spreadValues({}, BASE_EFFECT_NODE), {
22759      cleanupFns: void 0,
22760      zone: null,
22761      onDestroyFn: noop2,
22762      run() {
22763        if (ngDevMode && isInNotificationPhase()) {
22764          throw new Error(`Schedulers cannot synchronously execute watches while scheduling.`);
22765        }
22766        const prevRefreshingViews = setIsRefreshingViews(false);
22767        try {
22768          runEffect(this);
22769        } finally {
22770          setIsRefreshingViews(prevRefreshingViews);
22771        }
22772      },
22773      cleanup() {
22774        if (!this.cleanupFns?.length) {
22775          return;
22776        }
22777        const prevConsumer = setActiveConsumer(null);
22778        try {
22779          while (this.cleanupFns.length) {
22780            this.cleanupFns.pop()();
22781          }
22782        } finally {
22783          this.cleanupFns = [];
22784          setActiveConsumer(prevConsumer);
22785        }
22786      }
22787    }))();
22788    ROOT_EFFECT_NODE = /* @__PURE__ */ (() => __spreadProps(__spreadValues({}, EFFECT_NODE), {
22789      consumerMarkedDirty() {
22790        this.scheduler.schedule(this);
22791        this.notifier.notify(
22792          12
22793          /* NotificationSource.RootEffect */
22794        );
22795      },
22796      destroy() {
22797        consumerDestroy(this);
22798        this.onDestroyFn();
22799        this.cleanup();
22800        this.scheduler.remove(this);
22801      }
22802    }))();
22803    VIEW_EFFECT_NODE = /* @__PURE__ */ (() => __spreadProps(__spreadValues({}, EFFECT_NODE), {
22804      consumerMarkedDirty() {
22805        this.view[FLAGS] |= 8192;
22806        markAncestorsForTraversal(this.view);
22807        this.notifier.notify(
22808          13
22809          /* NotificationSource.ViewEffect */
22810        );
22811      },
22812      destroy() {
22813        consumerDestroy(this);
22814        this.onDestroyFn();
22815        this.cleanup();
22816        this.view[EFFECTS]?.delete(this);
22817      }
22818    }))();
22819    identityFn = (v) => v;
22820    BaseWritableResource = class {
22821      value;
22822      constructor(value) {
22823        this.value = value;
22824        this.value.set = this.set.bind(this);
22825        this.value.update = this.update.bind(this);
22826        this.value.asReadonly = signalAsReadonlyFn;
22827      }
22828      isError = computed(() => this.status() === "error");
22829      update(updateFn) {
22830        this.set(updateFn(untracked2(this.value)));
22831      }
22832      isLoading = computed(() => this.status() === "loading" || this.status() === "reloading");
22833      // Use a computed here to avoid triggering reactive consumers if the value changes while staying
22834      // either defined or undefined.
22835      isValueDefined = computed(() => {
22836        if (this.isError()) {
22837          return false;
22838        }
22839        return this.value() !== void 0;
22840      });
22841      hasValue() {
22842        return this.isValueDefined();
22843      }
22844      asReadonly() {
22845        return this;
22846      }
22847    };
22848    ResourceImpl = class extends BaseWritableResource {
22849      loaderFn;
22850      equal;
22851      pendingTasks;
22852      /**
22853       * The current state of the resource. Status, value, and error are derived from this.
22854       */
22855      state;
22856      /**
22857       * Combines the current request with a reload counter which allows the resource to be reloaded on
22858       * imperative command.
22859       */
22860      extRequest;
22861      effectRef;
22862      pendingController;
22863      resolvePendingTask = void 0;
22864      destroyed = false;
22865      unregisterOnDestroy;
22866      constructor(request, loaderFn, defaultValue, equal, injector) {
22867        super(
22868          // Feed a computed signal for the value to `BaseWritableResource`, which will upgrade it to a
22869          // `WritableSignal` that delegates to `ResourceImpl.set`.
22870          computed(() => {
22871            const streamValue = this.state().stream?.();
22872            if (!streamValue) {
22873              return defaultValue;
22874            }
22875            if (this.state().status === "loading" && this.error()) {
22876              return defaultValue;
22877            }
22878            if (!isResolved(streamValue)) {
22879              throw new ResourceValueError(this.error());
22880            }
22881            return streamValue.value;
22882          }, { equal })
22883        );
22884        this.loaderFn = loaderFn;
22885        this.equal = equal;
22886        this.extRequest = linkedSignal({
22887          source: request,
22888          computation: (request2) => ({ request: request2, reload: 0 })
22889        });
22890        this.state = linkedSignal({
22891          // Whenever the request changes,
22892          source: this.extRequest,
22893          // Compute the state of the resource given a change in status.
22894          computation: (extRequest, previous) => {
22895            const status = extRequest.request === void 0 ? "idle" : "loading";
22896            if (!previous) {
22897              return {
22898                extRequest,
22899                status,
22900                previousStatus: "idle",
22901                stream: void 0
22902              };
22903            } else {
22904              return {
22905                extRequest,
22906                status,
22907                previousStatus: projectStatusOfState(previous.value),
22908                // If the request hasn't changed, keep the previous stream.
22909                stream: previous.value.extRequest.request === extRequest.request ? previous.value.stream : void 0
22910              };
22911            }
22912          }
22913        });
22914        this.effectRef = effect(this.loadEffect.bind(this), {
22915          injector,
22916          manualCleanup: true
22917        });
22918        this.pendingTasks = injector.get(PendingTasks);
22919        this.unregisterOnDestroy = injector.get(DestroyRef).onDestroy(() => this.destroy());
22920      }
22921      status = computed(() => projectStatusOfState(this.state()));
22922      error = computed(() => {
22923        const stream = this.state().stream?.();
22924        return stream && !isResolved(stream) ? stream.error : void 0;
22925      });
22926      /**
22927       * Called either directly via `WritableResource.set` or via `.value.set()`.
22928       */
22929      set(value) {
22930        if (this.destroyed) {
22931          return;
22932        }
22933        const error = untracked2(this.error);
22934        const state = untracked2(this.state);
22935        if (!error) {
22936          const current = untracked2(this.value);
22937          if (state.status === "local" && (this.equal ? this.equal(current, value) : current === value)) {
22938            return;
22939          }
22940        }
22941        this.state.set({
22942          extRequest: state.extRequest,
22943          status: "local",
22944          previousStatus: "local",
22945          stream: signal({ value })
22946        });
22947        this.abortInProgressLoad();
22948      }
22949      reload() {
22950        const { status } = untracked2(this.state);
22951        if (status === "idle" || status === "loading") {
22952          return false;
22953        }
22954        this.extRequest.update(({ request, reload }) => ({ request, reload: reload + 1 }));
22955        return true;
22956      }
22957      destroy() {
22958        this.destroyed = true;
22959        this.unregisterOnDestroy();
22960        this.effectRef.destroy();
22961        this.abortInProgressLoad();
22962        this.state.set({
22963          extRequest: { request: void 0, reload: 0 },
22964          status: "idle",
22965          previousStatus: "idle",
22966          stream: void 0
22967        });
22968      }
22969      loadEffect() {
22970        return __async(this, null, function* () {
22971          const extRequest = this.extRequest();
22972          const { status: currentStatus, previousStatus } = untracked2(this.state);
22973          if (extRequest.request === void 0) {
22974            return;
22975          } else if (currentStatus !== "loading") {
22976            return;
22977          }
22978          this.abortInProgressLoad();
22979          let resolvePendingTask = this.resolvePendingTask = this.pendingTasks.add();
22980          const { signal: abortSignal } = this.pendingController = new AbortController();
22981          try {
22982            const stream = yield untracked2(() => {
22983              return this.loaderFn({
22984                params: extRequest.request,
22985                // TODO(alxhub): cleanup after g3 removal of `request` alias.
22986                request: extRequest.request,
22987                abortSignal,
22988                previous: {
22989                  status: previousStatus
22990                }
22991              });
22992            });
22993            if (abortSignal.aborted || untracked2(this.extRequest) !== extRequest) {
22994              return;
22995            }
22996            this.state.set({
22997              extRequest,
22998              status: "resolved",
22999              previousStatus: "resolved",
23000              stream
23001            });
23002          } catch (err) {
23003            if (abortSignal.aborted || untracked2(this.extRequest) !== extRequest) {
23004              return;
23005            }
23006            this.state.set({
23007              extRequest,
23008              status: "resolved",
23009              previousStatus: "error",
23010              stream: signal({ error: encapsulateResourceError(err) })
23011            });
23012          } finally {
23013            resolvePendingTask?.();
23014            resolvePendingTask = void 0;
23015          }
23016        });
23017      }
23018      abortInProgressLoad() {
23019        untracked2(() => this.pendingController?.abort());
23020        this.pendingController = void 0;
23021        this.resolvePendingTask?.();
23022        this.resolvePendingTask = void 0;
23023      }
23024    };
23025    ResourceValueError = class extends Error {
23026      constructor(error) {
23027        super(ngDevMode ? `Resource is currently in an error state (see Error.cause for details): ${error.message}` : error.message, { cause: error });
23028      }
23029    };
23030    ResourceWrappedError = class extends Error {
23031      constructor(error) {
23032        super(ngDevMode ? `Resource returned an error that's not an Error instance: ${String(error)}. Check this error's .cause for the actual error.` : String(error), { cause: error });
23033      }
23034    };
23035  }
23036});
23037
vendor: 63,086 bytes, lines 23038-24726
23038// node_modules/@angular/core/fesm2022/core.mjs
23039function createInputSignal(initialValue, options) {
23040  const node = Object.create(INPUT_SIGNAL_NODE);
23041  node.value = initialValue;
23042  node.transformFn = options?.transform;
23043  function inputValueFn() {
23044    producerAccessed(node);
23045    if (node.value === REQUIRED_UNSET_VALUE) {
23046      let message = null;
23047      if (ngDevMode) {
23048        const name = options?.debugName ?? options?.alias;
23049        message = `Input${name ? ` "${name}"` : ""} is required but no value is available yet.`;
23050      }
23051      throw new RuntimeError(-950, message);
23052    }
23053    return node.value;
23054  }
23055  inputValueFn[SIGNAL] = node;
23056  if (ngDevMode) {
23057    inputValueFn.toString = () => `[Input Signal: ${inputValueFn()}]`;
23058    node.debugName = options?.debugName;
23059  }
23060  return inputValueFn;
23061}
23062function getDevModeNodeName(tNode) {
23063  if (tNode.type & 8) {
23064    return "an <ng-container>";
23065  } else if (tNode.type & 4) {
23066    return "an <ng-template>";
23067  } else if (tNode.type & 128) {
23068    return "an @let declaration";
23069  } else {
23070    return "a node";
23071  }
23072}
23073function inputFunction(initialValue, opts) {
23074  ngDevMode && assertInInjectionContext(input);
23075  return createInputSignal(initialValue, opts);
23076}
23077function inputRequiredFunction(opts) {
23078  ngDevMode && assertInInjectionContext(input);
23079  return createInputSignal(REQUIRED_UNSET_VALUE, opts);
23080}
23081function viewChildFn(locator, opts) {
23082  ngDevMode && assertInInjectionContext(viewChild);
23083  return createSingleResultOptionalQuerySignalFn(opts);
23084}
23085function viewChildRequiredFn(locator, opts) {
23086  ngDevMode && assertInInjectionContext(viewChild);
23087  return createSingleResultRequiredQuerySignalFn(opts);
23088}
23089function contentChildFn(locator, opts) {
23090  ngDevMode && assertInInjectionContext(contentChild);
23091  return createSingleResultOptionalQuerySignalFn(opts);
23092}
23093function contentChildRequiredFn(locator, opts) {
23094  ngDevMode && assertInInjectionContext(contentChildren);
23095  return createSingleResultRequiredQuerySignalFn(opts);
23096}
23097function contentChildren(locator, opts) {
23098  return createMultiResultQuerySignalFn(opts);
23099}
23100function createModelSignal(initialValue, opts) {
23101  const node = Object.create(INPUT_SIGNAL_NODE);
23102  const emitterRef = new OutputEmitterRef();
23103  node.value = initialValue;
23104  function getter() {
23105    producerAccessed(node);
23106    assertModelSet(node.value);
23107    return node.value;
23108  }
23109  getter[SIGNAL] = node;
23110  getter.asReadonly = signalAsReadonlyFn.bind(getter);
23111  getter.set = (newValue) => {
23112    if (!node.equal(node.value, newValue)) {
23113      signalSetFn(node, newValue);
23114      emitterRef.emit(newValue);
23115    }
23116  };
23117  getter.update = (updateFn) => {
23118    assertModelSet(node.value);
23119    getter.set(updateFn(node.value));
23120  };
23121  getter.subscribe = emitterRef.subscribe.bind(emitterRef);
23122  getter.destroyRef = emitterRef.destroyRef;
23123  if (ngDevMode) {
23124    getter.toString = () => `[Model Signal: ${getter()}]`;
23125    node.debugName = opts?.debugName;
23126  }
23127  return getter;
23128}
23129function assertModelSet(value) {
23130  if (value === REQUIRED_UNSET_VALUE) {
23131    throw new RuntimeError(952, ngDevMode && "Model is required but no value is available yet.");
23132  }
23133}
23134function modelFunction(initialValue, opts) {
23135  ngDevMode && assertInInjectionContext(model);
23136  return createModelSignal(initialValue, opts);
23137}
23138function modelRequiredFunction(opts) {
23139  ngDevMode && assertInInjectionContext(model);
23140  return createModelSignal(REQUIRED_UNSET_VALUE, opts);
23141}
23142function compileNgModuleFactory(injector, options, moduleType) {
23143  ngDevMode && assertNgModuleType(moduleType);
23144  const moduleFactory = new NgModuleFactory2(moduleType);
23145  if (true) {
23146    return Promise.resolve(moduleFactory);
23147  }
23148  const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);
23149  setJitOptions({
23150    defaultEncapsulation: _lastDefined(compilerOptions.map((opts) => opts.defaultEncapsulation)),
23151    preserveWhitespaces: _lastDefined(compilerOptions.map((opts) => opts.preserveWhitespaces))
23152  });
23153  if (isComponentResourceResolutionQueueEmpty()) {
23154    return Promise.resolve(moduleFactory);
23155  }
23156  const compilerProviders = compilerOptions.flatMap((option) => option.providers ?? []);
23157  if (compilerProviders.length === 0) {
23158    return Promise.resolve(moduleFactory);
23159  }
23160  const compiler = getCompilerFacade({
23161    usage: 0,
23162    kind: "NgModule",
23163    type: moduleType
23164  });
23165  const compilerInjector = Injector.create({ providers: compilerProviders });
23166  const resourceLoader = compilerInjector.get(compiler.ResourceLoader);
23167  return resolveComponentResources((url) => Promise.resolve(resourceLoader.get(url))).then(() => moduleFactory);
23168}
23169function _lastDefined(args) {
23170  for (let i = args.length - 1; i >= 0; i--) {
23171    if (args[i] !== void 0) {
23172      return args[i];
23173    }
23174  }
23175  return void 0;
23176}
23177function logLazyLCPWarning(src) {
23178  console.warn(formatRuntimeError(-913, `An image with src ${src} is the Largest Contentful Paint (LCP) element but was given a "loading" value of "lazy", which can negatively impact application loading performance. This warning can be addressed by changing the loading value of the LCP image to "eager", or by using the NgOptimizedImage directive's prioritization utilities. For more information about addressing or disabling this warning, see https://angular.dev/errors/NG0913`));
23179}
23180function logOversizedImageWarning(src) {
23181  console.warn(formatRuntimeError(-913, `An image with src ${src} has intrinsic file dimensions much larger than its rendered size. This can negatively impact application loading performance. For more information about addressing or disabling this warning, see https://angular.dev/errors/NG0913`));
23182}
23183function isApplicationBootstrapConfig(config2) {
23184  return !config2.moduleRef;
23185}
23186function bootstrap(config2) {
23187  const envInjector = isApplicationBootstrapConfig(config2) ? config2.r3Injector : config2.moduleRef.injector;
23188  const ngZone = envInjector.get(NgZone);
23189  return ngZone.run(() => {
23190    if (isApplicationBootstrapConfig(config2)) {
23191      config2.r3Injector.resolveInjectorInitializers();
23192    } else {
23193      config2.moduleRef.resolveInjectorInitializers();
23194    }
23195    const exceptionHandler = envInjector.get(INTERNAL_APPLICATION_ERROR_HANDLER);
23196    if (typeof ngDevMode === "undefined" || ngDevMode) {
23197      if (envInjector.get(PROVIDED_ZONELESS) && envInjector.get(PROVIDED_NG_ZONE)) {
23198        throw new RuntimeError(408, "Invalid change detection configuration: provideZoneChangeDetection and provideZonelessChangeDetection cannot be used together.");
23199      }
23200    }
23201    let onErrorSubscription;
23202    ngZone.runOutsideAngular(() => {
23203      onErrorSubscription = ngZone.onError.subscribe({
23204        next: exceptionHandler
23205      });
23206    });
23207    if (isApplicationBootstrapConfig(config2)) {
23208      const destroyListener = () => envInjector.destroy();
23209      const onPlatformDestroyListeners = config2.platformInjector.get(PLATFORM_DESTROY_LISTENERS);
23210      onPlatformDestroyListeners.add(destroyListener);
23211      envInjector.onDestroy(() => {
23212        onErrorSubscription.unsubscribe();
23213        onPlatformDestroyListeners.delete(destroyListener);
23214      });
23215    } else {
23216      const destroyListener = () => config2.moduleRef.destroy();
23217      const onPlatformDestroyListeners = config2.platformInjector.get(PLATFORM_DESTROY_LISTENERS);
23218      onPlatformDestroyListeners.add(destroyListener);
23219      config2.moduleRef.onDestroy(() => {
23220        remove(config2.allPlatformModules, config2.moduleRef);
23221        onErrorSubscription.unsubscribe();
23222        onPlatformDestroyListeners.delete(destroyListener);
23223      });
23224    }
23225    return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => {
23226      const pendingTasks = envInjector.get(PendingTasksInternal);
23227      const taskId = pendingTasks.add();
23228      const initStatus = envInjector.get(ApplicationInitStatus);
23229      initStatus.runInitializers();
23230      return initStatus.donePromise.then(() => {
23231        const localeId = envInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID);
23232        setLocaleId(localeId || DEFAULT_LOCALE_ID);
23233        const enableRootComponentbootstrap = envInjector.get(ENABLE_ROOT_COMPONENT_BOOTSTRAP, true);
23234        if (!enableRootComponentbootstrap) {
23235          if (isApplicationBootstrapConfig(config2)) {
23236            return envInjector.get(ApplicationRef);
23237          }
23238          config2.allPlatformModules.push(config2.moduleRef);
23239          return config2.moduleRef;
23240        }
23241        if (typeof ngDevMode === "undefined" || ngDevMode) {
23242          const imagePerformanceService = envInjector.get(ImagePerformanceWarning);
23243          imagePerformanceService.start();
23244        }
23245        if (isApplicationBootstrapConfig(config2)) {
23246          const appRef = envInjector.get(ApplicationRef);
23247          if (config2.rootComponent !== void 0) {
23248            appRef.bootstrap(config2.rootComponent);
23249          }
23250          return appRef;
23251        } else {
23252          moduleBootstrapImpl?.(config2.moduleRef, config2.allPlatformModules);
23253          return config2.moduleRef;
23254        }
23255      }).finally(() => void pendingTasks.remove(taskId));
23256    });
23257  });
23258}
23259function setModuleBootstrapImpl() {
23260  moduleBootstrapImpl = _moduleDoBootstrap;
23261}
23262function _moduleDoBootstrap(moduleRef, allPlatformModules) {
23263  const appRef = moduleRef.injector.get(ApplicationRef);
23264  if (moduleRef._bootstrapComponents.length > 0) {
23265    moduleRef._bootstrapComponents.forEach((f) => appRef.bootstrap(f));
23266  } else if (moduleRef.instance.ngDoBootstrap) {
23267    moduleRef.instance.ngDoBootstrap(appRef);
23268  } else {
23269    throw new RuntimeError(-403, ngDevMode && `The module ${stringify(moduleRef.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);
23270  }
23271  allPlatformModules.push(moduleRef);
23272}
23273function _callAndReportToErrorHandler(errorHandler2, ngZone, callback) {
23274  try {
23275    const result = callback();
23276    if (isPromise2(result)) {
23277      return result.catch((e) => {
23278        ngZone.runOutsideAngular(() => errorHandler2(e));
23279        throw e;
23280      });
23281    }
23282    return result;
23283  } catch (e) {
23284    ngZone.runOutsideAngular(() => errorHandler2(e));
23285    throw e;
23286  }
23287}
23288function createPlatform(injector) {
23289  if (getPlatform()) {
23290    throw new RuntimeError(400, ngDevMode && "There can be only one platform. Destroy the previous one to create a new one.");
23291  }
23292  publishDefaultGlobalUtils();
23293  publishSignalConfiguration();
23294  _platformInjector = true ? injector : null;
23295  const platform = injector.get(PlatformRef);
23296  runPlatformInitializers(injector);
23297  return platform;
23298}
23299function createPlatformFactory(parentPlatformFactory, name, providers = []) {
23300  const desc = `Platform: ${name}`;
23301  const marker = new InjectionToken(desc);
23302  return (extraProviders = []) => {
23303    let platform = getPlatform();
23304    if (!platform) {
23305      const platformProviders = [
23306        ...providers,
23307        ...extraProviders,
23308        { provide: marker, useValue: true }
23309      ];
23310      platform = parentPlatformFactory?.(platformProviders) ?? createPlatform(createPlatformInjector(platformProviders, desc));
23311    }
23312    return false ? platform : assertPlatform(marker);
23313  };
23314}
23315function createPlatformInjector(providers = [], name) {
23316  return Injector.create({
23317    name,
23318    providers: [
23319      { provide: INJECTOR_SCOPE, useValue: "platform" },
23320      { provide: PLATFORM_DESTROY_LISTENERS, useValue: /* @__PURE__ */ new Set([() => _platformInjector = null]) },
23321      ...providers
23322    ]
23323  });
23324}
23325function assertPlatform(requiredToken) {
23326  const platform = getPlatform();
23327  if (!platform) {
23328    throw new RuntimeError(-401, ngDevMode && "No platform exists!");
23329  }
23330  if ((typeof ngDevMode === "undefined" || ngDevMode) && !platform.injector.get(requiredToken, null)) {
23331    throw new RuntimeError(400, "A platform with a different configuration has been created. Please destroy it first.");
23332  }
23333  return platform;
23334}
23335function getPlatform() {
23336  if (false) {
23337    return null;
23338  }
23339  return _platformInjector?.get(PlatformRef) ?? null;
23340}
23341function createOrReusePlatformInjector(providers = []) {
23342  if (_platformInjector)
23343    return _platformInjector;
23344  publishDefaultGlobalUtils();
23345  const injector = createPlatformInjector(providers);
23346  if (true) {
23347    _platformInjector = injector;
23348  }
23349  publishSignalConfiguration();
23350  runPlatformInitializers(injector);
23351  return injector;
23352}
23353function runPlatformInitializers(injector) {
23354  const inits = injector.get(PLATFORM_INITIALIZER, null);
23355  runInInjectionContext(injector, () => {
23356    inits?.forEach((init) => init());
23357  });
23358}
23359function injectChangeDetectorRef(flags) {
23360  return createViewRef(
23361    getCurrentTNode(),
23362    getLView(),
23363    (flags & 16) === 16
23364    /* InternalInjectFlags.ForPipe */
23365  );
23366}
23367function createViewRef(tNode, lView, isPipe2) {
23368  if (isComponentHost(tNode) && !isPipe2) {
23369    const componentView = getComponentLViewByIndex(tNode.index, lView);
23370    return new ViewRef(componentView, componentView);
23371  } else if (tNode.type & (3 | 12 | 32 | 128)) {
23372    const hostComponentView = lView[DECLARATION_COMPONENT_VIEW];
23373    return new ViewRef(hostComponentView, lView);
23374  }
23375  return null;
23376}
23377function getPreviousIndex(item, addRemoveOffset, moveOffsets) {
23378  const previousIndex = item.previousIndex;
23379  if (previousIndex === null)
23380    return previousIndex;
23381  let moveOffset = 0;
23382  if (moveOffsets && previousIndex < moveOffsets.length) {
23383    moveOffset = moveOffsets[previousIndex];
23384  }
23385  return previousIndex + addRemoveOffset + moveOffset;
23386}
23387function defaultIterableDiffersFactory() {
23388  return new IterableDiffers([new DefaultIterableDifferFactory()]);
23389}
23390function getTypeNameForDebugging(type) {
23391  return type["name"] || typeof type;
23392}
23393function defaultKeyValueDiffersFactory() {
23394  return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]);
23395}
23396function internalCreateApplication(config2) {
23397  const { rootComponent, appProviders, platformProviders, platformRef } = config2;
23398  profiler(
23399    8
23400    /* ProfilerEvent.BootstrapApplicationStart */
23401  );
23402  if (false) {
23403    throw new RuntimeError(-401, ngDevMode && "Missing Platform: This may be due to using `bootstrapApplication` on the server without passing a `BootstrapContext`. Please make sure that `bootstrapApplication` is called with a `context` argument.");
23404  }
23405  try {
23406    const platformInjector = platformRef?.injector ?? createOrReusePlatformInjector(platformProviders);
23407    if ((typeof ngDevMode === "undefined" || ngDevMode) && rootComponent !== void 0) {
23408      assertStandaloneComponentType(rootComponent);
23409    }
23410    const allAppProviders = [
23411      internalProvideZoneChangeDetection({}),
23412      { provide: ChangeDetectionScheduler, useExisting: ChangeDetectionSchedulerImpl },
23413      errorHandlerEnvironmentInitializer,
23414      ...appProviders || []
23415    ];
23416    const adapter = new EnvironmentNgModuleRefAdapter({
23417      providers: allAppProviders,
23418      parent: platformInjector,
23419      debugName: typeof ngDevMode === "undefined" || ngDevMode ? "Environment Injector" : "",
23420      // We skip environment initializers because we need to run them inside the NgZone, which
23421      // happens after we get the NgZone instance from the Injector.
23422      runEnvironmentInitializers: false
23423    });
23424    return bootstrap({
23425      r3Injector: adapter.injector,
23426      platformInjector,
23427      rootComponent
23428    });
23429  } catch (e) {
23430    return Promise.reject(e);
23431  } finally {
23432    profiler(
23433      9
23434      /* ProfilerEvent.BootstrapApplicationEnd */
23435    );
23436  }
23437}
23438function booleanAttribute(value) {
23439  return typeof value === "boolean" ? value : value != null && value !== "false";
23440}
23441function numberAttribute(value, fallbackValue = NaN) {
23442  const isNumberValue = !isNaN(parseFloat(value)) && !isNaN(Number(value));
23443  return isNumberValue ? Number(value) : fallbackValue;
23444}
23445var REQUIRED_UNSET_VALUE, INPUT_SIGNAL_NODE, FactoryTarget, R3TemplateDependencyKind, ViewEncapsulation2, HOST_TAG_NAME, input, viewChild, contentChild, model, emitDistinctChangesOnlyDefaultValue, Query, ContentChildren, ContentChild, ViewChildren, ViewChild, SCAN_DELAY, OVERSIZED_IMAGE_TOLERANCE, ImagePerformanceWarning, PLATFORM_DESTROY_LISTENERS, ENABLE_ROOT_COMPONENT_BOOTSTRAP, moduleBootstrapImpl, PlatformRef, _platformInjector, ChangeDetectorRef, DefaultIterableDifferFactory, trackByIdentity, DefaultIterableDiffer, IterableChangeRecord_, _DuplicateItemRecordList, _DuplicateMap, DefaultKeyValueDifferFactory, DefaultKeyValueDiffer, KeyValueChangeRecord_, IterableDiffers, KeyValueDiffers, keyValDiff, iterableDiff, defaultIterableDiffers, defaultKeyValueDiffers, platformCore, ApplicationModule, REQUEST, RESPONSE_INIT, REQUEST_CONTEXT;
23446var init_core = __esm({
23447  "node_modules/@angular/core/fesm2022/core.mjs"() {
23448    "use strict";
23449    init_root_effect_scheduler();
23450    init_root_effect_scheduler();
23451    init_signal();
23452    init_debug_node();
23453    init_debug_node();
23454    init_resource();
23455    init_resource();
23456    REQUIRED_UNSET_VALUE = /* @__PURE__ */ Symbol("InputSignalNode#UNSET");
23457    INPUT_SIGNAL_NODE = /* @__PURE__ */ (() => {
23458      return __spreadProps(__spreadValues({}, SIGNAL_NODE), {
23459        transformFn: void 0,
23460        applyValueToInputSignal(node, value) {
23461          signalSetFn(node, value);
23462        }
23463      });
23464    })();
23465    (function(FactoryTarget2) {
23466      FactoryTarget2[FactoryTarget2["Directive"] = 0] = "Directive";
23467      FactoryTarget2[FactoryTarget2["Component"] = 1] = "Component";
23468      FactoryTarget2[FactoryTarget2["Injectable"] = 2] = "Injectable";
23469      FactoryTarget2[FactoryTarget2["Pipe"] = 3] = "Pipe";
23470      FactoryTarget2[FactoryTarget2["NgModule"] = 4] = "NgModule";
23471    })(FactoryTarget || (FactoryTarget = {}));
23472    (function(R3TemplateDependencyKind2) {
23473      R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
23474      R3TemplateDependencyKind2[R3TemplateDependencyKind2["Pipe"] = 1] = "Pipe";
23475      R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
23476    })(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
23477    (function(ViewEncapsulation3) {
23478      ViewEncapsulation3[ViewEncapsulation3["Emulated"] = 0] = "Emulated";
23479      ViewEncapsulation3[ViewEncapsulation3["None"] = 2] = "None";
23480      ViewEncapsulation3[ViewEncapsulation3["ShadowDom"] = 3] = "ShadowDom";
23481    })(ViewEncapsulation2 || (ViewEncapsulation2 = {}));
23482    HOST_TAG_NAME = new InjectionToken(ngDevMode ? "HOST_TAG_NAME" : "");
23483    HOST_TAG_NAME.__NG_ELEMENT_ID__ = (flags) => {
23484      const tNode = getCurrentTNode();
23485      if (tNode === null) {
23486        throw new RuntimeError(204, ngDevMode && "HOST_TAG_NAME can only be injected in directives and components during construction time (in a class constructor or as a class field initializer)");
23487      }
23488      if (tNode.type & 2) {
23489        return tNode.value;
23490      }
23491      if (flags & 8) {
23492        return null;
23493      }
23494      throw new RuntimeError(204, ngDevMode && `HOST_TAG_NAME was used on ${getDevModeNodeName(tNode)} which doesn't have an underlying element in the DOM. This is invalid, and so the dependency should be marked as optional.`);
23495    };
23496    input = (() => {
23497      inputFunction.required = inputRequiredFunction;
23498      return inputFunction;
23499    })();
23500    viewChild = (() => {
23501      viewChildFn.required = viewChildRequiredFn;
23502      return viewChildFn;
23503    })();
23504    contentChild = (() => {
23505      contentChildFn.required = contentChildRequiredFn;
23506      return contentChildFn;
23507    })();
23508    model = (() => {
23509      modelFunction.required = modelRequiredFunction;
23510      return modelFunction;
23511    })();
23512    emitDistinctChangesOnlyDefaultValue = true;
23513    Query = class {
23514    };
23515    ContentChildren = makePropDecorator("ContentChildren", (selector, opts = {}) => __spreadValues({
23516      selector,
23517      first: false,
23518      isViewQuery: false,
23519      descendants: false,
23520      emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue
23521    }, opts), Query);
23522    ContentChild = makePropDecorator("ContentChild", (selector, opts = {}) => __spreadValues({
23523      selector,
23524      first: true,
23525      isViewQuery: false,
23526      descendants: true
23527    }, opts), Query);
23528    ViewChildren = makePropDecorator("ViewChildren", (selector, opts = {}) => __spreadValues({
23529      selector,
23530      first: false,
23531      isViewQuery: true,
23532      descendants: true,
23533      emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue
23534    }, opts), Query);
23535    ViewChild = makePropDecorator("ViewChild", (selector, opts) => __spreadValues({
23536      selector,
23537      first: true,
23538      isViewQuery: true,
23539      descendants: true
23540    }, opts), Query);
23541    SCAN_DELAY = 200;
23542    OVERSIZED_IMAGE_TOLERANCE = 1200;
23543    ImagePerformanceWarning = class _ImagePerformanceWarning {
23544      // Map of full image URLs -> original `ngSrc` values.
23545      window = null;
23546      observer = null;
23547      options = inject2(IMAGE_CONFIG);
23548      lcpImageUrl;
23549      start() {
23550        if (typeof PerformanceObserver === "undefined" || this.options?.disableImageSizeWarning && this.options?.disableImageLazyLoadWarning) {
23551          return;
23552        }
23553        this.observer = this.initPerformanceObserver();
23554        const doc = getDocument();
23555        const win = doc.defaultView;
23556        if (win) {
23557          this.window = win;
23558          const waitToScan = () => {
23559            setTimeout(this.scanImages.bind(this), SCAN_DELAY);
23560          };
23561          const setup = () => {
23562            if (doc.readyState === "complete") {
23563              waitToScan();
23564            } else {
23565              this.window?.addEventListener("load", waitToScan, { once: true });
23566            }
23567          };
23568          if (typeof Zone !== "undefined") {
23569            Zone.root.run(() => setup());
23570          } else {
23571            setup();
23572          }
23573        }
23574      }
23575      ngOnDestroy() {
23576        this.observer?.disconnect();
23577      }
23578      initPerformanceObserver() {
23579        if (typeof PerformanceObserver === "undefined") {
23580          return null;
23581        }
23582        const observer = new PerformanceObserver((entryList) => {
23583          const entries = entryList.getEntries();
23584          if (entries.length === 0)
23585            return;
23586          const lcpElement = entries[entries.length - 1];
23587          const imgSrc = lcpElement.element?.src ?? "";
23588          if (imgSrc.startsWith("data:") || imgSrc.startsWith("blob:"))
23589            return;
23590          this.lcpImageUrl = imgSrc;
23591        });
23592        observer.observe({ type: "largest-contentful-paint", buffered: true });
23593        return observer;
23594      }
23595      scanImages() {
23596        const images = getDocument().querySelectorAll("img");
23597        let lcpElementFound, lcpElementLoadedCorrectly = false;
23598        for (let index = 0; index < images.length; index++) {
23599          const image = images[index];
23600          if (!image) {
23601            continue;
23602          }
23603          if (!this.options?.disableImageSizeWarning) {
23604            if (!image.getAttribute("ng-img") && this.isOversized(image)) {
23605              logOversizedImageWarning(image.src);
23606            }
23607          }
23608          if (!this.options?.disableImageLazyLoadWarning && this.lcpImageUrl) {
23609            if (image.src === this.lcpImageUrl) {
23610              lcpElementFound = true;
23611              if (image.loading !== "lazy" || image.getAttribute("ng-img")) {
23612                lcpElementLoadedCorrectly = true;
23613              }
23614            }
23615          }
23616        }
23617        if (lcpElementFound && !lcpElementLoadedCorrectly && this.lcpImageUrl && !this.options?.disableImageLazyLoadWarning) {
23618          logLazyLCPWarning(this.lcpImageUrl);
23619        }
23620      }
23621      isOversized(image) {
23622        if (!this.window) {
23623          return false;
23624        }
23625        const nonOversizedImageExtentions = [
23626          // SVG images are vector-based, which means they can scale
23627          // to any size without losing quality.
23628          ".svg"
23629        ];
23630        const imageSource = (image.src || "").toLowerCase();
23631        if (nonOversizedImageExtentions.some((extension) => imageSource.endsWith(extension))) {
23632          return false;
23633        }
23634        const computedStyle = this.window.getComputedStyle(image);
23635        let renderedWidth = parseFloat(computedStyle.getPropertyValue("width"));
23636        let renderedHeight = parseFloat(computedStyle.getPropertyValue("height"));
23637        const boxSizing = computedStyle.getPropertyValue("box-sizing");
23638        const objectFit = computedStyle.getPropertyValue("object-fit");
23639        if (objectFit === `cover`) {
23640          return false;
23641        }
23642        if (boxSizing === "border-box") {
23643          const paddingTop = computedStyle.getPropertyValue("padding-top");
23644          const paddingRight = computedStyle.getPropertyValue("padding-right");
23645          const paddingBottom = computedStyle.getPropertyValue("padding-bottom");
23646          const paddingLeft = computedStyle.getPropertyValue("padding-left");
23647          renderedWidth -= parseFloat(paddingRight) + parseFloat(paddingLeft);
23648          renderedHeight -= parseFloat(paddingTop) + parseFloat(paddingBottom);
23649        }
23650        const intrinsicWidth = image.naturalWidth;
23651        const intrinsicHeight = image.naturalHeight;
23652        const recommendedWidth = this.window.devicePixelRatio * renderedWidth;
23653        const recommendedHeight = this.window.devicePixelRatio * renderedHeight;
23654        const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE;
23655        const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE;
23656        return oversizedWidth || oversizedHeight;
23657      }
23658      static \u0275fac = function ImagePerformanceWarning_Factory(__ngFactoryType__) {
23659        return new (__ngFactoryType__ || _ImagePerformanceWarning)();
23660      };
23661      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _ImagePerformanceWarning, factory: _ImagePerformanceWarning.\u0275fac, providedIn: "root" });
23662    };
23663    (() => {
23664      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ImagePerformanceWarning, [{
23665        type: Injectable,
23666        args: [{ providedIn: "root" }]
23667      }], null, null);
23668    })();
23669    PLATFORM_DESTROY_LISTENERS = new InjectionToken(ngDevMode ? "PlatformDestroyListeners" : "");
23670    ENABLE_ROOT_COMPONENT_BOOTSTRAP = new InjectionToken(ngDevMode ? "ENABLE_ROOT_COMPONENT_BOOTSTRAP" : "");
23671    PlatformRef = class _PlatformRef {
23672      _injector;
23673      _modules = [];
23674      _destroyListeners = [];
23675      _destroyed = false;
23676      /** @internal */
23677      constructor(_injector) {
23678        this._injector = _injector;
23679      }
23680      /**
23681       * Creates an instance of an `@NgModule` for the given platform.
23682       *
23683       * @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function
23684       *     argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.
23685       */
23686      bootstrapModuleFactory(moduleFactory, options) {
23687        const scheduleInRootZone = options?.scheduleInRootZone;
23688        const ngZoneFactory = () => getNgZone(options?.ngZone, __spreadProps(__spreadValues({}, getNgZoneOptions({
23689          eventCoalescing: options?.ngZoneEventCoalescing,
23690          runCoalescing: options?.ngZoneRunCoalescing
23691        })), {
23692          scheduleInRootZone
23693        }));
23694        const ignoreChangesOutsideZone = options?.ignoreChangesOutsideZone;
23695        const allAppProviders = [
23696          internalProvideZoneChangeDetection({
23697            ngZoneFactory,
23698            ignoreChangesOutsideZone
23699          }),
23700          { provide: ChangeDetectionScheduler, useExisting: ChangeDetectionSchedulerImpl },
23701          errorHandlerEnvironmentInitializer
23702        ];
23703        const moduleRef = createNgModuleRefWithProviders(moduleFactory.moduleType, this.injector, allAppProviders);
23704        setModuleBootstrapImpl();
23705        return bootstrap({
23706          moduleRef,
23707          allPlatformModules: this._modules,
23708          platformInjector: this.injector
23709        });
23710      }
23711      /**
23712       * Creates an instance of an `@NgModule` for a given platform.
23713       *
23714       * @usageNotes
23715       * ### Simple Example
23716       *
23717       * ```ts
23718       * @NgModule({
23719       *   imports: [BrowserModule]
23720       * })
23721       * class MyModule {}
23722       *
23723       * let moduleRef = platformBrowser().bootstrapModule(MyModule);
23724       * ```
23725       *
23726       */
23727      bootstrapModule(moduleType, compilerOptions = []) {
23728        const options = optionsReducer({}, compilerOptions);
23729        setModuleBootstrapImpl();
23730        return compileNgModuleFactory(this.injector, options, moduleType).then((moduleFactory) => this.bootstrapModuleFactory(moduleFactory, options));
23731      }
23732      /**
23733       * Registers a listener to be called when the platform is destroyed.
23734       */
23735      onDestroy(callback) {
23736        this._destroyListeners.push(callback);
23737      }
23738      /**
23739       * Retrieves the platform {@link Injector}, which is the parent injector for
23740       * every Angular application on the page and provides singleton providers.
23741       */
23742      get injector() {
23743        return this._injector;
23744      }
23745      /**
23746       * Destroys the current Angular platform and all Angular applications on the page.
23747       * Destroys all modules and listeners registered with the platform.
23748       */
23749      destroy() {
23750        if (this._destroyed) {
23751          throw new RuntimeError(404, ngDevMode && "The platform has already been destroyed!");
23752        }
23753        this._modules.slice().forEach((module) => module.destroy());
23754        this._destroyListeners.forEach((listener) => listener());
23755        const destroyListeners = this._injector.get(PLATFORM_DESTROY_LISTENERS, null);
23756        if (destroyListeners) {
23757          destroyListeners.forEach((listener) => listener());
23758          destroyListeners.clear();
23759        }
23760        this._destroyed = true;
23761      }
23762      /**
23763       * Indicates whether this instance was destroyed.
23764       */
23765      get destroyed() {
23766        return this._destroyed;
23767      }
23768      static \u0275fac = function PlatformRef_Factory(__ngFactoryType__) {
23769        return new (__ngFactoryType__ || _PlatformRef)(\u0275\u0275inject(Injector));
23770      };
23771      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _PlatformRef, factory: _PlatformRef.\u0275fac, providedIn: "platform" });
23772    };
23773    (() => {
23774      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PlatformRef, [{
23775        type: Injectable,
23776        args: [{ providedIn: "platform" }]
23777      }], () => [{ type: Injector }], null);
23778    })();
23779    _platformInjector = null;
23780    ChangeDetectorRef = class {
23781      /**
23782       * @internal
23783       * @nocollapse
23784       */
23785      static __NG_ELEMENT_ID__ = injectChangeDetectorRef;
23786    };
23787    DefaultIterableDifferFactory = class {
23788      constructor() {
23789      }
23790      supports(obj) {
23791        return isListLikeIterable(obj);
23792      }
23793      create(trackByFn) {
23794        return new DefaultIterableDiffer(trackByFn);
23795      }
23796    };
23797    trackByIdentity = (index, item) => item;
23798    DefaultIterableDiffer = class {
23799      length = 0;
23800      // TODO: confirm the usage of `collection` as it's unused, readonly and on a non public API.
23801      collection;
23802      // Keeps track of the used records at any point in time (during & across `_check()` calls)
23803      _linkedRecords = null;
23804      // Keeps track of the removed records at any point in time during `_check()` calls.
23805      _unlinkedRecords = null;
23806      _previousItHead = null;
23807      _itHead = null;
23808      _itTail = null;
23809      _additionsHead = null;
23810      _additionsTail = null;
23811      _movesHead = null;
23812      _movesTail = null;
23813      _removalsHead = null;
23814      _removalsTail = null;
23815      // Keeps track of records where custom track by is the same, but item identity has changed
23816      _identityChangesHead = null;
23817      _identityChangesTail = null;
23818      _trackByFn;
23819      constructor(trackByFn) {
23820        this._trackByFn = trackByFn || trackByIdentity;
23821      }
23822      forEachItem(fn) {
23823        let record;
23824        for (record = this._itHead; record !== null; record = record._next) {
23825          fn(record);
23826        }
23827      }
23828      forEachOperation(fn) {
23829        let nextIt = this._itHead;
23830        let nextRemove = this._removalsHead;
23831        let addRemoveOffset = 0;
23832        let moveOffsets = null;
23833        while (nextIt || nextRemove) {
23834          const record = !nextRemove || nextIt && nextIt.currentIndex < getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ? nextIt : nextRemove;
23835          const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);
23836          const currentIndex = record.currentIndex;
23837          if (record === nextRemove) {
23838            addRemoveOffset--;
23839            nextRemove = nextRemove._nextRemoved;
23840          } else {
23841            nextIt = nextIt._next;
23842            if (record.previousIndex == null) {
23843              addRemoveOffset++;
23844            } else {
23845              if (!moveOffsets)
23846                moveOffsets = [];
23847              const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;
23848              const localCurrentIndex = currentIndex - addRemoveOffset;
23849              if (localMovePreviousIndex != localCurrentIndex) {
23850                for (let i = 0; i < localMovePreviousIndex; i++) {
23851                  const offset = i < moveOffsets.length ? moveOffsets[i] : moveOffsets[i] = 0;
23852                  const index = offset + i;
23853                  if (localCurrentIndex <= index && index < localMovePreviousIndex) {
23854                    moveOffsets[i] = offset + 1;
23855                  }
23856                }
23857                const previousIndex = record.previousIndex;
23858                moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;
23859              }
23860            }
23861          }
23862          if (adjPreviousIndex !== currentIndex) {
23863            fn(record, adjPreviousIndex, currentIndex);
23864          }
23865        }
23866      }
23867      forEachPreviousItem(fn) {
23868        let record;
23869        for (record = this._previousItHead; record !== null; record = record._nextPrevious) {
23870          fn(record);
23871        }
23872      }
23873      forEachAddedItem(fn) {
23874        let record;
23875        for (record = this._additionsHead; record !== null; record = record._nextAdded) {
23876          fn(record);
23877        }
23878      }
23879      forEachMovedItem(fn) {
23880        let record;
23881        for (record = this._movesHead; record !== null; record = record._nextMoved) {
23882          fn(record);
23883        }
23884      }
23885      forEachRemovedItem(fn) {
23886        let record;
23887        for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
23888          fn(record);
23889        }
23890      }
23891      forEachIdentityChange(fn) {
23892        let record;
23893        for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {
23894          fn(record);
23895        }
23896      }
23897      diff(collection) {
23898        if (collection == null)
23899          collection = [];
23900        if (!isListLikeIterable(collection)) {
23901          throw new RuntimeError(900, ngDevMode && `Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`);
23902        }
23903        if (this.check(collection)) {
23904          return this;
23905        } else {
23906          return null;
23907        }
23908      }
23909      onDestroy() {
23910      }
23911      check(collection) {
23912        this._reset();
23913        let record = this._itHead;
23914        let mayBeDirty = false;
23915        let index;
23916        let item;
23917        let itemTrackBy;
23918        if (Array.isArray(collection)) {
23919          this.length = collection.length;
23920          for (let index2 = 0; index2 < this.length; index2++) {
23921            item = collection[index2];
23922            itemTrackBy = this._trackByFn(index2, item);
23923            if (record === null || !Object.is(record.trackById, itemTrackBy)) {
23924              record = this._mismatch(record, item, itemTrackBy, index2);
23925              mayBeDirty = true;
23926            } else {
23927              if (mayBeDirty) {
23928                record = this._verifyReinsertion(record, item, itemTrackBy, index2);
23929              }
23930              if (!Object.is(record.item, item))
23931                this._addIdentityChange(record, item);
23932            }
23933            record = record._next;
23934          }
23935        } else {
23936          index = 0;
23937          iterateListLike(collection, (item2) => {
23938            itemTrackBy = this._trackByFn(index, item2);
23939            if (record === null || !Object.is(record.trackById, itemTrackBy)) {
23940              record = this._mismatch(record, item2, itemTrackBy, index);
23941              mayBeDirty = true;
23942            } else {
23943              if (mayBeDirty) {
23944                record = this._verifyReinsertion(record, item2, itemTrackBy, index);
23945              }
23946              if (!Object.is(record.item, item2))
23947                this._addIdentityChange(record, item2);
23948            }
23949            record = record._next;
23950            index++;
23951          });
23952          this.length = index;
23953        }
23954        this._truncate(record);
23955        this.collection = collection;
23956        return this.isDirty;
23957      }
23958      /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity
23959       * changes.
23960       */
23961      get isDirty() {
23962        return this._additionsHead !== null || this._movesHead !== null || this._removalsHead !== null || this._identityChangesHead !== null;
23963      }
23964      /**
23965       * Reset the state of the change objects to show no changes. This means set previousKey to
23966       * currentKey, and clear all of the queues (additions, moves, removals).
23967       * Set the previousIndexes of moved and added items to their currentIndexes
23968       * Reset the list of additions, moves and removals
23969       *
23970       * @internal
23971       */
23972      _reset() {
23973        if (this.isDirty) {
23974          let record;
23975          for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {
23976            record._nextPrevious = record._next;
23977          }
23978          for (record = this._additionsHead; record !== null; record = record._nextAdded) {
23979            record.previousIndex = record.currentIndex;
23980          }
23981          this._additionsHead = this._additionsTail = null;
23982          for (record = this._movesHead; record !== null; record = record._nextMoved) {
23983            record.previousIndex = record.currentIndex;
23984          }
23985          this._movesHead = this._movesTail = null;
23986          this._removalsHead = this._removalsTail = null;
23987          this._identityChangesHead = this._identityChangesTail = null;
23988        }
23989      }
23990      /**
23991       * This is the core function which handles differences between collections.
23992       *
23993       * - `record` is the record which we saw at this position last time. If null then it is a new
23994       *   item.
23995       * - `item` is the current item in the collection
23996       * - `index` is the position of the item in the collection
23997       *
23998       * @internal
23999       */
24000      _mismatch(record, item, itemTrackBy, index) {
24001        let previousRecord;
24002        if (record === null) {
24003          previousRecord = this._itTail;
24004        } else {
24005          previousRecord = record._prev;
24006          this._remove(record);
24007        }
24008        record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);
24009        if (record !== null) {
24010          if (!Object.is(record.item, item))
24011            this._addIdentityChange(record, item);
24012          this._reinsertAfter(record, previousRecord, index);
24013        } else {
24014          record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);
24015          if (record !== null) {
24016            if (!Object.is(record.item, item))
24017              this._addIdentityChange(record, item);
24018            this._moveAfter(record, previousRecord, index);
24019          } else {
24020            record = this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index);
24021          }
24022        }
24023        return record;
24024      }
24025      /**
24026       * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)
24027       *
24028       * Use case: `[a, a]` => `[b, a, a]`
24029       *
24030       * If we did not have this check then the insertion of `b` would:
24031       *   1) evict first `a`
24032       *   2) insert `b` at `0` index.
24033       *   3) leave `a` at index `1` as is. <-- this is wrong!
24034       *   3) reinsert `a` at index 2. <-- this is wrong!
24035       *
24036       * The correct behavior is:
24037       *   1) evict first `a`
24038       *   2) insert `b` at `0` index.
24039       *   3) reinsert `a` at index 1.
24040       *   3) move `a` at from `1` to `2`.
24041       *
24042       *
24043       * Double check that we have not evicted a duplicate item. We need to check if the item type may
24044       * have already been removed:
24045       * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted
24046       * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a
24047       * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'
24048       * at the end.
24049       *
24050       * @internal
24051       */
24052      _verifyReinsertion(record, item, itemTrackBy, index) {
24053        let reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);
24054        if (reinsertRecord !== null) {
24055          record = this._reinsertAfter(reinsertRecord, record._prev, index);
24056        } else if (record.currentIndex != index) {
24057          record.currentIndex = index;
24058          this._addToMoves(record, index);
24059        }
24060        return record;
24061      }
24062      /**
24063       * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection
24064       *
24065       * - `record` The first excess {@link IterableChangeRecord_}.
24066       *
24067       * @internal
24068       */
24069      _truncate(record) {
24070        while (record !== null) {
24071          const nextRecord = record._next;
24072          this._addToRemovals(this._unlink(record));
24073          record = nextRecord;
24074        }
24075        if (this._unlinkedRecords !== null) {
24076          this._unlinkedRecords.clear();
24077        }
24078        if (this._additionsTail !== null) {
24079          this._additionsTail._nextAdded = null;
24080        }
24081        if (this._movesTail !== null) {
24082          this._movesTail._nextMoved = null;
24083        }
24084        if (this._itTail !== null) {
24085          this._itTail._next = null;
24086        }
24087        if (this._removalsTail !== null) {
24088          this._removalsTail._nextRemoved = null;
24089        }
24090        if (this._identityChangesTail !== null) {
24091          this._identityChangesTail._nextIdentityChange = null;
24092        }
24093      }
24094      /** @internal */
24095      _reinsertAfter(record, prevRecord, index) {
24096        if (this._unlinkedRecords !== null) {
24097          this._unlinkedRecords.remove(record);
24098        }
24099        const prev = record._prevRemoved;
24100        const next = record._nextRemoved;
24101        if (prev === null) {
24102          this._removalsHead = next;
24103        } else {
24104          prev._nextRemoved = next;
24105        }
24106        if (next === null) {
24107          this._removalsTail = prev;
24108        } else {
24109          next._prevRemoved = prev;
24110        }
24111        this._insertAfter(record, prevRecord, index);
24112        this._addToMoves(record, index);
24113        return record;
24114      }
24115      /** @internal */
24116      _moveAfter(record, prevRecord, index) {
24117        this._unlink(record);
24118        this._insertAfter(record, prevRecord, index);
24119        this._addToMoves(record, index);
24120        return record;
24121      }
24122      /** @internal */
24123      _addAfter(record, prevRecord, index) {
24124        this._insertAfter(record, prevRecord, index);
24125        if (this._additionsTail === null) {
24126          this._additionsTail = this._additionsHead = record;
24127        } else {
24128          this._additionsTail = this._additionsTail._nextAdded = record;
24129        }
24130        return record;
24131      }
24132      /** @internal */
24133      _insertAfter(record, prevRecord, index) {
24134        const next = prevRecord === null ? this._itHead : prevRecord._next;
24135        record._next = next;
24136        record._prev = prevRecord;
24137        if (next === null) {
24138          this._itTail = record;
24139        } else {
24140          next._prev = record;
24141        }
24142        if (prevRecord === null) {
24143          this._itHead = record;
24144        } else {
24145          prevRecord._next = record;
24146        }
24147        if (this._linkedRecords === null) {
24148          this._linkedRecords = new _DuplicateMap();
24149        }
24150        this._linkedRecords.put(record);
24151        record.currentIndex = index;
24152        return record;
24153      }
24154      /** @internal */
24155      _remove(record) {
24156        return this._addToRemovals(this._unlink(record));
24157      }
24158      /** @internal */
24159      _unlink(record) {
24160        if (this._linkedRecords !== null) {
24161          this._linkedRecords.remove(record);
24162        }
24163        const prev = record._prev;
24164        const next = record._next;
24165        if (prev === null) {
24166          this._itHead = next;
24167        } else {
24168          prev._next = next;
24169        }
24170        if (next === null) {
24171          this._itTail = prev;
24172        } else {
24173          next._prev = prev;
24174        }
24175        return record;
24176      }
24177      /** @internal */
24178      _addToMoves(record, toIndex) {
24179        if (record.previousIndex === toIndex) {
24180          return record;
24181        }
24182        if (this._movesTail === null) {
24183          this._movesTail = this._movesHead = record;
24184        } else {
24185          this._movesTail = this._movesTail._nextMoved = record;
24186        }
24187        return record;
24188      }
24189      _addToRemovals(record) {
24190        if (this._unlinkedRecords === null) {
24191          this._unlinkedRecords = new _DuplicateMap();
24192        }
24193        this._unlinkedRecords.put(record);
24194        record.currentIndex = null;
24195        record._nextRemoved = null;
24196        if (this._removalsTail === null) {
24197          this._removalsTail = this._removalsHead = record;
24198          record._prevRemoved = null;
24199        } else {
24200          record._prevRemoved = this._removalsTail;
24201          this._removalsTail = this._removalsTail._nextRemoved = record;
24202        }
24203        return record;
24204      }
24205      /** @internal */
24206      _addIdentityChange(record, item) {
24207        record.item = item;
24208        if (this._identityChangesTail === null) {
24209          this._identityChangesTail = this._identityChangesHead = record;
24210        } else {
24211          this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;
24212        }
24213        return record;
24214      }
24215    };
24216    IterableChangeRecord_ = class {
24217      item;
24218      trackById;
24219      currentIndex = null;
24220      previousIndex = null;
24221      /** @internal */
24222      _nextPrevious = null;
24223      /** @internal */
24224      _prev = null;
24225      /** @internal */
24226      _next = null;
24227      /** @internal */
24228      _prevDup = null;
24229      /** @internal */
24230      _nextDup = null;
24231      /** @internal */
24232      _prevRemoved = null;
24233      /** @internal */
24234      _nextRemoved = null;
24235      /** @internal */
24236      _nextAdded = null;
24237      /** @internal */
24238      _nextMoved = null;
24239      /** @internal */
24240      _nextIdentityChange = null;
24241      constructor(item, trackById) {
24242        this.item = item;
24243        this.trackById = trackById;
24244      }
24245    };
24246    _DuplicateItemRecordList = class {
24247      /** @internal */
24248      _head = null;
24249      /** @internal */
24250      _tail = null;
24251      /**
24252       * Append the record to the list of duplicates.
24253       *
24254       * Note: by design all records in the list of duplicates hold the same value in record.item.
24255       */
24256      add(record) {
24257        if (this._head === null) {
24258          this._head = this._tail = record;
24259          record._nextDup = null;
24260          record._prevDup = null;
24261        } else {
24262          this._tail._nextDup = record;
24263          record._prevDup = this._tail;
24264          record._nextDup = null;
24265          this._tail = record;
24266        }
24267      }
24268      // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and
24269      // IterableChangeRecord_.currentIndex >= atOrAfterIndex
24270      get(trackById, atOrAfterIndex) {
24271        let record;
24272        for (record = this._head; record !== null; record = record._nextDup) {
24273          if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) && Object.is(record.trackById, trackById)) {
24274            return record;
24275          }
24276        }
24277        return null;
24278      }
24279      /**
24280       * Remove one {@link IterableChangeRecord_} from the list of duplicates.
24281       *
24282       * Returns whether the list of duplicates is empty.
24283       */
24284      remove(record) {
24285        const prev = record._prevDup;
24286        const next = record._nextDup;
24287        if (prev === null) {
24288          this._head = next;
24289        } else {
24290          prev._nextDup = next;
24291        }
24292        if (next === null) {
24293          this._tail = prev;
24294        } else {
24295          next._prevDup = prev;
24296        }
24297        return this._head === null;
24298      }
24299    };
24300    _DuplicateMap = class {
24301      map = /* @__PURE__ */ new Map();
24302      put(record) {
24303        const key = record.trackById;
24304        let duplicates = this.map.get(key);
24305        if (!duplicates) {
24306          duplicates = new _DuplicateItemRecordList();
24307          this.map.set(key, duplicates);
24308        }
24309        duplicates.add(record);
24310      }
24311      /**
24312       * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we
24313       * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.
24314       *
24315       * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we
24316       * have any more `a`s needs to return the second `a`.
24317       */
24318      get(trackById, atOrAfterIndex) {
24319        const key = trackById;
24320        const recordList = this.map.get(key);
24321        return recordList ? recordList.get(trackById, atOrAfterIndex) : null;
24322      }
24323      /**
24324       * Removes a {@link IterableChangeRecord_} from the list of duplicates.
24325       *
24326       * The list of duplicates also is removed from the map if it gets empty.
24327       */
24328      remove(record) {
24329        const key = record.trackById;
24330        const recordList = this.map.get(key);
24331        if (recordList.remove(record)) {
24332          this.map.delete(key);
24333        }
24334        return record;
24335      }
24336      get isEmpty() {
24337        return this.map.size === 0;
24338      }
24339      clear() {
24340        this.map.clear();
24341      }
24342    };
24343    DefaultKeyValueDifferFactory = class {
24344      constructor() {
24345      }
24346      supports(obj) {
24347        return obj instanceof Map || isJsObject(obj);
24348      }
24349      create() {
24350        return new DefaultKeyValueDiffer();
24351      }
24352    };
24353    DefaultKeyValueDiffer = class {
24354      _records = /* @__PURE__ */ new Map();
24355      _mapHead = null;
24356      // _appendAfter is used in the check loop
24357      _appendAfter = null;
24358      _previousMapHead = null;
24359      _changesHead = null;
24360      _changesTail = null;
24361      _additionsHead = null;
24362      _additionsTail = null;
24363      _removalsHead = null;
24364      _removalsTail = null;
24365      get isDirty() {
24366        return this._additionsHead !== null || this._changesHead !== null || this._removalsHead !== null;
24367      }
24368      forEachItem(fn) {
24369        let record;
24370        for (record = this._mapHead; record !== null; record = record._next) {
24371          fn(record);
24372        }
24373      }
24374      forEachPreviousItem(fn) {
24375        let record;
24376        for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {
24377          fn(record);
24378        }
24379      }
24380      forEachChangedItem(fn) {
24381        let record;
24382        for (record = this._changesHead; record !== null; record = record._nextChanged) {
24383          fn(record);
24384        }
24385      }
24386      forEachAddedItem(fn) {
24387        let record;
24388        for (record = this._additionsHead; record !== null; record = record._nextAdded) {
24389          fn(record);
24390        }
24391      }
24392      forEachRemovedItem(fn) {
24393        let record;
24394        for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
24395          fn(record);
24396        }
24397      }
24398      diff(map2) {
24399        if (!map2) {
24400          map2 = /* @__PURE__ */ new Map();
24401        } else if (!(map2 instanceof Map || isJsObject(map2))) {
24402          throw new RuntimeError(900, ngDevMode && `Error trying to diff '${stringify(map2)}'. Only maps and objects are allowed`);
24403        }
24404        return this.check(map2) ? this : null;
24405      }
24406      onDestroy() {
24407      }
24408      /**
24409       * Check the current state of the map vs the previous.
24410       * The algorithm is optimised for when the keys do no change.
24411       */
24412      check(map2) {
24413        this._reset();
24414        let insertBefore = this._mapHead;
24415        this._appendAfter = null;
24416        this._forEach(map2, (value, key) => {
24417          if (insertBefore && insertBefore.key === key) {
24418            this._maybeAddToChanges(insertBefore, value);
24419            this._appendAfter = insertBefore;
24420            insertBefore = insertBefore._next;
24421          } else {
24422            const record = this._getOrCreateRecordForKey(key, value);
24423            insertBefore = this._insertBeforeOrAppend(insertBefore, record);
24424          }
24425        });
24426        if (insertBefore) {
24427          if (insertBefore._prev) {
24428            insertBefore._prev._next = null;
24429          }
24430          this._removalsHead = insertBefore;
24431          for (let record = insertBefore; record !== null; record = record._nextRemoved) {
24432            if (record === this._mapHead) {
24433              this._mapHead = null;
24434            }
24435            this._records.delete(record.key);
24436            record._nextRemoved = record._next;
24437            record.previousValue = record.currentValue;
24438            record.currentValue = null;
24439            record._prev = null;
24440            record._next = null;
24441          }
24442        }
24443        if (this._changesTail)
24444          this._changesTail._nextChanged = null;
24445        if (this._additionsTail)
24446          this._additionsTail._nextAdded = null;
24447        return this.isDirty;
24448      }
24449      /**
24450       * Inserts a record before `before` or append at the end of the list when `before` is null.
24451       *
24452       * Notes:
24453       * - This method appends at `this._appendAfter`,
24454       * - This method updates `this._appendAfter`,
24455       * - The return value is the new value for the insertion pointer.
24456       */
24457      _insertBeforeOrAppend(before, record) {
24458        if (before) {
24459          const prev = before._prev;
24460          record._next = before;
24461          record._prev = prev;
24462          before._prev = record;
24463          if (prev) {
24464            prev._next = record;
24465          }
24466          if (before === this._mapHead) {
24467            this._mapHead = record;
24468          }
24469          this._appendAfter = before;
24470          return before;
24471        }
24472        if (this._appendAfter) {
24473          this._appendAfter._next = record;
24474          record._prev = this._appendAfter;
24475        } else {
24476          this._mapHead = record;
24477        }
24478        this._appendAfter = record;
24479        return null;
24480      }
24481      _getOrCreateRecordForKey(key, value) {
24482        if (this._records.has(key)) {
24483          const record2 = this._records.get(key);
24484          this._maybeAddToChanges(record2, value);
24485          const prev = record2._prev;
24486          const next = record2._next;
24487          if (prev) {
24488            prev._next = next;
24489          }
24490          if (next) {
24491            next._prev = prev;
24492          }
24493          record2._next = null;
24494          record2._prev = null;
24495          return record2;
24496        }
24497        const record = new KeyValueChangeRecord_(key);
24498        this._records.set(key, record);
24499        record.currentValue = value;
24500        this._addToAdditions(record);
24501        return record;
24502      }
24503      /** @internal */
24504      _reset() {
24505        if (this.isDirty) {
24506          let record;
24507          this._previousMapHead = this._mapHead;
24508          for (record = this._previousMapHead; record !== null; record = record._next) {
24509            record._nextPrevious = record._next;
24510          }
24511          for (record = this._changesHead; record !== null; record = record._nextChanged) {
24512            record.previousValue = record.currentValue;
24513          }
24514          for (record = this._additionsHead; record != null; record = record._nextAdded) {
24515            record.previousValue = record.currentValue;
24516          }
24517          this._changesHead = this._changesTail = null;
24518          this._additionsHead = this._additionsTail = null;
24519          this._removalsHead = null;
24520        }
24521      }
24522      // Add the record or a given key to the list of changes only when the value has actually changed
24523      _maybeAddToChanges(record, newValue) {
24524        if (!Object.is(newValue, record.currentValue)) {
24525          record.previousValue = record.currentValue;
24526          record.currentValue = newValue;
24527          this._addToChanges(record);
24528        }
24529      }
24530      _addToAdditions(record) {
24531        if (this._additionsHead === null) {
24532          this._additionsHead = this._additionsTail = record;
24533        } else {
24534          this._additionsTail._nextAdded = record;
24535          this._additionsTail = record;
24536        }
24537      }
24538      _addToChanges(record) {
24539        if (this._changesHead === null) {
24540          this._changesHead = this._changesTail = record;
24541        } else {
24542          this._changesTail._nextChanged = record;
24543          this._changesTail = record;
24544        }
24545      }
24546      /** @internal */
24547      _forEach(obj, fn) {
24548        if (obj instanceof Map) {
24549          obj.forEach(fn);
24550        } else {
24551          Object.keys(obj).forEach((k) => fn(obj[k], k));
24552        }
24553      }
24554    };
24555    KeyValueChangeRecord_ = class {
24556      key;
24557      previousValue = null;
24558      currentValue = null;
24559      /** @internal */
24560      _nextPrevious = null;
24561      /** @internal */
24562      _next = null;
24563      /** @internal */
24564      _prev = null;
24565      /** @internal */
24566      _nextAdded = null;
24567      /** @internal */
24568      _nextRemoved = null;
24569      /** @internal */
24570      _nextChanged = null;
24571      constructor(key) {
24572        this.key = key;
24573      }
24574    };
24575    IterableDiffers = class _IterableDiffers {
24576      factories;
24577      /** @nocollapse */
24578      static \u0275prov = (
24579        /** @pureOrBreakMyCode */
24580        /* @__PURE__ */ \u0275\u0275defineInjectable({
24581          token: _IterableDiffers,
24582          providedIn: "root",
24583          factory: defaultIterableDiffersFactory
24584        })
24585      );
24586      constructor(factories) {
24587        this.factories = factories;
24588      }
24589      static create(factories, parent) {
24590        if (parent != null) {
24591          const copied = parent.factories.slice();
24592          factories = factories.concat(copied);
24593        }
24594        return new _IterableDiffers(factories);
24595      }
24596      /**
24597       * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the
24598       * inherited {@link IterableDiffers} instance with the provided factories and return a new
24599       * {@link IterableDiffers} instance.
24600       *
24601       * @usageNotes
24602       * ### Example
24603       *
24604       * The following example shows how to extend an existing list of factories,
24605       * which will only be applied to the injector for this component and its children.
24606       * This step is all that's required to make a new {@link IterableDiffer} available.
24607       *
24608       * ```ts
24609       * @Component({
24610       *   viewProviders: [
24611       *     IterableDiffers.extend([new ImmutableListDiffer()])
24612       *   ]
24613       * })
24614       * ```
24615       */
24616      static extend(factories) {
24617        return {
24618          provide: _IterableDiffers,
24619          useFactory: () => {
24620            const parent = inject2(_IterableDiffers, { optional: true, skipSelf: true });
24621            return _IterableDiffers.create(factories, parent || defaultIterableDiffersFactory());
24622          }
24623        };
24624      }
24625      find(iterable) {
24626        const factory = this.factories.find((f) => f.supports(iterable));
24627        if (factory != null) {
24628          return factory;
24629        } else {
24630          throw new RuntimeError(901, ngDevMode && `Cannot find a differ supporting object '${iterable}' of type '${getTypeNameForDebugging(iterable)}'`);
24631        }
24632      }
24633    };
24634    KeyValueDiffers = class _KeyValueDiffers {
24635      /** @nocollapse */
24636      static \u0275prov = (
24637        /** @pureOrBreakMyCode */
24638        /* @__PURE__ */ \u0275\u0275defineInjectable({
24639          token: _KeyValueDiffers,
24640          providedIn: "root",
24641          factory: defaultKeyValueDiffersFactory
24642        })
24643      );
24644      factories;
24645      constructor(factories) {
24646        this.factories = factories;
24647      }
24648      static create(factories, parent) {
24649        if (parent) {
24650          const copied = parent.factories.slice();
24651          factories = factories.concat(copied);
24652        }
24653        return new _KeyValueDiffers(factories);
24654      }
24655      /**
24656       * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the
24657       * inherited {@link KeyValueDiffers} instance with the provided factories and return a new
24658       * {@link KeyValueDiffers} instance.
24659       *
24660       * @usageNotes
24661       * ### Example
24662       *
24663       * The following example shows how to extend an existing list of factories,
24664       * which will only be applied to the injector for this component and its children.
24665       * This step is all that's required to make a new {@link KeyValueDiffer} available.
24666       *
24667       * ```ts
24668       * @Component({
24669       *   viewProviders: [
24670       *     KeyValueDiffers.extend([new ImmutableMapDiffer()])
24671       *   ]
24672       * })
24673       * ```
24674       */
24675      static extend(factories) {
24676        return {
24677          provide: _KeyValueDiffers,
24678          useFactory: () => {
24679            const parent = inject2(_KeyValueDiffers, { optional: true, skipSelf: true });
24680            return _KeyValueDiffers.create(factories, parent || defaultKeyValueDiffersFactory());
24681          }
24682        };
24683      }
24684      find(kv) {
24685        const factory = this.factories.find((f) => f.supports(kv));
24686        if (factory) {
24687          return factory;
24688        }
24689        throw new RuntimeError(901, ngDevMode && `Cannot find a differ supporting object '${kv}'`);
24690      }
24691    };
24692    keyValDiff = [new DefaultKeyValueDifferFactory()];
24693    iterableDiff = [new DefaultIterableDifferFactory()];
24694    defaultIterableDiffers = new IterableDiffers(iterableDiff);
24695    defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);
24696    platformCore = createPlatformFactory(null, "core", []);
24697    ApplicationModule = class _ApplicationModule {
24698      // Inject ApplicationRef to make it eager...
24699      constructor(appRef) {
24700      }
24701      static \u0275fac = function ApplicationModule_Factory(__ngFactoryType__) {
24702        return new (__ngFactoryType__ || _ApplicationModule)(\u0275\u0275inject(ApplicationRef));
24703      };
24704      static \u0275mod = /* @__PURE__ */ \u0275\u0275defineNgModule({ type: _ApplicationModule });
24705      static \u0275inj = /* @__PURE__ */ \u0275\u0275defineInjector({});
24706    };
24707    (() => {
24708      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationModule, [{
24709        type: NgModule
24710      }], () => [{ type: ApplicationRef }], null);
24711    })();
24712    REQUEST = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "REQUEST" : "", {
24713      providedIn: "platform",
24714      factory: () => null
24715    });
24716    RESPONSE_INIT = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "RESPONSE_INIT" : "", {
24717      providedIn: "platform",
24718      factory: () => null
24719    });
24720    REQUEST_CONTEXT = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "REQUEST_CONTEXT" : "", {
24721      providedIn: "platform",
24722      factory: () => null
24723    });
24724  }
24725});
24726
vendor: 11,864 bytes, lines 24727-25035
24727// node_modules/@angular/elements/fesm2022/elements.mjs
24728function camelToDashCase(input2) {
24729  return input2.replace(/[A-Z]/g, (char) => `-${char.toLowerCase()}`);
24730}
24731function isElement(node) {
24732  return !!node && node.nodeType === Node.ELEMENT_NODE;
24733}
24734function matchesSelector(el, selector) {
24735  if (!_matches) {
24736    const elProto = Element.prototype;
24737    _matches = elProto.matches || elProto.matchesSelector || elProto.mozMatchesSelector || elProto.msMatchesSelector || elProto.oMatchesSelector || elProto.webkitMatchesSelector;
24738  }
24739  return el.nodeType === Node.ELEMENT_NODE ? _matches.call(el, selector) : false;
24740}
24741function getDefaultAttributeToPropertyInputs(inputs) {
24742  const attributeToPropertyInputs = {};
24743  inputs.forEach(({ propName, templateName, transform }) => {
24744    attributeToPropertyInputs[camelToDashCase(templateName)] = [propName, transform];
24745  });
24746  return attributeToPropertyInputs;
24747}
24748function getComponentInputs(component, injector) {
24749  const componentFactoryResolver = injector.get(ComponentFactoryResolver$1);
24750  const componentFactory = componentFactoryResolver.resolveComponentFactory(component);
24751  return componentFactory.inputs;
24752}
24753function extractProjectableNodes(host, ngContentSelectors) {
24754  const nodes = host.childNodes;
24755  const projectableNodes = ngContentSelectors.map(() => []);
24756  let wildcardIndex = -1;
24757  ngContentSelectors.some((selector, i) => {
24758    if (selector === "*") {
24759      wildcardIndex = i;
24760      return true;
24761    }
24762    return false;
24763  });
24764  for (let i = 0, ii = nodes.length; i < ii; ++i) {
24765    const node = nodes[i];
24766    const ngContentIndex = findMatchingIndex(node, ngContentSelectors, wildcardIndex);
24767    if (ngContentIndex !== -1) {
24768      projectableNodes[ngContentIndex].push(node);
24769    }
24770  }
24771  return projectableNodes;
24772}
24773function findMatchingIndex(node, selectors, defaultIndex) {
24774  let matchingIndex = defaultIndex;
24775  if (isElement(node)) {
24776    selectors.some((selector, i) => {
24777      if (selector !== "*" && matchesSelector(node, selector)) {
24778        matchingIndex = i;
24779        return true;
24780      }
24781      return false;
24782    });
24783  }
24784  return matchingIndex;
24785}
24786function createCustomElement(component, config2) {
24787  const inputs = getComponentInputs(component, config2.injector);
24788  const strategyFactory = config2.strategyFactory || new ComponentNgElementStrategyFactory(component, config2.injector);
24789  const attributeToPropertyInputs = getDefaultAttributeToPropertyInputs(inputs);
24790  class NgElementImpl extends NgElement {
24791    injector;
24792    // Work around a bug in closure typed optimizations(b/79557487) where it is not honoring static
24793    // field externs. So using quoted access to explicitly prevent renaming.
24794    static ["observedAttributes"] = Object.keys(attributeToPropertyInputs);
24795    get ngElementStrategy() {
24796      if (!this._ngElementStrategy) {
24797        const strategy = this._ngElementStrategy = strategyFactory.create(this.injector || config2.injector);
24798        inputs.forEach(({ propName, transform }) => {
24799          if (!this.hasOwnProperty(propName)) {
24800            return;
24801          }
24802          const value = this[propName];
24803          delete this[propName];
24804          strategy.setInputValue(propName, value, transform);
24805        });
24806      }
24807      return this._ngElementStrategy;
24808    }
24809    _ngElementStrategy;
24810    constructor(injector) {
24811      super();
24812      this.injector = injector;
24813    }
24814    attributeChangedCallback(attrName, oldValue, newValue, namespace) {
24815      const [propName, transform] = attributeToPropertyInputs[attrName];
24816      this.ngElementStrategy.setInputValue(propName, newValue, transform);
24817    }
24818    connectedCallback() {
24819      let subscribedToEvents = false;
24820      if (this.ngElementStrategy.events) {
24821        this.subscribeToEvents();
24822        subscribedToEvents = true;
24823      }
24824      this.ngElementStrategy.connect(this);
24825      if (!subscribedToEvents) {
24826        this.subscribeToEvents();
24827      }
24828    }
24829    disconnectedCallback() {
24830      if (this._ngElementStrategy) {
24831        this._ngElementStrategy.disconnect();
24832      }
24833      if (this.ngElementEventsSubscription) {
24834        this.ngElementEventsSubscription.unsubscribe();
24835        this.ngElementEventsSubscription = null;
24836      }
24837    }
24838    subscribeToEvents() {
24839      this.ngElementEventsSubscription = this.ngElementStrategy.events.subscribe((e) => {
24840        const customEvent = new CustomEvent(e.name, { detail: e.value });
24841        this.dispatchEvent(customEvent);
24842      });
24843    }
24844  }
24845  inputs.forEach(({ propName, transform }) => {
24846    Object.defineProperty(NgElementImpl.prototype, propName, {
24847      get() {
24848        return this.ngElementStrategy.getInputValue(propName);
24849      },
24850      set(newValue) {
24851        this.ngElementStrategy.setInputValue(propName, newValue, transform);
24852      },
24853      configurable: true,
24854      enumerable: true
24855    });
24856  });
24857  return NgElementImpl;
24858}
24859var scheduler, _matches, DESTROY_DELAY, ComponentNgElementStrategyFactory, ComponentNgElementStrategy, NgElement;
24860var init_elements = __esm({
24861  "node_modules/@angular/elements/fesm2022/elements.mjs"() {
24862    "use strict";
24863    init_core();
24864    init_esm();
24865    init_operators();
24866    scheduler = {
24867      /**
24868       * Schedule a callback to be called after some delay.
24869       *
24870       * Returns a function that when executed will cancel the scheduled function.
24871       */
24872      schedule(taskFn, delay) {
24873        const id = setTimeout(taskFn, delay);
24874        return () => clearTimeout(id);
24875      }
24876    };
24877    DESTROY_DELAY = 10;
24878    ComponentNgElementStrategyFactory = class {
24879      componentFactory;
24880      inputMap = /* @__PURE__ */ new Map();
24881      constructor(component, injector) {
24882        this.componentFactory = injector.get(ComponentFactoryResolver$1).resolveComponentFactory(component);
24883        for (const input2 of this.componentFactory.inputs) {
24884          this.inputMap.set(input2.propName, input2.templateName);
24885        }
24886      }
24887      create(injector) {
24888        return new ComponentNgElementStrategy(this.componentFactory, injector, this.inputMap);
24889      }
24890    };
24891    ComponentNgElementStrategy = class {
24892      componentFactory;
24893      injector;
24894      inputMap;
24895      // Subject of `NgElementStrategyEvent` observables corresponding to the component's outputs.
24896      eventEmitters = new ReplaySubject(1);
24897      /** Merged stream of the component's output events. */
24898      events = this.eventEmitters.pipe(switchMap((emitters) => merge(...emitters)));
24899      /** Reference to the component that was created on connect. */
24900      componentRef = null;
24901      /** Callback function that when called will cancel a scheduled destruction on the component. */
24902      scheduledDestroyFn = null;
24903      /** Initial input values that were set before the component was created. */
24904      initialInputValues = /* @__PURE__ */ new Map();
24905      /** Service for setting zone context. */
24906      ngZone;
24907      /** The zone the element was created in or `null` if Zone.js is not loaded. */
24908      elementZone;
24909      /**
24910       * The `ApplicationRef` shared by all instances of this custom element (and potentially others).
24911       */
24912      appRef;
24913      /**
24914       * Angular's change detection scheduler, which works independently of zone.js.
24915       */
24916      cdScheduler;
24917      constructor(componentFactory, injector, inputMap) {
24918        this.componentFactory = componentFactory;
24919        this.injector = injector;
24920        this.inputMap = inputMap;
24921        this.ngZone = this.injector.get(NgZone);
24922        this.appRef = this.injector.get(ApplicationRef);
24923        this.cdScheduler = injector.get(ChangeDetectionScheduler);
24924        this.elementZone = typeof Zone === "undefined" ? null : this.ngZone.run(() => Zone.current);
24925      }
24926      /**
24927       * Initializes a new component if one has not yet been created and cancels any scheduled
24928       * destruction.
24929       */
24930      connect(element) {
24931        this.runInZone(() => {
24932          if (this.scheduledDestroyFn !== null) {
24933            this.scheduledDestroyFn();
24934            this.scheduledDestroyFn = null;
24935            return;
24936          }
24937          if (this.componentRef === null) {
24938            this.initializeComponent(element);
24939          }
24940        });
24941      }
24942      /**
24943       * Schedules the component to be destroyed after some small delay in case the element is just
24944       * being moved across the DOM.
24945       */
24946      disconnect() {
24947        this.runInZone(() => {
24948          if (this.componentRef === null || this.scheduledDestroyFn !== null) {
24949            return;
24950          }
24951          this.scheduledDestroyFn = scheduler.schedule(() => {
24952            if (this.componentRef !== null) {
24953              this.componentRef.destroy();
24954              this.componentRef = null;
24955            }
24956          }, DESTROY_DELAY);
24957        });
24958      }
24959      /**
24960       * Returns the component property value. If the component has not yet been created, the value is
24961       * retrieved from the cached initialization values.
24962       */
24963      getInputValue(property) {
24964        return this.runInZone(() => {
24965          if (this.componentRef === null) {
24966            return this.initialInputValues.get(property);
24967          }
24968          return this.componentRef.instance[property];
24969        });
24970      }
24971      /**
24972       * Sets the input value for the property. If the component has not yet been created, the value is
24973       * cached and set when the component is created.
24974       */
24975      setInputValue(property, value) {
24976        if (this.componentRef === null) {
24977          this.initialInputValues.set(property, value);
24978          return;
24979        }
24980        this.runInZone(() => {
24981          this.componentRef.setInput(this.inputMap.get(property) ?? property, value);
24982          if (isViewDirty(this.componentRef.hostView)) {
24983            markForRefresh(this.componentRef.changeDetectorRef);
24984            this.cdScheduler.notify(
24985              6
24986              /* NotificationSource.CustomElement */
24987            );
24988          }
24989        });
24990      }
24991      /**
24992       * Creates a new component through the component factory with the provided element host and
24993       * sets up its initial inputs, listens for outputs changes, and runs an initial change detection.
24994       */
24995      initializeComponent(element) {
24996        const childInjector = Injector.create({ providers: [], parent: this.injector });
24997        const projectableNodes = extractProjectableNodes(element, this.componentFactory.ngContentSelectors);
24998        this.componentRef = this.componentFactory.create(childInjector, projectableNodes, element);
24999        this.initializeInputs();
25000        this.initializeOutputs(this.componentRef);
25001        this.appRef.attachView(this.componentRef.hostView);
25002        this.componentRef.hostView.detectChanges();
25003      }
25004      /** Set any stored initial inputs on the component's properties. */
25005      initializeInputs() {
25006        for (const [propName, value] of this.initialInputValues) {
25007          this.setInputValue(propName, value);
25008        }
25009        this.initialInputValues.clear();
25010      }
25011      /** Sets up listeners for the component's outputs so that the events stream emits the events. */
25012      initializeOutputs(componentRef) {
25013        const eventEmitters = this.componentFactory.outputs.map(({ propName, templateName }) => {
25014          const emitter = componentRef.instance[propName];
25015          return new Observable((observer) => {
25016            const sub = emitter.subscribe((value) => observer.next({ name: templateName, value }));
25017            return () => sub.unsubscribe();
25018          });
25019        });
25020        this.eventEmitters.next(eventEmitters);
25021      }
25022      /** Runs in the angular zone, if present. */
25023      runInZone(fn) {
25024        return this.elementZone && Zone.current !== this.elementZone ? this.ngZone.run(fn) : fn();
25025      }
25026    };
25027    NgElement = class extends HTMLElement {
25028      /**
25029       * A subscription to change, connect, and disconnect events in the custom element.
25030       */
25031      ngElementEventsSubscription = null;
25032    };
25033  }
25034});
25035
vendor: 17,449 bytes, lines 25036-25531
25036// node_modules/@angular/common/fesm2022/location.mjs
25037function getDOM() {
25038  return _DOM;
25039}
25040function setRootDomAdapter(adapter) {
25041  _DOM ??= adapter;
25042}
25043function joinWithSlash(start, end) {
25044  if (!start) return end;
25045  if (!end) return start;
25046  if (start.endsWith("/")) {
25047    return end.startsWith("/") ? start + end.slice(1) : start + end;
25048  }
25049  return end.startsWith("/") ? start + end : `${start}/${end}`;
25050}
25051function stripTrailingSlash(url) {
25052  const pathEndIdx = url.search(/#|\?|$/);
25053  return url[pathEndIdx - 1] === "/" ? url.slice(0, pathEndIdx - 1) + url.slice(pathEndIdx) : url;
25054}
25055function normalizeQueryParams(params) {
25056  return params && params[0] !== "?" ? `?${params}` : params;
25057}
25058function createLocation() {
25059  return new Location(\u0275\u0275inject(LocationStrategy));
25060}
25061function _stripBasePath(basePath, url) {
25062  if (!basePath || !url.startsWith(basePath)) {
25063    return url;
25064  }
25065  const strippedUrl = url.substring(basePath.length);
25066  if (strippedUrl === "" || ["/", ";", "?", "#"].includes(strippedUrl[0])) {
25067    return strippedUrl;
25068  }
25069  return url;
25070}
25071function _stripIndexHtml(url) {
25072  return url.replace(/\/index.html$/, "");
25073}
25074function _stripOrigin(baseHref) {
25075  const isAbsoluteUrl2 = new RegExp("^(https?:)?//").test(baseHref);
25076  if (isAbsoluteUrl2) {
25077    const [, pathname] = baseHref.split(/\/\/[^\/]+/);
25078    return pathname;
25079  }
25080  return baseHref;
25081}
25082var _DOM, DomAdapter, PlatformLocation, LOCATION_INITIALIZED, BrowserPlatformLocation, LocationStrategy, APP_BASE_HREF, PathLocationStrategy, Location;
25083var init_location = __esm({
25084  "node_modules/@angular/common/fesm2022/location.mjs"() {
25085    "use strict";
25086    init_core();
25087    init_core();
25088    init_esm();
25089    _DOM = null;
25090    DomAdapter = class {
25091    };
25092    PlatformLocation = class _PlatformLocation {
25093      historyGo(relativePosition) {
25094        throw new Error(ngDevMode ? "Not implemented" : "");
25095      }
25096      static \u0275fac = function PlatformLocation_Factory(__ngFactoryType__) {
25097        return new (__ngFactoryType__ || _PlatformLocation)();
25098      };
25099      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
25100        token: _PlatformLocation,
25101        factory: () => (() => inject2(BrowserPlatformLocation))(),
25102        providedIn: "platform"
25103      });
25104    };
25105    (() => {
25106      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PlatformLocation, [{
25107        type: Injectable,
25108        args: [{
25109          providedIn: "platform",
25110          useFactory: () => inject2(BrowserPlatformLocation)
25111        }]
25112      }], null, null);
25113    })();
25114    LOCATION_INITIALIZED = new InjectionToken(ngDevMode ? "Location Initialized" : "");
25115    BrowserPlatformLocation = class _BrowserPlatformLocation extends PlatformLocation {
25116      _location;
25117      _history;
25118      _doc = inject2(DOCUMENT);
25119      constructor() {
25120        super();
25121        this._location = window.location;
25122        this._history = window.history;
25123      }
25124      getBaseHrefFromDOM() {
25125        return getDOM().getBaseHref(this._doc);
25126      }
25127      onPopState(fn) {
25128        const window2 = getDOM().getGlobalEventTarget(this._doc, "window");
25129        window2.addEventListener("popstate", fn, false);
25130        return () => window2.removeEventListener("popstate", fn);
25131      }
25132      onHashChange(fn) {
25133        const window2 = getDOM().getGlobalEventTarget(this._doc, "window");
25134        window2.addEventListener("hashchange", fn, false);
25135        return () => window2.removeEventListener("hashchange", fn);
25136      }
25137      get href() {
25138        return this._location.href;
25139      }
25140      get protocol() {
25141        return this._location.protocol;
25142      }
25143      get hostname() {
25144        return this._location.hostname;
25145      }
25146      get port() {
25147        return this._location.port;
25148      }
25149      get pathname() {
25150        return this._location.pathname;
25151      }
25152      get search() {
25153        return this._location.search;
25154      }
25155      get hash() {
25156        return this._location.hash;
25157      }
25158      set pathname(newPath) {
25159        this._location.pathname = newPath;
25160      }
25161      pushState(state, title, url) {
25162        this._history.pushState(state, title, url);
25163      }
25164      replaceState(state, title, url) {
25165        this._history.replaceState(state, title, url);
25166      }
25167      forward() {
25168        this._history.forward();
25169      }
25170      back() {
25171        this._history.back();
25172      }
25173      historyGo(relativePosition = 0) {
25174        this._history.go(relativePosition);
25175      }
25176      getState() {
25177        return this._history.state;
25178      }
25179      static \u0275fac = function BrowserPlatformLocation_Factory(__ngFactoryType__) {
25180        return new (__ngFactoryType__ || _BrowserPlatformLocation)();
25181      };
25182      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
25183        token: _BrowserPlatformLocation,
25184        factory: () => (() => new _BrowserPlatformLocation())(),
25185        providedIn: "platform"
25186      });
25187    };
25188    (() => {
25189      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(BrowserPlatformLocation, [{
25190        type: Injectable,
25191        args: [{
25192          providedIn: "platform",
25193          useFactory: () => new BrowserPlatformLocation()
25194        }]
25195      }], () => [], null);
25196    })();
25197    LocationStrategy = class _LocationStrategy {
25198      historyGo(relativePosition) {
25199        throw new Error(ngDevMode ? "Not implemented" : "");
25200      }
25201      static \u0275fac = function LocationStrategy_Factory(__ngFactoryType__) {
25202        return new (__ngFactoryType__ || _LocationStrategy)();
25203      };
25204      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
25205        token: _LocationStrategy,
25206        factory: () => (() => inject2(PathLocationStrategy))(),
25207        providedIn: "root"
25208      });
25209    };
25210    (() => {
25211      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(LocationStrategy, [{
25212        type: Injectable,
25213        args: [{
25214          providedIn: "root",
25215          useFactory: () => inject2(PathLocationStrategy)
25216        }]
25217      }], null, null);
25218    })();
25219    APP_BASE_HREF = new InjectionToken(ngDevMode ? "appBaseHref" : "");
25220    PathLocationStrategy = class _PathLocationStrategy extends LocationStrategy {
25221      _platformLocation;
25222      _baseHref;
25223      _removeListenerFns = [];
25224      constructor(_platformLocation, href) {
25225        super();
25226        this._platformLocation = _platformLocation;
25227        this._baseHref = href ?? this._platformLocation.getBaseHrefFromDOM() ?? inject2(DOCUMENT).location?.origin ?? "";
25228      }
25229      /** @docs-private */
25230      ngOnDestroy() {
25231        while (this._removeListenerFns.length) {
25232          this._removeListenerFns.pop()();
25233        }
25234      }
25235      onPopState(fn) {
25236        this._removeListenerFns.push(this._platformLocation.onPopState(fn), this._platformLocation.onHashChange(fn));
25237      }
25238      getBaseHref() {
25239        return this._baseHref;
25240      }
25241      prepareExternalUrl(internal) {
25242        return joinWithSlash(this._baseHref, internal);
25243      }
25244      path(includeHash = false) {
25245        const pathname = this._platformLocation.pathname + normalizeQueryParams(this._platformLocation.search);
25246        const hash = this._platformLocation.hash;
25247        return hash && includeHash ? `${pathname}${hash}` : pathname;
25248      }
25249      pushState(state, title, url, queryParams) {
25250        const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));
25251        this._platformLocation.pushState(state, title, externalUrl);
25252      }
25253      replaceState(state, title, url, queryParams) {
25254        const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));
25255        this._platformLocation.replaceState(state, title, externalUrl);
25256      }
25257      forward() {
25258        this._platformLocation.forward();
25259      }
25260      back() {
25261        this._platformLocation.back();
25262      }
25263      getState() {
25264        return this._platformLocation.getState();
25265      }
25266      historyGo(relativePosition = 0) {
25267        this._platformLocation.historyGo?.(relativePosition);
25268      }
25269      static \u0275fac = function PathLocationStrategy_Factory(__ngFactoryType__) {
25270        return new (__ngFactoryType__ || _PathLocationStrategy)(\u0275\u0275inject(PlatformLocation), \u0275\u0275inject(APP_BASE_HREF, 8));
25271      };
25272      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
25273        token: _PathLocationStrategy,
25274        factory: _PathLocationStrategy.\u0275fac,
25275        providedIn: "root"
25276      });
25277    };
25278    (() => {
25279      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PathLocationStrategy, [{
25280        type: Injectable,
25281        args: [{
25282          providedIn: "root"
25283        }]
25284      }], () => [{
25285        type: PlatformLocation
25286      }, {
25287        type: void 0,
25288        decorators: [{
25289          type: Optional
25290        }, {
25291          type: Inject,
25292          args: [APP_BASE_HREF]
25293        }]
25294      }], null);
25295    })();
25296    Location = class _Location {
25297      /** @internal */
25298      _subject = new Subject();
25299      /** @internal */
25300      _basePath;
25301      /** @internal */
25302      _locationStrategy;
25303      /** @internal */
25304      _urlChangeListeners = [];
25305      /** @internal */
25306      _urlChangeSubscription = null;
25307      constructor(locationStrategy) {
25308        this._locationStrategy = locationStrategy;
25309        const baseHref = this._locationStrategy.getBaseHref();
25310        this._basePath = _stripOrigin(stripTrailingSlash(_stripIndexHtml(baseHref)));
25311        this._locationStrategy.onPopState((ev) => {
25312          this._subject.next({
25313            "url": this.path(true),
25314            "pop": true,
25315            "state": ev.state,
25316            "type": ev.type
25317          });
25318        });
25319      }
25320      /** @docs-private */
25321      ngOnDestroy() {
25322        this._urlChangeSubscription?.unsubscribe();
25323        this._urlChangeListeners = [];
25324      }
25325      /**
25326       * Normalizes the URL path for this location.
25327       *
25328       * @param includeHash True to include an anchor fragment in the path.
25329       *
25330       * @returns The normalized URL path.
25331       */
25332      // TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is
25333      // removed.
25334      path(includeHash = false) {
25335        return this.normalize(this._locationStrategy.path(includeHash));
25336      }
25337      /**
25338       * Reports the current state of the location history.
25339       * @returns The current value of the `history.state` object.
25340       */
25341      getState() {
25342        return this._locationStrategy.getState();
25343      }
25344      /**
25345       * Normalizes the given path and compares to the current normalized path.
25346       *
25347       * @param path The given URL path.
25348       * @param query Query parameters.
25349       *
25350       * @returns True if the given URL path is equal to the current normalized path, false
25351       * otherwise.
25352       */
25353      isCurrentPathEqualTo(path, query = "") {
25354        return this.path() == this.normalize(path + normalizeQueryParams(query));
25355      }
25356      /**
25357       * Normalizes a URL path by stripping any trailing slashes.
25358       *
25359       * @param url String representing a URL.
25360       *
25361       * @returns The normalized URL string.
25362       */
25363      normalize(url) {
25364        return _Location.stripTrailingSlash(_stripBasePath(this._basePath, _stripIndexHtml(url)));
25365      }
25366      /**
25367       * Normalizes an external URL path.
25368       * If the given URL doesn't begin with a leading slash (`'/'`), adds one
25369       * before normalizing. Adds a hash if `HashLocationStrategy` is
25370       * in use, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.
25371       *
25372       * @param url String representing a URL.
25373       *
25374       * @returns  A normalized platform-specific URL.
25375       */
25376      prepareExternalUrl(url) {
25377        if (url && url[0] !== "/") {
25378          url = "/" + url;
25379        }
25380        return this._locationStrategy.prepareExternalUrl(url);
25381      }
25382      // TODO: rename this method to pushState
25383      /**
25384       * Changes the browser's URL to a normalized version of a given URL, and pushes a
25385       * new item onto the platform's history.
25386       *
25387       * @param path  URL path to normalize.
25388       * @param query Query parameters.
25389       * @param state Location history state.
25390       *
25391       */
25392      go(path, query = "", state = null) {
25393        this._locationStrategy.pushState(state, "", path, query);
25394        this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state);
25395      }
25396      /**
25397       * Changes the browser's URL to a normalized version of the given URL, and replaces
25398       * the top item on the platform's history stack.
25399       *
25400       * @param path  URL path to normalize.
25401       * @param query Query parameters.
25402       * @param state Location history state.
25403       */
25404      replaceState(path, query = "", state = null) {
25405        this._locationStrategy.replaceState(state, "", path, query);
25406        this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state);
25407      }
25408      /**
25409       * Navigates forward in the platform's history.
25410       */
25411      forward() {
25412        this._locationStrategy.forward();
25413      }
25414      /**
25415       * Navigates back in the platform's history.
25416       */
25417      back() {
25418        this._locationStrategy.back();
25419      }
25420      /**
25421       * Navigate to a specific page from session history, identified by its relative position to the
25422       * current page.
25423       *
25424       * @param relativePosition  Position of the target page in the history relative to the current
25425       *     page.
25426       * A negative value moves backwards, a positive value moves forwards, e.g. `location.historyGo(2)`
25427       * moves forward two pages and `location.historyGo(-2)` moves back two pages. When we try to go
25428       * beyond what's stored in the history session, we stay in the current page. Same behaviour occurs
25429       * when `relativePosition` equals 0.
25430       * @see https://developer.mozilla.org/en-US/docs/Web/API/History_API#Moving_to_a_specific_point_in_history
25431       */
25432      historyGo(relativePosition = 0) {
25433        this._locationStrategy.historyGo?.(relativePosition);
25434      }
25435      /**
25436       * Registers a URL change listener. Use to catch updates performed by the Angular
25437       * framework that are not detectible through "popstate" or "hashchange" events.
25438       *
25439       * @param fn The change handler function, which take a URL and a location history state.
25440       * @returns A function that, when executed, unregisters a URL change listener.
25441       */
25442      onUrlChange(fn) {
25443        this._urlChangeListeners.push(fn);
25444        this._urlChangeSubscription ??= this.subscribe((v) => {
25445          this._notifyUrlChangeListeners(v.url, v.state);
25446        });
25447        return () => {
25448          const fnIndex = this._urlChangeListeners.indexOf(fn);
25449          this._urlChangeListeners.splice(fnIndex, 1);
25450          if (this._urlChangeListeners.length === 0) {
25451            this._urlChangeSubscription?.unsubscribe();
25452            this._urlChangeSubscription = null;
25453          }
25454        };
25455      }
25456      /** @internal */
25457      _notifyUrlChangeListeners(url = "", state) {
25458        this._urlChangeListeners.forEach((fn) => fn(url, state));
25459      }
25460      /**
25461       * Subscribes to the platform's `popState` events.
25462       *
25463       * Note: `Location.go()` does not trigger the `popState` event in the browser. Use
25464       * `Location.onUrlChange()` to subscribe to URL changes instead.
25465       *
25466       * @param value Event that is triggered when the state history changes.
25467       * @param exception The exception to throw.
25468       *
25469       * @see [onpopstate](https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate)
25470       *
25471       * @returns Subscribed events.
25472       */
25473      subscribe(onNext, onThrow, onReturn) {
25474        return this._subject.subscribe({
25475          next: onNext,
25476          error: onThrow ?? void 0,
25477          complete: onReturn ?? void 0
25478        });
25479      }
25480      /**
25481       * Normalizes URL parameters by prepending with `?` if needed.
25482       *
25483       * @param  params String of URL parameters.
25484       *
25485       * @returns The normalized URL parameters string.
25486       */
25487      static normalizeQueryParams = normalizeQueryParams;
25488      /**
25489       * Joins two parts of a URL with a slash if needed.
25490       *
25491       * @param start  URL string
25492       * @param end    URL string
25493       *
25494       *
25495       * @returns The joined URL string.
25496       */
25497      static joinWithSlash = joinWithSlash;
25498      /**
25499       * Removes a trailing slash from a URL string if needed.
25500       * Looks for the first occurrence of either `#`, `?`, or the end of the
25501       * line as `/` characters and removes the trailing slash if one exists.
25502       *
25503       * @param url URL string.
25504       *
25505       * @returns The URL string, modified if needed.
25506       */
25507      static stripTrailingSlash = stripTrailingSlash;
25508      static \u0275fac = function Location_Factory(__ngFactoryType__) {
25509        return new (__ngFactoryType__ || _Location)(\u0275\u0275inject(LocationStrategy));
25510      };
25511      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
25512        token: _Location,
25513        factory: () => createLocation(),
25514        providedIn: "root"
25515      });
25516    };
25517    (() => {
25518      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Location, [{
25519        type: Injectable,
25520        args: [{
25521          providedIn: "root",
25522          // See #23917
25523          useFactory: createLocation
25524        }]
25525      }], () => [{
25526        type: LocationStrategy
25527      }], null);
25528    })();
25529  }
25530});
25531
vendor: 117,115 bytes, lines 25532-28640
25532// node_modules/@angular/common/fesm2022/common_module.mjs
25533function getLocaleId2(locale) {
25534  return findLocaleData(locale)[LocaleDataIndex.LocaleId];
25535}
25536function getLocaleDayPeriods(locale, formStyle, width) {
25537  const data = findLocaleData(locale);
25538  const amPmData = [data[LocaleDataIndex.DayPeriodsFormat], data[LocaleDataIndex.DayPeriodsStandalone]];
25539  const amPm = getLastDefinedValue(amPmData, formStyle);
25540  return getLastDefinedValue(amPm, width);
25541}
25542function getLocaleDayNames(locale, formStyle, width) {
25543  const data = findLocaleData(locale);
25544  const daysData = [data[LocaleDataIndex.DaysFormat], data[LocaleDataIndex.DaysStandalone]];
25545  const days = getLastDefinedValue(daysData, formStyle);
25546  return getLastDefinedValue(days, width);
25547}
25548function getLocaleMonthNames(locale, formStyle, width) {
25549  const data = findLocaleData(locale);
25550  const monthsData = [data[LocaleDataIndex.MonthsFormat], data[LocaleDataIndex.MonthsStandalone]];
25551  const months = getLastDefinedValue(monthsData, formStyle);
25552  return getLastDefinedValue(months, width);
25553}
25554function getLocaleEraNames(locale, width) {
25555  const data = findLocaleData(locale);
25556  const erasData = data[LocaleDataIndex.Eras];
25557  return getLastDefinedValue(erasData, width);
25558}
25559function getLocaleDateFormat(locale, width) {
25560  const data = findLocaleData(locale);
25561  return getLastDefinedValue(data[LocaleDataIndex.DateFormat], width);
25562}
25563function getLocaleTimeFormat(locale, width) {
25564  const data = findLocaleData(locale);
25565  return getLastDefinedValue(data[LocaleDataIndex.TimeFormat], width);
25566}
25567function getLocaleDateTimeFormat(locale, width) {
25568  const data = findLocaleData(locale);
25569  const dateTimeFormatData = data[LocaleDataIndex.DateTimeFormat];
25570  return getLastDefinedValue(dateTimeFormatData, width);
25571}
25572function getLocaleNumberSymbol(locale, symbol) {
25573  const data = findLocaleData(locale);
25574  const res = data[LocaleDataIndex.NumberSymbols][symbol];
25575  if (typeof res === "undefined") {
25576    if (symbol === NumberSymbol.CurrencyDecimal) {
25577      return data[LocaleDataIndex.NumberSymbols][NumberSymbol.Decimal];
25578    } else if (symbol === NumberSymbol.CurrencyGroup) {
25579      return data[LocaleDataIndex.NumberSymbols][NumberSymbol.Group];
25580    }
25581  }
25582  return res;
25583}
25584function getLocaleNumberFormat(locale, type) {
25585  const data = findLocaleData(locale);
25586  return data[LocaleDataIndex.NumberFormats][type];
25587}
25588function getLocaleCurrencies(locale) {
25589  const data = findLocaleData(locale);
25590  return data[LocaleDataIndex.Currencies];
25591}
25592function checkFullData(data) {
25593  if (!data[LocaleDataIndex.ExtraData]) {
25594    throw new RuntimeError(2303, ngDevMode && `Missing extra locale data for the locale "${data[LocaleDataIndex.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`);
25595  }
25596}
25597function getLocaleExtraDayPeriodRules(locale) {
25598  const data = findLocaleData(locale);
25599  checkFullData(data);
25600  const rules = data[LocaleDataIndex.ExtraData][
25601    2
25602    /* ɵExtraLocaleDataIndex.ExtraDayPeriodsRules */
25603  ] || [];
25604  return rules.map((rule) => {
25605    if (typeof rule === "string") {
25606      return extractTime(rule);
25607    }
25608    return [extractTime(rule[0]), extractTime(rule[1])];
25609  });
25610}
25611function getLocaleExtraDayPeriods(locale, formStyle, width) {
25612  const data = findLocaleData(locale);
25613  checkFullData(data);
25614  const dayPeriodsData = [data[LocaleDataIndex.ExtraData][
25615    0
25616    /* ɵExtraLocaleDataIndex.ExtraDayPeriodFormats */
25617  ], data[LocaleDataIndex.ExtraData][
25618    1
25619    /* ɵExtraLocaleDataIndex.ExtraDayPeriodStandalone */
25620  ]];
25621  const dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];
25622  return getLastDefinedValue(dayPeriods, width) || [];
25623}
25624function getLastDefinedValue(data, index) {
25625  for (let i = index; i > -1; i--) {
25626    if (typeof data[i] !== "undefined") {
25627      return data[i];
25628    }
25629  }
25630  throw new RuntimeError(2304, ngDevMode && "Locale data API: locale data undefined");
25631}
25632function extractTime(time) {
25633  const [h, m] = time.split(":");
25634  return {
25635    hours: +h,
25636    minutes: +m
25637  };
25638}
25639function getCurrencySymbol(code, format, locale = "en") {
25640  const currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];
25641  const symbolNarrow = currency[
25642    1
25643    /* ɵCurrencyIndex.SymbolNarrow */
25644  ];
25645  if (format === "narrow" && typeof symbolNarrow === "string") {
25646    return symbolNarrow;
25647  }
25648  return currency[
25649    0
25650    /* ɵCurrencyIndex.Symbol */
25651  ] || code;
25652}
25653function getNumberOfCurrencyDigits(code) {
25654  let digits;
25655  const currency = CURRENCIES_EN[code];
25656  if (currency) {
25657    digits = currency[
25658      2
25659      /* ɵCurrencyIndex.NbOfDigits */
25660    ];
25661  }
25662  return typeof digits === "number" ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS;
25663}
25664function formatDate(value, format, locale, timezone) {
25665  let date = toDate(value);
25666  const namedFormat = getNamedFormat(locale, format);
25667  format = namedFormat || format;
25668  let parts = [];
25669  let match;
25670  while (format) {
25671    match = DATE_FORMATS_SPLIT.exec(format);
25672    if (match) {
25673      parts = parts.concat(match.slice(1));
25674      const part = parts.pop();
25675      if (!part) {
25676        break;
25677      }
25678      format = part;
25679    } else {
25680      parts.push(format);
25681      break;
25682    }
25683  }
25684  if (typeof ngDevMode === "undefined" || ngDevMode) {
25685    assertValidDateFormat(parts);
25686  }
25687  let dateTimezoneOffset = date.getTimezoneOffset();
25688  if (timezone) {
25689    dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
25690    date = convertTimezoneToLocal(date, timezone);
25691  }
25692  let text = "";
25693  parts.forEach((value2) => {
25694    const dateFormatter = getDateFormatter(value2);
25695    text += dateFormatter ? dateFormatter(date, locale, dateTimezoneOffset) : value2 === "''" ? "'" : value2.replace(/(^'|'$)/g, "").replace(/''/g, "'");
25696  });
25697  return text;
25698}
25699function assertValidDateFormat(parts) {
25700  if (parts.some((part) => /^Y+$/.test(part)) && !parts.some((part) => /^w+$/.test(part))) {
25701    const message = `Suspicious use of week-based year "Y" in date pattern "${parts.join("")}". Did you mean to use calendar year "y" instead?`;
25702    if (parts.length === 1) {
25703      console.error(formatRuntimeError(2300, message));
25704    } else {
25705      throw new RuntimeError(2300, message);
25706    }
25707  }
25708}
25709function createDate(year, month, date) {
25710  const newDate = /* @__PURE__ */ new Date(0);
25711  newDate.setFullYear(year, month, date);
25712  newDate.setHours(0, 0, 0);
25713  return newDate;
25714}
25715function getNamedFormat(locale, format) {
25716  const localeId = getLocaleId2(locale);
25717  NAMED_FORMATS[localeId] ??= {};
25718  if (NAMED_FORMATS[localeId][format]) {
25719    return NAMED_FORMATS[localeId][format];
25720  }
25721  let formatValue2 = "";
25722  switch (format) {
25723    case "shortDate":
25724      formatValue2 = getLocaleDateFormat(locale, FormatWidth.Short);
25725      break;
25726    case "mediumDate":
25727      formatValue2 = getLocaleDateFormat(locale, FormatWidth.Medium);
25728      break;
25729    case "longDate":
25730      formatValue2 = getLocaleDateFormat(locale, FormatWidth.Long);
25731      break;
25732    case "fullDate":
25733      formatValue2 = getLocaleDateFormat(locale, FormatWidth.Full);
25734      break;
25735    case "shortTime":
25736      formatValue2 = getLocaleTimeFormat(locale, FormatWidth.Short);
25737      break;
25738    case "mediumTime":
25739      formatValue2 = getLocaleTimeFormat(locale, FormatWidth.Medium);
25740      break;
25741    case "longTime":
25742      formatValue2 = getLocaleTimeFormat(locale, FormatWidth.Long);
25743      break;
25744    case "fullTime":
25745      formatValue2 = getLocaleTimeFormat(locale, FormatWidth.Full);
25746      break;
25747    case "short":
25748      const shortTime = getNamedFormat(locale, "shortTime");
25749      const shortDate = getNamedFormat(locale, "shortDate");
25750      formatValue2 = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]);
25751      break;
25752    case "medium":
25753      const mediumTime = getNamedFormat(locale, "mediumTime");
25754      const mediumDate = getNamedFormat(locale, "mediumDate");
25755      formatValue2 = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]);
25756      break;
25757    case "long":
25758      const longTime = getNamedFormat(locale, "longTime");
25759      const longDate = getNamedFormat(locale, "longDate");
25760      formatValue2 = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]);
25761      break;
25762    case "full":
25763      const fullTime = getNamedFormat(locale, "fullTime");
25764      const fullDate = getNamedFormat(locale, "fullDate");
25765      formatValue2 = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]);
25766      break;
25767  }
25768  if (formatValue2) {
25769    NAMED_FORMATS[localeId][format] = formatValue2;
25770  }
25771  return formatValue2;
25772}
25773function formatDateTime(str, opt_values) {
25774  if (opt_values) {
25775    str = str.replace(/\{([^}]+)}/g, function(match, key) {
25776      return opt_values != null && key in opt_values ? opt_values[key] : match;
25777    });
25778  }
25779  return str;
25780}
25781function padNumber(num, digits, minusSign = "-", trim, negWrap) {
25782  let neg = "";
25783  if (num < 0 || negWrap && num <= 0) {
25784    if (negWrap) {
25785      num = -num + 1;
25786    } else {
25787      num = -num;
25788      neg = minusSign;
25789    }
25790  }
25791  let strNum = String(num);
25792  while (strNum.length < digits) {
25793    strNum = "0" + strNum;
25794  }
25795  if (trim) {
25796    strNum = strNum.slice(strNum.length - digits);
25797  }
25798  return neg + strNum;
25799}
25800function formatFractionalSeconds(milliseconds, digits) {
25801  const strMs = padNumber(milliseconds, 3);
25802  return strMs.substring(0, digits);
25803}
25804function dateGetter(name, size, offset = 0, trim = false, negWrap = false) {
25805  return function(date, locale) {
25806    let part = getDatePart(name, date);
25807    if (offset > 0 || part > -offset) {
25808      part += offset;
25809    }
25810    if (name === 3) {
25811      if (part === 0 && offset === -12) {
25812        part = 12;
25813      }
25814    } else if (name === 6) {
25815      return formatFractionalSeconds(part, size);
25816    }
25817    const localeMinus = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);
25818    return padNumber(part, size, localeMinus, trim, negWrap);
25819  };
25820}
25821function getDatePart(part, date) {
25822  switch (part) {
25823    case 0:
25824      return date.getFullYear();
25825    case 1:
25826      return date.getMonth();
25827    case 2:
25828      return date.getDate();
25829    case 3:
25830      return date.getHours();
25831    case 4:
25832      return date.getMinutes();
25833    case 5:
25834      return date.getSeconds();
25835    case 6:
25836      return date.getMilliseconds();
25837    case 7:
25838      return date.getDay();
25839    default:
25840      throw new RuntimeError(2301, ngDevMode && `Unknown DateType value "${part}".`);
25841  }
25842}
25843function dateStrGetter(name, width, form = FormStyle.Format, extended = false) {
25844  return function(date, locale) {
25845    return getDateTranslation(date, locale, name, width, form, extended);
25846  };
25847}
25848function getDateTranslation(date, locale, name, width, form, extended) {
25849  switch (name) {
25850    case 2:
25851      return getLocaleMonthNames(locale, form, width)[date.getMonth()];
25852    case 1:
25853      return getLocaleDayNames(locale, form, width)[date.getDay()];
25854    case 0:
25855      const currentHours = date.getHours();
25856      const currentMinutes = date.getMinutes();
25857      if (extended) {
25858        const rules = getLocaleExtraDayPeriodRules(locale);
25859        const dayPeriods = getLocaleExtraDayPeriods(locale, form, width);
25860        const index = rules.findIndex((rule) => {
25861          if (Array.isArray(rule)) {
25862            const [from2, to] = rule;
25863            const afterFrom = currentHours >= from2.hours && currentMinutes >= from2.minutes;
25864            const beforeTo = currentHours < to.hours || currentHours === to.hours && currentMinutes < to.minutes;
25865            if (from2.hours < to.hours) {
25866              if (afterFrom && beforeTo) {
25867                return true;
25868              }
25869            } else if (afterFrom || beforeTo) {
25870              return true;
25871            }
25872          } else {
25873            if (rule.hours === currentHours && rule.minutes === currentMinutes) {
25874              return true;
25875            }
25876          }
25877          return false;
25878        });
25879        if (index !== -1) {
25880          return dayPeriods[index];
25881        }
25882      }
25883      return getLocaleDayPeriods(locale, form, width)[currentHours < 12 ? 0 : 1];
25884    case 3:
25885      return getLocaleEraNames(locale, width)[date.getFullYear() <= 0 ? 0 : 1];
25886    default:
25887      const unexpected = name;
25888      throw new RuntimeError(2302, ngDevMode && `unexpected translation type ${unexpected}`);
25889  }
25890}
25891function timeZoneGetter(width) {
25892  return function(date, locale, offset) {
25893    const zone = -1 * offset;
25894    const minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);
25895    const hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);
25896    switch (width) {
25897      case 0:
25898        return (zone >= 0 ? "+" : "") + padNumber(hours, 2, minusSign) + padNumber(Math.abs(zone % 60), 2, minusSign);
25899      case 1:
25900        return "GMT" + (zone >= 0 ? "+" : "") + padNumber(hours, 1, minusSign);
25901      case 2:
25902        return "GMT" + (zone >= 0 ? "+" : "") + padNumber(hours, 2, minusSign) + ":" + padNumber(Math.abs(zone % 60), 2, minusSign);
25903      case 3:
25904        if (offset === 0) {
25905          return "Z";
25906        } else {
25907          return (zone >= 0 ? "+" : "") + padNumber(hours, 2, minusSign) + ":" + padNumber(Math.abs(zone % 60), 2, minusSign);
25908        }
25909      default:
25910        throw new RuntimeError(2310, ngDevMode && `Unknown zone width "${width}"`);
25911    }
25912  };
25913}
25914function getFirstThursdayOfYear(year) {
25915  const firstDayOfYear = createDate(year, JANUARY, 1).getDay();
25916  return createDate(year, 0, 1 + (firstDayOfYear <= THURSDAY ? THURSDAY : THURSDAY + 7) - firstDayOfYear);
25917}
25918function getThursdayThisIsoWeek(datetime) {
25919  const currentDay = datetime.getDay();
25920  const deltaToThursday = currentDay === 0 ? -3 : THURSDAY - currentDay;
25921  return createDate(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + deltaToThursday);
25922}
25923function weekGetter(size, monthBased = false) {
25924  return function(date, locale) {
25925    let result;
25926    if (monthBased) {
25927      const nbDaysBefore1stDayOfMonth = new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1;
25928      const today = date.getDate();
25929      result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);
25930    } else {
25931      const thisThurs = getThursdayThisIsoWeek(date);
25932      const firstThurs = getFirstThursdayOfYear(thisThurs.getFullYear());
25933      const diff = thisThurs.getTime() - firstThurs.getTime();
25934      result = 1 + Math.round(diff / 6048e5);
25935    }
25936    return padNumber(result, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
25937  };
25938}
25939function weekNumberingYearGetter(size, trim = false) {
25940  return function(date, locale) {
25941    const thisThurs = getThursdayThisIsoWeek(date);
25942    const weekNumberingYear = thisThurs.getFullYear();
25943    return padNumber(weekNumberingYear, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign), trim);
25944  };
25945}
25946function getDateFormatter(format) {
25947  if (DATE_FORMATS[format]) {
25948    return DATE_FORMATS[format];
25949  }
25950  let formatter2;
25951  switch (format) {
25952    // Era name (AD/BC)
25953    case "G":
25954    case "GG":
25955    case "GGG":
25956      formatter2 = dateStrGetter(3, TranslationWidth.Abbreviated);
25957      break;
25958    case "GGGG":
25959      formatter2 = dateStrGetter(3, TranslationWidth.Wide);
25960      break;
25961    case "GGGGG":
25962      formatter2 = dateStrGetter(3, TranslationWidth.Narrow);
25963      break;
25964    // 1 digit representation of the year, e.g. (AD 1 => 1, AD 199 => 199)
25965    case "y":
25966      formatter2 = dateGetter(0, 1, 0, false, true);
25967      break;
25968    // 2 digit representation of the year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)
25969    case "yy":
25970      formatter2 = dateGetter(0, 2, 0, true, true);
25971      break;
25972    // 3 digit representation of the year, padded (000-999). (e.g. AD 2001 => 01, AD 2010 => 10)
25973    case "yyy":
25974      formatter2 = dateGetter(0, 3, 0, false, true);
25975      break;
25976    // 4 digit representation of the year (e.g. AD 1 => 0001, AD 2010 => 2010)
25977    case "yyyy":
25978      formatter2 = dateGetter(0, 4, 0, false, true);
25979      break;
25980    // 1 digit representation of the week-numbering year, e.g. (AD 1 => 1, AD 199 => 199)
25981    case "Y":
25982      formatter2 = weekNumberingYearGetter(1);
25983      break;
25984    // 2 digit representation of the week-numbering year, padded (00-99). (e.g. AD 2001 => 01, AD
25985    // 2010 => 10)
25986    case "YY":
25987      formatter2 = weekNumberingYearGetter(2, true);
25988      break;
25989    // 3 digit representation of the week-numbering year, padded (000-999). (e.g. AD 1 => 001, AD
25990    // 2010 => 2010)
25991    case "YYY":
25992      formatter2 = weekNumberingYearGetter(3);
25993      break;
25994    // 4 digit representation of the week-numbering year (e.g. AD 1 => 0001, AD 2010 => 2010)
25995    case "YYYY":
25996      formatter2 = weekNumberingYearGetter(4);
25997      break;
25998    // Month of the year (1-12), numeric
25999    case "M":
26000    case "L":
26001      formatter2 = dateGetter(1, 1, 1);
26002      break;
26003    case "MM":
26004    case "LL":
26005      formatter2 = dateGetter(1, 2, 1);
26006      break;
26007    // Month of the year (January, ...), string, format
26008    case "MMM":
26009      formatter2 = dateStrGetter(2, TranslationWidth.Abbreviated);
26010      break;
26011    case "MMMM":
26012      formatter2 = dateStrGetter(2, TranslationWidth.Wide);
26013      break;
26014    case "MMMMM":
26015      formatter2 = dateStrGetter(2, TranslationWidth.Narrow);
26016      break;
26017    // Month of the year (January, ...), string, standalone
26018    case "LLL":
26019      formatter2 = dateStrGetter(2, TranslationWidth.Abbreviated, FormStyle.Standalone);
26020      break;
26021    case "LLLL":
26022      formatter2 = dateStrGetter(2, TranslationWidth.Wide, FormStyle.Standalone);
26023      break;
26024    case "LLLLL":
26025      formatter2 = dateStrGetter(2, TranslationWidth.Narrow, FormStyle.Standalone);
26026      break;
26027    // Week of the year (1, ... 52)
26028    case "w":
26029      formatter2 = weekGetter(1);
26030      break;
26031    case "ww":
26032      formatter2 = weekGetter(2);
26033      break;
26034    // Week of the month (1, ...)
26035    case "W":
26036      formatter2 = weekGetter(1, true);
26037      break;
26038    // Day of the month (1-31)
26039    case "d":
26040      formatter2 = dateGetter(2, 1);
26041      break;
26042    case "dd":
26043      formatter2 = dateGetter(2, 2);
26044      break;
26045    // Day of the Week StandAlone (1, 1, Mon, Monday, M, Mo)
26046    case "c":
26047    case "cc":
26048      formatter2 = dateGetter(7, 1);
26049      break;
26050    case "ccc":
26051      formatter2 = dateStrGetter(1, TranslationWidth.Abbreviated, FormStyle.Standalone);
26052      break;
26053    case "cccc":
26054      formatter2 = dateStrGetter(1, TranslationWidth.Wide, FormStyle.Standalone);
26055      break;
26056    case "ccccc":
26057      formatter2 = dateStrGetter(1, TranslationWidth.Narrow, FormStyle.Standalone);
26058      break;
26059    case "cccccc":
26060      formatter2 = dateStrGetter(1, TranslationWidth.Short, FormStyle.Standalone);
26061      break;
26062    // Day of the Week
26063    case "E":
26064    case "EE":
26065    case "EEE":
26066      formatter2 = dateStrGetter(1, TranslationWidth.Abbreviated);
26067      break;
26068    case "EEEE":
26069      formatter2 = dateStrGetter(1, TranslationWidth.Wide);
26070      break;
26071    case "EEEEE":
26072      formatter2 = dateStrGetter(1, TranslationWidth.Narrow);
26073      break;
26074    case "EEEEEE":
26075      formatter2 = dateStrGetter(1, TranslationWidth.Short);
26076      break;
26077    // Generic period of the day (am-pm)
26078    case "a":
26079    case "aa":
26080    case "aaa":
26081      formatter2 = dateStrGetter(0, TranslationWidth.Abbreviated);
26082      break;
26083    case "aaaa":
26084      formatter2 = dateStrGetter(0, TranslationWidth.Wide);
26085      break;
26086    case "aaaaa":
26087      formatter2 = dateStrGetter(0, TranslationWidth.Narrow);
26088      break;
26089    // Extended period of the day (midnight, at night, ...), standalone
26090    case "b":
26091    case "bb":
26092    case "bbb":
26093      formatter2 = dateStrGetter(0, TranslationWidth.Abbreviated, FormStyle.Standalone, true);
26094      break;
26095    case "bbbb":
26096      formatter2 = dateStrGetter(0, TranslationWidth.Wide, FormStyle.Standalone, true);
26097      break;
26098    case "bbbbb":
26099      formatter2 = dateStrGetter(0, TranslationWidth.Narrow, FormStyle.Standalone, true);
26100      break;
26101    // Extended period of the day (midnight, night, ...), standalone
26102    case "B":
26103    case "BB":
26104    case "BBB":
26105      formatter2 = dateStrGetter(0, TranslationWidth.Abbreviated, FormStyle.Format, true);
26106      break;
26107    case "BBBB":
26108      formatter2 = dateStrGetter(0, TranslationWidth.Wide, FormStyle.Format, true);
26109      break;
26110    case "BBBBB":
26111      formatter2 = dateStrGetter(0, TranslationWidth.Narrow, FormStyle.Format, true);
26112      break;
26113    // Hour in AM/PM, (1-12)
26114    case "h":
26115      formatter2 = dateGetter(3, 1, -12);
26116      break;
26117    case "hh":
26118      formatter2 = dateGetter(3, 2, -12);
26119      break;
26120    // Hour of the day (0-23)
26121    case "H":
26122      formatter2 = dateGetter(3, 1);
26123      break;
26124    // Hour in day, padded (00-23)
26125    case "HH":
26126      formatter2 = dateGetter(3, 2);
26127      break;
26128    // Minute of the hour (0-59)
26129    case "m":
26130      formatter2 = dateGetter(4, 1);
26131      break;
26132    case "mm":
26133      formatter2 = dateGetter(4, 2);
26134      break;
26135    // Second of the minute (0-59)
26136    case "s":
26137      formatter2 = dateGetter(5, 1);
26138      break;
26139    case "ss":
26140      formatter2 = dateGetter(5, 2);
26141      break;
26142    // Fractional second
26143    case "S":
26144      formatter2 = dateGetter(6, 1);
26145      break;
26146    case "SS":
26147      formatter2 = dateGetter(6, 2);
26148      break;
26149    case "SSS":
26150      formatter2 = dateGetter(6, 3);
26151      break;
26152    // Timezone ISO8601 short format (-0430)
26153    case "Z":
26154    case "ZZ":
26155    case "ZZZ":
26156      formatter2 = timeZoneGetter(
26157        0
26158        /* ZoneWidth.Short */
26159      );
26160      break;
26161    // Timezone ISO8601 extended format (-04:30)
26162    case "ZZZZZ":
26163      formatter2 = timeZoneGetter(
26164        3
26165        /* ZoneWidth.Extended */
26166      );
26167      break;
26168    // Timezone GMT short format (GMT+4)
26169    case "O":
26170    case "OO":
26171    case "OOO":
26172    // Should be location, but fallback to format O instead because we don't have the data yet
26173    case "z":
26174    case "zz":
26175    case "zzz":
26176      formatter2 = timeZoneGetter(
26177        1
26178        /* ZoneWidth.ShortGMT */
26179      );
26180      break;
26181    // Timezone GMT long format (GMT+0430)
26182    case "OOOO":
26183    case "ZZZZ":
26184    // Should be location, but fallback to format O instead because we don't have the data yet
26185    case "zzzz":
26186      formatter2 = timeZoneGetter(
26187        2
26188        /* ZoneWidth.Long */
26189      );
26190      break;
26191    default:
26192      return null;
26193  }
26194  DATE_FORMATS[format] = formatter2;
26195  return formatter2;
26196}
26197function timezoneToOffset(timezone, fallback) {
26198  timezone = timezone.replace(/:/g, "");
26199  const requestedTimezoneOffset = Date.parse("Jan 01, 1970 00:00:00 " + timezone) / 6e4;
26200  return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;
26201}
26202function addDateMinutes(date, minutes) {
26203  date = new Date(date.getTime());
26204  date.setMinutes(date.getMinutes() + minutes);
26205  return date;
26206}
26207function convertTimezoneToLocal(date, timezone, reverse) {
26208  const reverseValue = -1;
26209  const dateTimezoneOffset = date.getTimezoneOffset();
26210  const timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
26211  return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset));
26212}
26213function toDate(value) {
26214  if (isDate(value)) {
26215    return value;
26216  }
26217  if (typeof value === "number" && !isNaN(value)) {
26218    return new Date(value);
26219  }
26220  if (typeof value === "string") {
26221    value = value.trim();
26222    if (/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(value)) {
26223      const [y, m = 1, d = 1] = value.split("-").map((val) => +val);
26224      return createDate(y, m - 1, d);
26225    }
26226    const parsedNb = parseFloat(value);
26227    if (!isNaN(value - parsedNb)) {
26228      return new Date(parsedNb);
26229    }
26230    let match;
26231    if (match = value.match(ISO8601_DATE_REGEX)) {
26232      return isoStringToDate(match);
26233    }
26234  }
26235  const date = new Date(value);
26236  if (!isDate(date)) {
26237    throw new RuntimeError(2311, ngDevMode && `Unable to convert "${value}" into a date`);
26238  }
26239  return date;
26240}
26241function isoStringToDate(match) {
26242  const date = /* @__PURE__ */ new Date(0);
26243  let tzHour = 0;
26244  let tzMin = 0;
26245  const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;
26246  const timeSetter = match[8] ? date.setUTCHours : date.setHours;
26247  if (match[9]) {
26248    tzHour = Number(match[9] + match[10]);
26249    tzMin = Number(match[9] + match[11]);
26250  }
26251  dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));
26252  const h = Number(match[4] || 0) - tzHour;
26253  const m = Number(match[5] || 0) - tzMin;
26254  const s = Number(match[6] || 0);
26255  const ms = Math.floor(parseFloat("0." + (match[7] || 0)) * 1e3);
26256  timeSetter.call(date, h, m, s, ms);
26257  return date;
26258}
26259function isDate(value) {
26260  return value instanceof Date && !isNaN(value.valueOf());
26261}
26262function formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimalSymbol, digitsInfo, isPercent = false) {
26263  let formattedText = "";
26264  let isZero = false;
26265  if (!isFinite(value)) {
26266    formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity);
26267  } else {
26268    let parsedNumber = parseNumber(value);
26269    if (isPercent) {
26270      parsedNumber = toPercent(parsedNumber);
26271    }
26272    let minInt = pattern.minInt;
26273    let minFraction = pattern.minFrac;
26274    let maxFraction = pattern.maxFrac;
26275    if (digitsInfo) {
26276      const parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);
26277      if (parts === null) {
26278        throw new RuntimeError(2306, ngDevMode && `${digitsInfo} is not a valid digit info`);
26279      }
26280      const minIntPart = parts[1];
26281      const minFractionPart = parts[3];
26282      const maxFractionPart = parts[5];
26283      if (minIntPart != null) {
26284        minInt = parseIntAutoRadix(minIntPart);
26285      }
26286      if (minFractionPart != null) {
26287        minFraction = parseIntAutoRadix(minFractionPart);
26288      }
26289      if (maxFractionPart != null) {
26290        maxFraction = parseIntAutoRadix(maxFractionPart);
26291      } else if (minFractionPart != null && minFraction > maxFraction) {
26292        maxFraction = minFraction;
26293      }
26294    }
26295    roundNumber(parsedNumber, minFraction, maxFraction);
26296    let digits = parsedNumber.digits;
26297    let integerLen = parsedNumber.integerLen;
26298    const exponent = parsedNumber.exponent;
26299    let decimals = [];
26300    isZero = digits.every((d) => !d);
26301    for (; integerLen < minInt; integerLen++) {
26302      digits.unshift(0);
26303    }
26304    for (; integerLen < 0; integerLen++) {
26305      digits.unshift(0);
26306    }
26307    if (integerLen > 0) {
26308      decimals = digits.splice(integerLen, digits.length);
26309    } else {
26310      decimals = digits;
26311      digits = [0];
26312    }
26313    const groups = [];
26314    if (digits.length >= pattern.lgSize) {
26315      groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(""));
26316    }
26317    while (digits.length > pattern.gSize) {
26318      groups.unshift(digits.splice(-pattern.gSize, digits.length).join(""));
26319    }
26320    if (digits.length) {
26321      groups.unshift(digits.join(""));
26322    }
26323    formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol));
26324    if (decimals.length) {
26325      formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join("");
26326    }
26327    if (exponent) {
26328      formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + "+" + exponent;
26329    }
26330  }
26331  if (value < 0 && !isZero) {
26332    formattedText = pattern.negPre + formattedText + pattern.negSuf;
26333  } else {
26334    formattedText = pattern.posPre + formattedText + pattern.posSuf;
26335  }
26336  return formattedText;
26337}
26338function formatCurrency(value, locale, currency, currencyCode, digitsInfo) {
26339  const format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency);
26340  const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
26341  pattern.minFrac = getNumberOfCurrencyDigits(currencyCode);
26342  pattern.maxFrac = pattern.minFrac;
26343  const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo);
26344  return res.replace(CURRENCY_CHAR, currency).replace(CURRENCY_CHAR, "").trim();
26345}
26346function formatPercent(value, locale, digitsInfo) {
26347  const format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);
26348  const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
26349  const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo, true);
26350  return res.replace(new RegExp(PERCENT_CHAR, "g"), getLocaleNumberSymbol(locale, NumberSymbol.PercentSign));
26351}
26352function formatNumber(value, locale, digitsInfo) {
26353  const format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);
26354  const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
26355  return formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo);
26356}
26357function parseNumberFormat(format, minusSign = "-") {
26358  const p = {
26359    minInt: 1,
26360    minFrac: 0,
26361    maxFrac: 0,
26362    posPre: "",
26363    posSuf: "",
26364    negPre: "",
26365    negSuf: "",
26366    gSize: 0,
26367    lgSize: 0
26368  };
26369  const patternParts = format.split(PATTERN_SEP);
26370  const positive = patternParts[0];
26371  const negative = patternParts[1];
26372  const positiveParts = positive.indexOf(DECIMAL_SEP) !== -1 ? positive.split(DECIMAL_SEP) : [positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1), positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1)], integer = positiveParts[0], fraction = positiveParts[1] || "";
26373  p.posPre = integer.substring(0, integer.indexOf(DIGIT_CHAR));
26374  for (let i = 0; i < fraction.length; i++) {
26375    const ch = fraction.charAt(i);
26376    if (ch === ZERO_CHAR) {
26377      p.minFrac = p.maxFrac = i + 1;
26378    } else if (ch === DIGIT_CHAR) {
26379      p.maxFrac = i + 1;
26380    } else {
26381      p.posSuf += ch;
26382    }
26383  }
26384  const groups = integer.split(GROUP_SEP);
26385  p.gSize = groups[1] ? groups[1].length : 0;
26386  p.lgSize = groups[2] || groups[1] ? (groups[2] || groups[1]).length : 0;
26387  if (negative) {
26388    const trunkLen = positive.length - p.posPre.length - p.posSuf.length, pos = negative.indexOf(DIGIT_CHAR);
26389    p.negPre = negative.substring(0, pos).replace(/'/g, "");
26390    p.negSuf = negative.slice(pos + trunkLen).replace(/'/g, "");
26391  } else {
26392    p.negPre = minusSign + p.posPre;
26393    p.negSuf = p.posSuf;
26394  }
26395  return p;
26396}
26397function toPercent(parsedNumber) {
26398  if (parsedNumber.digits[0] === 0) {
26399    return parsedNumber;
26400  }
26401  const fractionLen = parsedNumber.digits.length - parsedNumber.integerLen;
26402  if (parsedNumber.exponent) {
26403    parsedNumber.exponent += 2;
26404  } else {
26405    if (fractionLen === 0) {
26406      parsedNumber.digits.push(0, 0);
26407    } else if (fractionLen === 1) {
26408      parsedNumber.digits.push(0);
26409    }
26410    parsedNumber.integerLen += 2;
26411  }
26412  return parsedNumber;
26413}
26414function parseNumber(num) {
26415  let numStr = Math.abs(num) + "";
26416  let exponent = 0, digits, integerLen;
26417  let i, j, zeros;
26418  if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) {
26419    numStr = numStr.replace(DECIMAL_SEP, "");
26420  }
26421  if ((i = numStr.search(/e/i)) > 0) {
26422    if (integerLen < 0) integerLen = i;
26423    integerLen += +numStr.slice(i + 1);
26424    numStr = numStr.substring(0, i);
26425  } else if (integerLen < 0) {
26426    integerLen = numStr.length;
26427  }
26428  for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) {
26429  }
26430  if (i === (zeros = numStr.length)) {
26431    digits = [0];
26432    integerLen = 1;
26433  } else {
26434    zeros--;
26435    while (numStr.charAt(zeros) === ZERO_CHAR) zeros--;
26436    integerLen -= i;
26437    digits = [];
26438    for (j = 0; i <= zeros; i++, j++) {
26439      digits[j] = Number(numStr.charAt(i));
26440    }
26441  }
26442  if (integerLen > MAX_DIGITS) {
26443    digits = digits.splice(0, MAX_DIGITS - 1);
26444    exponent = integerLen - 1;
26445    integerLen = 1;
26446  }
26447  return {
26448    digits,
26449    exponent,
26450    integerLen
26451  };
26452}
26453function roundNumber(parsedNumber, minFrac, maxFrac) {
26454  if (minFrac > maxFrac) {
26455    throw new RuntimeError(2307, ngDevMode && `The minimum number of digits after fraction (${minFrac}) is higher than the maximum (${maxFrac}).`);
26456  }
26457  let digits = parsedNumber.digits;
26458  let fractionLen = digits.length - parsedNumber.integerLen;
26459  const fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac);
26460  let roundAt = fractionSize + parsedNumber.integerLen;
26461  let digit = digits[roundAt];
26462  if (roundAt > 0) {
26463    digits.splice(Math.max(parsedNumber.integerLen, roundAt));
26464    for (let j = roundAt; j < digits.length; j++) {
26465      digits[j] = 0;
26466    }
26467  } else {
26468    fractionLen = Math.max(0, fractionLen);
26469    parsedNumber.integerLen = 1;
26470    digits.length = Math.max(1, roundAt = fractionSize + 1);
26471    digits[0] = 0;
26472    for (let i = 1; i < roundAt; i++) digits[i] = 0;
26473  }
26474  if (digit >= 5) {
26475    if (roundAt - 1 < 0) {
26476      for (let k = 0; k > roundAt; k--) {
26477        digits.unshift(0);
26478        parsedNumber.integerLen++;
26479      }
26480      digits.unshift(1);
26481      parsedNumber.integerLen++;
26482    } else {
26483      digits[roundAt - 1]++;
26484    }
26485  }
26486  for (; fractionLen < Math.max(0, fractionSize); fractionLen++) digits.push(0);
26487  let dropTrailingZeros = fractionSize !== 0;
26488  const minLen = minFrac + parsedNumber.integerLen;
26489  const carry = digits.reduceRight(function(carry2, d, i, digits2) {
26490    d = d + carry2;
26491    digits2[i] = d < 10 ? d : d - 10;
26492    if (dropTrailingZeros) {
26493      if (digits2[i] === 0 && i >= minLen) {
26494        digits2.pop();
26495      } else {
26496        dropTrailingZeros = false;
26497      }
26498    }
26499    return d >= 10 ? 1 : 0;
26500  }, 0);
26501  if (carry) {
26502    digits.unshift(carry);
26503    parsedNumber.integerLen++;
26504  }
26505}
26506function parseIntAutoRadix(text) {
26507  const result = parseInt(text);
26508  if (isNaN(result)) {
26509    throw new RuntimeError(2305, ngDevMode && "Invalid integer literal when parsing " + text);
26510  }
26511  return result;
26512}
26513function getPluralCategory(value, cases, ngLocalization, locale) {
26514  let key = `=${value}`;
26515  if (cases.indexOf(key) > -1) {
26516    return key;
26517  }
26518  key = ngLocalization.getPluralCategory(value, locale);
26519  if (cases.indexOf(key) > -1) {
26520    return key;
26521  }
26522  if (cases.indexOf("other") > -1) {
26523    return "other";
26524  }
26525  throw new RuntimeError(2308, ngDevMode && `No plural message found for value "${value}"`);
26526}
26527function getParentInjector(injector) {
26528  const parentNgModule = injector.get(NgModuleRef$1);
26529  return parentNgModule.injector;
26530}
26531function applyViewChange(view, record) {
26532  view.context.$implicit = record.item;
26533}
26534function getTypeName(type) {
26535  return type["name"] || typeof type;
26536}
26537function assertTemplate(templateRef, property) {
26538  if (templateRef && !templateRef.createEmbeddedView) {
26539    throw new RuntimeError(2020, (typeof ngDevMode === "undefined" || ngDevMode) && `${property} must be a TemplateRef, but received '${stringify(templateRef)}'.`);
26540  }
26541}
26542function throwNgSwitchProviderNotFoundError(attrName, directiveName) {
26543  throw new RuntimeError(2e3, `An element with the "${attrName}" attribute (matching the "${directiveName}" directive) must be located inside an element with the "ngSwitch" attribute (matching "NgSwitch" directive)`);
26544}
26545function invalidPipeArgumentError(type, value) {
26546  return new RuntimeError(2100, ngDevMode && `InvalidPipeArgument: '${value}' for pipe '${stringify(type)}'`);
26547}
26548function makeKeyValuePair(key, value) {
26549  return {
26550    key,
26551    value
26552  };
26553}
26554function defaultComparator(keyValueA, keyValueB) {
26555  const a = keyValueA.key;
26556  const b = keyValueB.key;
26557  if (a === b) return 0;
26558  if (a == null) return 1;
26559  if (b == null) return -1;
26560  if (typeof a == "string" && typeof b == "string") {
26561    return a < b ? -1 : 1;
26562  }
26563  if (typeof a == "number" && typeof b == "number") {
26564    return a - b;
26565  }
26566  if (typeof a == "boolean" && typeof b == "boolean") {
26567    return a < b ? -1 : 1;
26568  }
26569  const aString = String(a);
26570  const bString = String(b);
26571  return aString == bString ? 0 : aString < bString ? -1 : 1;
26572}
26573function isValue(value) {
26574  return !(value == null || value === "" || value !== value);
26575}
26576function strToNumber(value) {
26577  if (typeof value === "string" && !isNaN(Number(value) - parseFloat(value))) {
26578    return Number(value);
26579  }
26580  if (typeof value !== "number") {
26581    throw new RuntimeError(2309, ngDevMode && `${value} is not a number`);
26582  }
26583  return value;
26584}
26585var HashLocationStrategy, CURRENCIES_EN, NumberFormatStyle, Plural, FormStyle, TranslationWidth, FormatWidth, NumberSymbol, WeekDay, getLocalePluralCase2, DEFAULT_NB_OF_CURRENCY_DIGITS, ISO8601_DATE_REGEX, NAMED_FORMATS, DATE_FORMATS_SPLIT, JANUARY, THURSDAY, DATE_FORMATS, NUMBER_FORMAT_REGEXP, MAX_DIGITS, DECIMAL_SEP, ZERO_CHAR, PATTERN_SEP, GROUP_SEP, DIGIT_CHAR, CURRENCY_CHAR, PERCENT_CHAR, NgLocalization, NgLocaleLocalization, WS_REGEXP, EMPTY_ARRAY2, NgClass, NgComponentOutlet, NgForOfContext, NgForOf, NgIf, NgIfContext, SwitchView, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, NgStyle, NgTemplateOutlet, COMMON_DIRECTIVES, SubscribableStrategy, PromiseStrategy, _promiseStrategy, _subscribableStrategy, AsyncPipe, LowerCasePipe, unicodeWordMatch, TitleCasePipe, UpperCasePipe, DEFAULT_DATE_FORMAT, DATE_PIPE_DEFAULT_TIMEZONE, DATE_PIPE_DEFAULT_OPTIONS, DatePipe, _INTERPOLATION_REGEXP, I18nPluralPipe, I18nSelectPipe, JsonPipe, KeyValuePipe, DecimalPipe, PercentPipe, CurrencyPipe, SlicePipe, COMMON_PIPES, CommonModule;
26586var init_common_module = __esm({
26587  "node_modules/@angular/common/fesm2022/common_module.mjs"() {
26588    "use strict";
26589    init_core();
26590    init_core();
26591    init_location();
26592    HashLocationStrategy = class _HashLocationStrategy extends LocationStrategy {
26593      _platformLocation;
26594      _baseHref = "";
26595      _removeListenerFns = [];
26596      constructor(_platformLocation, _baseHref) {
26597        super();
26598        this._platformLocation = _platformLocation;
26599        if (_baseHref != null) {
26600          this._baseHref = _baseHref;
26601        }
26602      }
26603      /** @docs-private */
26604      ngOnDestroy() {
26605        while (this._removeListenerFns.length) {
26606          this._removeListenerFns.pop()();
26607        }
26608      }
26609      onPopState(fn) {
26610        this._removeListenerFns.push(this._platformLocation.onPopState(fn), this._platformLocation.onHashChange(fn));
26611      }
26612      getBaseHref() {
26613        return this._baseHref;
26614      }
26615      path(includeHash = false) {
26616        const path = this._platformLocation.hash ?? "#";
26617        return path.length > 0 ? path.substring(1) : path;
26618      }
26619      prepareExternalUrl(internal) {
26620        const url = joinWithSlash(this._baseHref, internal);
26621        return url.length > 0 ? "#" + url : url;
26622      }
26623      pushState(state, title, path, queryParams) {
26624        const url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams)) || this._platformLocation.pathname;
26625        this._platformLocation.pushState(state, title, url);
26626      }
26627      replaceState(state, title, path, queryParams) {
26628        const url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams)) || this._platformLocation.pathname;
26629        this._platformLocation.replaceState(state, title, url);
26630      }
26631      forward() {
26632        this._platformLocation.forward();
26633      }
26634      back() {
26635        this._platformLocation.back();
26636      }
26637      getState() {
26638        return this._platformLocation.getState();
26639      }
26640      historyGo(relativePosition = 0) {
26641        this._platformLocation.historyGo?.(relativePosition);
26642      }
26643      static \u0275fac = function HashLocationStrategy_Factory(__ngFactoryType__) {
26644        return new (__ngFactoryType__ || _HashLocationStrategy)(\u0275\u0275inject(PlatformLocation), \u0275\u0275inject(APP_BASE_HREF, 8));
26645      };
26646      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
26647        token: _HashLocationStrategy,
26648        factory: _HashLocationStrategy.\u0275fac
26649      });
26650    };
26651    (() => {
26652      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(HashLocationStrategy, [{
26653        type: Injectable
26654      }], () => [{
26655        type: PlatformLocation
26656      }, {
26657        type: void 0,
26658        decorators: [{
26659          type: Optional
26660        }, {
26661          type: Inject,
26662          args: [APP_BASE_HREF]
26663        }]
26664      }], null);
26665    })();
26666    CURRENCIES_EN = {
26667      "ADP": [void 0, void 0, 0],
26668      "AFN": [void 0, "\u060B", 0],
26669      "ALL": [void 0, void 0, 0],
26670      "AMD": [void 0, "\u058F", 2],
26671      "AOA": [void 0, "Kz"],
26672      "ARS": [void 0, "$"],
26673      "AUD": ["A$", "$"],
26674      "AZN": [void 0, "\u20BC"],
26675      "BAM": [void 0, "KM"],
26676      "BBD": [void 0, "$"],
26677      "BDT": [void 0, "\u09F3"],
26678      "BHD": [void 0, void 0, 3],
26679      "BIF": [void 0, void 0, 0],
26680      "BMD": [void 0, "$"],
26681      "BND": [void 0, "$"],
26682      "BOB": [void 0, "Bs"],
26683      "BRL": ["R$"],
26684      "BSD": [void 0, "$"],
26685      "BWP": [void 0, "P"],
26686      "BYN": [void 0, void 0, 2],
26687      "BYR": [void 0, void 0, 0],
26688      "BZD": [void 0, "$"],
26689      "CAD": ["CA$", "$", 2],
26690      "CHF": [void 0, void 0, 2],
26691      "CLF": [void 0, void 0, 4],
26692      "CLP": [void 0, "$", 0],
26693      "CNY": ["CN\xA5", "\xA5"],
26694      "COP": [void 0, "$", 2],
26695      "CRC": [void 0, "\u20A1", 2],
26696      "CUC": [void 0, "$"],
26697      "CUP": [void 0, "$"],
26698      "CZK": [void 0, "K\u010D", 2],
26699      "DJF": [void 0, void 0, 0],
26700      "DKK": [void 0, "kr", 2],
26701      "DOP": [void 0, "$"],
26702      "EGP": [void 0, "E\xA3"],
26703      "ESP": [void 0, "\u20A7", 0],
26704      "EUR": ["\u20AC"],
26705      "FJD": [void 0, "$"],
26706      "FKP": [void 0, "\xA3"],
26707      "GBP": ["\xA3"],
26708      "GEL": [void 0, "\u20BE"],
26709      "GHS": [void 0, "GH\u20B5"],
26710      "GIP": [void 0, "\xA3"],
26711      "GNF": [void 0, "FG", 0],
26712      "GTQ": [void 0, "Q"],
26713      "GYD": [void 0, "$", 2],
26714      "HKD": ["HK$", "$"],
26715      "HNL": [void 0, "L"],
26716      "HRK": [void 0, "kn"],
26717      "HUF": [void 0, "Ft", 2],
26718      "IDR": [void 0, "Rp", 2],
26719      "ILS": ["\u20AA"],
26720      "INR": ["\u20B9"],
26721      "IQD": [void 0, void 0, 0],
26722      "IRR": [void 0, void 0, 0],
26723      "ISK": [void 0, "kr", 0],
26724      "ITL": [void 0, void 0, 0],
26725      "JMD": [void 0, "$"],
26726      "JOD": [void 0, void 0, 3],
26727      "JPY": ["\xA5", void 0, 0],
26728      "KHR": [void 0, "\u17DB"],
26729      "KMF": [void 0, "CF", 0],
26730      "KPW": [void 0, "\u20A9", 0],
26731      "KRW": ["\u20A9", void 0, 0],
26732      "KWD": [void 0, void 0, 3],
26733      "KYD": [void 0, "$"],
26734      "KZT": [void 0, "\u20B8"],
26735      "LAK": [void 0, "\u20AD", 0],
26736      "LBP": [void 0, "L\xA3", 0],
26737      "LKR": [void 0, "Rs"],
26738      "LRD": [void 0, "$"],
26739      "LTL": [void 0, "Lt"],
26740      "LUF": [void 0, void 0, 0],
26741      "LVL": [void 0, "Ls"],
26742      "LYD": [void 0, void 0, 3],
26743      "MGA": [void 0, "Ar", 0],
26744      "MGF": [void 0, void 0, 0],
26745      "MMK": [void 0, "K", 0],
26746      "MNT": [void 0, "\u20AE", 2],
26747      "MRO": [void 0, void 0, 0],
26748      "MUR": [void 0, "Rs", 2],
26749      "MXN": ["MX$", "$"],
26750      "MYR": [void 0, "RM"],
26751      "NAD": [void 0, "$"],
26752      "NGN": [void 0, "\u20A6"],
26753      "NIO": [void 0, "C$"],
26754      "NOK": [void 0, "kr", 2],
26755      "NPR": [void 0, "Rs"],
26756      "NZD": ["NZ$", "$"],
26757      "OMR": [void 0, void 0, 3],
26758      "PHP": ["\u20B1"],
26759      "PKR": [void 0, "Rs", 2],
26760      "PLN": [void 0, "z\u0142"],
26761      "PYG": [void 0, "\u20B2", 0],
26762      "RON": [void 0, "lei"],
26763      "RSD": [void 0, void 0, 0],
26764      "RUB": [void 0, "\u20BD"],
26765      "RWF": [void 0, "RF", 0],
26766      "SBD": [void 0, "$"],
26767      "SEK": [void 0, "kr", 2],
26768      "SGD": [void 0, "$"],
26769      "SHP": [void 0, "\xA3"],
26770      "SLE": [void 0, void 0, 2],
26771      "SLL": [void 0, void 0, 0],
26772      "SOS": [void 0, void 0, 0],
26773      "SRD": [void 0, "$"],
26774      "SSP": [void 0, "\xA3"],
26775      "STD": [void 0, void 0, 0],
26776      "STN": [void 0, "Db"],
26777      "SYP": [void 0, "\xA3", 0],
26778      "THB": [void 0, "\u0E3F"],
26779      "TMM": [void 0, void 0, 0],
26780      "TND": [void 0, void 0, 3],
26781      "TOP": [void 0, "T$"],
26782      "TRL": [void 0, void 0, 0],
26783      "TRY": [void 0, "\u20BA"],
26784      "TTD": [void 0, "$"],
26785      "TWD": ["NT$", "$", 2],
26786      "TZS": [void 0, void 0, 2],
26787      "UAH": [void 0, "\u20B4"],
26788      "UGX": [void 0, void 0, 0],
26789      "USD": ["$"],
26790      "UYI": [void 0, void 0, 0],
26791      "UYU": [void 0, "$"],
26792      "UYW": [void 0, void 0, 4],
26793      "UZS": [void 0, void 0, 2],
26794      "VEF": [void 0, "Bs", 2],
26795      "VND": ["\u20AB", void 0, 0],
26796      "VUV": [void 0, void 0, 0],
26797      "XAF": ["FCFA", void 0, 0],
26798      "XCD": ["EC$", "$"],
26799      "XOF": ["F\u202FCFA", void 0, 0],
26800      "XPF": ["CFPF", void 0, 0],
26801      "XXX": ["\xA4"],
26802      "YER": [void 0, void 0, 0],
26803      "ZAR": [void 0, "R"],
26804      "ZMK": [void 0, void 0, 0],
26805      "ZMW": [void 0, "ZK"],
26806      "ZWD": [void 0, void 0, 0]
26807    };
26808    (function(NumberFormatStyle2) {
26809      NumberFormatStyle2[NumberFormatStyle2["Decimal"] = 0] = "Decimal";
26810      NumberFormatStyle2[NumberFormatStyle2["Percent"] = 1] = "Percent";
26811      NumberFormatStyle2[NumberFormatStyle2["Currency"] = 2] = "Currency";
26812      NumberFormatStyle2[NumberFormatStyle2["Scientific"] = 3] = "Scientific";
26813    })(NumberFormatStyle || (NumberFormatStyle = {}));
26814    (function(Plural2) {
26815      Plural2[Plural2["Zero"] = 0] = "Zero";
26816      Plural2[Plural2["One"] = 1] = "One";
26817      Plural2[Plural2["Two"] = 2] = "Two";
26818      Plural2[Plural2["Few"] = 3] = "Few";
26819      Plural2[Plural2["Many"] = 4] = "Many";
26820      Plural2[Plural2["Other"] = 5] = "Other";
26821    })(Plural || (Plural = {}));
26822    (function(FormStyle2) {
26823      FormStyle2[FormStyle2["Format"] = 0] = "Format";
26824      FormStyle2[FormStyle2["Standalone"] = 1] = "Standalone";
26825    })(FormStyle || (FormStyle = {}));
26826    (function(TranslationWidth2) {
26827      TranslationWidth2[TranslationWidth2["Narrow"] = 0] = "Narrow";
26828      TranslationWidth2[TranslationWidth2["Abbreviated"] = 1] = "Abbreviated";
26829      TranslationWidth2[TranslationWidth2["Wide"] = 2] = "Wide";
26830      TranslationWidth2[TranslationWidth2["Short"] = 3] = "Short";
26831    })(TranslationWidth || (TranslationWidth = {}));
26832    (function(FormatWidth2) {
26833      FormatWidth2[FormatWidth2["Short"] = 0] = "Short";
26834      FormatWidth2[FormatWidth2["Medium"] = 1] = "Medium";
26835      FormatWidth2[FormatWidth2["Long"] = 2] = "Long";
26836      FormatWidth2[FormatWidth2["Full"] = 3] = "Full";
26837    })(FormatWidth || (FormatWidth = {}));
26838    NumberSymbol = {
26839      /**
26840       * Decimal separator.
26841       * For `en-US`, the dot character.
26842       * Example: 2,345`.`67
26843       */
26844      Decimal: 0,
26845      /**
26846       * Grouping separator, typically for thousands.
26847       * For `en-US`, the comma character.
26848       * Example: 2`,`345.67
26849       */
26850      Group: 1,
26851      /**
26852       * List-item separator.
26853       * Example: "one, two, and three"
26854       */
26855      List: 2,
26856      /**
26857       * Sign for percentage (out of 100).
26858       * Example: 23.4%
26859       */
26860      PercentSign: 3,
26861      /**
26862       * Sign for positive numbers.
26863       * Example: +23
26864       */
26865      PlusSign: 4,
26866      /**
26867       * Sign for negative numbers.
26868       * Example: -23
26869       */
26870      MinusSign: 5,
26871      /**
26872       * Computer notation for exponential value (n times a power of 10).
26873       * Example: 1.2E3
26874       */
26875      Exponential: 6,
26876      /**
26877       * Human-readable format of exponential.
26878       * Example: 1.2x103
26879       */
26880      SuperscriptingExponent: 7,
26881      /**
26882       * Sign for permille (out of 1000).
26883       * Example: 23.4‰
26884       */
26885      PerMille: 8,
26886      /**
26887       * Infinity, can be used with plus and minus.
26888       * Example: ∞, +∞, -∞
26889       */
26890      Infinity: 9,
26891      /**
26892       * Not a number.
26893       * Example: NaN
26894       */
26895      NaN: 10,
26896      /**
26897       * Symbol used between time units.
26898       * Example: 10:52
26899       */
26900      TimeSeparator: 11,
26901      /**
26902       * Decimal separator for currency values (fallback to `Decimal`).
26903       * Example: $2,345.67
26904       */
26905      CurrencyDecimal: 12,
26906      /**
26907       * Group separator for currency values (fallback to `Group`).
26908       * Example: $2,345.67
26909       */
26910      CurrencyGroup: 13
26911    };
26912    (function(WeekDay2) {
26913      WeekDay2[WeekDay2["Sunday"] = 0] = "Sunday";
26914      WeekDay2[WeekDay2["Monday"] = 1] = "Monday";
26915      WeekDay2[WeekDay2["Tuesday"] = 2] = "Tuesday";
26916      WeekDay2[WeekDay2["Wednesday"] = 3] = "Wednesday";
26917      WeekDay2[WeekDay2["Thursday"] = 4] = "Thursday";
26918      WeekDay2[WeekDay2["Friday"] = 5] = "Friday";
26919      WeekDay2[WeekDay2["Saturday"] = 6] = "Saturday";
26920    })(WeekDay || (WeekDay = {}));
26921    getLocalePluralCase2 = getLocalePluralCase;
26922    DEFAULT_NB_OF_CURRENCY_DIGITS = 2;
26923    ISO8601_DATE_REGEX = /^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
26924    NAMED_FORMATS = {};
26925    DATE_FORMATS_SPLIT = /((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;
26926    JANUARY = 0;
26927    THURSDAY = 4;
26928    DATE_FORMATS = {};
26929    NUMBER_FORMAT_REGEXP = /^(\d+)?\.((\d+)(-(\d+))?)?$/;
26930    MAX_DIGITS = 22;
26931    DECIMAL_SEP = ".";
26932    ZERO_CHAR = "0";
26933    PATTERN_SEP = ";";
26934    GROUP_SEP = ",";
26935    DIGIT_CHAR = "#";
26936    CURRENCY_CHAR = "\xA4";
26937    PERCENT_CHAR = "%";
26938    NgLocalization = class _NgLocalization {
26939      static \u0275fac = function NgLocalization_Factory(__ngFactoryType__) {
26940        return new (__ngFactoryType__ || _NgLocalization)();
26941      };
26942      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
26943        token: _NgLocalization,
26944        factory: function NgLocalization_Factory(__ngFactoryType__) {
26945          let __ngConditionalFactory__ = null;
26946          if (__ngFactoryType__) {
26947            __ngConditionalFactory__ = new __ngFactoryType__();
26948          } else {
26949            __ngConditionalFactory__ = ((locale) => new NgLocaleLocalization(locale))(\u0275\u0275inject(LOCALE_ID));
26950          }
26951          return __ngConditionalFactory__;
26952        },
26953        providedIn: "root"
26954      });
26955    };
26956    (() => {
26957      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgLocalization, [{
26958        type: Injectable,
26959        args: [{
26960          providedIn: "root",
26961          useFactory: (locale) => new NgLocaleLocalization(locale),
26962          deps: [LOCALE_ID]
26963        }]
26964      }], null, null);
26965    })();
26966    NgLocaleLocalization = class _NgLocaleLocalization extends NgLocalization {
26967      locale;
26968      constructor(locale) {
26969        super();
26970        this.locale = locale;
26971      }
26972      getPluralCategory(value, locale) {
26973        const plural2 = getLocalePluralCase2(locale || this.locale)(value);
26974        switch (plural2) {
26975          case Plural.Zero:
26976            return "zero";
26977          case Plural.One:
26978            return "one";
26979          case Plural.Two:
26980            return "two";
26981          case Plural.Few:
26982            return "few";
26983          case Plural.Many:
26984            return "many";
26985          default:
26986            return "other";
26987        }
26988      }
26989      static \u0275fac = function NgLocaleLocalization_Factory(__ngFactoryType__) {
26990        return new (__ngFactoryType__ || _NgLocaleLocalization)(\u0275\u0275inject(LOCALE_ID));
26991      };
26992      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
26993        token: _NgLocaleLocalization,
26994        factory: _NgLocaleLocalization.\u0275fac
26995      });
26996    };
26997    (() => {
26998      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgLocaleLocalization, [{
26999        type: Injectable
27000      }], () => [{
27001        type: void 0,
27002        decorators: [{
27003          type: Inject,
27004          args: [LOCALE_ID]
27005        }]
27006      }], null);
27007    })();
27008    WS_REGEXP = /\s+/;
27009    EMPTY_ARRAY2 = [];
27010    NgClass = class _NgClass {
27011      _ngEl;
27012      _renderer;
27013      initialClasses = EMPTY_ARRAY2;
27014      rawClass;
27015      stateMap = /* @__PURE__ */ new Map();
27016      constructor(_ngEl, _renderer) {
27017        this._ngEl = _ngEl;
27018        this._renderer = _renderer;
27019      }
27020      set klass(value) {
27021        this.initialClasses = value != null ? value.trim().split(WS_REGEXP) : EMPTY_ARRAY2;
27022      }
27023      set ngClass(value) {
27024        this.rawClass = typeof value === "string" ? value.trim().split(WS_REGEXP) : value;
27025      }
27026      /*
27027      The NgClass directive uses the custom change detection algorithm for its inputs. The custom
27028      algorithm is necessary since inputs are represented as complex object or arrays that need to be
27029      deeply-compared.
27030         This algorithm is perf-sensitive since NgClass is used very frequently and its poor performance
27031      might negatively impact runtime performance of the entire change detection cycle. The design of
27032      this algorithm is making sure that:
27033      - there is no unnecessary DOM manipulation (CSS classes are added / removed from the DOM only when
27034      needed), even if references to bound objects change;
27035      - there is no memory allocation if nothing changes (even relatively modest memory allocation
27036      during the change detection cycle can result in GC pauses for some of the CD cycles).
27037         The algorithm works by iterating over the set of bound classes, staring with [class] binding and
27038      then going over [ngClass] binding. For each CSS class name:
27039      - check if it was seen before (this information is tracked in the state map) and if its value
27040      changed;
27041      - mark it as "touched" - names that are not marked are not present in the latest set of binding
27042      and we can remove such class name from the internal data structures;
27043         After iteration over all the CSS class names we've got data structure with all the information
27044      necessary to synchronize changes to the DOM - it is enough to iterate over the state map, flush
27045      changes to the DOM and reset internal data structures so those are ready for the next change
27046      detection cycle.
27047       */
27048      ngDoCheck() {
27049        for (const klass of this.initialClasses) {
27050          this._updateState(klass, true);
27051        }
27052        const rawClass = this.rawClass;
27053        if (Array.isArray(rawClass) || rawClass instanceof Set) {
27054          for (const klass of rawClass) {
27055            this._updateState(klass, true);
27056          }
27057        } else if (rawClass != null) {
27058          for (const klass of Object.keys(rawClass)) {
27059            this._updateState(klass, Boolean(rawClass[klass]));
27060          }
27061        }
27062        this._applyStateDiff();
27063      }
27064      _updateState(klass, nextEnabled) {
27065        const state = this.stateMap.get(klass);
27066        if (state !== void 0) {
27067          if (state.enabled !== nextEnabled) {
27068            state.changed = true;
27069            state.enabled = nextEnabled;
27070          }
27071          state.touched = true;
27072        } else {
27073          this.stateMap.set(klass, {
27074            enabled: nextEnabled,
27075            changed: true,
27076            touched: true
27077          });
27078        }
27079      }
27080      _applyStateDiff() {
27081        for (const stateEntry of this.stateMap) {
27082          const klass = stateEntry[0];
27083          const state = stateEntry[1];
27084          if (state.changed) {
27085            this._toggleClass(klass, state.enabled);
27086            state.changed = false;
27087          } else if (!state.touched) {
27088            if (state.enabled) {
27089              this._toggleClass(klass, false);
27090            }
27091            this.stateMap.delete(klass);
27092          }
27093          state.touched = false;
27094        }
27095      }
27096      _toggleClass(klass, enabled) {
27097        if (ngDevMode) {
27098          if (typeof klass !== "string") {
27099            throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${stringify(klass)}`);
27100          }
27101        }
27102        klass = klass.trim();
27103        if (klass.length > 0) {
27104          klass.split(WS_REGEXP).forEach((klass2) => {
27105            if (enabled) {
27106              this._renderer.addClass(this._ngEl.nativeElement, klass2);
27107            } else {
27108              this._renderer.removeClass(this._ngEl.nativeElement, klass2);
27109            }
27110          });
27111        }
27112      }
27113      static \u0275fac = function NgClass_Factory(__ngFactoryType__) {
27114        return new (__ngFactoryType__ || _NgClass)(\u0275\u0275directiveInject(ElementRef), \u0275\u0275directiveInject(Renderer2));
27115      };
27116      static \u0275dir = /* @__PURE__ */ \u0275\u0275defineDirective({
27117        type: _NgClass,
27118        selectors: [["", "ngClass", ""]],
27119        inputs: {
27120          klass: [0, "class", "klass"],
27121          ngClass: "ngClass"
27122        }
27123      });
27124    };
27125    (() => {
27126      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgClass, [{
27127        type: Directive,
27128        args: [{
27129          selector: "[ngClass]"
27130        }]
27131      }], () => [{
27132        type: ElementRef
27133      }, {
27134        type: Renderer2
27135      }], {
27136        klass: [{
27137          type: Input,
27138          args: ["class"]
27139        }],
27140        ngClass: [{
27141          type: Input,
27142          args: ["ngClass"]
27143        }]
27144      });
27145    })();
27146    NgComponentOutlet = class _NgComponentOutlet {
27147      _viewContainerRef;
27148      // TODO(crisbeto): this should be `Type<T>`, but doing so broke a few
27149      // targets in a TGP so we need to do it in a major version.
27150      /** Component that should be rendered in the outlet. */
27151      ngComponentOutlet = null;
27152      ngComponentOutletInputs;
27153      ngComponentOutletInjector;
27154      ngComponentOutletEnvironmentInjector;
27155      ngComponentOutletContent;
27156      ngComponentOutletNgModule;
27157      /**
27158       * @deprecated This input is deprecated, use `ngComponentOutletNgModule` instead.
27159       */
27160      ngComponentOutletNgModuleFactory;
27161      _componentRef;
27162      _moduleRef;
27163      /**
27164       * A helper data structure that allows us to track inputs that were part of the
27165       * ngComponentOutletInputs expression. Tracking inputs is necessary for proper removal of ones
27166       * that are no longer referenced.
27167       */
27168      _inputsUsed = /* @__PURE__ */ new Map();
27169      /**
27170       * Gets the instance of the currently-rendered component.
27171       * Will be null if no component has been rendered.
27172       */
27173      get componentInstance() {
27174        return this._componentRef?.instance ?? null;
27175      }
27176      constructor(_viewContainerRef) {
27177        this._viewContainerRef = _viewContainerRef;
27178      }
27179      _needToReCreateNgModuleInstance(changes) {
27180        return changes["ngComponentOutletNgModule"] !== void 0 || changes["ngComponentOutletNgModuleFactory"] !== void 0;
27181      }
27182      _needToReCreateComponentInstance(changes) {
27183        return changes["ngComponentOutlet"] !== void 0 || changes["ngComponentOutletContent"] !== void 0 || changes["ngComponentOutletInjector"] !== void 0 || changes["ngComponentOutletEnvironmentInjector"] !== void 0 || this._needToReCreateNgModuleInstance(changes);
27184      }
27185      /** @docs-private */
27186      ngOnChanges(changes) {
27187        if (this._needToReCreateComponentInstance(changes)) {
27188          this._viewContainerRef.clear();
27189          this._inputsUsed.clear();
27190          this._componentRef = void 0;
27191          if (this.ngComponentOutlet) {
27192            const injector = this.ngComponentOutletInjector || this._viewContainerRef.parentInjector;
27193            if (this._needToReCreateNgModuleInstance(changes)) {
27194              this._moduleRef?.destroy();
27195              if (this.ngComponentOutletNgModule) {
27196                this._moduleRef = createNgModule(this.ngComponentOutletNgModule, getParentInjector(injector));
27197              } else if (this.ngComponentOutletNgModuleFactory) {
27198                this._moduleRef = this.ngComponentOutletNgModuleFactory.create(getParentInjector(injector));
27199              } else {
27200                this._moduleRef = void 0;
27201              }
27202            }
27203            this._componentRef = this._viewContainerRef.createComponent(this.ngComponentOutlet, {
27204              injector,
27205              ngModuleRef: this._moduleRef,
27206              projectableNodes: this.ngComponentOutletContent,
27207              environmentInjector: this.ngComponentOutletEnvironmentInjector
27208            });
27209          }
27210        }
27211      }
27212      /** @docs-private */
27213      ngDoCheck() {
27214        if (this._componentRef) {
27215          if (this.ngComponentOutletInputs) {
27216            for (const inputName of Object.keys(this.ngComponentOutletInputs)) {
27217              this._inputsUsed.set(inputName, true);
27218            }
27219          }
27220          this._applyInputStateDiff(this._componentRef);
27221        }
27222      }
27223      /** @docs-private */
27224      ngOnDestroy() {
27225        this._moduleRef?.destroy();
27226      }
27227      _applyInputStateDiff(componentRef) {
27228        for (const [inputName, touched] of this._inputsUsed) {
27229          if (!touched) {
27230            componentRef.setInput(inputName, void 0);
27231            this._inputsUsed.delete(inputName);
27232          } else {
27233            componentRef.setInput(inputName, this.ngComponentOutletInputs[inputName]);
27234            this._inputsUsed.set(inputName, false);
27235          }
27236        }
27237      }
27238      static \u0275fac = function NgComponentOutlet_Factory(__ngFactoryType__) {
27239        return new (__ngFactoryType__ || _NgComponentOutlet)(\u0275\u0275directiveInject(ViewContainerRef));
27240      };
27241      static \u0275dir = /* @__PURE__ */ \u0275\u0275defineDirective({
27242        type: _NgComponentOutlet,
27243        selectors: [["", "ngComponentOutlet", ""]],
27244        inputs: {
27245          ngComponentOutlet: "ngComponentOutlet",
27246          ngComponentOutletInputs: "ngComponentOutletInputs",
27247          ngComponentOutletInjector: "ngComponentOutletInjector",
27248          ngComponentOutletEnvironmentInjector: "ngComponentOutletEnvironmentInjector",
27249          ngComponentOutletContent: "ngComponentOutletContent",
27250          ngComponentOutletNgModule: "ngComponentOutletNgModule",
27251          ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory"
27252        },
27253        exportAs: ["ngComponentOutlet"],
27254        features: [\u0275\u0275NgOnChangesFeature]
27255      });
27256    };
27257    (() => {
27258      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgComponentOutlet, [{
27259        type: Directive,
27260        args: [{
27261          selector: "[ngComponentOutlet]",
27262          exportAs: "ngComponentOutlet"
27263        }]
27264      }], () => [{
27265        type: ViewContainerRef
27266      }], {
27267        ngComponentOutlet: [{
27268          type: Input
27269        }],
27270        ngComponentOutletInputs: [{
27271          type: Input
27272        }],
27273        ngComponentOutletInjector: [{
27274          type: Input
27275        }],
27276        ngComponentOutletEnvironmentInjector: [{
27277          type: Input
27278        }],
27279        ngComponentOutletContent: [{
27280          type: Input
27281        }],
27282        ngComponentOutletNgModule: [{
27283          type: Input
27284        }],
27285        ngComponentOutletNgModuleFactory: [{
27286          type: Input
27287        }]
27288      });
27289    })();
27290    NgForOfContext = class {
27291      $implicit;
27292      ngForOf;
27293      index;
27294      count;
27295      constructor($implicit, ngForOf, index, count) {
27296        this.$implicit = $implicit;
27297        this.ngForOf = ngForOf;
27298        this.index = index;
27299        this.count = count;
27300      }
27301      // Indicates whether this is the first item in the collection.
27302      get first() {
27303        return this.index === 0;
27304      }
27305      // Indicates whether this is the last item in the collection.
27306      get last() {
27307        return this.index === this.count - 1;
27308      }
27309      // Indicates whether an index of this item in the collection is even.
27310      get even() {
27311        return this.index % 2 === 0;
27312      }
27313      // Indicates whether an index of this item in the collection is odd.
27314      get odd() {
27315        return !this.even;
27316      }
27317    };
27318    NgForOf = class _NgForOf {
27319      _viewContainer;
27320      _template;
27321      _differs;
27322      /**
27323       * The value of the iterable expression, which can be used as a
27324       * [template input variable](guide/directives/structural-directives#shorthand).
27325       * @deprecated The `ngFor` directive is deprecated. Use the `@for` block instead.
27326       */
27327      set ngForOf(ngForOf) {
27328        this._ngForOf = ngForOf;
27329        this._ngForOfDirty = true;
27330      }
27331      /**
27332       * Specifies a custom `TrackByFunction` to compute the identity of items in an iterable.
27333       *
27334       * If a custom `TrackByFunction` is not provided, `NgForOf` will use the item's [object
27335       * identity](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is)
27336       * as the key.
27337       *
27338       * `NgForOf` uses the computed key to associate items in an iterable with DOM elements
27339       * it produces for these items.
27340       *
27341       * A custom `TrackByFunction` is useful to provide good user experience in cases when items in an
27342       * iterable rendered using `NgForOf` have a natural identifier (for example, custom ID or a
27343       * primary key), and this iterable could be updated with new object instances that still
27344       * represent the same underlying entity (for example, when data is re-fetched from the server,
27345       * and the iterable is recreated and re-rendered, but most of the data is still the same).
27346       *
27347       * @see {@link TrackByFunction}
27348       * @deprecated The `ngFor` directive is deprecated. Use the `@for` block instead.
27349       */
27350      set ngForTrackBy(fn) {
27351        if ((typeof ngDevMode === "undefined" || ngDevMode) && fn != null && typeof fn !== "function") {
27352          console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}. See https://angular.dev/api/common/NgForOf#change-propagation for more information.`);
27353        }
27354        this._trackByFn = fn;
27355      }
27356      get ngForTrackBy() {
27357        return this._trackByFn;
27358      }
27359      _ngForOf = null;
27360      _ngForOfDirty = true;
27361      _differ = null;
27362      // waiting for microsoft/typescript#43662 to allow the return type `TrackByFunction|undefined` for
27363      // the getter
27364      _trackByFn;
27365      constructor(_viewContainer, _template, _differs) {
27366        this._viewContainer = _viewContainer;
27367        this._template = _template;
27368        this._differs = _differs;
27369      }
27370      /**
27371       * A reference to the template that is stamped out for each item in the iterable.
27372       * @see [template reference variable](guide/templates/variables#template-reference-variables)
27373       * @deprecated The `ngFor` directive is deprecated. Use the `@for` block instead.
27374       */
27375      set ngForTemplate(value) {
27376        if (value) {
27377          this._template = value;
27378        }
27379      }
27380      /**
27381       * Applies the changes when needed.
27382       * @docs-private
27383       */
27384      ngDoCheck() {
27385        if (this._ngForOfDirty) {
27386          this._ngForOfDirty = false;
27387          const value = this._ngForOf;
27388          if (!this._differ && value) {
27389            if (typeof ngDevMode === "undefined" || ngDevMode) {
27390              try {
27391                this._differ = this._differs.find(value).create(this.ngForTrackBy);
27392              } catch {
27393                let errorMessage = `Cannot find a differ supporting object '${value}' of type '${getTypeName(value)}'. NgFor only supports binding to Iterables, such as Arrays.`;
27394                if (typeof value === "object") {
27395                  errorMessage += " Did you mean to use the keyvalue pipe?";
27396                }
27397                throw new RuntimeError(-2200, errorMessage);
27398              }
27399            } else {
27400              this._differ = this._differs.find(value).create(this.ngForTrackBy);
27401            }
27402          }
27403        }
27404        if (this._differ) {
27405          const changes = this._differ.diff(this._ngForOf);
27406          if (changes) this._applyChanges(changes);
27407        }
27408      }
27409      _applyChanges(changes) {
27410        const viewContainer = this._viewContainer;
27411        changes.forEachOperation((item, adjustedPreviousIndex, currentIndex) => {
27412          if (item.previousIndex == null) {
27413            viewContainer.createEmbeddedView(this._template, new NgForOfContext(item.item, this._ngForOf, -1, -1), currentIndex === null ? void 0 : currentIndex);
27414          } else if (currentIndex == null) {
27415            viewContainer.remove(adjustedPreviousIndex === null ? void 0 : adjustedPreviousIndex);
27416          } else if (adjustedPreviousIndex !== null) {
27417            const view = viewContainer.get(adjustedPreviousIndex);
27418            viewContainer.move(view, currentIndex);
27419            applyViewChange(view, item);
27420          }
27421        });
27422        for (let i = 0, ilen = viewContainer.length; i < ilen; i++) {
27423          const viewRef = viewContainer.get(i);
27424          const context2 = viewRef.context;
27425          context2.index = i;
27426          context2.count = ilen;
27427          context2.ngForOf = this._ngForOf;
27428        }
27429        changes.forEachIdentityChange((record) => {
27430          const viewRef = viewContainer.get(record.currentIndex);
27431          applyViewChange(viewRef, record);
27432        });
27433      }
27434      /**
27435       * Asserts the correct type of the context for the template that `NgForOf` will render.
27436       *
27437       * The presence of this method is a signal to the Ivy template type-check compiler that the
27438       * `NgForOf` structural directive renders its template with a specific context type.
27439       */
27440      static ngTemplateContextGuard(dir, ctx) {
27441        return true;
27442      }
27443      static \u0275fac = function NgForOf_Factory(__ngFactoryType__) {
27444        return new (__ngFactoryType__ || _NgForOf)(\u0275\u0275directiveInject(ViewContainerRef), \u0275\u0275directiveInject(TemplateRef), \u0275\u0275directiveInject(IterableDiffers));
27445      };
27446      static \u0275dir = /* @__PURE__ */ \u0275\u0275defineDirective({
27447        type: _NgForOf,
27448        selectors: [["", "ngFor", "", "ngForOf", ""]],
27449        inputs: {
27450          ngForOf: "ngForOf",
27451          ngForTrackBy: "ngForTrackBy",
27452          ngForTemplate: "ngForTemplate"
27453        }
27454      });
27455    };
27456    (() => {
27457      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgForOf, [{
27458        type: Directive,
27459        args: [{
27460          selector: "[ngFor][ngForOf]"
27461        }]
27462      }], () => [{
27463        type: ViewContainerRef
27464      }, {
27465        type: TemplateRef
27466      }, {
27467        type: IterableDiffers
27468      }], {
27469        ngForOf: [{
27470          type: Input
27471        }],
27472        ngForTrackBy: [{
27473          type: Input
27474        }],
27475        ngForTemplate: [{
27476          type: Input
27477        }]
27478      });
27479    })();
27480    NgIf = class _NgIf {
27481      _viewContainer;
27482      _context = new NgIfContext();
27483      _thenTemplateRef = null;
27484      _elseTemplateRef = null;
27485      _thenViewRef = null;
27486      _elseViewRef = null;
27487      constructor(_viewContainer, templateRef) {
27488        this._viewContainer = _viewContainer;
27489        this._thenTemplateRef = templateRef;
27490      }
27491      /**
27492       * The Boolean expression to evaluate as the condition for showing a template.
27493       * @deprecated Use the `@if` block instead. Intent to remove in v22
27494       */
27495      set ngIf(condition) {
27496        this._context.$implicit = this._context.ngIf = condition;
27497        this._updateView();
27498      }
27499      /**
27500       * A template to show if the condition expression evaluates to true.
27501       * @deprecated Use the `@if` block instead. Intent to remove in v22
27502       */
27503      set ngIfThen(templateRef) {
27504        assertTemplate(templateRef, (typeof ngDevMode === "undefined" || ngDevMode) && "ngIfThen");
27505        this._thenTemplateRef = templateRef;
27506        this._thenViewRef = null;
27507        this._updateView();
27508      }
27509      /**
27510       * A template to show if the condition expression evaluates to false.
27511       * @deprecated Use the `@if` block instead. Intent to remove in v22
27512       */
27513      set ngIfElse(templateRef) {
27514        assertTemplate(templateRef, (typeof ngDevMode === "undefined" || ngDevMode) && "ngIfElse");
27515        this._elseTemplateRef = templateRef;
27516        this._elseViewRef = null;
27517        this._updateView();
27518      }
27519      _updateView() {
27520        if (this._context.$implicit) {
27521          if (!this._thenViewRef) {
27522            this._viewContainer.clear();
27523            this._elseViewRef = null;
27524            if (this._thenTemplateRef) {
27525              this._thenViewRef = this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context);
27526            }
27527          }
27528        } else {
27529          if (!this._elseViewRef) {
27530            this._viewContainer.clear();
27531            this._thenViewRef = null;
27532            if (this._elseTemplateRef) {
27533              this._elseViewRef = this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);
27534            }
27535          }
27536        }
27537      }
27538      /** @internal */
27539      static ngIfUseIfTypeGuard;
27540      /**
27541       * Assert the correct type of the expression bound to the `ngIf` input within the template.
27542       *
27543       * The presence of this static field is a signal to the Ivy template type check compiler that
27544       * when the `NgIf` structural directive renders its template, the type of the expression bound
27545       * to `ngIf` should be narrowed in some way. For `NgIf`, the binding expression itself is used to
27546       * narrow its type, which allows the strictNullChecks feature of TypeScript to work with `NgIf`.
27547       */
27548      static ngTemplateGuard_ngIf;
27549      /**
27550       * Asserts the correct type of the context for the template that `NgIf` will render.
27551       *
27552       * The presence of this method is a signal to the Ivy template type-check compiler that the
27553       * `NgIf` structural directive renders its template with a specific context type.
27554       */
27555      static ngTemplateContextGuard(dir, ctx) {
27556        return true;
27557      }
27558      static \u0275fac = function NgIf_Factory(__ngFactoryType__) {
27559        return new (__ngFactoryType__ || _NgIf)(\u0275\u0275directiveInject(ViewContainerRef), \u0275\u0275directiveInject(TemplateRef));
27560      };
27561      static \u0275dir = /* @__PURE__ */ \u0275\u0275defineDirective({
27562        type: _NgIf,
27563        selectors: [["", "ngIf", ""]],
27564        inputs: {
27565          ngIf: "ngIf",
27566          ngIfThen: "ngIfThen",
27567          ngIfElse: "ngIfElse"
27568        }
27569      });
27570    };
27571    (() => {
27572      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgIf, [{
27573        type: Directive,
27574        args: [{
27575          selector: "[ngIf]"
27576        }]
27577      }], () => [{
27578        type: ViewContainerRef
27579      }, {
27580        type: TemplateRef
27581      }], {
27582        ngIf: [{
27583          type: Input
27584        }],
27585        ngIfThen: [{
27586          type: Input
27587        }],
27588        ngIfElse: [{
27589          type: Input
27590        }]
27591      });
27592    })();
27593    NgIfContext = class {
27594      $implicit = null;
27595      ngIf = null;
27596    };
27597    SwitchView = class {
27598      _viewContainerRef;
27599      _templateRef;
27600      _created = false;
27601      constructor(_viewContainerRef, _templateRef) {
27602        this._viewContainerRef = _viewContainerRef;
27603        this._templateRef = _templateRef;
27604      }
27605      create() {
27606        this._created = true;
27607        this._viewContainerRef.createEmbeddedView(this._templateRef);
27608      }
27609      destroy() {
27610        this._created = false;
27611        this._viewContainerRef.clear();
27612      }
27613      enforceState(created) {
27614        if (created && !this._created) {
27615          this.create();
27616        } else if (!created && this._created) {
27617          this.destroy();
27618        }
27619      }
27620    };
27621    NgSwitch = class _NgSwitch {
27622      _defaultViews = [];
27623      _defaultUsed = false;
27624      _caseCount = 0;
27625      _lastCaseCheckIndex = 0;
27626      _lastCasesMatched = false;
27627      _ngSwitch;
27628      /** @deprecated Use the `@switch` block instead. Intent to remove in v22 */
27629      set ngSwitch(newValue) {
27630        this._ngSwitch = newValue;
27631        if (this._caseCount === 0) {
27632          this._updateDefaultCases(true);
27633        }
27634      }
27635      /** @internal */
27636      _addCase() {
27637        return this._caseCount++;
27638      }
27639      /** @internal */
27640      _addDefault(view) {
27641        this._defaultViews.push(view);
27642      }
27643      /** @internal */
27644      _matchCase(value) {
27645        const matched = value === this._ngSwitch;
27646        this._lastCasesMatched ||= matched;
27647        this._lastCaseCheckIndex++;
27648        if (this._lastCaseCheckIndex === this._caseCount) {
27649          this._updateDefaultCases(!this._lastCasesMatched);
27650          this._lastCaseCheckIndex = 0;
27651          this._lastCasesMatched = false;
27652        }
27653        return matched;
27654      }
27655      _updateDefaultCases(useDefault) {
27656        if (this._defaultViews.length > 0 && useDefault !== this._defaultUsed) {
27657          this._defaultUsed = useDefault;
27658          for (const defaultView of this._defaultViews) {
27659            defaultView.enforceState(useDefault);
27660          }
27661        }
27662      }
27663      static \u0275fac = function NgSwitch_Factory(__ngFactoryType__) {
27664        return new (__ngFactoryType__ || _NgSwitch)();
27665      };
27666      static \u0275dir = /* @__PURE__ */ \u0275\u0275defineDirective({
27667        type: _NgSwitch,
27668        selectors: [["", "ngSwitch", ""]],
27669        inputs: {
27670          ngSwitch: "ngSwitch"
27671        }
27672      });
27673    };
27674    (() => {
27675      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgSwitch, [{
27676        type: Directive,
27677        args: [{
27678          selector: "[ngSwitch]"
27679        }]
27680      }], null, {
27681        ngSwitch: [{
27682          type: Input
27683        }]
27684      });
27685    })();
27686    NgSwitchCase = class _NgSwitchCase {
27687      ngSwitch;
27688      _view;
27689      /**
27690       * Stores the HTML template to be selected on match.
27691       * @deprecated Use the `@case` block within a `@switch` block instead. Intent to remove in v22
27692       */
27693      ngSwitchCase;
27694      constructor(viewContainer, templateRef, ngSwitch) {
27695        this.ngSwitch = ngSwitch;
27696        if ((typeof ngDevMode === "undefined" || ngDevMode) && !ngSwitch) {
27697          throwNgSwitchProviderNotFoundError("ngSwitchCase", "NgSwitchCase");
27698        }
27699        ngSwitch._addCase();
27700        this._view = new SwitchView(viewContainer, templateRef);
27701      }
27702      /**
27703       * Performs case matching. For internal use only.
27704       * @docs-private
27705       */
27706      ngDoCheck() {
27707        this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));
27708      }
27709      static \u0275fac = function NgSwitchCase_Factory(__ngFactoryType__) {
27710        return new (__ngFactoryType__ || _NgSwitchCase)(\u0275\u0275directiveInject(ViewContainerRef), \u0275\u0275directiveInject(TemplateRef), \u0275\u0275directiveInject(NgSwitch, 9));
27711      };
27712      static \u0275dir = /* @__PURE__ */ \u0275\u0275defineDirective({
27713        type: _NgSwitchCase,
27714        selectors: [["", "ngSwitchCase", ""]],
27715        inputs: {
27716          ngSwitchCase: "ngSwitchCase"
27717        }
27718      });
27719    };
27720    (() => {
27721      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgSwitchCase, [{
27722        type: Directive,
27723        args: [{
27724          selector: "[ngSwitchCase]"
27725        }]
27726      }], () => [{
27727        type: ViewContainerRef
27728      }, {
27729        type: TemplateRef
27730      }, {
27731        type: NgSwitch,
27732        decorators: [{
27733          type: Optional
27734        }, {
27735          type: Host
27736        }]
27737      }], {
27738        ngSwitchCase: [{
27739          type: Input
27740        }]
27741      });
27742    })();
27743    NgSwitchDefault = class _NgSwitchDefault {
27744      constructor(viewContainer, templateRef, ngSwitch) {
27745        if ((typeof ngDevMode === "undefined" || ngDevMode) && !ngSwitch) {
27746          throwNgSwitchProviderNotFoundError("ngSwitchDefault", "NgSwitchDefault");
27747        }
27748        ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));
27749      }
27750      static \u0275fac = function NgSwitchDefault_Factory(__ngFactoryType__) {
27751        return new (__ngFactoryType__ || _NgSwitchDefault)(\u0275\u0275directiveInject(ViewContainerRef), \u0275\u0275directiveInject(TemplateRef), \u0275\u0275directiveInject(NgSwitch, 9));
27752      };
27753      static \u0275dir = /* @__PURE__ */ \u0275\u0275defineDirective({
27754        type: _NgSwitchDefault,
27755        selectors: [["", "ngSwitchDefault", ""]]
27756      });
27757    };
27758    (() => {
27759      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgSwitchDefault, [{
27760        type: Directive,
27761        args: [{
27762          selector: "[ngSwitchDefault]"
27763        }]
27764      }], () => [{
27765        type: ViewContainerRef
27766      }, {
27767        type: TemplateRef
27768      }, {
27769        type: NgSwitch,
27770        decorators: [{
27771          type: Optional
27772        }, {
27773          type: Host
27774        }]
27775      }], null);
27776    })();
27777    NgPlural = class _NgPlural {
27778      _localization;
27779      _activeView;
27780      _caseViews = {};
27781      constructor(_localization) {
27782        this._localization = _localization;
27783      }
27784      set ngPlural(value) {
27785        this._updateView(value);
27786      }
27787      addCase(value, switchView) {
27788        this._caseViews[value] = switchView;
27789      }
27790      _updateView(switchValue) {
27791        this._clearViews();
27792        const cases = Object.keys(this._caseViews);
27793        const key = getPluralCategory(switchValue, cases, this._localization);
27794        this._activateView(this._caseViews[key]);
27795      }
27796      _clearViews() {
27797        if (this._activeView) this._activeView.destroy();
27798      }
27799      _activateView(view) {
27800        if (view) {
27801          this._activeView = view;
27802          this._activeView.create();
27803        }
27804      }
27805      static \u0275fac = function NgPlural_Factory(__ngFactoryType__) {
27806        return new (__ngFactoryType__ || _NgPlural)(\u0275\u0275directiveInject(NgLocalization));
27807      };
27808      static \u0275dir = /* @__PURE__ */ \u0275\u0275defineDirective({
27809        type: _NgPlural,
27810        selectors: [["", "ngPlural", ""]],
27811        inputs: {
27812          ngPlural: "ngPlural"
27813        }
27814      });
27815    };
27816    (() => {
27817      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgPlural, [{
27818        type: Directive,
27819        args: [{
27820          selector: "[ngPlural]"
27821        }]
27822      }], () => [{
27823        type: NgLocalization
27824      }], {
27825        ngPlural: [{
27826          type: Input
27827        }]
27828      });
27829    })();
27830    NgPluralCase = class _NgPluralCase {
27831      value;
27832      constructor(value, template, viewContainer, ngPlural) {
27833        this.value = value;
27834        const isANumber = !isNaN(Number(value));
27835        ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));
27836      }
27837      static \u0275fac = function NgPluralCase_Factory(__ngFactoryType__) {
27838        return new (__ngFactoryType__ || _NgPluralCase)(\u0275\u0275injectAttribute("ngPluralCase"), \u0275\u0275directiveInject(TemplateRef), \u0275\u0275directiveInject(ViewContainerRef), \u0275\u0275directiveInject(NgPlural, 1));
27839      };
27840      static \u0275dir = /* @__PURE__ */ \u0275\u0275defineDirective({
27841        type: _NgPluralCase,
27842        selectors: [["", "ngPluralCase", ""]]
27843      });
27844    };
27845    (() => {
27846      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgPluralCase, [{
27847        type: Directive,
27848        args: [{
27849          selector: "[ngPluralCase]"
27850        }]
27851      }], () => [{
27852        type: void 0,
27853        decorators: [{
27854          type: Attribute,
27855          args: ["ngPluralCase"]
27856        }]
27857      }, {
27858        type: TemplateRef
27859      }, {
27860        type: ViewContainerRef
27861      }, {
27862        type: NgPlural,
27863        decorators: [{
27864          type: Host
27865        }]
27866      }], null);
27867    })();
27868    NgStyle = class _NgStyle {
27869      _ngEl;
27870      _differs;
27871      _renderer;
27872      _ngStyle = null;
27873      _differ = null;
27874      constructor(_ngEl, _differs, _renderer) {
27875        this._ngEl = _ngEl;
27876        this._differs = _differs;
27877        this._renderer = _renderer;
27878      }
27879      set ngStyle(values) {
27880        this._ngStyle = values;
27881        if (!this._differ && values) {
27882          this._differ = this._differs.find(values).create();
27883        }
27884      }
27885      ngDoCheck() {
27886        if (this._differ) {
27887          const changes = this._differ.diff(this._ngStyle);
27888          if (changes) {
27889            this._applyChanges(changes);
27890          }
27891        }
27892      }
27893      _setStyle(nameAndUnit, value) {
27894        const [name, unit] = nameAndUnit.split(".");
27895        const flags = name.indexOf("-") === -1 ? void 0 : RendererStyleFlags2.DashCase;
27896        if (value != null) {
27897          this._renderer.setStyle(this._ngEl.nativeElement, name, unit ? `${value}${unit}` : value, flags);
27898        } else {
27899          this._renderer.removeStyle(this._ngEl.nativeElement, name, flags);
27900        }
27901      }
27902      _applyChanges(changes) {
27903        changes.forEachRemovedItem((record) => this._setStyle(record.key, null));
27904        changes.forEachAddedItem((record) => this._setStyle(record.key, record.currentValue));
27905        changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue));
27906      }
27907      static \u0275fac = function NgStyle_Factory(__ngFactoryType__) {
27908        return new (__ngFactoryType__ || _NgStyle)(\u0275\u0275directiveInject(ElementRef), \u0275\u0275directiveInject(KeyValueDiffers), \u0275\u0275directiveInject(Renderer2));
27909      };
27910      static \u0275dir = /* @__PURE__ */ \u0275\u0275defineDirective({
27911        type: _NgStyle,
27912        selectors: [["", "ngStyle", ""]],
27913        inputs: {
27914          ngStyle: "ngStyle"
27915        }
27916      });
27917    };
27918    (() => {
27919      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgStyle, [{
27920        type: Directive,
27921        args: [{
27922          selector: "[ngStyle]"
27923        }]
27924      }], () => [{
27925        type: ElementRef
27926      }, {
27927        type: KeyValueDiffers
27928      }, {
27929        type: Renderer2
27930      }], {
27931        ngStyle: [{
27932          type: Input,
27933          args: ["ngStyle"]
27934        }]
27935      });
27936    })();
27937    NgTemplateOutlet = class _NgTemplateOutlet {
27938      _viewContainerRef;
27939      _viewRef = null;
27940      /**
27941       * A context object to attach to the {@link EmbeddedViewRef}. This should be an
27942       * object, the object's keys will be available for binding by the local template `let`
27943       * declarations.
27944       * Using the key `$implicit` in the context object will set its value as default.
27945       */
27946      ngTemplateOutletContext = null;
27947      /**
27948       * A string defining the template reference and optionally the context object for the template.
27949       */
27950      ngTemplateOutlet = null;
27951      /** Injector to be used within the embedded view. */
27952      ngTemplateOutletInjector = null;
27953      constructor(_viewContainerRef) {
27954        this._viewContainerRef = _viewContainerRef;
27955      }
27956      ngOnChanges(changes) {
27957        if (this._shouldRecreateView(changes)) {
27958          const viewContainerRef = this._viewContainerRef;
27959          if (this._viewRef) {
27960            viewContainerRef.remove(viewContainerRef.indexOf(this._viewRef));
27961          }
27962          if (!this.ngTemplateOutlet) {
27963            this._viewRef = null;
27964            return;
27965          }
27966          const viewContext = this._createContextForwardProxy();
27967          this._viewRef = viewContainerRef.createEmbeddedView(this.ngTemplateOutlet, viewContext, {
27968            injector: this.ngTemplateOutletInjector ?? void 0
27969          });
27970        }
27971      }
27972      /**
27973       * We need to re-create existing embedded view if either is true:
27974       * - the outlet changed.
27975       * - the injector changed.
27976       */
27977      _shouldRecreateView(changes) {
27978        return !!changes["ngTemplateOutlet"] || !!changes["ngTemplateOutletInjector"];
27979      }
27980      /**
27981       * For a given outlet instance, we create a proxy object that delegates
27982       * to the user-specified context. This allows changing, or swapping out
27983       * the context object completely without having to destroy/re-create the view.
27984       */
27985      _createContextForwardProxy() {
27986        return new Proxy({}, {
27987          set: (_target, prop, newValue) => {
27988            if (!this.ngTemplateOutletContext) {
27989              return false;
27990            }
27991            return Reflect.set(this.ngTemplateOutletContext, prop, newValue);
27992          },
27993          get: (_target, prop, receiver) => {
27994            if (!this.ngTemplateOutletContext) {
27995              return void 0;
27996            }
27997            return Reflect.get(this.ngTemplateOutletContext, prop, receiver);
27998          }
27999        });
28000      }
28001      static \u0275fac = function NgTemplateOutlet_Factory(__ngFactoryType__) {
28002        return new (__ngFactoryType__ || _NgTemplateOutlet)(\u0275\u0275directiveInject(ViewContainerRef));
28003      };
28004      static \u0275dir = /* @__PURE__ */ \u0275\u0275defineDirective({
28005        type: _NgTemplateOutlet,
28006        selectors: [["", "ngTemplateOutlet", ""]],
28007        inputs: {
28008          ngTemplateOutletContext: "ngTemplateOutletContext",
28009          ngTemplateOutlet: "ngTemplateOutlet",
28010          ngTemplateOutletInjector: "ngTemplateOutletInjector"
28011        },
28012        features: [\u0275\u0275NgOnChangesFeature]
28013      });
28014    };
28015    (() => {
28016      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgTemplateOutlet, [{
28017        type: Directive,
28018        args: [{
28019          selector: "[ngTemplateOutlet]"
28020        }]
28021      }], () => [{
28022        type: ViewContainerRef
28023      }], {
28024        ngTemplateOutletContext: [{
28025          type: Input
28026        }],
28027        ngTemplateOutlet: [{
28028          type: Input
28029        }],
28030        ngTemplateOutletInjector: [{
28031          type: Input
28032        }]
28033      });
28034    })();
28035    COMMON_DIRECTIVES = [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase];
28036    SubscribableStrategy = class {
28037      createSubscription(async, updateLatestValue, onError) {
28038        return untracked2(() => async.subscribe({
28039          next: updateLatestValue,
28040          error: onError
28041        }));
28042      }
28043      dispose(subscription) {
28044        untracked2(() => subscription.unsubscribe());
28045      }
28046    };
28047    PromiseStrategy = class {
28048      createSubscription(async, updateLatestValue, onError) {
28049        async.then(
28050          // Using optional chaining because we may have set it to `null`; since the promise
28051          // is async, the view might be destroyed by the time the promise resolves.
28052          (v) => updateLatestValue?.(v),
28053          (e) => onError?.(e)
28054        );
28055        return {
28056          unsubscribe: () => {
28057            updateLatestValue = null;
28058            onError = null;
28059          }
28060        };
28061      }
28062      dispose(subscription) {
28063        subscription.unsubscribe();
28064      }
28065    };
28066    _promiseStrategy = new PromiseStrategy();
28067    _subscribableStrategy = new SubscribableStrategy();
28068    AsyncPipe = class _AsyncPipe {
28069      _ref;
28070      _latestValue = null;
28071      markForCheckOnValueUpdate = true;
28072      _subscription = null;
28073      _obj = null;
28074      _strategy = null;
28075      applicationErrorHandler = inject2(INTERNAL_APPLICATION_ERROR_HANDLER);
28076      constructor(ref) {
28077        this._ref = ref;
28078      }
28079      ngOnDestroy() {
28080        if (this._subscription) {
28081          this._dispose();
28082        }
28083        this._ref = null;
28084      }
28085      transform(obj) {
28086        if (!this._obj) {
28087          if (obj) {
28088            try {
28089              this.markForCheckOnValueUpdate = false;
28090              this._subscribe(obj);
28091            } finally {
28092              this.markForCheckOnValueUpdate = true;
28093            }
28094          }
28095          return this._latestValue;
28096        }
28097        if (obj !== this._obj) {
28098          this._dispose();
28099          return this.transform(obj);
28100        }
28101        return this._latestValue;
28102      }
28103      _subscribe(obj) {
28104        this._obj = obj;
28105        this._strategy = this._selectStrategy(obj);
28106        this._subscription = this._strategy.createSubscription(obj, (value) => this._updateLatestValue(obj, value), (e) => this.applicationErrorHandler(e));
28107      }
28108      _selectStrategy(obj) {
28109        if (isPromise2(obj)) {
28110          return _promiseStrategy;
28111        }
28112        if (isSubscribable(obj)) {
28113          return _subscribableStrategy;
28114        }
28115        throw invalidPipeArgumentError(_AsyncPipe, obj);
28116      }
28117      _dispose() {
28118        this._strategy.dispose(this._subscription);
28119        this._latestValue = null;
28120        this._subscription = null;
28121        this._obj = null;
28122      }
28123      _updateLatestValue(async, value) {
28124        if (async === this._obj) {
28125          this._latestValue = value;
28126          if (this.markForCheckOnValueUpdate) {
28127            this._ref?.markForCheck();
28128          }
28129        }
28130      }
28131      static \u0275fac = function AsyncPipe_Factory(__ngFactoryType__) {
28132        return new (__ngFactoryType__ || _AsyncPipe)(\u0275\u0275directiveInject(ChangeDetectorRef, 16));
28133      };
28134      static \u0275pipe = /* @__PURE__ */ \u0275\u0275definePipe({
28135        name: "async",
28136        type: _AsyncPipe,
28137        pure: false
28138      });
28139    };
28140    (() => {
28141      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(AsyncPipe, [{
28142        type: Pipe,
28143        args: [{
28144          name: "async",
28145          pure: false
28146        }]
28147      }], () => [{
28148        type: ChangeDetectorRef
28149      }], null);
28150    })();
28151    LowerCasePipe = class _LowerCasePipe {
28152      transform(value) {
28153        if (value == null) return null;
28154        if (typeof value !== "string") {
28155          throw invalidPipeArgumentError(_LowerCasePipe, value);
28156        }
28157        return value.toLowerCase();
28158      }
28159      static \u0275fac = function LowerCasePipe_Factory(__ngFactoryType__) {
28160        return new (__ngFactoryType__ || _LowerCasePipe)();
28161      };
28162      static \u0275pipe = /* @__PURE__ */ \u0275\u0275definePipe({
28163        name: "lowercase",
28164        type: _LowerCasePipe,
28165        pure: true
28166      });
28167    };
28168    (() => {
28169      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(LowerCasePipe, [{
28170        type: Pipe,
28171        args: [{
28172          name: "lowercase"
28173        }]
28174      }], null, null);
28175    })();
28176    unicodeWordMatch = /(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g;
28177    TitleCasePipe = class _TitleCasePipe {
28178      transform(value) {
28179        if (value == null) return null;
28180        if (typeof value !== "string") {
28181          throw invalidPipeArgumentError(_TitleCasePipe, value);
28182        }
28183        return value.replace(unicodeWordMatch, (txt) => txt[0].toUpperCase() + txt.slice(1).toLowerCase());
28184      }
28185      static \u0275fac = function TitleCasePipe_Factory(__ngFactoryType__) {
28186        return new (__ngFactoryType__ || _TitleCasePipe)();
28187      };
28188      static \u0275pipe = /* @__PURE__ */ \u0275\u0275definePipe({
28189        name: "titlecase",
28190        type: _TitleCasePipe,
28191        pure: true
28192      });
28193    };
28194    (() => {
28195      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(TitleCasePipe, [{
28196        type: Pipe,
28197        args: [{
28198          name: "titlecase"
28199        }]
28200      }], null, null);
28201    })();
28202    UpperCasePipe = class _UpperCasePipe {
28203      transform(value) {
28204        if (value == null) return null;
28205        if (typeof value !== "string") {
28206          throw invalidPipeArgumentError(_UpperCasePipe, value);
28207        }
28208        return value.toUpperCase();
28209      }
28210      static \u0275fac = function UpperCasePipe_Factory(__ngFactoryType__) {
28211        return new (__ngFactoryType__ || _UpperCasePipe)();
28212      };
28213      static \u0275pipe = /* @__PURE__ */ \u0275\u0275definePipe({
28214        name: "uppercase",
28215        type: _UpperCasePipe,
28216        pure: true
28217      });
28218    };
28219    (() => {
28220      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(UpperCasePipe, [{
28221        type: Pipe,
28222        args: [{
28223          name: "uppercase"
28224        }]
28225      }], null, null);
28226    })();
28227    DEFAULT_DATE_FORMAT = "mediumDate";
28228    DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken(ngDevMode ? "DATE_PIPE_DEFAULT_TIMEZONE" : "");
28229    DATE_PIPE_DEFAULT_OPTIONS = new InjectionToken(ngDevMode ? "DATE_PIPE_DEFAULT_OPTIONS" : "");
28230    DatePipe = class _DatePipe {
28231      locale;
28232      defaultTimezone;
28233      defaultOptions;
28234      constructor(locale, defaultTimezone, defaultOptions) {
28235        this.locale = locale;
28236        this.defaultTimezone = defaultTimezone;
28237        this.defaultOptions = defaultOptions;
28238      }
28239      transform(value, format, timezone, locale) {
28240        if (value == null || value === "" || value !== value) return null;
28241        try {
28242          const _format = format ?? this.defaultOptions?.dateFormat ?? DEFAULT_DATE_FORMAT;
28243          const _timezone = timezone ?? this.defaultOptions?.timezone ?? this.defaultTimezone ?? void 0;
28244          return formatDate(value, _format, locale || this.locale, _timezone);
28245        } catch (error) {
28246          throw invalidPipeArgumentError(_DatePipe, error.message);
28247        }
28248      }
28249      static \u0275fac = function DatePipe_Factory(__ngFactoryType__) {
28250        return new (__ngFactoryType__ || _DatePipe)(\u0275\u0275directiveInject(LOCALE_ID, 16), \u0275\u0275directiveInject(DATE_PIPE_DEFAULT_TIMEZONE, 24), \u0275\u0275directiveInject(DATE_PIPE_DEFAULT_OPTIONS, 24));
28251      };
28252      static \u0275pipe = /* @__PURE__ */ \u0275\u0275definePipe({
28253        name: "date",
28254        type: _DatePipe,
28255        pure: true
28256      });
28257    };
28258    (() => {
28259      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(DatePipe, [{
28260        type: Pipe,
28261        args: [{
28262          name: "date"
28263        }]
28264      }], () => [{
28265        type: void 0,
28266        decorators: [{
28267          type: Inject,
28268          args: [LOCALE_ID]
28269        }]
28270      }, {
28271        type: void 0,
28272        decorators: [{
28273          type: Inject,
28274          args: [DATE_PIPE_DEFAULT_TIMEZONE]
28275        }, {
28276          type: Optional
28277        }]
28278      }, {
28279        type: void 0,
28280        decorators: [{
28281          type: Inject,
28282          args: [DATE_PIPE_DEFAULT_OPTIONS]
28283        }, {
28284          type: Optional
28285        }]
28286      }], null);
28287    })();
28288    _INTERPOLATION_REGEXP = /#/g;
28289    I18nPluralPipe = class _I18nPluralPipe {
28290      _localization;
28291      constructor(_localization) {
28292        this._localization = _localization;
28293      }
28294      /**
28295       * @param value the number to be formatted
28296       * @param pluralMap an object that mimics the ICU format, see
28297       * https://unicode-org.github.io/icu/userguide/format_parse/messages/.
28298       * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
28299       * default).
28300       */
28301      transform(value, pluralMap, locale) {
28302        if (value == null) return "";
28303        if (typeof pluralMap !== "object" || pluralMap === null) {
28304          throw invalidPipeArgumentError(_I18nPluralPipe, pluralMap);
28305        }
28306        const key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);
28307        return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());
28308      }
28309      static \u0275fac = function I18nPluralPipe_Factory(__ngFactoryType__) {
28310        return new (__ngFactoryType__ || _I18nPluralPipe)(\u0275\u0275directiveInject(NgLocalization, 16));
28311      };
28312      static \u0275pipe = /* @__PURE__ */ \u0275\u0275definePipe({
28313        name: "i18nPlural",
28314        type: _I18nPluralPipe,
28315        pure: true
28316      });
28317    };
28318    (() => {
28319      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(I18nPluralPipe, [{
28320        type: Pipe,
28321        args: [{
28322          name: "i18nPlural"
28323        }]
28324      }], () => [{
28325        type: NgLocalization
28326      }], null);
28327    })();
28328    I18nSelectPipe = class _I18nSelectPipe {
28329      /**
28330       * @param value a string to be internationalized.
28331       * @param mapping an object that indicates the text that should be displayed
28332       * for different values of the provided `value`.
28333       */
28334      transform(value, mapping) {
28335        if (value == null) return "";
28336        if (typeof mapping !== "object" || typeof value !== "string") {
28337          throw invalidPipeArgumentError(_I18nSelectPipe, mapping);
28338        }
28339        if (mapping.hasOwnProperty(value)) {
28340          return mapping[value];
28341        }
28342        if (mapping.hasOwnProperty("other")) {
28343          return mapping["other"];
28344        }
28345        return "";
28346      }
28347      static \u0275fac = function I18nSelectPipe_Factory(__ngFactoryType__) {
28348        return new (__ngFactoryType__ || _I18nSelectPipe)();
28349      };
28350      static \u0275pipe = /* @__PURE__ */ \u0275\u0275definePipe({
28351        name: "i18nSelect",
28352        type: _I18nSelectPipe,
28353        pure: true
28354      });
28355    };
28356    (() => {
28357      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(I18nSelectPipe, [{
28358        type: Pipe,
28359        args: [{
28360          name: "i18nSelect"
28361        }]
28362      }], null, null);
28363    })();
28364    JsonPipe = class _JsonPipe {
28365      /**
28366       * @param value A value of any type to convert into a JSON-format string.
28367       */
28368      transform(value) {
28369        return JSON.stringify(value, null, 2);
28370      }
28371      static \u0275fac = function JsonPipe_Factory(__ngFactoryType__) {
28372        return new (__ngFactoryType__ || _JsonPipe)();
28373      };
28374      static \u0275pipe = /* @__PURE__ */ \u0275\u0275definePipe({
28375        name: "json",
28376        type: _JsonPipe,
28377        pure: false
28378      });
28379    };
28380    (() => {
28381      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(JsonPipe, [{
28382        type: Pipe,
28383        args: [{
28384          name: "json",
28385          pure: false
28386        }]
28387      }], null, null);
28388    })();
28389    KeyValuePipe = class _KeyValuePipe {
28390      differs;
28391      constructor(differs) {
28392        this.differs = differs;
28393      }
28394      differ;
28395      keyValues = [];
28396      compareFn = defaultComparator;
28397      transform(input2, compareFn = defaultComparator) {
28398        if (!input2 || !(input2 instanceof Map) && typeof input2 !== "object") {
28399          return null;
28400        }
28401        this.differ ??= this.differs.find(input2).create();
28402        const differChanges = this.differ.diff(input2);
28403        const compareFnChanged = compareFn !== this.compareFn;
28404        if (differChanges) {
28405          this.keyValues = [];
28406          differChanges.forEachItem((r) => {
28407            this.keyValues.push(makeKeyValuePair(r.key, r.currentValue));
28408          });
28409        }
28410        if (differChanges || compareFnChanged) {
28411          if (compareFn) {
28412            this.keyValues.sort(compareFn);
28413          }
28414          this.compareFn = compareFn;
28415        }
28416        return this.keyValues;
28417      }
28418      static \u0275fac = function KeyValuePipe_Factory(__ngFactoryType__) {
28419        return new (__ngFactoryType__ || _KeyValuePipe)(\u0275\u0275directiveInject(KeyValueDiffers, 16));
28420      };
28421      static \u0275pipe = /* @__PURE__ */ \u0275\u0275definePipe({
28422        name: "keyvalue",
28423        type: _KeyValuePipe,
28424        pure: false
28425      });
28426    };
28427    (() => {
28428      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(KeyValuePipe, [{
28429        type: Pipe,
28430        args: [{
28431          name: "keyvalue",
28432          pure: false
28433        }]
28434      }], () => [{
28435        type: KeyValueDiffers
28436      }], null);
28437    })();
28438    DecimalPipe = class _DecimalPipe {
28439      _locale;
28440      constructor(_locale) {
28441        this._locale = _locale;
28442      }
28443      transform(value, digitsInfo, locale) {
28444        if (!isValue(value)) return null;
28445        locale ||= this._locale;
28446        try {
28447          const num = strToNumber(value);
28448          return formatNumber(num, locale, digitsInfo);
28449        } catch (error) {
28450          throw invalidPipeArgumentError(_DecimalPipe, error.message);
28451        }
28452      }
28453      static \u0275fac = function DecimalPipe_Factory(__ngFactoryType__) {
28454        return new (__ngFactoryType__ || _DecimalPipe)(\u0275\u0275directiveInject(LOCALE_ID, 16));
28455      };
28456      static \u0275pipe = /* @__PURE__ */ \u0275\u0275definePipe({
28457        name: "number",
28458        type: _DecimalPipe,
28459        pure: true
28460      });
28461    };
28462    (() => {
28463      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(DecimalPipe, [{
28464        type: Pipe,
28465        args: [{
28466          name: "number"
28467        }]
28468      }], () => [{
28469        type: void 0,
28470        decorators: [{
28471          type: Inject,
28472          args: [LOCALE_ID]
28473        }]
28474      }], null);
28475    })();
28476    PercentPipe = class _PercentPipe {
28477      _locale;
28478      constructor(_locale) {
28479        this._locale = _locale;
28480      }
28481      /**
28482       *
28483       * @param value The number to be formatted as a percentage.
28484       * @param digitsInfo Decimal representation options, specified by a string
28485       * in the following format:<br>
28486       * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
28487       *   - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
28488       * Default is `1`.
28489       *   - `minFractionDigits`: The minimum number of digits after the decimal point.
28490       * Default is `0`.
28491       *   - `maxFractionDigits`: The maximum number of digits after the decimal point.
28492       * Default is `0`.
28493       * @param locale A locale code for the locale format rules to use.
28494       * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
28495       * See [Setting your app locale](guide/i18n/locale-id).
28496       */
28497      transform(value, digitsInfo, locale) {
28498        if (!isValue(value)) return null;
28499        locale ||= this._locale;
28500        try {
28501          const num = strToNumber(value);
28502          return formatPercent(num, locale, digitsInfo);
28503        } catch (error) {
28504          throw invalidPipeArgumentError(_PercentPipe, error.message);
28505        }
28506      }
28507      static \u0275fac = function PercentPipe_Factory(__ngFactoryType__) {
28508        return new (__ngFactoryType__ || _PercentPipe)(\u0275\u0275directiveInject(LOCALE_ID, 16));
28509      };
28510      static \u0275pipe = /* @__PURE__ */ \u0275\u0275definePipe({
28511        name: "percent",
28512        type: _PercentPipe,
28513        pure: true
28514      });
28515    };
28516    (() => {
28517      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PercentPipe, [{
28518        type: Pipe,
28519        args: [{
28520          name: "percent"
28521        }]
28522      }], () => [{
28523        type: void 0,
28524        decorators: [{
28525          type: Inject,
28526          args: [LOCALE_ID]
28527        }]
28528      }], null);
28529    })();
28530    CurrencyPipe = class _CurrencyPipe {
28531      _locale;
28532      _defaultCurrencyCode;
28533      constructor(_locale, _defaultCurrencyCode = "USD") {
28534        this._locale = _locale;
28535        this._defaultCurrencyCode = _defaultCurrencyCode;
28536      }
28537      transform(value, currencyCode = this._defaultCurrencyCode, display = "symbol", digitsInfo, locale) {
28538        if (!isValue(value)) return null;
28539        locale ||= this._locale;
28540        if (typeof display === "boolean") {
28541          if (typeof ngDevMode === "undefined" || ngDevMode) {
28542            console.warn(`Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are "code", "symbol" or "symbol-narrow".`);
28543          }
28544          display = display ? "symbol" : "code";
28545        }
28546        let currency = currencyCode || this._defaultCurrencyCode;
28547        if (display !== "code") {
28548          if (display === "symbol" || display === "symbol-narrow") {
28549            currency = getCurrencySymbol(currency, display === "symbol" ? "wide" : "narrow", locale);
28550          } else {
28551            currency = display;
28552          }
28553        }
28554        try {
28555          const num = strToNumber(value);
28556          return formatCurrency(num, locale, currency, currencyCode, digitsInfo);
28557        } catch (error) {
28558          throw invalidPipeArgumentError(_CurrencyPipe, error.message);
28559        }
28560      }
28561      static \u0275fac = function CurrencyPipe_Factory(__ngFactoryType__) {
28562        return new (__ngFactoryType__ || _CurrencyPipe)(\u0275\u0275directiveInject(LOCALE_ID, 16), \u0275\u0275directiveInject(DEFAULT_CURRENCY_CODE, 16));
28563      };
28564      static \u0275pipe = /* @__PURE__ */ \u0275\u0275definePipe({
28565        name: "currency",
28566        type: _CurrencyPipe,
28567        pure: true
28568      });
28569    };
28570    (() => {
28571      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(CurrencyPipe, [{
28572        type: Pipe,
28573        args: [{
28574          name: "currency"
28575        }]
28576      }], () => [{
28577        type: void 0,
28578        decorators: [{
28579          type: Inject,
28580          args: [LOCALE_ID]
28581        }]
28582      }, {
28583        type: void 0,
28584        decorators: [{
28585          type: Inject,
28586          args: [DEFAULT_CURRENCY_CODE]
28587        }]
28588      }], null);
28589    })();
28590    SlicePipe = class _SlicePipe {
28591      transform(value, start, end) {
28592        if (value == null) return null;
28593        const supports = typeof value === "string" || Array.isArray(value);
28594        if (!supports) {
28595          throw invalidPipeArgumentError(_SlicePipe, value);
28596        }
28597        return value.slice(start, end);
28598      }
28599      static \u0275fac = function SlicePipe_Factory(__ngFactoryType__) {
28600        return new (__ngFactoryType__ || _SlicePipe)();
28601      };
28602      static \u0275pipe = /* @__PURE__ */ \u0275\u0275definePipe({
28603        name: "slice",
28604        type: _SlicePipe,
28605        pure: false
28606      });
28607    };
28608    (() => {
28609      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(SlicePipe, [{
28610        type: Pipe,
28611        args: [{
28612          name: "slice",
28613          pure: false
28614        }]
28615      }], null, null);
28616    })();
28617    COMMON_PIPES = [AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe];
28618    CommonModule = class _CommonModule {
28619      static \u0275fac = function CommonModule_Factory(__ngFactoryType__) {
28620        return new (__ngFactoryType__ || _CommonModule)();
28621      };
28622      static \u0275mod = /* @__PURE__ */ \u0275\u0275defineNgModule({
28623        type: _CommonModule,
28624        imports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe],
28625        exports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe]
28626      });
28627      static \u0275inj = /* @__PURE__ */ \u0275\u0275defineInjector({});
28628    };
28629    (() => {
28630      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(CommonModule, [{
28631        type: NgModule,
28632        args: [{
28633          imports: [COMMON_DIRECTIVES, COMMON_PIPES],
28634          exports: [COMMON_DIRECTIVES, COMMON_PIPES]
28635        }]
28636      }], null, null);
28637    })();
28638  }
28639});
28640
vendor: 604 bytes, lines 28641-28661
28641// node_modules/@angular/common/fesm2022/xhr.mjs
28642function parseCookieValue(cookieStr, name) {
28643  name = encodeURIComponent(name);
28644  for (const cookie of cookieStr.split(";")) {
28645    const eqIndex = cookie.indexOf("=");
28646    const [cookieName, cookieValue] = eqIndex == -1 ? [cookie, ""] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)];
28647    if (cookieName.trim() === name) {
28648      return decodeURIComponent(cookieValue);
28649    }
28650  }
28651  return null;
28652}
28653var XhrFactory;
28654var init_xhr = __esm({
28655  "node_modules/@angular/common/fesm2022/xhr.mjs"() {
28656    "use strict";
28657    XhrFactory = class {
28658    };
28659  }
28660});
28661
vendor: 55,957 bytes, lines 28662-29867
28662// node_modules/@angular/common/fesm2022/common.mjs
28663function getUrl(src, win) {
28664  return isAbsoluteUrl(src) ? new URL(src) : new URL(src, win.location.href);
28665}
28666function isAbsoluteUrl(src) {
28667  return /^https?:\/\//.test(src);
28668}
28669function extractHostname(url) {
28670  return isAbsoluteUrl(url) ? new URL(url).hostname : url;
28671}
28672function isValidPath(path) {
28673  const isString = typeof path === "string";
28674  if (!isString || path.trim() === "") {
28675    return false;
28676  }
28677  try {
28678    const url = new URL(path);
28679    return true;
28680  } catch {
28681    return false;
28682  }
28683}
28684function normalizePath(path) {
28685  return path.endsWith("/") ? path.slice(0, -1) : path;
28686}
28687function normalizeSrc(src) {
28688  return src.startsWith("/") ? src.slice(1) : src;
28689}
28690function createImageLoader(buildUrlFn, exampleUrls) {
28691  return function provideImageLoader(path) {
28692    if (!isValidPath(path)) {
28693      throwInvalidPathError(path, exampleUrls || []);
28694    }
28695    path = normalizePath(path);
28696    const loaderFn = (config2) => {
28697      if (isAbsoluteUrl(config2.src)) {
28698        throwUnexpectedAbsoluteUrlError(path, config2.src);
28699      }
28700      return buildUrlFn(path, __spreadProps(__spreadValues({}, config2), {
28701        src: normalizeSrc(config2.src)
28702      }));
28703    };
28704    const providers = [{
28705      provide: IMAGE_LOADER,
28706      useValue: loaderFn
28707    }];
28708    return providers;
28709  };
28710}
28711function throwInvalidPathError(path, exampleUrls) {
28712  throw new RuntimeError(2959, ngDevMode && `Image loader has detected an invalid path (\`${path}\`). To fix this, supply a path using one of the following formats: ${exampleUrls.join(" or ")}`);
28713}
28714function throwUnexpectedAbsoluteUrlError(path, url) {
28715  throw new RuntimeError(2959, ngDevMode && `Image loader has detected a \`<img>\` tag with an invalid \`ngSrc\` attribute: ${url}. This image loader expects \`ngSrc\` to be a relative URL - however the provided value is an absolute URL. To fix this, provide \`ngSrc\` as a path relative to the base URL configured for this loader (\`${path}\`).`);
28716}
28717function createCloudflareUrl(path, config2) {
28718  let params = `format=auto`;
28719  if (config2.width) {
28720    params += `,width=${config2.width}`;
28721  }
28722  if (config2.isPlaceholder) {
28723    params += `,quality=${PLACEHOLDER_QUALITY}`;
28724  }
28725  return `${path}/cdn-cgi/image/${params}/${config2.src}`;
28726}
28727function isCloudinaryUrl(url) {
28728  return CLOUDINARY_LOADER_REGEX.test(url);
28729}
28730function createCloudinaryUrl(path, config2) {
28731  const quality = config2.isPlaceholder ? "q_auto:low" : "q_auto";
28732  let params = `f_auto,${quality}`;
28733  if (config2.width) {
28734    params += `,w_${config2.width}`;
28735  }
28736  if (config2.loaderParams?.["rounded"]) {
28737    params += `,r_max`;
28738  }
28739  return `${path}/image/upload/${params}/${config2.src}`;
28740}
28741function isImageKitUrl(url) {
28742  return IMAGE_KIT_LOADER_REGEX.test(url);
28743}
28744function createImagekitUrl(path, config2) {
28745  const {
28746    src,
28747    width
28748  } = config2;
28749  const params = [];
28750  if (width) {
28751    params.push(`w-${width}`);
28752  }
28753  if (config2.isPlaceholder) {
28754    params.push(`q-${PLACEHOLDER_QUALITY}`);
28755  }
28756  const urlSegments = params.length ? [path, `tr:${params.join(",")}`, src] : [path, src];
28757  const url = new URL(urlSegments.join("/"));
28758  return url.href;
28759}
28760function isImgixUrl(url) {
28761  return IMGIX_LOADER_REGEX.test(url);
28762}
28763function createImgixUrl(path, config2) {
28764  const url = new URL(`${path}/${config2.src}`);
28765  url.searchParams.set("auto", "format");
28766  if (config2.width) {
28767    url.searchParams.set("w", config2.width.toString());
28768  }
28769  if (config2.isPlaceholder) {
28770    url.searchParams.set("q", PLACEHOLDER_QUALITY);
28771  }
28772  return url.href;
28773}
28774function isNetlifyUrl(url) {
28775  return NETLIFY_LOADER_REGEX.test(url);
28776}
28777function imgDirectiveDetails(ngSrc, includeNgSrc = true) {
28778  const ngSrcInfo = includeNgSrc ? `(activated on an <img> element with the \`ngSrc="${ngSrc}"\`) ` : "";
28779  return `The NgOptimizedImage directive ${ngSrcInfo}has detected that`;
28780}
28781function assertDevMode(checkName) {
28782  if (!ngDevMode) {
28783    throw new RuntimeError(2958, `Unexpected invocation of the ${checkName} in the prod mode. Please make sure that the prod mode is enabled for production builds.`);
28784  }
28785}
28786function logMissingPriorityError(ngSrc) {
28787  const directiveDetails = imgDirectiveDetails(ngSrc);
28788  console.error(formatRuntimeError(2955, `${directiveDetails} this image is the Largest Contentful Paint (LCP) element but was not marked "priority". This image should be marked "priority" in order to prioritize its loading. To fix this, add the "priority" attribute.`));
28789}
28790function logModifiedWarning(ngSrc) {
28791  const directiveDetails = imgDirectiveDetails(ngSrc);
28792  console.warn(formatRuntimeError(2964, `${directiveDetails} this image is the Largest Contentful Paint (LCP) element and has had its "ngSrc" attribute modified. This can cause slower loading performance. It is recommended not to modify the "ngSrc" property on any image which could be the LCP element.`));
28793}
28794function deepForEach2(input2, fn) {
28795  for (let value of input2) {
28796    Array.isArray(value) ? deepForEach2(value, fn) : fn(value);
28797  }
28798}
28799function processConfig(config2) {
28800  let sortedBreakpoints = {};
28801  if (config2.breakpoints) {
28802    sortedBreakpoints.breakpoints = config2.breakpoints.sort((a, b) => a - b);
28803  }
28804  return Object.assign({}, IMAGE_CONFIG_DEFAULTS, config2, sortedBreakpoints);
28805}
28806function assertNoConflictingSrc(dir) {
28807  if (dir.src) {
28808    throw new RuntimeError(2950, `${imgDirectiveDetails(dir.ngSrc)} both \`src\` and \`ngSrc\` have been set. Supplying both of these attributes breaks lazy loading. The NgOptimizedImage directive sets \`src\` itself based on the value of \`ngSrc\`. To fix this, please remove the \`src\` attribute.`);
28809  }
28810}
28811function assertNoConflictingSrcset(dir) {
28812  if (dir.srcset) {
28813    throw new RuntimeError(2951, `${imgDirectiveDetails(dir.ngSrc)} both \`srcset\` and \`ngSrcset\` have been set. Supplying both of these attributes breaks lazy loading. The NgOptimizedImage directive sets \`srcset\` itself based on the value of \`ngSrcset\`. To fix this, please remove the \`srcset\` attribute.`);
28814  }
28815}
28816function assertNotBase64Image(dir) {
28817  let ngSrc = dir.ngSrc.trim();
28818  if (ngSrc.startsWith("data:")) {
28819    if (ngSrc.length > BASE64_IMG_MAX_LENGTH_IN_ERROR) {
28820      ngSrc = ngSrc.substring(0, BASE64_IMG_MAX_LENGTH_IN_ERROR) + "...";
28821    }
28822    throw new RuntimeError(2952, `${imgDirectiveDetails(dir.ngSrc, false)} \`ngSrc\` is a Base64-encoded string (${ngSrc}). NgOptimizedImage does not support Base64-encoded strings. To fix this, disable the NgOptimizedImage directive for this element by removing \`ngSrc\` and using a standard \`src\` attribute instead.`);
28823  }
28824}
28825function assertNoComplexSizes(dir) {
28826  let sizes = dir.sizes;
28827  if (sizes?.match(/((\)|,)\s|^)\d+px/)) {
28828    throw new RuntimeError(2952, `${imgDirectiveDetails(dir.ngSrc, false)} \`sizes\` was set to a string including pixel values. For automatic \`srcset\` generation, \`sizes\` must only include responsive values, such as \`sizes="50vw"\` or \`sizes="(min-width: 768px) 50vw, 100vw"\`. To fix this, modify the \`sizes\` attribute, or provide your own \`ngSrcset\` value directly.`);
28829  }
28830}
28831function assertValidPlaceholder(dir, imageLoader) {
28832  assertNoPlaceholderConfigWithoutPlaceholder(dir);
28833  assertNoRelativePlaceholderWithoutLoader(dir, imageLoader);
28834  assertNoOversizedDataUrl(dir);
28835}
28836function assertNoPlaceholderConfigWithoutPlaceholder(dir) {
28837  if (dir.placeholderConfig && !dir.placeholder) {
28838    throw new RuntimeError(2952, `${imgDirectiveDetails(dir.ngSrc, false)} \`placeholderConfig\` options were provided for an image that does not use the \`placeholder\` attribute, and will have no effect.`);
28839  }
28840}
28841function assertNoRelativePlaceholderWithoutLoader(dir, imageLoader) {
28842  if (dir.placeholder === true && imageLoader === noopImageLoader) {
28843    throw new RuntimeError(2963, `${imgDirectiveDetails(dir.ngSrc)} the \`placeholder\` attribute is set to true but no image loader is configured (i.e. the default one is being used), which would result in the same image being used for the primary image and its placeholder. To fix this, provide a loader or remove the \`placeholder\` attribute from the image.`);
28844  }
28845}
28846function assertNoOversizedDataUrl(dir) {
28847  if (dir.placeholder && typeof dir.placeholder === "string" && dir.placeholder.startsWith("data:")) {
28848    if (dir.placeholder.length > DATA_URL_ERROR_LIMIT) {
28849      throw new RuntimeError(2965, `${imgDirectiveDetails(dir.ngSrc)} the \`placeholder\` attribute is set to a data URL which is longer than ${DATA_URL_ERROR_LIMIT} characters. This is strongly discouraged, as large inline placeholders directly increase the bundle size of Angular and hurt page load performance. To fix this, generate a smaller data URL placeholder.`);
28850    }
28851    if (dir.placeholder.length > DATA_URL_WARN_LIMIT) {
28852      console.warn(formatRuntimeError(2965, `${imgDirectiveDetails(dir.ngSrc)} the \`placeholder\` attribute is set to a data URL which is longer than ${DATA_URL_WARN_LIMIT} characters. This is discouraged, as large inline placeholders directly increase the bundle size of Angular and hurt page load performance. For better loading performance, generate a smaller data URL placeholder.`));
28853    }
28854  }
28855}
28856function assertNotBlobUrl(dir) {
28857  const ngSrc = dir.ngSrc.trim();
28858  if (ngSrc.startsWith("blob:")) {
28859    throw new RuntimeError(2952, `${imgDirectiveDetails(dir.ngSrc)} \`ngSrc\` was set to a blob URL (${ngSrc}). Blob URLs are not supported by the NgOptimizedImage directive. To fix this, disable the NgOptimizedImage directive for this element by removing \`ngSrc\` and using a regular \`src\` attribute instead.`);
28860  }
28861}
28862function assertNonEmptyInput(dir, name, value) {
28863  const isString = typeof value === "string";
28864  const isEmptyString = isString && value.trim() === "";
28865  if (!isString || isEmptyString) {
28866    throw new RuntimeError(2952, `${imgDirectiveDetails(dir.ngSrc)} \`${name}\` has an invalid value (\`${value}\`). To fix this, change the value to a non-empty string.`);
28867  }
28868}
28869function assertValidNgSrcset(dir, value) {
28870  if (value == null) return;
28871  assertNonEmptyInput(dir, "ngSrcset", value);
28872  const stringVal = value;
28873  const isValidWidthDescriptor = VALID_WIDTH_DESCRIPTOR_SRCSET.test(stringVal);
28874  const isValidDensityDescriptor = VALID_DENSITY_DESCRIPTOR_SRCSET.test(stringVal);
28875  if (isValidDensityDescriptor) {
28876    assertUnderDensityCap(dir, stringVal);
28877  }
28878  const isValidSrcset = isValidWidthDescriptor || isValidDensityDescriptor;
28879  if (!isValidSrcset) {
28880    throw new RuntimeError(2952, `${imgDirectiveDetails(dir.ngSrc)} \`ngSrcset\` has an invalid value (\`${value}\`). To fix this, supply \`ngSrcset\` using a comma-separated list of one or more width descriptors (e.g. "100w, 200w") or density descriptors (e.g. "1x, 2x").`);
28881  }
28882}
28883function assertUnderDensityCap(dir, value) {
28884  const underDensityCap = value.split(",").every((num) => num === "" || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP);
28885  if (!underDensityCap) {
28886    throw new RuntimeError(2952, `${imgDirectiveDetails(dir.ngSrc)} the \`ngSrcset\` contains an unsupported image density:\`${value}\`. NgOptimizedImage generally recommends a max image density of ${RECOMMENDED_SRCSET_DENSITY_CAP}x but supports image densities up to ${ABSOLUTE_SRCSET_DENSITY_CAP}x. The human eye cannot distinguish between image densities greater than ${RECOMMENDED_SRCSET_DENSITY_CAP}x - which makes them unnecessary for most use cases. Images that will be pinch-zoomed are typically the primary use case for ${ABSOLUTE_SRCSET_DENSITY_CAP}x images. Please remove the high density descriptor and try again.`);
28887  }
28888}
28889function postInitInputChangeError(dir, inputName) {
28890  let reason;
28891  if (inputName === "width" || inputName === "height") {
28892    reason = `Changing \`${inputName}\` may result in different attribute value applied to the underlying image element and cause layout shifts on a page.`;
28893  } else {
28894    reason = `Changing the \`${inputName}\` would have no effect on the underlying image element, because the resource loading has already occurred.`;
28895  }
28896  return new RuntimeError(2953, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` was updated after initialization. The NgOptimizedImage directive will not react to this input change. ${reason} To fix this, either switch \`${inputName}\` to a static value or wrap the image element in an @if that is gated on the necessary value.`);
28897}
28898function assertNoPostInitInputChange(dir, changes, inputs) {
28899  inputs.forEach((input2) => {
28900    const isUpdated = changes.hasOwnProperty(input2);
28901    if (isUpdated && !changes[input2].isFirstChange()) {
28902      if (input2 === "ngSrc") {
28903        dir = {
28904          ngSrc: changes[input2].previousValue
28905        };
28906      }
28907      throw postInitInputChangeError(dir, input2);
28908    }
28909  });
28910}
28911function assertGreaterThanZero(dir, inputValue, inputName) {
28912  const validNumber = typeof inputValue === "number" && inputValue > 0;
28913  const validString = typeof inputValue === "string" && /^\d+$/.test(inputValue.trim()) && parseInt(inputValue) > 0;
28914  if (!validNumber && !validString) {
28915    throw new RuntimeError(2952, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` has an invalid value. To fix this, provide \`${inputName}\` as a number greater than 0.`);
28916  }
28917}
28918function assertNoImageDistortion(dir, img, renderer, destroyRef) {
28919  const callback = () => {
28920    removeLoadListenerFn();
28921    removeErrorListenerFn();
28922    const computedStyle = window.getComputedStyle(img);
28923    let renderedWidth = parseFloat(computedStyle.getPropertyValue("width"));
28924    let renderedHeight = parseFloat(computedStyle.getPropertyValue("height"));
28925    const boxSizing = computedStyle.getPropertyValue("box-sizing");
28926    if (boxSizing === "border-box") {
28927      const paddingTop = computedStyle.getPropertyValue("padding-top");
28928      const paddingRight = computedStyle.getPropertyValue("padding-right");
28929      const paddingBottom = computedStyle.getPropertyValue("padding-bottom");
28930      const paddingLeft = computedStyle.getPropertyValue("padding-left");
28931      renderedWidth -= parseFloat(paddingRight) + parseFloat(paddingLeft);
28932      renderedHeight -= parseFloat(paddingTop) + parseFloat(paddingBottom);
28933    }
28934    const renderedAspectRatio = renderedWidth / renderedHeight;
28935    const nonZeroRenderedDimensions = renderedWidth !== 0 && renderedHeight !== 0;
28936    const intrinsicWidth = img.naturalWidth;
28937    const intrinsicHeight = img.naturalHeight;
28938    const intrinsicAspectRatio = intrinsicWidth / intrinsicHeight;
28939    const suppliedWidth = dir.width;
28940    const suppliedHeight = dir.height;
28941    const suppliedAspectRatio = suppliedWidth / suppliedHeight;
28942    const inaccurateDimensions = Math.abs(suppliedAspectRatio - intrinsicAspectRatio) > ASPECT_RATIO_TOLERANCE;
28943    const stylingDistortion = nonZeroRenderedDimensions && Math.abs(intrinsicAspectRatio - renderedAspectRatio) > ASPECT_RATIO_TOLERANCE;
28944    if (inaccurateDimensions) {
28945      console.warn(formatRuntimeError(2952, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the image does not match the aspect ratio indicated by the width and height attributes. 
28946Intrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h (aspect-ratio: ${round(intrinsicAspectRatio)}). 
28947Supplied width and height attributes: ${suppliedWidth}w x ${suppliedHeight}h (aspect-ratio: ${round(suppliedAspectRatio)}). 
28948To fix this, update the width and height attributes.`));
28949    } else if (stylingDistortion) {
28950      console.warn(formatRuntimeError(2952, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the rendered image does not match the image's intrinsic aspect ratio. 
28951Intrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h (aspect-ratio: ${round(intrinsicAspectRatio)}). 
28952Rendered image size: ${renderedWidth}w x ${renderedHeight}h (aspect-ratio: ${round(renderedAspectRatio)}). 
28953This issue can occur if "width" and "height" attributes are added to an image without updating the corresponding image styling. To fix this, adjust image styling. In most cases, adding "height: auto" or "width: auto" to the image styling will fix this issue.`));
28954    } else if (!dir.ngSrcset && nonZeroRenderedDimensions) {
28955      const recommendedWidth = RECOMMENDED_SRCSET_DENSITY_CAP * renderedWidth;
28956      const recommendedHeight = RECOMMENDED_SRCSET_DENSITY_CAP * renderedHeight;
28957      const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE2;
28958      const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE2;
28959      if (oversizedWidth || oversizedHeight) {
28960        console.warn(formatRuntimeError(2960, `${imgDirectiveDetails(dir.ngSrc)} the intrinsic image is significantly larger than necessary. 
28961Rendered image size: ${renderedWidth}w x ${renderedHeight}h. 
28962Intrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h. 
28963Recommended intrinsic image size: ${recommendedWidth}w x ${recommendedHeight}h. 
28964Note: Recommended intrinsic image size is calculated assuming a maximum DPR of ${RECOMMENDED_SRCSET_DENSITY_CAP}. To improve loading time, resize the image or consider using the "ngSrcset" and "sizes" attributes.`));
28965      }
28966    }
28967  };
28968  const removeLoadListenerFn = renderer.listen(img, "load", callback);
28969  const removeErrorListenerFn = renderer.listen(img, "error", () => {
28970    removeLoadListenerFn();
28971    removeErrorListenerFn();
28972  });
28973  destroyRef.onDestroy(() => {
28974    removeLoadListenerFn();
28975    removeErrorListenerFn();
28976  });
28977  callOnLoadIfImageIsLoaded(img, callback);
28978}
28979function assertNonEmptyWidthAndHeight(dir) {
28980  let missingAttributes = [];
28981  if (dir.width === void 0) missingAttributes.push("width");
28982  if (dir.height === void 0) missingAttributes.push("height");
28983  if (missingAttributes.length > 0) {
28984    throw new RuntimeError(2954, `${imgDirectiveDetails(dir.ngSrc)} these required attributes are missing: ${missingAttributes.map((attr) => `"${attr}"`).join(", ")}. Including "width" and "height" attributes will prevent image-related layout shifts. To fix this, include "width" and "height" attributes on the image tag or turn on "fill" mode with the \`fill\` attribute.`);
28985  }
28986}
28987function assertEmptyWidthAndHeight(dir) {
28988  if (dir.width || dir.height) {
28989    throw new RuntimeError(2952, `${imgDirectiveDetails(dir.ngSrc)} the attributes \`height\` and/or \`width\` are present along with the \`fill\` attribute. Because \`fill\` mode causes an image to fill its containing element, the size attributes have no effect and should be removed.`);
28990  }
28991}
28992function assertNonZeroRenderedHeight(dir, img, renderer, destroyRef) {
28993  const callback = () => {
28994    removeLoadListenerFn();
28995    removeErrorListenerFn();
28996    const renderedHeight = img.clientHeight;
28997    if (dir.fill && renderedHeight === 0) {
28998      console.warn(formatRuntimeError(2952, `${imgDirectiveDetails(dir.ngSrc)} the height of the fill-mode image is zero. This is likely because the containing element does not have the CSS 'position' property set to one of the following: "relative", "fixed", or "absolute". To fix this problem, make sure the container element has the CSS 'position' property defined and the height of the element is not zero.`));
28999    }
29000  };
29001  const removeLoadListenerFn = renderer.listen(img, "load", callback);
29002  const removeErrorListenerFn = renderer.listen(img, "error", () => {
29003    removeLoadListenerFn();
29004    removeErrorListenerFn();
29005  });
29006  destroyRef.onDestroy(() => {
29007    removeLoadListenerFn();
29008    removeErrorListenerFn();
29009  });
29010  callOnLoadIfImageIsLoaded(img, callback);
29011}
29012function assertValidLoadingInput(dir) {
29013  if (dir.loading && dir.priority) {
29014    throw new RuntimeError(2952, `${imgDirectiveDetails(dir.ngSrc)} the \`loading\` attribute was used on an image that was marked "priority". Setting \`loading\` on priority images is not allowed because these images will always be eagerly loaded. To fix this, remove the \u201Cloading\u201D attribute from the priority image.`);
29015  }
29016  const validInputs = ["auto", "eager", "lazy"];
29017  if (typeof dir.loading === "string" && !validInputs.includes(dir.loading)) {
29018    throw new RuntimeError(2952, `${imgDirectiveDetails(dir.ngSrc)} the \`loading\` attribute has an invalid value (\`${dir.loading}\`). To fix this, provide a valid value ("lazy", "eager", or "auto").`);
29019  }
29020}
29021function assertValidDecodingInput(dir) {
29022  const validInputs = ["sync", "async", "auto"];
29023  if (typeof dir.decoding === "string" && !validInputs.includes(dir.decoding)) {
29024    throw new RuntimeError(2952, `${imgDirectiveDetails(dir.ngSrc)} the \`decoding\` attribute has an invalid value (\`${dir.decoding}\`). To fix this, provide a valid value ("sync", "async", or "auto").`);
29025  }
29026}
29027function assertNotMissingBuiltInLoader(ngSrc, imageLoader) {
29028  if (imageLoader === noopImageLoader) {
29029    let builtInLoaderName = "";
29030    for (const loader of BUILT_IN_LOADERS) {
29031      if (loader.testUrl(ngSrc)) {
29032        builtInLoaderName = loader.name;
29033        break;
29034      }
29035    }
29036    if (builtInLoaderName) {
29037      console.warn(formatRuntimeError(2962, `NgOptimizedImage: It looks like your images may be hosted on the ${builtInLoaderName} CDN, but your app is not using Angular's built-in loader for that CDN. We recommend switching to use the built-in by calling \`provide${builtInLoaderName}Loader()\` in your \`providers\` and passing it your instance's base URL. If you don't want to use the built-in loader, define a custom loader function using IMAGE_LOADER to silence this warning.`));
29038    }
29039  }
29040}
29041function assertNoNgSrcsetWithoutLoader(dir, imageLoader) {
29042  if (dir.ngSrcset && imageLoader === noopImageLoader) {
29043    console.warn(formatRuntimeError(2963, `${imgDirectiveDetails(dir.ngSrc)} the \`ngSrcset\` attribute is present but no image loader is configured (i.e. the default one is being used), which would result in the same image being used for all configured sizes. To fix this, provide a loader or remove the \`ngSrcset\` attribute from the image.`));
29044  }
29045}
29046function assertNoLoaderParamsWithoutLoader(dir, imageLoader) {
29047  if (dir.loaderParams && imageLoader === noopImageLoader) {
29048    console.warn(formatRuntimeError(2963, `${imgDirectiveDetails(dir.ngSrc)} the \`loaderParams\` attribute is present but no image loader is configured (i.e. the default one is being used), which means that the loaderParams data will not be consumed and will not affect the URL. To fix this, provide a custom loader or remove the \`loaderParams\` attribute from the image.`));
29049  }
29050}
29051function assetPriorityCountBelowThreshold(appRef) {
29052  return __async(this, null, function* () {
29053    if (IMGS_WITH_PRIORITY_ATTR_COUNT === 0) {
29054      IMGS_WITH_PRIORITY_ATTR_COUNT++;
29055      yield appRef.whenStable();
29056      if (IMGS_WITH_PRIORITY_ATTR_COUNT > PRIORITY_COUNT_THRESHOLD) {
29057        console.warn(formatRuntimeError(2966, `NgOptimizedImage: The "priority" attribute is set to true more than ${PRIORITY_COUNT_THRESHOLD} times (${IMGS_WITH_PRIORITY_ATTR_COUNT} times). Marking too many images as "high" priority can hurt your application's LCP (https://web.dev/lcp). "Priority" should only be set on the image expected to be the page's LCP element.`));
29058      }
29059    } else {
29060      IMGS_WITH_PRIORITY_ATTR_COUNT++;
29061    }
29062  });
29063}
29064function assertPlaceholderDimensions(dir, imgElement) {
29065  const computedStyle = window.getComputedStyle(imgElement);
29066  let renderedWidth = parseFloat(computedStyle.getPropertyValue("width"));
29067  let renderedHeight = parseFloat(computedStyle.getPropertyValue("height"));
29068  if (renderedWidth > PLACEHOLDER_DIMENSION_LIMIT || renderedHeight > PLACEHOLDER_DIMENSION_LIMIT) {
29069    console.warn(formatRuntimeError(2967, `${imgDirectiveDetails(dir.ngSrc)} it uses a placeholder image, but at least one of the dimensions attribute (height or width) exceeds the limit of ${PLACEHOLDER_DIMENSION_LIMIT}px. To fix this, use a smaller image as a placeholder.`));
29070  }
29071}
29072function callOnLoadIfImageIsLoaded(img, callback) {
29073  if (img.complete && img.naturalWidth) {
29074    callback();
29075  }
29076}
29077function round(input2) {
29078  return Number.isInteger(input2) ? input2 : input2.toFixed(2);
29079}
29080function unwrapSafeUrl(value) {
29081  if (typeof value === "string") {
29082    return value;
29083  }
29084  return unwrapSafeValue(value);
29085}
29086function booleanOrUrlAttribute(value) {
29087  if (typeof value === "string" && value !== "true" && value !== "false" && value !== "") {
29088    return value;
29089  }
29090  return booleanAttribute(value);
29091}
29092var PLATFORM_BROWSER_ID, PLACEHOLDER_QUALITY, noopImageLoader, IMAGE_LOADER, provideCloudflareLoader, cloudinaryLoaderInfo, CLOUDINARY_LOADER_REGEX, provideCloudinaryLoader, imageKitLoaderInfo, IMAGE_KIT_LOADER_REGEX, provideImageKitLoader, imgixLoaderInfo, IMGIX_LOADER_REGEX, provideImgixLoader, netlifyLoaderInfo, NETLIFY_LOADER_REGEX, LCPImageObserver, INTERNAL_PRECONNECT_CHECK_BLOCKLIST, PRECONNECT_CHECK_BLOCKLIST, PreconnectLinkChecker, DEFAULT_PRELOADED_IMAGES_LIMIT, PRELOADED_IMAGES, PreloadLinkCreator, BASE64_IMG_MAX_LENGTH_IN_ERROR, VALID_WIDTH_DESCRIPTOR_SRCSET, VALID_DENSITY_DESCRIPTOR_SRCSET, ABSOLUTE_SRCSET_DENSITY_CAP, RECOMMENDED_SRCSET_DENSITY_CAP, DENSITY_SRCSET_MULTIPLIERS, VIEWPORT_BREAKPOINT_CUTOFF, ASPECT_RATIO_TOLERANCE, OVERSIZED_IMAGE_TOLERANCE2, FIXED_SRCSET_WIDTH_LIMIT, FIXED_SRCSET_HEIGHT_LIMIT, PLACEHOLDER_DIMENSION_LIMIT, DATA_URL_WARN_LIMIT, DATA_URL_ERROR_LIMIT, BUILT_IN_LOADERS, PRIORITY_COUNT_THRESHOLD, IMGS_WITH_PRIORITY_ATTR_COUNT, NgOptimizedImage;
29093var init_common = __esm({
29094  "node_modules/@angular/common/fesm2022/common.mjs"() {
29095    "use strict";
29096    init_common_module();
29097    init_core();
29098    init_core();
29099    init_core();
29100    init_xhr();
29101    init_location();
29102    PLATFORM_BROWSER_ID = "browser";
29103    PLACEHOLDER_QUALITY = "20";
29104    noopImageLoader = (config2) => config2.src;
29105    IMAGE_LOADER = new InjectionToken(ngDevMode ? "ImageLoader" : "", {
29106      providedIn: "root",
29107      factory: () => noopImageLoader
29108    });
29109    provideCloudflareLoader = createImageLoader(createCloudflareUrl, ngDevMode ? ["https://<ZONE>/cdn-cgi/image/<OPTIONS>/<SOURCE-IMAGE>"] : void 0);
29110    cloudinaryLoaderInfo = {
29111      name: "Cloudinary",
29112      testUrl: isCloudinaryUrl
29113    };
29114    CLOUDINARY_LOADER_REGEX = /https?\:\/\/[^\/]+\.cloudinary\.com\/.+/;
29115    provideCloudinaryLoader = createImageLoader(createCloudinaryUrl, ngDevMode ? ["https://res.cloudinary.com/mysite", "https://mysite.cloudinary.com", "https://subdomain.mysite.com"] : void 0);
29116    imageKitLoaderInfo = {
29117      name: "ImageKit",
29118      testUrl: isImageKitUrl
29119    };
29120    IMAGE_KIT_LOADER_REGEX = /https?\:\/\/[^\/]+\.imagekit\.io\/.+/;
29121    provideImageKitLoader = createImageLoader(createImagekitUrl, ngDevMode ? ["https://ik.imagekit.io/mysite", "https://subdomain.mysite.com"] : void 0);
29122    imgixLoaderInfo = {
29123      name: "Imgix",
29124      testUrl: isImgixUrl
29125    };
29126    IMGIX_LOADER_REGEX = /https?\:\/\/[^\/]+\.imgix\.net\/.+/;
29127    provideImgixLoader = createImageLoader(createImgixUrl, ngDevMode ? ["https://somepath.imgix.net/"] : void 0);
29128    netlifyLoaderInfo = {
29129      name: "Netlify",
29130      testUrl: isNetlifyUrl
29131    };
29132    NETLIFY_LOADER_REGEX = /https?\:\/\/[^\/]+\.netlify\.app\/.+/;
29133    LCPImageObserver = class _LCPImageObserver {
29134      // Map of full image URLs -> original `ngSrc` values.
29135      images = /* @__PURE__ */ new Map();
29136      window = inject2(DOCUMENT).defaultView;
29137      observer = null;
29138      constructor() {
29139        assertDevMode("LCP checker");
29140        if (typeof PerformanceObserver !== "undefined") {
29141          this.observer = this.initPerformanceObserver();
29142        }
29143      }
29144      /**
29145       * Inits PerformanceObserver and subscribes to LCP events.
29146       * Based on https://web.dev/lcp/#measure-lcp-in-javascript
29147       */
29148      initPerformanceObserver() {
29149        const observer = new PerformanceObserver((entryList) => {
29150          const entries = entryList.getEntries();
29151          if (entries.length === 0) return;
29152          const lcpElement = entries[entries.length - 1];
29153          const imgSrc = lcpElement.element?.src ?? "";
29154          if (imgSrc.startsWith("data:") || imgSrc.startsWith("blob:")) return;
29155          const img = this.images.get(imgSrc);
29156          if (!img) return;
29157          if (!img.priority && !img.alreadyWarnedPriority) {
29158            img.alreadyWarnedPriority = true;
29159            logMissingPriorityError(imgSrc);
29160          }
29161          if (img.modified && !img.alreadyWarnedModified) {
29162            img.alreadyWarnedModified = true;
29163            logModifiedWarning(imgSrc);
29164          }
29165        });
29166        observer.observe({
29167          type: "largest-contentful-paint",
29168          buffered: true
29169        });
29170        return observer;
29171      }
29172      registerImage(rewrittenSrc, originalNgSrc, isPriority) {
29173        if (!this.observer) return;
29174        const newObservedImageState = {
29175          priority: isPriority,
29176          modified: false,
29177          alreadyWarnedModified: false,
29178          alreadyWarnedPriority: false
29179        };
29180        this.images.set(getUrl(rewrittenSrc, this.window).href, newObservedImageState);
29181      }
29182      unregisterImage(rewrittenSrc) {
29183        if (!this.observer) return;
29184        this.images.delete(getUrl(rewrittenSrc, this.window).href);
29185      }
29186      updateImage(originalSrc, newSrc) {
29187        if (!this.observer) return;
29188        const originalUrl = getUrl(originalSrc, this.window).href;
29189        const img = this.images.get(originalUrl);
29190        if (img) {
29191          img.modified = true;
29192          this.images.set(getUrl(newSrc, this.window).href, img);
29193          this.images.delete(originalUrl);
29194        }
29195      }
29196      ngOnDestroy() {
29197        if (!this.observer) return;
29198        this.observer.disconnect();
29199        this.images.clear();
29200      }
29201      static \u0275fac = function LCPImageObserver_Factory(__ngFactoryType__) {
29202        return new (__ngFactoryType__ || _LCPImageObserver)();
29203      };
29204      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
29205        token: _LCPImageObserver,
29206        factory: _LCPImageObserver.\u0275fac,
29207        providedIn: "root"
29208      });
29209    };
29210    (() => {
29211      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(LCPImageObserver, [{
29212        type: Injectable,
29213        args: [{
29214          providedIn: "root"
29215        }]
29216      }], () => [], null);
29217    })();
29218    INTERNAL_PRECONNECT_CHECK_BLOCKLIST = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "0.0.0.0", "[::1]"]);
29219    PRECONNECT_CHECK_BLOCKLIST = new InjectionToken(ngDevMode ? "PRECONNECT_CHECK_BLOCKLIST" : "");
29220    PreconnectLinkChecker = class _PreconnectLinkChecker {
29221      document = inject2(DOCUMENT);
29222      /**
29223       * Set of <link rel="preconnect"> tags found on this page.
29224       * The `null` value indicates that there was no DOM query operation performed.
29225       */
29226      preconnectLinks = null;
29227      /*
29228       * Keep track of all already seen origin URLs to avoid repeating the same check.
29229       */
29230      alreadySeen = /* @__PURE__ */ new Set();
29231      window = this.document.defaultView;
29232      blocklist = new Set(INTERNAL_PRECONNECT_CHECK_BLOCKLIST);
29233      constructor() {
29234        assertDevMode("preconnect link checker");
29235        const blocklist = inject2(PRECONNECT_CHECK_BLOCKLIST, {
29236          optional: true
29237        });
29238        if (blocklist) {
29239          this.populateBlocklist(blocklist);
29240        }
29241      }
29242      populateBlocklist(origins) {
29243        if (Array.isArray(origins)) {
29244          deepForEach2(origins, (origin) => {
29245            this.blocklist.add(extractHostname(origin));
29246          });
29247        } else {
29248          this.blocklist.add(extractHostname(origins));
29249        }
29250      }
29251      /**
29252       * Checks that a preconnect resource hint exists in the head for the
29253       * given src.
29254       *
29255       * @param rewrittenSrc src formatted with loader
29256       * @param originalNgSrc ngSrc value
29257       */
29258      assertPreconnect(rewrittenSrc, originalNgSrc) {
29259        if (false) return;
29260        const imgUrl = getUrl(rewrittenSrc, this.window);
29261        if (this.blocklist.has(imgUrl.hostname) || this.alreadySeen.has(imgUrl.origin)) return;
29262        this.alreadySeen.add(imgUrl.origin);
29263        this.preconnectLinks ??= this.queryPreconnectLinks();
29264        if (!this.preconnectLinks.has(imgUrl.origin)) {
29265          console.warn(formatRuntimeError(2956, `${imgDirectiveDetails(originalNgSrc)} there is no preconnect tag present for this image. Preconnecting to the origin(s) that serve priority images ensures that these images are delivered as soon as possible. To fix this, please add the following element into the <head> of the document:
29266  <link rel="preconnect" href="${imgUrl.origin}">`));
29267        }
29268      }
29269      queryPreconnectLinks() {
29270        const preconnectUrls = /* @__PURE__ */ new Set();
29271        const links = this.document.querySelectorAll("link[rel=preconnect]");
29272        for (const link of links) {
29273          const url = getUrl(link.href, this.window);
29274          preconnectUrls.add(url.origin);
29275        }
29276        return preconnectUrls;
29277      }
29278      ngOnDestroy() {
29279        this.preconnectLinks?.clear();
29280        this.alreadySeen.clear();
29281      }
29282      static \u0275fac = function PreconnectLinkChecker_Factory(__ngFactoryType__) {
29283        return new (__ngFactoryType__ || _PreconnectLinkChecker)();
29284      };
29285      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
29286        token: _PreconnectLinkChecker,
29287        factory: _PreconnectLinkChecker.\u0275fac,
29288        providedIn: "root"
29289      });
29290    };
29291    (() => {
29292      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PreconnectLinkChecker, [{
29293        type: Injectable,
29294        args: [{
29295          providedIn: "root"
29296        }]
29297      }], () => [], null);
29298    })();
29299    DEFAULT_PRELOADED_IMAGES_LIMIT = 5;
29300    PRELOADED_IMAGES = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "NG_OPTIMIZED_PRELOADED_IMAGES" : "", {
29301      providedIn: "root",
29302      factory: () => /* @__PURE__ */ new Set()
29303    });
29304    PreloadLinkCreator = class _PreloadLinkCreator {
29305      preloadedImages = inject2(PRELOADED_IMAGES);
29306      document = inject2(DOCUMENT);
29307      errorShown = false;
29308      /**
29309       * @description Add a preload `<link>` to the `<head>` of the `index.html` that is served from the
29310       * server while using Angular Universal and SSR to kick off image loads for high priority images.
29311       *
29312       * The `sizes` (passed in from the user) and `srcset` (parsed and formatted from `ngSrcset`)
29313       * properties used to set the corresponding attributes, `imagesizes` and `imagesrcset`
29314       * respectively, on the preload `<link>` tag so that the correctly sized image is preloaded from
29315       * the CDN.
29316       *
29317       * {@link https://web.dev/preload-responsive-images/#imagesrcset-and-imagesizes}
29318       *
29319       * @param renderer The `Renderer2` passed in from the directive
29320       * @param src The original src of the image that is set on the `ngSrc` input.
29321       * @param srcset The parsed and formatted srcset created from the `ngSrcset` input
29322       * @param sizes The value of the `sizes` attribute passed in to the `<img>` tag
29323       */
29324      createPreloadLinkTag(renderer, src, srcset, sizes) {
29325        if (ngDevMode && !this.errorShown && this.preloadedImages.size >= DEFAULT_PRELOADED_IMAGES_LIMIT) {
29326          this.errorShown = true;
29327          console.warn(formatRuntimeError(2961, `The \`NgOptimizedImage\` directive has detected that more than ${DEFAULT_PRELOADED_IMAGES_LIMIT} images were marked as priority. This might negatively affect an overall performance of the page. To fix this, remove the "priority" attribute from images with less priority.`));
29328        }
29329        if (this.preloadedImages.has(src)) {
29330          return;
29331        }
29332        this.preloadedImages.add(src);
29333        const preload = renderer.createElement("link");
29334        renderer.setAttribute(preload, "as", "image");
29335        renderer.setAttribute(preload, "href", src);
29336        renderer.setAttribute(preload, "rel", "preload");
29337        renderer.setAttribute(preload, "fetchpriority", "high");
29338        if (sizes) {
29339          renderer.setAttribute(preload, "imageSizes", sizes);
29340        }
29341        if (srcset) {
29342          renderer.setAttribute(preload, "imageSrcset", srcset);
29343        }
29344        renderer.appendChild(this.document.head, preload);
29345      }
29346      static \u0275fac = function PreloadLinkCreator_Factory(__ngFactoryType__) {
29347        return new (__ngFactoryType__ || _PreloadLinkCreator)();
29348      };
29349      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
29350        token: _PreloadLinkCreator,
29351        factory: _PreloadLinkCreator.\u0275fac,
29352        providedIn: "root"
29353      });
29354    };
29355    (() => {
29356      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PreloadLinkCreator, [{
29357        type: Injectable,
29358        args: [{
29359          providedIn: "root"
29360        }]
29361      }], null, null);
29362    })();
29363    BASE64_IMG_MAX_LENGTH_IN_ERROR = 50;
29364    VALID_WIDTH_DESCRIPTOR_SRCSET = /^((\s*\d+w\s*(,|$)){1,})$/;
29365    VALID_DENSITY_DESCRIPTOR_SRCSET = /^((\s*\d+(\.\d+)?x\s*(,|$)){1,})$/;
29366    ABSOLUTE_SRCSET_DENSITY_CAP = 3;
29367    RECOMMENDED_SRCSET_DENSITY_CAP = 2;
29368    DENSITY_SRCSET_MULTIPLIERS = [1, 2];
29369    VIEWPORT_BREAKPOINT_CUTOFF = 640;
29370    ASPECT_RATIO_TOLERANCE = 0.1;
29371    OVERSIZED_IMAGE_TOLERANCE2 = 1e3;
29372    FIXED_SRCSET_WIDTH_LIMIT = 1920;
29373    FIXED_SRCSET_HEIGHT_LIMIT = 1080;
29374    PLACEHOLDER_DIMENSION_LIMIT = 1e3;
29375    DATA_URL_WARN_LIMIT = 4e3;
29376    DATA_URL_ERROR_LIMIT = 1e4;
29377    BUILT_IN_LOADERS = [imgixLoaderInfo, imageKitLoaderInfo, cloudinaryLoaderInfo, netlifyLoaderInfo];
29378    PRIORITY_COUNT_THRESHOLD = 10;
29379    IMGS_WITH_PRIORITY_ATTR_COUNT = 0;
29380    NgOptimizedImage = class _NgOptimizedImage {
29381      imageLoader = inject2(IMAGE_LOADER);
29382      config = processConfig(inject2(IMAGE_CONFIG));
29383      renderer = inject2(Renderer2);
29384      imgElement = inject2(ElementRef).nativeElement;
29385      injector = inject2(Injector);
29386      destroyRef = inject2(DestroyRef);
29387      // An LCP image observer should be injected only in development mode.
29388      // Do not assign it to `null` to avoid having a redundant property in the production bundle.
29389      lcpObserver;
29390      /**
29391       * Calculate the rewritten `src` once and store it.
29392       * This is needed to avoid repetitive calculations and make sure the directive cleanup in the
29393       * `ngOnDestroy` does not rely on the `IMAGE_LOADER` logic (which in turn can rely on some other
29394       * instance that might be already destroyed).
29395       */
29396      _renderedSrc = null;
29397      /**
29398       * Name of the source image.
29399       * Image name will be processed by the image loader and the final URL will be applied as the `src`
29400       * property of the image.
29401       */
29402      ngSrc;
29403      /**
29404       * A comma separated list of width or density descriptors.
29405       * The image name will be taken from `ngSrc` and combined with the list of width or density
29406       * descriptors to generate the final `srcset` property of the image.
29407       *
29408       * Example:
29409       * ```html
29410       * <img ngSrc="hello.jpg" ngSrcset="100w, 200w" />  =>
29411       * <img src="path/hello.jpg" srcset="path/hello.jpg?w=100 100w, path/hello.jpg?w=200 200w" />
29412       * ```
29413       */
29414      ngSrcset;
29415      /**
29416       * The base `sizes` attribute passed through to the `<img>` element.
29417       * Providing sizes causes the image to create an automatic responsive srcset.
29418       */
29419      sizes;
29420      /**
29421       * For responsive images: the intrinsic width of the image in pixels.
29422       * For fixed size images: the desired rendered width of the image in pixels.
29423       */
29424      width;
29425      /**
29426       * For responsive images: the intrinsic height of the image in pixels.
29427       * For fixed size images: the desired rendered height of the image in pixels.
29428       */
29429      height;
29430      /**
29431       * The desired decoding behavior for the image. Defaults to `auto`
29432       * if not explicitly set, matching native browser behavior.
29433       *
29434       * Use `async` to decode the image off the main thread (non-blocking),
29435       * `sync` for immediate decoding (blocking), or `auto` to let the
29436       * browser decide the optimal strategy.
29437       *
29438       * [Spec](https://html.spec.whatwg.org/multipage/images.html#image-decoding-hint)
29439       */
29440      decoding;
29441      /**
29442       * The desired loading behavior (lazy, eager, or auto). Defaults to `lazy`,
29443       * which is recommended for most images.
29444       *
29445       * Warning: Setting images as loading="eager" or loading="auto" marks them
29446       * as non-priority images and can hurt loading performance. For images which
29447       * may be the LCP element, use the `priority` attribute instead of `loading`.
29448       */
29449      loading;
29450      /**
29451       * Indicates whether this image should have a high priority.
29452       */
29453      priority = false;
29454      /**
29455       * Data to pass through to custom loaders.
29456       */
29457      loaderParams;
29458      /**
29459       * Disables automatic srcset generation for this image.
29460       */
29461      disableOptimizedSrcset = false;
29462      /**
29463       * Sets the image to "fill mode", which eliminates the height/width requirement and adds
29464       * styles such that the image fills its containing element.
29465       */
29466      fill = false;
29467      /**
29468       * A URL or data URL for an image to be used as a placeholder while this image loads.
29469       */
29470      placeholder;
29471      /**
29472       * Configuration object for placeholder settings. Options:
29473       *   * blur: Setting this to false disables the automatic CSS blur.
29474       */
29475      placeholderConfig;
29476      /**
29477       * Value of the `src` attribute if set on the host `<img>` element.
29478       * This input is exclusively read to assert that `src` is not set in conflict
29479       * with `ngSrc` and that images don't start to load until a lazy loading strategy is set.
29480       * @internal
29481       */
29482      src;
29483      /**
29484       * Value of the `srcset` attribute if set on the host `<img>` element.
29485       * This input is exclusively read to assert that `srcset` is not set in conflict
29486       * with `ngSrcset` and that images don't start to load until a lazy loading strategy is set.
29487       * @internal
29488       */
29489      srcset;
29490      constructor() {
29491        if (ngDevMode) {
29492          this.lcpObserver = this.injector.get(LCPImageObserver);
29493          this.destroyRef.onDestroy(() => {
29494            if (!this.priority && this._renderedSrc !== null) {
29495              this.lcpObserver.unregisterImage(this._renderedSrc);
29496            }
29497          });
29498        }
29499      }
29500      /** @docs-private */
29501      ngOnInit() {
29502        performanceMarkFeature("NgOptimizedImage");
29503        if (ngDevMode) {
29504          const ngZone = this.injector.get(NgZone);
29505          assertNonEmptyInput(this, "ngSrc", this.ngSrc);
29506          assertValidNgSrcset(this, this.ngSrcset);
29507          assertNoConflictingSrc(this);
29508          if (this.ngSrcset) {
29509            assertNoConflictingSrcset(this);
29510          }
29511          assertNotBase64Image(this);
29512          assertNotBlobUrl(this);
29513          if (this.fill) {
29514            assertEmptyWidthAndHeight(this);
29515            ngZone.runOutsideAngular(() => assertNonZeroRenderedHeight(this, this.imgElement, this.renderer, this.destroyRef));
29516          } else {
29517            assertNonEmptyWidthAndHeight(this);
29518            if (this.height !== void 0) {
29519              assertGreaterThanZero(this, this.height, "height");
29520            }
29521            if (this.width !== void 0) {
29522              assertGreaterThanZero(this, this.width, "width");
29523            }
29524            ngZone.runOutsideAngular(() => assertNoImageDistortion(this, this.imgElement, this.renderer, this.destroyRef));
29525          }
29526          assertValidLoadingInput(this);
29527          assertValidDecodingInput(this);
29528          if (!this.ngSrcset) {
29529            assertNoComplexSizes(this);
29530          }
29531          assertValidPlaceholder(this, this.imageLoader);
29532          assertNotMissingBuiltInLoader(this.ngSrc, this.imageLoader);
29533          assertNoNgSrcsetWithoutLoader(this, this.imageLoader);
29534          assertNoLoaderParamsWithoutLoader(this, this.imageLoader);
29535          ngZone.runOutsideAngular(() => {
29536            this.lcpObserver.registerImage(this.getRewrittenSrc(), this.ngSrc, this.priority);
29537          });
29538          if (this.priority) {
29539            const checker = this.injector.get(PreconnectLinkChecker);
29540            checker.assertPreconnect(this.getRewrittenSrc(), this.ngSrc);
29541            if (true) {
29542              const applicationRef = this.injector.get(ApplicationRef);
29543              assetPriorityCountBelowThreshold(applicationRef);
29544            }
29545          }
29546        }
29547        if (this.placeholder) {
29548          this.removePlaceholderOnLoad(this.imgElement);
29549        }
29550        this.setHostAttributes();
29551      }
29552      setHostAttributes() {
29553        if (this.fill) {
29554          this.sizes ||= "100vw";
29555        } else {
29556          this.setHostAttribute("width", this.width.toString());
29557          this.setHostAttribute("height", this.height.toString());
29558        }
29559        this.setHostAttribute("loading", this.getLoadingBehavior());
29560        this.setHostAttribute("fetchpriority", this.getFetchPriority());
29561        this.setHostAttribute("decoding", this.getDecoding());
29562        this.setHostAttribute("ng-img", "true");
29563        const rewrittenSrcset = this.updateSrcAndSrcset();
29564        if (this.sizes) {
29565          if (this.getLoadingBehavior() === "lazy") {
29566            this.setHostAttribute("sizes", "auto, " + this.sizes);
29567          } else {
29568            this.setHostAttribute("sizes", this.sizes);
29569          }
29570        } else {
29571          if (this.ngSrcset && VALID_WIDTH_DESCRIPTOR_SRCSET.test(this.ngSrcset) && this.getLoadingBehavior() === "lazy") {
29572            this.setHostAttribute("sizes", "auto, 100vw");
29573          }
29574        }
29575        if (false) {
29576          const preloadLinkCreator = this.injector.get(PreloadLinkCreator);
29577          preloadLinkCreator.createPreloadLinkTag(this.renderer, this.getRewrittenSrc(), rewrittenSrcset, this.sizes);
29578        }
29579      }
29580      /** @docs-private */
29581      ngOnChanges(changes) {
29582        if (ngDevMode) {
29583          assertNoPostInitInputChange(this, changes, ["ngSrcset", "width", "height", "priority", "fill", "loading", "sizes", "loaderParams", "disableOptimizedSrcset"]);
29584        }
29585        if (changes["ngSrc"] && !changes["ngSrc"].isFirstChange()) {
29586          const oldSrc = this._renderedSrc;
29587          this.updateSrcAndSrcset(true);
29588          if (ngDevMode) {
29589            const newSrc = this._renderedSrc;
29590            if (oldSrc && newSrc && oldSrc !== newSrc) {
29591              const ngZone = this.injector.get(NgZone);
29592              ngZone.runOutsideAngular(() => {
29593                this.lcpObserver.updateImage(oldSrc, newSrc);
29594              });
29595            }
29596          }
29597        }
29598        if (ngDevMode && changes["placeholder"]?.currentValue && true && true) {
29599          assertPlaceholderDimensions(this, this.imgElement);
29600        }
29601      }
29602      callImageLoader(configWithoutCustomParams) {
29603        let augmentedConfig = configWithoutCustomParams;
29604        if (this.loaderParams) {
29605          augmentedConfig.loaderParams = this.loaderParams;
29606        }
29607        return this.imageLoader(augmentedConfig);
29608      }
29609      getLoadingBehavior() {
29610        if (!this.priority && this.loading !== void 0) {
29611          return this.loading;
29612        }
29613        return this.priority ? "eager" : "lazy";
29614      }
29615      getFetchPriority() {
29616        return this.priority ? "high" : "auto";
29617      }
29618      getDecoding() {
29619        if (this.priority) {
29620          return "sync";
29621        }
29622        return this.decoding ?? "auto";
29623      }
29624      getRewrittenSrc() {
29625        if (!this._renderedSrc) {
29626          const imgConfig = {
29627            src: this.ngSrc
29628          };
29629          this._renderedSrc = this.callImageLoader(imgConfig);
29630        }
29631        return this._renderedSrc;
29632      }
29633      getRewrittenSrcset() {
29634        const widthSrcSet = VALID_WIDTH_DESCRIPTOR_SRCSET.test(this.ngSrcset);
29635        const finalSrcs = this.ngSrcset.split(",").filter((src) => src !== "").map((srcStr) => {
29636          srcStr = srcStr.trim();
29637          const width = widthSrcSet ? parseFloat(srcStr) : parseFloat(srcStr) * this.width;
29638          return `${this.callImageLoader({
29639            src: this.ngSrc,
29640            width
29641          })} ${srcStr}`;
29642        });
29643        return finalSrcs.join(", ");
29644      }
29645      getAutomaticSrcset() {
29646        if (this.sizes) {
29647          return this.getResponsiveSrcset();
29648        } else {
29649          return this.getFixedSrcset();
29650        }
29651      }
29652      getResponsiveSrcset() {
29653        const {
29654          breakpoints
29655        } = this.config;
29656        let filteredBreakpoints = breakpoints;
29657        if (this.sizes?.trim() === "100vw") {
29658          filteredBreakpoints = breakpoints.filter((bp) => bp >= VIEWPORT_BREAKPOINT_CUTOFF);
29659        }
29660        const finalSrcs = filteredBreakpoints.map((bp) => `${this.callImageLoader({
29661          src: this.ngSrc,
29662          width: bp
29663        })} ${bp}w`);
29664        return finalSrcs.join(", ");
29665      }
29666      updateSrcAndSrcset(forceSrcRecalc = false) {
29667        if (forceSrcRecalc) {
29668          this._renderedSrc = null;
29669        }
29670        const rewrittenSrc = this.getRewrittenSrc();
29671        this.setHostAttribute("src", rewrittenSrc);
29672        let rewrittenSrcset = void 0;
29673        if (this.ngSrcset) {
29674          rewrittenSrcset = this.getRewrittenSrcset();
29675        } else if (this.shouldGenerateAutomaticSrcset()) {
29676          rewrittenSrcset = this.getAutomaticSrcset();
29677        }
29678        if (rewrittenSrcset) {
29679          this.setHostAttribute("srcset", rewrittenSrcset);
29680        }
29681        return rewrittenSrcset;
29682      }
29683      getFixedSrcset() {
29684        const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map((multiplier) => `${this.callImageLoader({
29685          src: this.ngSrc,
29686          width: this.width * multiplier
29687        })} ${multiplier}x`);
29688        return finalSrcs.join(", ");
29689      }
29690      shouldGenerateAutomaticSrcset() {
29691        let oversizedImage = false;
29692        if (!this.sizes) {
29693          oversizedImage = this.width > FIXED_SRCSET_WIDTH_LIMIT || this.height > FIXED_SRCSET_HEIGHT_LIMIT;
29694        }
29695        return !this.disableOptimizedSrcset && !this.srcset && this.imageLoader !== noopImageLoader && !oversizedImage;
29696      }
29697      /**
29698       * Returns an image url formatted for use with the CSS background-image property. Expects one of:
29699       * * A base64 encoded image, which is wrapped and passed through.
29700       * * A boolean. If true, calls the image loader to generate a small placeholder url.
29701       */
29702      generatePlaceholder(placeholderInput) {
29703        const {
29704          placeholderResolution
29705        } = this.config;
29706        if (placeholderInput === true) {
29707          return `url(${this.callImageLoader({
29708            src: this.ngSrc,
29709            width: placeholderResolution,
29710            isPlaceholder: true
29711          })})`;
29712        } else if (typeof placeholderInput === "string") {
29713          return `url(${placeholderInput})`;
29714        }
29715        return null;
29716      }
29717      /**
29718       * Determines if blur should be applied, based on an optional boolean
29719       * property `blur` within the optional configuration object `placeholderConfig`.
29720       */
29721      shouldBlurPlaceholder(placeholderConfig) {
29722        if (!placeholderConfig || !placeholderConfig.hasOwnProperty("blur")) {
29723          return true;
29724        }
29725        return Boolean(placeholderConfig.blur);
29726      }
29727      removePlaceholderOnLoad(img) {
29728        const callback = () => {
29729          const changeDetectorRef = this.injector.get(ChangeDetectorRef);
29730          removeLoadListenerFn();
29731          removeErrorListenerFn();
29732          this.placeholder = false;
29733          changeDetectorRef.markForCheck();
29734        };
29735        const removeLoadListenerFn = this.renderer.listen(img, "load", callback);
29736        const removeErrorListenerFn = this.renderer.listen(img, "error", callback);
29737        this.destroyRef.onDestroy(() => {
29738          removeLoadListenerFn();
29739          removeErrorListenerFn();
29740        });
29741        callOnLoadIfImageIsLoaded(img, callback);
29742      }
29743      setHostAttribute(name, value) {
29744        this.renderer.setAttribute(this.imgElement, name, value);
29745      }
29746      static \u0275fac = function NgOptimizedImage_Factory(__ngFactoryType__) {
29747        return new (__ngFactoryType__ || _NgOptimizedImage)();
29748      };
29749      static \u0275dir = /* @__PURE__ */ \u0275\u0275defineDirective({
29750        type: _NgOptimizedImage,
29751        selectors: [["img", "ngSrc", ""]],
29752        hostVars: 18,
29753        hostBindings: function NgOptimizedImage_HostBindings(rf, ctx) {
29754          if (rf & 2) {
29755            \u0275\u0275styleProp("position", ctx.fill ? "absolute" : null)("width", ctx.fill ? "100%" : null)("height", ctx.fill ? "100%" : null)("inset", ctx.fill ? "0" : null)("background-size", ctx.placeholder ? "cover" : null)("background-position", ctx.placeholder ? "50% 50%" : null)("background-repeat", ctx.placeholder ? "no-repeat" : null)("background-image", ctx.placeholder ? ctx.generatePlaceholder(ctx.placeholder) : null)("filter", ctx.placeholder && ctx.shouldBlurPlaceholder(ctx.placeholderConfig) ? "blur(15px)" : null);
29756          }
29757        },
29758        inputs: {
29759          ngSrc: [2, "ngSrc", "ngSrc", unwrapSafeUrl],
29760          ngSrcset: "ngSrcset",
29761          sizes: "sizes",
29762          width: [2, "width", "width", numberAttribute],
29763          height: [2, "height", "height", numberAttribute],
29764          decoding: "decoding",
29765          loading: "loading",
29766          priority: [2, "priority", "priority", booleanAttribute],
29767          loaderParams: "loaderParams",
29768          disableOptimizedSrcset: [2, "disableOptimizedSrcset", "disableOptimizedSrcset", booleanAttribute],
29769          fill: [2, "fill", "fill", booleanAttribute],
29770          placeholder: [2, "placeholder", "placeholder", booleanOrUrlAttribute],
29771          placeholderConfig: "placeholderConfig",
29772          src: "src",
29773          srcset: "srcset"
29774        },
29775        features: [\u0275\u0275NgOnChangesFeature]
29776      });
29777    };
29778    (() => {
29779      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgOptimizedImage, [{
29780        type: Directive,
29781        args: [{
29782          selector: "img[ngSrc]",
29783          host: {
29784            "[style.position]": 'fill ? "absolute" : null',
29785            "[style.width]": 'fill ? "100%" : null',
29786            "[style.height]": 'fill ? "100%" : null',
29787            "[style.inset]": 'fill ? "0" : null',
29788            "[style.background-size]": 'placeholder ? "cover" : null',
29789            "[style.background-position]": 'placeholder ? "50% 50%" : null',
29790            "[style.background-repeat]": 'placeholder ? "no-repeat" : null',
29791            "[style.background-image]": "placeholder ? generatePlaceholder(placeholder) : null",
29792            "[style.filter]": 'placeholder && shouldBlurPlaceholder(placeholderConfig) ? "blur(15px)" : null'
29793          }
29794        }]
29795      }], () => [], {
29796        ngSrc: [{
29797          type: Input,
29798          args: [{
29799            required: true,
29800            transform: unwrapSafeUrl
29801          }]
29802        }],
29803        ngSrcset: [{
29804          type: Input
29805        }],
29806        sizes: [{
29807          type: Input
29808        }],
29809        width: [{
29810          type: Input,
29811          args: [{
29812            transform: numberAttribute
29813          }]
29814        }],
29815        height: [{
29816          type: Input,
29817          args: [{
29818            transform: numberAttribute
29819          }]
29820        }],
29821        decoding: [{
29822          type: Input
29823        }],
29824        loading: [{
29825          type: Input
29826        }],
29827        priority: [{
29828          type: Input,
29829          args: [{
29830            transform: booleanAttribute
29831          }]
29832        }],
29833        loaderParams: [{
29834          type: Input
29835        }],
29836        disableOptimizedSrcset: [{
29837          type: Input,
29838          args: [{
29839            transform: booleanAttribute
29840          }]
29841        }],
29842        fill: [{
29843          type: Input,
29844          args: [{
29845            transform: booleanAttribute
29846          }]
29847        }],
29848        placeholder: [{
29849          type: Input,
29850          args: [{
29851            transform: booleanOrUrlAttribute
29852          }]
29853        }],
29854        placeholderConfig: [{
29855          type: Input
29856        }],
29857        src: [{
29858          type: Input
29859        }],
29860        srcset: [{
29861          type: Input
29862        }]
29863      });
29864    })();
29865  }
29866});
29867
vendor: 27,920 bytes, lines 29868-30615
29868// node_modules/@angular/platform-browser/fesm2022/dom_renderer.mjs
29869function removeElements(elements) {
29870  for (const element of elements) {
29871    element.remove();
29872  }
29873}
29874function createStyleElement(style, doc) {
29875  const styleElement = doc.createElement("style");
29876  styleElement.textContent = style;
29877  return styleElement;
29878}
29879function addServerStyles(doc, appId, inline, external) {
29880  const elements = doc.head?.querySelectorAll(`style[${APP_ID_ATTRIBUTE_NAME}="${appId}"],link[${APP_ID_ATTRIBUTE_NAME}="${appId}"]`);
29881  if (elements) {
29882    for (const styleElement of elements) {
29883      styleElement.removeAttribute(APP_ID_ATTRIBUTE_NAME);
29884      if (styleElement instanceof HTMLLinkElement) {
29885        external.set(styleElement.href.slice(styleElement.href.lastIndexOf("/") + 1), {
29886          usage: 0,
29887          elements: [styleElement]
29888        });
29889      } else if (styleElement.textContent) {
29890        inline.set(styleElement.textContent, {
29891          usage: 0,
29892          elements: [styleElement]
29893        });
29894      }
29895    }
29896  }
29897}
29898function createLinkElement(url, doc) {
29899  const linkElement = doc.createElement("link");
29900  linkElement.setAttribute("rel", "stylesheet");
29901  linkElement.setAttribute("href", url);
29902  return linkElement;
29903}
29904function shimContentAttribute(componentShortId) {
29905  return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);
29906}
29907function shimHostAttribute(componentShortId) {
29908  return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);
29909}
29910function shimStylesContent(compId, styles) {
29911  return styles.map((s) => s.replace(COMPONENT_REGEX, compId));
29912}
29913function addBaseHrefToCssSourceMap(baseHref, styles) {
29914  if (!baseHref) {
29915    return styles;
29916  }
29917  const absoluteBaseHrefUrl = new URL(baseHref, "http://localhost");
29918  return styles.map((cssContent) => {
29919    if (!cssContent.includes("sourceMappingURL=")) {
29920      return cssContent;
29921    }
29922    return cssContent.replace(SOURCEMAP_URL_REGEXP, (_, sourceMapUrl) => {
29923      if (sourceMapUrl[0] === "/" || sourceMapUrl.startsWith("data:") || PROTOCOL_REGEXP.test(sourceMapUrl)) {
29924        return `/*# sourceMappingURL=${sourceMapUrl} */`;
29925      }
29926      const {
29927        pathname: resolvedSourceMapUrl
29928      } = new URL(sourceMapUrl, absoluteBaseHrefUrl);
29929      return `/*# sourceMappingURL=${resolvedSourceMapUrl} */`;
29930    });
29931  });
29932}
29933function checkNoSyntheticProp(name, nameKind) {
29934  if (name.charCodeAt(0) === AT_CHARCODE) {
29935    throw new RuntimeError(5105, `Unexpected synthetic ${nameKind} ${name} found. Please make sure that:
29936  - Make sure \`provideAnimationsAsync()\`, \`provideAnimations()\` or \`provideNoopAnimations()\` call was added to a list of providers used to bootstrap an application.
29937  - There is a corresponding animation configuration named \`${name}\` defined in the \`animations\` field of the \`@Component\` decorator (see https://angular.dev/api/core/Component#animations).`);
29938  }
29939}
29940function isTemplateNode(node) {
29941  return node.tagName === "TEMPLATE" && node.content !== void 0;
29942}
29943var EventManagerPlugin, DomEventsPlugin, EVENT_MANAGER_PLUGINS, EventManager, APP_ID_ATTRIBUTE_NAME, SharedStylesHost, NAMESPACE_URIS, COMPONENT_REGEX, SOURCEMAP_URL_REGEXP, PROTOCOL_REGEXP, COMPONENT_VARIABLE, HOST_ATTR, CONTENT_ATTR, REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT, REMOVE_STYLES_ON_COMPONENT_DESTROY, DomRendererFactory2, DefaultDomRenderer2, AT_CHARCODE, ShadowDomRenderer, NoneEncapsulationDomRenderer, EmulatedEncapsulationDomRenderer2;
29944var init_dom_renderer = __esm({
29945  "node_modules/@angular/platform-browser/fesm2022/dom_renderer.mjs"() {
29946    "use strict";
29947    init_common();
29948    init_core();
29949    init_core();
29950    EventManagerPlugin = class {
29951      _doc;
29952      // TODO: remove (has some usage in G3)
29953      constructor(_doc) {
29954        this._doc = _doc;
29955      }
29956      // Using non-null assertion because it's set by EventManager's constructor
29957      manager;
29958    };
29959    DomEventsPlugin = class _DomEventsPlugin extends EventManagerPlugin {
29960      constructor(doc) {
29961        super(doc);
29962      }
29963      // This plugin should come last in the list of plugins, because it accepts all
29964      // events.
29965      supports(eventName) {
29966        return true;
29967      }
29968      addEventListener(element, eventName, handler, options) {
29969        element.addEventListener(eventName, handler, options);
29970        return () => this.removeEventListener(element, eventName, handler, options);
29971      }
29972      removeEventListener(target, eventName, callback, options) {
29973        return target.removeEventListener(eventName, callback, options);
29974      }
29975      static \u0275fac = function DomEventsPlugin_Factory(__ngFactoryType__) {
29976        return new (__ngFactoryType__ || _DomEventsPlugin)(\u0275\u0275inject(DOCUMENT));
29977      };
29978      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
29979        token: _DomEventsPlugin,
29980        factory: _DomEventsPlugin.\u0275fac
29981      });
29982    };
29983    (() => {
29984      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(DomEventsPlugin, [{
29985        type: Injectable
29986      }], () => [{
29987        type: void 0,
29988        decorators: [{
29989          type: Inject,
29990          args: [DOCUMENT]
29991        }]
29992      }], null);
29993    })();
29994    EVENT_MANAGER_PLUGINS = new InjectionToken(ngDevMode ? "EventManagerPlugins" : "");
29995    EventManager = class _EventManager {
29996      _zone;
29997      _plugins;
29998      _eventNameToPlugin = /* @__PURE__ */ new Map();
29999      /**
30000       * Initializes an instance of the event-manager service.
30001       */
30002      constructor(plugins, _zone) {
30003        this._zone = _zone;
30004        plugins.forEach((plugin) => {
30005          plugin.manager = this;
30006        });
30007        const otherPlugins = plugins.filter((p) => !(p instanceof DomEventsPlugin));
30008        this._plugins = otherPlugins.slice().reverse();
30009        const domEventPlugin = plugins.find((p) => p instanceof DomEventsPlugin);
30010        if (domEventPlugin) {
30011          this._plugins.push(domEventPlugin);
30012        }
30013      }
30014      /**
30015       * Registers a handler for a specific element and event.
30016       *
30017       * @param element The HTML element to receive event notifications.
30018       * @param eventName The name of the event to listen for.
30019       * @param handler A function to call when the notification occurs. Receives the
30020       * event object as an argument.
30021       * @param options Options that configure how the event listener is bound.
30022       * @returns  A callback function that can be used to remove the handler.
30023       */
30024      addEventListener(element, eventName, handler, options) {
30025        const plugin = this._findPluginFor(eventName);
30026        return plugin.addEventListener(element, eventName, handler, options);
30027      }
30028      /**
30029       * Retrieves the compilation zone in which event listeners are registered.
30030       */
30031      getZone() {
30032        return this._zone;
30033      }
30034      /** @internal */
30035      _findPluginFor(eventName) {
30036        let plugin = this._eventNameToPlugin.get(eventName);
30037        if (plugin) {
30038          return plugin;
30039        }
30040        const plugins = this._plugins;
30041        plugin = plugins.find((plugin2) => plugin2.supports(eventName));
30042        if (!plugin) {
30043          throw new RuntimeError(5101, (typeof ngDevMode === "undefined" || ngDevMode) && `No event manager plugin found for event ${eventName}`);
30044        }
30045        this._eventNameToPlugin.set(eventName, plugin);
30046        return plugin;
30047      }
30048      static \u0275fac = function EventManager_Factory(__ngFactoryType__) {
30049        return new (__ngFactoryType__ || _EventManager)(\u0275\u0275inject(EVENT_MANAGER_PLUGINS), \u0275\u0275inject(NgZone));
30050      };
30051      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
30052        token: _EventManager,
30053        factory: _EventManager.\u0275fac
30054      });
30055    };
30056    (() => {
30057      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(EventManager, [{
30058        type: Injectable
30059      }], () => [{
30060        type: void 0,
30061        decorators: [{
30062          type: Inject,
30063          args: [EVENT_MANAGER_PLUGINS]
30064        }]
30065      }, {
30066        type: NgZone
30067      }], null);
30068    })();
30069    APP_ID_ATTRIBUTE_NAME = "ng-app-id";
30070    SharedStylesHost = class _SharedStylesHost {
30071      doc;
30072      appId;
30073      nonce;
30074      /**
30075       * Provides usage information for active inline style content and associated HTML <style> elements.
30076       * Embedded styles typically originate from the `styles` metadata of a rendered component.
30077       */
30078      inline = /* @__PURE__ */ new Map();
30079      /**
30080       * Provides usage information for active external style URLs and the associated HTML <link> elements.
30081       * External styles typically originate from the `ɵɵExternalStylesFeature` of a rendered component.
30082       */
30083      external = /* @__PURE__ */ new Map();
30084      /**
30085       * Set of host DOM nodes that will have styles attached.
30086       */
30087      hosts = /* @__PURE__ */ new Set();
30088      constructor(doc, appId, nonce, platformId = {}) {
30089        this.doc = doc;
30090        this.appId = appId;
30091        this.nonce = nonce;
30092        addServerStyles(doc, appId, this.inline, this.external);
30093        this.hosts.add(doc.head);
30094      }
30095      /**
30096       * Adds embedded styles to the DOM via HTML `style` elements.
30097       * @param styles An array of style content strings.
30098       */
30099      addStyles(styles, urls) {
30100        for (const value of styles) {
30101          this.addUsage(value, this.inline, createStyleElement);
30102        }
30103        urls?.forEach((value) => this.addUsage(value, this.external, createLinkElement));
30104      }
30105      /**
30106       * Removes embedded styles from the DOM that were added as HTML `style` elements.
30107       * @param styles An array of style content strings.
30108       */
30109      removeStyles(styles, urls) {
30110        for (const value of styles) {
30111          this.removeUsage(value, this.inline);
30112        }
30113        urls?.forEach((value) => this.removeUsage(value, this.external));
30114      }
30115      addUsage(value, usages, creator) {
30116        const record = usages.get(value);
30117        if (record) {
30118          if ((typeof ngDevMode === "undefined" || ngDevMode) && record.usage === 0) {
30119            record.elements.forEach((element) => element.setAttribute("ng-style-reused", ""));
30120          }
30121          record.usage++;
30122        } else {
30123          usages.set(value, {
30124            usage: 1,
30125            elements: [...this.hosts].map((host) => this.addElement(host, creator(value, this.doc)))
30126          });
30127        }
30128      }
30129      removeUsage(value, usages) {
30130        const record = usages.get(value);
30131        if (record) {
30132          record.usage--;
30133          if (record.usage <= 0) {
30134            removeElements(record.elements);
30135            usages.delete(value);
30136          }
30137        }
30138      }
30139      ngOnDestroy() {
30140        for (const [, {
30141          elements
30142        }] of [...this.inline, ...this.external]) {
30143          removeElements(elements);
30144        }
30145        this.hosts.clear();
30146      }
30147      /**
30148       * Adds a host node to the set of style hosts and adds all existing style usage to
30149       * the newly added host node.
30150       *
30151       * This is currently only used for Shadow DOM encapsulation mode.
30152       */
30153      addHost(hostNode) {
30154        this.hosts.add(hostNode);
30155        for (const [style, {
30156          elements
30157        }] of this.inline) {
30158          elements.push(this.addElement(hostNode, createStyleElement(style, this.doc)));
30159        }
30160        for (const [url, {
30161          elements
30162        }] of this.external) {
30163          elements.push(this.addElement(hostNode, createLinkElement(url, this.doc)));
30164        }
30165      }
30166      removeHost(hostNode) {
30167        this.hosts.delete(hostNode);
30168      }
30169      addElement(host, element) {
30170        if (this.nonce) {
30171          element.setAttribute("nonce", this.nonce);
30172        }
30173        if (false) {
30174          element.setAttribute(APP_ID_ATTRIBUTE_NAME, this.appId);
30175        }
30176        return host.appendChild(element);
30177      }
30178      static \u0275fac = function SharedStylesHost_Factory(__ngFactoryType__) {
30179        return new (__ngFactoryType__ || _SharedStylesHost)(\u0275\u0275inject(DOCUMENT), \u0275\u0275inject(APP_ID), \u0275\u0275inject(CSP_NONCE, 8), \u0275\u0275inject(PLATFORM_ID));
30180      };
30181      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
30182        token: _SharedStylesHost,
30183        factory: _SharedStylesHost.\u0275fac
30184      });
30185    };
30186    (() => {
30187      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(SharedStylesHost, [{
30188        type: Injectable
30189      }], () => [{
30190        type: Document,
30191        decorators: [{
30192          type: Inject,
30193          args: [DOCUMENT]
30194        }]
30195      }, {
30196        type: void 0,
30197        decorators: [{
30198          type: Inject,
30199          args: [APP_ID]
30200        }]
30201      }, {
30202        type: void 0,
30203        decorators: [{
30204          type: Inject,
30205          args: [CSP_NONCE]
30206        }, {
30207          type: Optional
30208        }]
30209      }, {
30210        type: void 0,
30211        decorators: [{
30212          type: Inject,
30213          args: [PLATFORM_ID]
30214        }]
30215      }], null);
30216    })();
30217    NAMESPACE_URIS = {
30218      "svg": "http://www.w3.org/2000/svg",
30219      "xhtml": "http://www.w3.org/1999/xhtml",
30220      "xlink": "http://www.w3.org/1999/xlink",
30221      "xml": "http://www.w3.org/XML/1998/namespace",
30222      "xmlns": "http://www.w3.org/2000/xmlns/",
30223      "math": "http://www.w3.org/1998/Math/MathML"
30224    };
30225    COMPONENT_REGEX = /%COMP%/g;
30226    SOURCEMAP_URL_REGEXP = /\/\*#\s*sourceMappingURL=(.+?)\s*\*\//;
30227    PROTOCOL_REGEXP = /^https?:/;
30228    COMPONENT_VARIABLE = "%COMP%";
30229    HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
30230    CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;
30231    REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT = true;
30232    REMOVE_STYLES_ON_COMPONENT_DESTROY = new InjectionToken(ngDevMode ? "RemoveStylesOnCompDestroy" : "", {
30233      providedIn: "root",
30234      factory: () => REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT
30235    });
30236    DomRendererFactory2 = class _DomRendererFactory2 {
30237      eventManager;
30238      sharedStylesHost;
30239      appId;
30240      removeStylesOnCompDestroy;
30241      doc;
30242      ngZone;
30243      nonce;
30244      tracingService;
30245      rendererByCompId = /* @__PURE__ */ new Map();
30246      defaultRenderer;
30247      platformIsServer;
30248      constructor(eventManager, sharedStylesHost, appId, removeStylesOnCompDestroy, doc, ngZone, nonce = null, tracingService = null) {
30249        this.eventManager = eventManager;
30250        this.sharedStylesHost = sharedStylesHost;
30251        this.appId = appId;
30252        this.removeStylesOnCompDestroy = removeStylesOnCompDestroy;
30253        this.doc = doc;
30254        this.ngZone = ngZone;
30255        this.nonce = nonce;
30256        this.tracingService = tracingService;
30257        this.platformIsServer = false;
30258        this.defaultRenderer = new DefaultDomRenderer2(eventManager, doc, ngZone, this.platformIsServer, this.tracingService);
30259      }
30260      createRenderer(element, type) {
30261        if (!element || !type) {
30262          return this.defaultRenderer;
30263        }
30264        if (false) {
30265          type = __spreadProps(__spreadValues({}, type), {
30266            encapsulation: ViewEncapsulation.Emulated
30267          });
30268        }
30269        const renderer = this.getOrCreateRenderer(element, type);
30270        if (renderer instanceof EmulatedEncapsulationDomRenderer2) {
30271          renderer.applyToHost(element);
30272        } else if (renderer instanceof NoneEncapsulationDomRenderer) {
30273          renderer.applyStyles();
30274        }
30275        return renderer;
30276      }
30277      getOrCreateRenderer(element, type) {
30278        const rendererByCompId = this.rendererByCompId;
30279        let renderer = rendererByCompId.get(type.id);
30280        if (!renderer) {
30281          const doc = this.doc;
30282          const ngZone = this.ngZone;
30283          const eventManager = this.eventManager;
30284          const sharedStylesHost = this.sharedStylesHost;
30285          const removeStylesOnCompDestroy = this.removeStylesOnCompDestroy;
30286          const platformIsServer = this.platformIsServer;
30287          const tracingService = this.tracingService;
30288          switch (type.encapsulation) {
30289            case ViewEncapsulation.Emulated:
30290              renderer = new EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, type, this.appId, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, tracingService);
30291              break;
30292            case ViewEncapsulation.ShadowDom:
30293              return new ShadowDomRenderer(eventManager, sharedStylesHost, element, type, doc, ngZone, this.nonce, platformIsServer, tracingService);
30294            default:
30295              renderer = new NoneEncapsulationDomRenderer(eventManager, sharedStylesHost, type, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, tracingService);
30296              break;
30297          }
30298          rendererByCompId.set(type.id, renderer);
30299        }
30300        return renderer;
30301      }
30302      ngOnDestroy() {
30303        this.rendererByCompId.clear();
30304      }
30305      /**
30306       * Used during HMR to clear any cached data about a component.
30307       * @param componentId ID of the component that is being replaced.
30308       */
30309      componentReplaced(componentId) {
30310        this.rendererByCompId.delete(componentId);
30311      }
30312      static \u0275fac = function DomRendererFactory2_Factory(__ngFactoryType__) {
30313        return new (__ngFactoryType__ || _DomRendererFactory2)(\u0275\u0275inject(EventManager), \u0275\u0275inject(SharedStylesHost), \u0275\u0275inject(APP_ID), \u0275\u0275inject(REMOVE_STYLES_ON_COMPONENT_DESTROY), \u0275\u0275inject(DOCUMENT), \u0275\u0275inject(NgZone), \u0275\u0275inject(CSP_NONCE), \u0275\u0275inject(TracingService, 8));
30314      };
30315      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
30316        token: _DomRendererFactory2,
30317        factory: _DomRendererFactory2.\u0275fac
30318      });
30319    };
30320    (() => {
30321      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(DomRendererFactory2, [{
30322        type: Injectable
30323      }], () => [{
30324        type: EventManager
30325      }, {
30326        type: SharedStylesHost
30327      }, {
30328        type: void 0,
30329        decorators: [{
30330          type: Inject,
30331          args: [APP_ID]
30332        }]
30333      }, {
30334        type: void 0,
30335        decorators: [{
30336          type: Inject,
30337          args: [REMOVE_STYLES_ON_COMPONENT_DESTROY]
30338        }]
30339      }, {
30340        type: Document,
30341        decorators: [{
30342          type: Inject,
30343          args: [DOCUMENT]
30344        }]
30345      }, {
30346        type: NgZone
30347      }, {
30348        type: void 0,
30349        decorators: [{
30350          type: Inject,
30351          args: [CSP_NONCE]
30352        }]
30353      }, {
30354        type: TracingService,
30355        decorators: [{
30356          type: Inject,
30357          args: [TracingService]
30358        }, {
30359          type: Optional
30360        }]
30361      }], null);
30362    })();
30363    DefaultDomRenderer2 = class {
30364      eventManager;
30365      doc;
30366      ngZone;
30367      platformIsServer;
30368      tracingService;
30369      data = /* @__PURE__ */ Object.create(null);
30370      /**
30371       * By default this renderer throws when encountering synthetic properties
30372       * This can be disabled for example by the AsyncAnimationRendererFactory
30373       */
30374      throwOnSyntheticProps = true;
30375      constructor(eventManager, doc, ngZone, platformIsServer, tracingService) {
30376        this.eventManager = eventManager;
30377        this.doc = doc;
30378        this.ngZone = ngZone;
30379        this.platformIsServer = platformIsServer;
30380        this.tracingService = tracingService;
30381      }
30382      destroy() {
30383      }
30384      destroyNode = null;
30385      createElement(name, namespace) {
30386        if (namespace) {
30387          return this.doc.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);
30388        }
30389        return this.doc.createElement(name);
30390      }
30391      createComment(value) {
30392        return this.doc.createComment(value);
30393      }
30394      createText(value) {
30395        return this.doc.createTextNode(value);
30396      }
30397      appendChild(parent, newChild) {
30398        const targetParent = isTemplateNode(parent) ? parent.content : parent;
30399        targetParent.appendChild(newChild);
30400      }
30401      insertBefore(parent, newChild, refChild) {
30402        if (parent) {
30403          const targetParent = isTemplateNode(parent) ? parent.content : parent;
30404          targetParent.insertBefore(newChild, refChild);
30405        }
30406      }
30407      removeChild(_parent, oldChild) {
30408        oldChild.remove();
30409      }
30410      selectRootElement(selectorOrNode, preserveContent) {
30411        let el = typeof selectorOrNode === "string" ? this.doc.querySelector(selectorOrNode) : selectorOrNode;
30412        if (!el) {
30413          throw new RuntimeError(-5104, (typeof ngDevMode === "undefined" || ngDevMode) && `The selector "${selectorOrNode}" did not match any elements`);
30414        }
30415        if (!preserveContent) {
30416          el.textContent = "";
30417        }
30418        return el;
30419      }
30420      parentNode(node) {
30421        return node.parentNode;
30422      }
30423      nextSibling(node) {
30424        return node.nextSibling;
30425      }
30426      setAttribute(el, name, value, namespace) {
30427        if (namespace) {
30428          name = namespace + ":" + name;
30429          const namespaceUri = NAMESPACE_URIS[namespace];
30430          if (namespaceUri) {
30431            el.setAttributeNS(namespaceUri, name, value);
30432          } else {
30433            el.setAttribute(name, value);
30434          }
30435        } else {
30436          el.setAttribute(name, value);
30437        }
30438      }
30439      removeAttribute(el, name, namespace) {
30440        if (namespace) {
30441          const namespaceUri = NAMESPACE_URIS[namespace];
30442          if (namespaceUri) {
30443            el.removeAttributeNS(namespaceUri, name);
30444          } else {
30445            el.removeAttribute(`${namespace}:${name}`);
30446          }
30447        } else {
30448          el.removeAttribute(name);
30449        }
30450      }
30451      addClass(el, name) {
30452        el.classList.add(name);
30453      }
30454      removeClass(el, name) {
30455        el.classList.remove(name);
30456      }
30457      setStyle(el, style, value, flags) {
30458        if (flags & (RendererStyleFlags2.DashCase | RendererStyleFlags2.Important)) {
30459          el.style.setProperty(style, value, flags & RendererStyleFlags2.Important ? "important" : "");
30460        } else {
30461          el.style[style] = value;
30462        }
30463      }
30464      removeStyle(el, style, flags) {
30465        if (flags & RendererStyleFlags2.DashCase) {
30466          el.style.removeProperty(style);
30467        } else {
30468          el.style[style] = "";
30469        }
30470      }
30471      setProperty(el, name, value) {
30472        if (el == null) {
30473          return;
30474        }
30475        (typeof ngDevMode === "undefined" || ngDevMode) && this.throwOnSyntheticProps && checkNoSyntheticProp(name, "property");
30476        el[name] = value;
30477      }
30478      setValue(node, value) {
30479        node.nodeValue = value;
30480      }
30481      listen(target, event, callback, options) {
30482        (typeof ngDevMode === "undefined" || ngDevMode) && this.throwOnSyntheticProps && checkNoSyntheticProp(event, "listener");
30483        if (typeof target === "string") {
30484          target = getDOM().getGlobalEventTarget(this.doc, target);
30485          if (!target) {
30486            throw new RuntimeError(5102, (typeof ngDevMode === "undefined" || ngDevMode) && `Unsupported event target ${target} for event ${event}`);
30487          }
30488        }
30489        let wrappedCallback = this.decoratePreventDefault(callback);
30490        if (this.tracingService?.wrapEventListener) {
30491          wrappedCallback = this.tracingService.wrapEventListener(target, event, wrappedCallback);
30492        }
30493        return this.eventManager.addEventListener(target, event, wrappedCallback, options);
30494      }
30495      decoratePreventDefault(eventHandler) {
30496        return (event) => {
30497          if (event === "__ngUnwrap__") {
30498            return eventHandler;
30499          }
30500          const allowDefaultBehavior = false ? this.ngZone.runGuarded(() => eventHandler(event)) : eventHandler(event);
30501          if (allowDefaultBehavior === false) {
30502            event.preventDefault();
30503          }
30504          return void 0;
30505        };
30506      }
30507    };
30508    AT_CHARCODE = (() => "@".charCodeAt(0))();
30509    ShadowDomRenderer = class extends DefaultDomRenderer2 {
30510      sharedStylesHost;
30511      hostEl;
30512      shadowRoot;
30513      constructor(eventManager, sharedStylesHost, hostEl, component, doc, ngZone, nonce, platformIsServer, tracingService) {
30514        super(eventManager, doc, ngZone, platformIsServer, tracingService);
30515        this.sharedStylesHost = sharedStylesHost;
30516        this.hostEl = hostEl;
30517        this.shadowRoot = hostEl.attachShadow({
30518          mode: "open"
30519        });
30520        this.sharedStylesHost.addHost(this.shadowRoot);
30521        let styles = component.styles;
30522        if (ngDevMode) {
30523          const baseHref = getDOM().getBaseHref(doc) ?? "";
30524          styles = addBaseHrefToCssSourceMap(baseHref, styles);
30525        }
30526        styles = shimStylesContent(component.id, styles);
30527        for (const style of styles) {
30528          const styleEl = document.createElement("style");
30529          if (nonce) {
30530            styleEl.setAttribute("nonce", nonce);
30531          }
30532          styleEl.textContent = style;
30533          this.shadowRoot.appendChild(styleEl);
30534        }
30535        const styleUrls = component.getExternalStyles?.();
30536        if (styleUrls) {
30537          for (const styleUrl of styleUrls) {
30538            const linkEl = createLinkElement(styleUrl, doc);
30539            if (nonce) {
30540              linkEl.setAttribute("nonce", nonce);
30541            }
30542            this.shadowRoot.appendChild(linkEl);
30543          }
30544        }
30545      }
30546      nodeOrShadowRoot(node) {
30547        return node === this.hostEl ? this.shadowRoot : node;
30548      }
30549      appendChild(parent, newChild) {
30550        return super.appendChild(this.nodeOrShadowRoot(parent), newChild);
30551      }
30552      insertBefore(parent, newChild, refChild) {
30553        return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild);
30554      }
30555      removeChild(_parent, oldChild) {
30556        return super.removeChild(null, oldChild);
30557      }
30558      parentNode(node) {
30559        return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node)));
30560      }
30561      destroy() {
30562        this.sharedStylesHost.removeHost(this.shadowRoot);
30563      }
30564    };
30565    NoneEncapsulationDomRenderer = class extends DefaultDomRenderer2 {
30566      sharedStylesHost;
30567      removeStylesOnCompDestroy;
30568      styles;
30569      styleUrls;
30570      constructor(eventManager, sharedStylesHost, component, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, tracingService, compId) {
30571        super(eventManager, doc, ngZone, platformIsServer, tracingService);
30572        this.sharedStylesHost = sharedStylesHost;
30573        this.removeStylesOnCompDestroy = removeStylesOnCompDestroy;
30574        let styles = component.styles;
30575        if (ngDevMode) {
30576          const baseHref = getDOM().getBaseHref(doc) ?? "";
30577          styles = addBaseHrefToCssSourceMap(baseHref, styles);
30578        }
30579        this.styles = compId ? shimStylesContent(compId, styles) : styles;
30580        this.styleUrls = component.getExternalStyles?.(compId);
30581      }
30582      applyStyles() {
30583        this.sharedStylesHost.addStyles(this.styles, this.styleUrls);
30584      }
30585      destroy() {
30586        if (!this.removeStylesOnCompDestroy) {
30587          return;
30588        }
30589        if (allLeavingAnimations.size === 0) {
30590          this.sharedStylesHost.removeStyles(this.styles, this.styleUrls);
30591        }
30592      }
30593    };
30594    EmulatedEncapsulationDomRenderer2 = class extends NoneEncapsulationDomRenderer {
30595      contentAttr;
30596      hostAttr;
30597      constructor(eventManager, sharedStylesHost, component, appId, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, tracingService) {
30598        const compId = appId + "-" + component.id;
30599        super(eventManager, sharedStylesHost, component, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, tracingService, compId);
30600        this.contentAttr = shimContentAttribute(compId);
30601        this.hostAttr = shimHostAttribute(compId);
30602      }
30603      applyToHost(element) {
30604        this.applyStyles();
30605        this.setAttribute(element, this.hostAttr, "");
30606      }
30607      createElement(parent, name) {
30608        const el = super.createElement(parent, name);
30609        super.setAttribute(el, this.contentAttr, "");
30610        return el;
30611      }
30612    };
30613  }
30614});
30615
vendor: 14,631 bytes, lines 30616-31024
30616// node_modules/@angular/platform-browser/fesm2022/browser.mjs
30617function getBaseElementHref() {
30618  baseElement = baseElement || document.head.querySelector("base");
30619  return baseElement ? baseElement.getAttribute("href") : null;
30620}
30621function relativePath(url) {
30622  return new URL(url, document.baseURI).pathname;
30623}
30624function createApplication(options) {
30625  return internalCreateApplication(createProvidersConfig(options));
30626}
30627function createProvidersConfig(options) {
30628  return {
30629    appProviders: [...BROWSER_MODULE_PROVIDERS, ...options?.providers ?? []],
30630    platformProviders: INTERNAL_BROWSER_PLATFORM_PROVIDERS
30631  };
30632}
30633function initDomAdapter() {
30634  BrowserDomAdapter.makeCurrent();
30635}
30636function errorHandler() {
30637  return new ErrorHandler();
30638}
30639function _document() {
30640  setDocument(document);
30641  return document;
30642}
30643var BrowserDomAdapter, baseElement, BrowserGetTestability, BrowserXhr, MODIFIER_KEYS, _keyMap, MODIFIER_KEY_GETTERS, KeyEventsPlugin, INTERNAL_BROWSER_PLATFORM_PROVIDERS, platformBrowser, BROWSER_MODULE_PROVIDERS_MARKER, TESTABILITY_PROVIDERS, BROWSER_MODULE_PROVIDERS, BrowserModule;
30644var init_browser = __esm({
30645  "node_modules/@angular/platform-browser/fesm2022/browser.mjs"() {
30646    "use strict";
30647    init_common();
30648    init_core();
30649    init_core();
30650    init_dom_renderer();
30651    BrowserDomAdapter = class _BrowserDomAdapter extends DomAdapter {
30652      supportsDOMEvents = true;
30653      static makeCurrent() {
30654        setRootDomAdapter(new _BrowserDomAdapter());
30655      }
30656      onAndCancel(el, evt, listener, options) {
30657        el.addEventListener(evt, listener, options);
30658        return () => {
30659          el.removeEventListener(evt, listener, options);
30660        };
30661      }
30662      dispatchEvent(el, evt) {
30663        el.dispatchEvent(evt);
30664      }
30665      remove(node) {
30666        node.remove();
30667      }
30668      createElement(tagName, doc) {
30669        doc = doc || this.getDefaultDocument();
30670        return doc.createElement(tagName);
30671      }
30672      createHtmlDocument() {
30673        return document.implementation.createHTMLDocument("fakeTitle");
30674      }
30675      getDefaultDocument() {
30676        return document;
30677      }
30678      isElementNode(node) {
30679        return node.nodeType === Node.ELEMENT_NODE;
30680      }
30681      isShadowRoot(node) {
30682        return node instanceof DocumentFragment;
30683      }
30684      /** @deprecated No longer being used in Ivy code. To be removed in version 14. */
30685      getGlobalEventTarget(doc, target) {
30686        if (target === "window") {
30687          return window;
30688        }
30689        if (target === "document") {
30690          return doc;
30691        }
30692        if (target === "body") {
30693          return doc.body;
30694        }
30695        return null;
30696      }
30697      getBaseHref(doc) {
30698        const href = getBaseElementHref();
30699        return href == null ? null : relativePath(href);
30700      }
30701      resetBaseElement() {
30702        baseElement = null;
30703      }
30704      getUserAgent() {
30705        return window.navigator.userAgent;
30706      }
30707      getCookie(name) {
30708        return parseCookieValue(document.cookie, name);
30709      }
30710    };
30711    baseElement = null;
30712    BrowserGetTestability = class {
30713      addToWindow(registry) {
30714        _global["getAngularTestability"] = (elem, findInAncestors = true) => {
30715          const testability = registry.findTestabilityInTree(elem, findInAncestors);
30716          if (testability == null) {
30717            throw new RuntimeError(5103, (typeof ngDevMode === "undefined" || ngDevMode) && "Could not find testability for element.");
30718          }
30719          return testability;
30720        };
30721        _global["getAllAngularTestabilities"] = () => registry.getAllTestabilities();
30722        _global["getAllAngularRootElements"] = () => registry.getAllRootElements();
30723        const whenAllStable = (callback) => {
30724          const testabilities = _global["getAllAngularTestabilities"]();
30725          let count = testabilities.length;
30726          const decrement = function() {
30727            count--;
30728            if (count == 0) {
30729              callback();
30730            }
30731          };
30732          testabilities.forEach((testability) => {
30733            testability.whenStable(decrement);
30734          });
30735        };
30736        if (!_global["frameworkStabilizers"]) {
30737          _global["frameworkStabilizers"] = [];
30738        }
30739        _global["frameworkStabilizers"].push(whenAllStable);
30740      }
30741      findTestabilityInTree(registry, elem, findInAncestors) {
30742        if (elem == null) {
30743          return null;
30744        }
30745        const t = registry.getTestability(elem);
30746        if (t != null) {
30747          return t;
30748        } else if (!findInAncestors) {
30749          return null;
30750        }
30751        if (getDOM().isShadowRoot(elem)) {
30752          return this.findTestabilityInTree(registry, elem.host, true);
30753        }
30754        return this.findTestabilityInTree(registry, elem.parentElement, true);
30755      }
30756    };
30757    BrowserXhr = class _BrowserXhr {
30758      build() {
30759        return new XMLHttpRequest();
30760      }
30761      static \u0275fac = function BrowserXhr_Factory(__ngFactoryType__) {
30762        return new (__ngFactoryType__ || _BrowserXhr)();
30763      };
30764      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
30765        token: _BrowserXhr,
30766        factory: _BrowserXhr.\u0275fac
30767      });
30768    };
30769    (() => {
30770      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(BrowserXhr, [{
30771        type: Injectable
30772      }], null, null);
30773    })();
30774    MODIFIER_KEYS = ["alt", "control", "meta", "shift"];
30775    _keyMap = {
30776      "\b": "Backspace",
30777      "	": "Tab",
30778      "\x7F": "Delete",
30779      "\x1B": "Escape",
30780      "Del": "Delete",
30781      "Esc": "Escape",
30782      "Left": "ArrowLeft",
30783      "Right": "ArrowRight",
30784      "Up": "ArrowUp",
30785      "Down": "ArrowDown",
30786      "Menu": "ContextMenu",
30787      "Scroll": "ScrollLock",
30788      "Win": "OS"
30789    };
30790    MODIFIER_KEY_GETTERS = {
30791      "alt": (event) => event.altKey,
30792      "control": (event) => event.ctrlKey,
30793      "meta": (event) => event.metaKey,
30794      "shift": (event) => event.shiftKey
30795    };
30796    KeyEventsPlugin = class _KeyEventsPlugin extends EventManagerPlugin {
30797      /**
30798       * Initializes an instance of the browser plug-in.
30799       * @param doc The document in which key events will be detected.
30800       */
30801      constructor(doc) {
30802        super(doc);
30803      }
30804      /**
30805       * Reports whether a named key event is supported.
30806       * @param eventName The event name to query.
30807       * @return True if the named key event is supported.
30808       */
30809      supports(eventName) {
30810        return _KeyEventsPlugin.parseEventName(eventName) != null;
30811      }
30812      /**
30813       * Registers a handler for a specific element and key event.
30814       * @param element The HTML element to receive event notifications.
30815       * @param eventName The name of the key event to listen for.
30816       * @param handler A function to call when the notification occurs. Receives the
30817       * event object as an argument.
30818       * @returns The key event that was registered.
30819       */
30820      addEventListener(element, eventName, handler, options) {
30821        const parsedEvent = _KeyEventsPlugin.parseEventName(eventName);
30822        const outsideHandler = _KeyEventsPlugin.eventCallback(parsedEvent["fullKey"], handler, this.manager.getZone());
30823        return this.manager.getZone().runOutsideAngular(() => {
30824          return getDOM().onAndCancel(element, parsedEvent["domEventName"], outsideHandler, options);
30825        });
30826      }
30827      /**
30828       * Parses the user provided full keyboard event definition and normalizes it for
30829       * later internal use. It ensures the string is all lowercase, converts special
30830       * characters to a standard spelling, and orders all the values consistently.
30831       *
30832       * @param eventName The name of the key event to listen for.
30833       * @returns an object with the full, normalized string, and the dom event name
30834       * or null in the case when the event doesn't match a keyboard event.
30835       */
30836      static parseEventName(eventName) {
30837        const parts = eventName.toLowerCase().split(".");
30838        const domEventName = parts.shift();
30839        if (parts.length === 0 || !(domEventName === "keydown" || domEventName === "keyup")) {
30840          return null;
30841        }
30842        const key = _KeyEventsPlugin._normalizeKey(parts.pop());
30843        let fullKey = "";
30844        let codeIX = parts.indexOf("code");
30845        if (codeIX > -1) {
30846          parts.splice(codeIX, 1);
30847          fullKey = "code.";
30848        }
30849        MODIFIER_KEYS.forEach((modifierName) => {
30850          const index = parts.indexOf(modifierName);
30851          if (index > -1) {
30852            parts.splice(index, 1);
30853            fullKey += modifierName + ".";
30854          }
30855        });
30856        fullKey += key;
30857        if (parts.length != 0 || key.length === 0) {
30858          return null;
30859        }
30860        const result = {};
30861        result["domEventName"] = domEventName;
30862        result["fullKey"] = fullKey;
30863        return result;
30864      }
30865      /**
30866       * Determines whether the actual keys pressed match the configured key code string.
30867       * The `fullKeyCode` event is normalized in the `parseEventName` method when the
30868       * event is attached to the DOM during the `addEventListener` call. This is unseen
30869       * by the end user and is normalized for internal consistency and parsing.
30870       *
30871       * @param event The keyboard event.
30872       * @param fullKeyCode The normalized user defined expected key event string
30873       * @returns boolean.
30874       */
30875      static matchEventFullKeyCode(event, fullKeyCode) {
30876        let keycode = _keyMap[event.key] || event.key;
30877        let key = "";
30878        if (fullKeyCode.indexOf("code.") > -1) {
30879          keycode = event.code;
30880          key = "code.";
30881        }
30882        if (keycode == null || !keycode) return false;
30883        keycode = keycode.toLowerCase();
30884        if (keycode === " ") {
30885          keycode = "space";
30886        } else if (keycode === ".") {
30887          keycode = "dot";
30888        }
30889        MODIFIER_KEYS.forEach((modifierName) => {
30890          if (modifierName !== keycode) {
30891            const modifierGetter = MODIFIER_KEY_GETTERS[modifierName];
30892            if (modifierGetter(event)) {
30893              key += modifierName + ".";
30894            }
30895          }
30896        });
30897        key += keycode;
30898        return key === fullKeyCode;
30899      }
30900      /**
30901       * Configures a handler callback for a key event.
30902       * @param fullKey The event name that combines all simultaneous keystrokes.
30903       * @param handler The function that responds to the key event.
30904       * @param zone The zone in which the event occurred.
30905       * @returns A callback function.
30906       */
30907      static eventCallback(fullKey, handler, zone) {
30908        return (event) => {
30909          if (_KeyEventsPlugin.matchEventFullKeyCode(event, fullKey)) {
30910            zone.runGuarded(() => handler(event));
30911          }
30912        };
30913      }
30914      /** @internal */
30915      static _normalizeKey(keyName) {
30916        return keyName === "esc" ? "escape" : keyName;
30917      }
30918      static \u0275fac = function KeyEventsPlugin_Factory(__ngFactoryType__) {
30919        return new (__ngFactoryType__ || _KeyEventsPlugin)(\u0275\u0275inject(DOCUMENT));
30920      };
30921      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
30922        token: _KeyEventsPlugin,
30923        factory: _KeyEventsPlugin.\u0275fac
30924      });
30925    };
30926    (() => {
30927      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(KeyEventsPlugin, [{
30928        type: Injectable
30929      }], () => [{
30930        type: void 0,
30931        decorators: [{
30932          type: Inject,
30933          args: [DOCUMENT]
30934        }]
30935      }], null);
30936    })();
30937    INTERNAL_BROWSER_PLATFORM_PROVIDERS = [{
30938      provide: PLATFORM_ID,
30939      useValue: PLATFORM_BROWSER_ID
30940    }, {
30941      provide: PLATFORM_INITIALIZER,
30942      useValue: initDomAdapter,
30943      multi: true
30944    }, {
30945      provide: DOCUMENT,
30946      useFactory: _document
30947    }];
30948    platformBrowser = createPlatformFactory(platformCore, "browser", INTERNAL_BROWSER_PLATFORM_PROVIDERS);
30949    BROWSER_MODULE_PROVIDERS_MARKER = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "BrowserModule Providers Marker" : "");
30950    TESTABILITY_PROVIDERS = [{
30951      provide: TESTABILITY_GETTER,
30952      useClass: BrowserGetTestability
30953    }, {
30954      provide: TESTABILITY,
30955      useClass: Testability,
30956      deps: [NgZone, TestabilityRegistry, TESTABILITY_GETTER]
30957    }, {
30958      provide: Testability,
30959      // Also provide as `Testability` for backwards-compatibility.
30960      useClass: Testability,
30961      deps: [NgZone, TestabilityRegistry, TESTABILITY_GETTER]
30962    }];
30963    BROWSER_MODULE_PROVIDERS = [{
30964      provide: INJECTOR_SCOPE,
30965      useValue: "root"
30966    }, {
30967      provide: ErrorHandler,
30968      useFactory: errorHandler
30969    }, {
30970      provide: EVENT_MANAGER_PLUGINS,
30971      useClass: DomEventsPlugin,
30972      multi: true,
30973      deps: [DOCUMENT]
30974    }, {
30975      provide: EVENT_MANAGER_PLUGINS,
30976      useClass: KeyEventsPlugin,
30977      multi: true,
30978      deps: [DOCUMENT]
30979    }, DomRendererFactory2, SharedStylesHost, EventManager, {
30980      provide: RendererFactory2,
30981      useExisting: DomRendererFactory2
30982    }, {
30983      provide: XhrFactory,
30984      useClass: BrowserXhr
30985    }, typeof ngDevMode === "undefined" || ngDevMode ? {
30986      provide: BROWSER_MODULE_PROVIDERS_MARKER,
30987      useValue: true
30988    } : []];
30989    BrowserModule = class _BrowserModule {
30990      constructor() {
30991        if (typeof ngDevMode === "undefined" || ngDevMode) {
30992          const providersAlreadyPresent = inject2(BROWSER_MODULE_PROVIDERS_MARKER, {
30993            optional: true,
30994            skipSelf: true
30995          });
30996          if (providersAlreadyPresent) {
30997            throw new RuntimeError(5100, `Providers from the \`BrowserModule\` have already been loaded. If you need access to common directives such as NgIf and NgFor, import the \`CommonModule\` instead.`);
30998          }
30999        }
31000      }
31001      static \u0275fac = function BrowserModule_Factory(__ngFactoryType__) {
31002        return new (__ngFactoryType__ || _BrowserModule)();
31003      };
31004      static \u0275mod = /* @__PURE__ */ \u0275\u0275defineNgModule({
31005        type: _BrowserModule,
31006        exports: [CommonModule, ApplicationModule]
31007      });
31008      static \u0275inj = /* @__PURE__ */ \u0275\u0275defineInjector({
31009        providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS],
31010        imports: [CommonModule, ApplicationModule]
31011      });
31012    };
31013    (() => {
31014      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(BrowserModule, [{
31015        type: NgModule,
31016        args: [{
31017          providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS],
31018          exports: [CommonModule, ApplicationModule]
31019        }]
31020      }], () => [], null);
31021    })();
31022  }
31023});
31024
vendor: 90,109 bytes, lines 31025-33394
31025// node_modules/@angular/common/fesm2022/module.mjs
31026function assertValidHeaders(headers) {
31027  for (const [key, value] of Object.entries(headers)) {
31028    if (!(typeof value === "string" || typeof value === "number") && !Array.isArray(value)) {
31029      throw new Error(`Unexpected value of the \`${key}\` header provided. Expecting either a string, a number or an array, but got: \`${value}\`.`);
31030    }
31031  }
31032}
31033function paramParser(rawParams, codec) {
31034  const map2 = /* @__PURE__ */ new Map();
31035  if (rawParams.length > 0) {
31036    const params = rawParams.replace(/^\?/, "").split("&");
31037    params.forEach((param) => {
31038      const eqIdx = param.indexOf("=");
31039      const [key, val] = eqIdx == -1 ? [codec.decodeKey(param), ""] : [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))];
31040      const list = map2.get(key) || [];
31041      list.push(val);
31042      map2.set(key, list);
31043    });
31044  }
31045  return map2;
31046}
31047function standardEncoding(v) {
31048  return encodeURIComponent(v).replace(STANDARD_ENCODING_REGEX, (s, t) => STANDARD_ENCODING_REPLACEMENTS[t] ?? s);
31049}
31050function valueToString(value) {
31051  return `${value}`;
31052}
31053function mightHaveBody(method) {
31054  switch (method) {
31055    case "DELETE":
31056    case "GET":
31057    case "HEAD":
31058    case "OPTIONS":
31059    case "JSONP":
31060      return false;
31061    default:
31062      return true;
31063  }
31064}
31065function isArrayBuffer(value) {
31066  return typeof ArrayBuffer !== "undefined" && value instanceof ArrayBuffer;
31067}
31068function isBlob(value) {
31069  return typeof Blob !== "undefined" && value instanceof Blob;
31070}
31071function isFormData(value) {
31072  return typeof FormData !== "undefined" && value instanceof FormData;
31073}
31074function isUrlSearchParams(value) {
31075  return typeof URLSearchParams !== "undefined" && value instanceof URLSearchParams;
31076}
31077function addBody(options, body) {
31078  return {
31079    body,
31080    headers: options.headers,
31081    context: options.context,
31082    observe: options.observe,
31083    params: options.params,
31084    reportProgress: options.reportProgress,
31085    responseType: options.responseType,
31086    withCredentials: options.withCredentials,
31087    credentials: options.credentials,
31088    transferCache: options.transferCache,
31089    timeout: options.timeout,
31090    keepalive: options.keepalive,
31091    priority: options.priority,
31092    cache: options.cache,
31093    mode: options.mode,
31094    redirect: options.redirect,
31095    integrity: options.integrity,
31096    referrer: options.referrer
31097  };
31098}
31099function getResponseUrl$1(response) {
31100  if (response.url) {
31101    return response.url;
31102  }
31103  const xRequestUrl = X_REQUEST_URL_HEADER.toLocaleLowerCase();
31104  return response.headers.get(xRequestUrl);
31105}
31106function noop3() {
31107}
31108function warningOptionsMessage(req) {
31109  if (req.credentials && req.withCredentials) {
31110    console.warn(formatRuntimeError(2819, `Angular detected that a \`HttpClient\` request has both \`withCredentials: true\` and \`credentials: '${req.credentials}'\` options. The \`withCredentials\` option is overriding the explicit \`credentials\` setting to 'include'. Consider removing \`withCredentials\` and using \`credentials: '${req.credentials}'\` directly for clarity.`));
31111  }
31112}
31113function silenceSuperfluousUnhandledPromiseRejection(promise) {
31114  promise.then(noop3, noop3);
31115}
31116function interceptorChainEndFn(req, finalHandlerFn) {
31117  return finalHandlerFn(req);
31118}
31119function adaptLegacyInterceptorToChain(chainTailFn, interceptor) {
31120  return (initialRequest, finalHandlerFn) => interceptor.intercept(initialRequest, {
31121    handle: (downstreamRequest) => chainTailFn(downstreamRequest, finalHandlerFn)
31122  });
31123}
31124function chainedInterceptorFn(chainTailFn, interceptorFn, injector) {
31125  return (initialRequest, finalHandlerFn) => runInInjectionContext(injector, () => interceptorFn(initialRequest, (downstreamRequest) => chainTailFn(downstreamRequest, finalHandlerFn)));
31126}
31127function legacyInterceptorFnFactory() {
31128  let chain = null;
31129  return (req, handler) => {
31130    if (chain === null) {
31131      const interceptors = inject2(HTTP_INTERCEPTORS, {
31132        optional: true
31133      }) ?? [];
31134      chain = interceptors.reduceRight(adaptLegacyInterceptorToChain, interceptorChainEndFn);
31135    }
31136    const pendingTasks = inject2(PendingTasks);
31137    const contributeToStability = inject2(REQUESTS_CONTRIBUTE_TO_STABILITY);
31138    if (contributeToStability) {
31139      const removeTask = pendingTasks.add();
31140      return chain(req, handler).pipe(finalize(removeTask));
31141    } else {
31142      return chain(req, handler);
31143    }
31144  };
31145}
31146function jsonpCallbackContext() {
31147  if (typeof window === "object") {
31148    return window;
31149  }
31150  return {};
31151}
31152function jsonpInterceptorFn(req, next) {
31153  if (req.method === "JSONP") {
31154    return inject2(JsonpClientBackend).handle(req);
31155  }
31156  return next(req);
31157}
31158function getResponseUrl(xhr) {
31159  if ("responseURL" in xhr && xhr.responseURL) {
31160    return xhr.responseURL;
31161  }
31162  if (X_REQUEST_URL_REGEXP.test(xhr.getAllResponseHeaders())) {
31163    return xhr.getResponseHeader(X_REQUEST_URL_HEADER);
31164  }
31165  return null;
31166}
31167function validateXhrCompatibility(req) {
31168  const unsupportedOptions = [{
31169    property: "keepalive",
31170    errorCode: 2813
31171    /* RuntimeErrorCode.KEEPALIVE_NOT_SUPPORTED_WITH_XHR */
31172  }, {
31173    property: "cache",
31174    errorCode: 2814
31175    /* RuntimeErrorCode.CACHE_NOT_SUPPORTED_WITH_XHR */
31176  }, {
31177    property: "priority",
31178    errorCode: 2815
31179    /* RuntimeErrorCode.PRIORITY_NOT_SUPPORTED_WITH_XHR */
31180  }, {
31181    property: "mode",
31182    errorCode: 2816
31183    /* RuntimeErrorCode.MODE_NOT_SUPPORTED_WITH_XHR */
31184  }, {
31185    property: "redirect",
31186    errorCode: 2817
31187    /* RuntimeErrorCode.REDIRECT_NOT_SUPPORTED_WITH_XHR */
31188  }, {
31189    property: "credentials",
31190    errorCode: 2818
31191    /* RuntimeErrorCode.CREDENTIALS_NOT_SUPPORTED_WITH_XHR */
31192  }, {
31193    property: "integrity",
31194    errorCode: 2820
31195    /* RuntimeErrorCode.INTEGRITY_NOT_SUPPORTED_WITH_XHR */
31196  }, {
31197    property: "referrer",
31198    errorCode: 2821
31199    /* RuntimeErrorCode.REFERRER_NOT_SUPPORTED_WITH_XHR */
31200  }];
31201  for (const {
31202    property,
31203    errorCode
31204  } of unsupportedOptions) {
31205    if (req[property]) {
31206      console.warn(formatRuntimeError(errorCode, `Angular detected that a \`HttpClient\` request with the \`${property}\` option was sent using XHR, which does not support it. To use the \`${property}\` option, enable Fetch API support by passing \`withFetch()\` as an argument to \`provideHttpClient()\`.`));
31207    }
31208  }
31209}
31210function xsrfInterceptorFn(req, next) {
31211  if (!inject2(XSRF_ENABLED) || req.method === "GET" || req.method === "HEAD" || ABSOLUTE_URL_REGEX.test(req.url)) {
31212    return next(req);
31213  }
31214  const token = inject2(HttpXsrfTokenExtractor).getToken();
31215  const headerName = inject2(XSRF_HEADER_NAME);
31216  if (token != null && !req.headers.has(headerName)) {
31217    req = req.clone({
31218      headers: req.headers.set(headerName, token)
31219    });
31220  }
31221  return next(req);
31222}
31223function makeHttpFeature(kind, providers) {
31224  return {
31225    \u0275kind: kind,
31226    \u0275providers: providers
31227  };
31228}
31229function provideHttpClient(...features) {
31230  if (ngDevMode) {
31231    const featureKinds = new Set(features.map((f) => f.\u0275kind));
31232    if (featureKinds.has(HttpFeatureKind.NoXsrfProtection) && featureKinds.has(HttpFeatureKind.CustomXsrfConfiguration)) {
31233      throw new Error(ngDevMode ? `Configuration error: found both withXsrfConfiguration() and withNoXsrfProtection() in the same call to provideHttpClient(), which is a contradiction.` : "");
31234    }
31235  }
31236  const providers = [HttpClient, HttpXhrBackend, HttpInterceptorHandler, {
31237    provide: HttpHandler,
31238    useExisting: HttpInterceptorHandler
31239  }, {
31240    provide: HttpBackend,
31241    useFactory: () => {
31242      return inject2(FETCH_BACKEND, {
31243        optional: true
31244      }) ?? inject2(HttpXhrBackend);
31245    }
31246  }, {
31247    provide: HTTP_INTERCEPTOR_FNS,
31248    useValue: xsrfInterceptorFn,
31249    multi: true
31250  }, {
31251    provide: XSRF_ENABLED,
31252    useValue: true
31253  }, {
31254    provide: HttpXsrfTokenExtractor,
31255    useClass: HttpXsrfCookieExtractor
31256  }];
31257  for (const feature of features) {
31258    providers.push(...feature.\u0275providers);
31259  }
31260  return makeEnvironmentProviders(providers);
31261}
31262function withInterceptorsFromDi() {
31263  return makeHttpFeature(HttpFeatureKind.LegacyInterceptors, [{
31264    provide: LEGACY_INTERCEPTOR_FN,
31265    useFactory: legacyInterceptorFnFactory
31266  }, {
31267    provide: HTTP_INTERCEPTOR_FNS,
31268    useExisting: LEGACY_INTERCEPTOR_FN,
31269    multi: true
31270  }]);
31271}
31272function withXsrfConfiguration({
31273  cookieName,
31274  headerName
31275}) {
31276  const providers = [];
31277  if (cookieName !== void 0) {
31278    providers.push({
31279      provide: XSRF_COOKIE_NAME,
31280      useValue: cookieName
31281    });
31282  }
31283  if (headerName !== void 0) {
31284    providers.push({
31285      provide: XSRF_HEADER_NAME,
31286      useValue: headerName
31287    });
31288  }
31289  return makeHttpFeature(HttpFeatureKind.CustomXsrfConfiguration, providers);
31290}
31291function withNoXsrfProtection() {
31292  return makeHttpFeature(HttpFeatureKind.NoXsrfProtection, [{
31293    provide: XSRF_ENABLED,
31294    useValue: false
31295  }]);
31296}
31297function withJsonpSupport() {
31298  return makeHttpFeature(HttpFeatureKind.JsonpSupport, [JsonpClientBackend, {
31299    provide: JsonpCallbackContext,
31300    useFactory: jsonpCallbackContext
31301  }, {
31302    provide: HTTP_INTERCEPTOR_FNS,
31303    useValue: jsonpInterceptorFn,
31304    multi: true
31305  }]);
31306}
31307var HttpHandler, HttpBackend, HttpHeaders, HttpUrlEncodingCodec, STANDARD_ENCODING_REGEX, STANDARD_ENCODING_REPLACEMENTS, HttpParams, HttpContext, CONTENT_TYPE_HEADER, ACCEPT_HEADER, X_REQUEST_URL_HEADER, TEXT_CONTENT_TYPE, JSON_CONTENT_TYPE, ACCEPT_HEADER_VALUE, HttpRequest, HttpEventType, HttpResponseBase, HttpHeaderResponse, HttpResponse, HttpErrorResponse, HTTP_STATUS_CODE_OK, HTTP_STATUS_CODE_NO_CONTENT, HttpStatusCode, HttpClient, XSSI_PREFIX$1, FETCH_BACKEND, FetchBackend, FetchFactory, HTTP_INTERCEPTORS, HTTP_INTERCEPTOR_FNS, HTTP_ROOT_INTERCEPTOR_FNS, REQUESTS_CONTRIBUTE_TO_STABILITY, fetchBackendWarningDisplayed, HttpInterceptorHandler, nextRequestId, foreignDocument, JSONP_ERR_NO_CALLBACK, JSONP_ERR_WRONG_METHOD, JSONP_ERR_WRONG_RESPONSE_TYPE, JSONP_ERR_HEADERS_NOT_SUPPORTED, JsonpCallbackContext, JsonpClientBackend, JsonpInterceptor, XSSI_PREFIX, X_REQUEST_URL_REGEXP, HttpXhrBackend, XSRF_ENABLED, XSRF_DEFAULT_COOKIE_NAME, XSRF_COOKIE_NAME, XSRF_DEFAULT_HEADER_NAME, XSRF_HEADER_NAME, HttpXsrfTokenExtractor, HttpXsrfCookieExtractor, ABSOLUTE_URL_REGEX, HttpXsrfInterceptor, HttpFeatureKind, LEGACY_INTERCEPTOR_FN, HttpClientXsrfModule, HttpClientModule, HttpClientJsonpModule;
31308var init_module = __esm({
31309  "node_modules/@angular/common/fesm2022/module.mjs"() {
31310    "use strict";
31311    init_core();
31312    init_core();
31313    init_operators();
31314    init_esm();
31315    init_xhr();
31316    HttpHandler = class {
31317    };
31318    HttpBackend = class {
31319    };
31320    HttpHeaders = class _HttpHeaders {
31321      /**
31322       * Internal map of lowercase header names to values.
31323       */
31324      headers;
31325      /**
31326       * Internal map of lowercased header names to the normalized
31327       * form of the name (the form seen first).
31328       */
31329      normalizedNames = /* @__PURE__ */ new Map();
31330      /**
31331       * Complete the lazy initialization of this object (needed before reading).
31332       */
31333      lazyInit;
31334      /**
31335       * Queued updates to be materialized the next initialization.
31336       */
31337      lazyUpdate = null;
31338      /**  Constructs a new HTTP header object with the given values.*/
31339      constructor(headers) {
31340        if (!headers) {
31341          this.headers = /* @__PURE__ */ new Map();
31342        } else if (typeof headers === "string") {
31343          this.lazyInit = () => {
31344            this.headers = /* @__PURE__ */ new Map();
31345            headers.split("\n").forEach((line) => {
31346              const index = line.indexOf(":");
31347              if (index > 0) {
31348                const name = line.slice(0, index);
31349                const value = line.slice(index + 1).trim();
31350                this.addHeaderEntry(name, value);
31351              }
31352            });
31353          };
31354        } else if (typeof Headers !== "undefined" && headers instanceof Headers) {
31355          this.headers = /* @__PURE__ */ new Map();
31356          headers.forEach((value, name) => {
31357            this.addHeaderEntry(name, value);
31358          });
31359        } else {
31360          this.lazyInit = () => {
31361            if (typeof ngDevMode === "undefined" || ngDevMode) {
31362              assertValidHeaders(headers);
31363            }
31364            this.headers = /* @__PURE__ */ new Map();
31365            Object.entries(headers).forEach(([name, values]) => {
31366              this.setHeaderEntries(name, values);
31367            });
31368          };
31369        }
31370      }
31371      /**
31372       * Checks for existence of a given header.
31373       *
31374       * @param name The header name to check for existence.
31375       *
31376       * @returns True if the header exists, false otherwise.
31377       */
31378      has(name) {
31379        this.init();
31380        return this.headers.has(name.toLowerCase());
31381      }
31382      /**
31383       * Retrieves the first value of a given header.
31384       *
31385       * @param name The header name.
31386       *
31387       * @returns The value string if the header exists, null otherwise
31388       */
31389      get(name) {
31390        this.init();
31391        const values = this.headers.get(name.toLowerCase());
31392        return values && values.length > 0 ? values[0] : null;
31393      }
31394      /**
31395       * Retrieves the names of the headers.
31396       *
31397       * @returns A list of header names.
31398       */
31399      keys() {
31400        this.init();
31401        return Array.from(this.normalizedNames.values());
31402      }
31403      /**
31404       * Retrieves a list of values for a given header.
31405       *
31406       * @param name The header name from which to retrieve values.
31407       *
31408       * @returns A string of values if the header exists, null otherwise.
31409       */
31410      getAll(name) {
31411        this.init();
31412        return this.headers.get(name.toLowerCase()) || null;
31413      }
31414      /**
31415       * Appends a new value to the existing set of values for a header
31416       * and returns them in a clone of the original instance.
31417       *
31418       * @param name The header name for which to append the values.
31419       * @param value The value to append.
31420       *
31421       * @returns A clone of the HTTP headers object with the value appended to the given header.
31422       */
31423      append(name, value) {
31424        return this.clone({
31425          name,
31426          value,
31427          op: "a"
31428        });
31429      }
31430      /**
31431       * Sets or modifies a value for a given header in a clone of the original instance.
31432       * If the header already exists, its value is replaced with the given value
31433       * in the returned object.
31434       *
31435       * @param name The header name.
31436       * @param value The value or values to set or override for the given header.
31437       *
31438       * @returns A clone of the HTTP headers object with the newly set header value.
31439       */
31440      set(name, value) {
31441        return this.clone({
31442          name,
31443          value,
31444          op: "s"
31445        });
31446      }
31447      /**
31448       * Deletes values for a given header in a clone of the original instance.
31449       *
31450       * @param name The header name.
31451       * @param value The value or values to delete for the given header.
31452       *
31453       * @returns A clone of the HTTP headers object with the given value deleted.
31454       */
31455      delete(name, value) {
31456        return this.clone({
31457          name,
31458          value,
31459          op: "d"
31460        });
31461      }
31462      maybeSetNormalizedName(name, lcName) {
31463        if (!this.normalizedNames.has(lcName)) {
31464          this.normalizedNames.set(lcName, name);
31465        }
31466      }
31467      init() {
31468        if (!!this.lazyInit) {
31469          if (this.lazyInit instanceof _HttpHeaders) {
31470            this.copyFrom(this.lazyInit);
31471          } else {
31472            this.lazyInit();
31473          }
31474          this.lazyInit = null;
31475          if (!!this.lazyUpdate) {
31476            this.lazyUpdate.forEach((update) => this.applyUpdate(update));
31477            this.lazyUpdate = null;
31478          }
31479        }
31480      }
31481      copyFrom(other) {
31482        other.init();
31483        Array.from(other.headers.keys()).forEach((key) => {
31484          this.headers.set(key, other.headers.get(key));
31485          this.normalizedNames.set(key, other.normalizedNames.get(key));
31486        });
31487      }
31488      clone(update) {
31489        const clone = new _HttpHeaders();
31490        clone.lazyInit = !!this.lazyInit && this.lazyInit instanceof _HttpHeaders ? this.lazyInit : this;
31491        clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);
31492        return clone;
31493      }
31494      applyUpdate(update) {
31495        const key = update.name.toLowerCase();
31496        switch (update.op) {
31497          case "a":
31498          case "s":
31499            let value = update.value;
31500            if (typeof value === "string") {
31501              value = [value];
31502            }
31503            if (value.length === 0) {
31504              return;
31505            }
31506            this.maybeSetNormalizedName(update.name, key);
31507            const base = (update.op === "a" ? this.headers.get(key) : void 0) || [];
31508            base.push(...value);
31509            this.headers.set(key, base);
31510            break;
31511          case "d":
31512            const toDelete = update.value;
31513            if (!toDelete) {
31514              this.headers.delete(key);
31515              this.normalizedNames.delete(key);
31516            } else {
31517              let existing = this.headers.get(key);
31518              if (!existing) {
31519                return;
31520              }
31521              existing = existing.filter((value2) => toDelete.indexOf(value2) === -1);
31522              if (existing.length === 0) {
31523                this.headers.delete(key);
31524                this.normalizedNames.delete(key);
31525              } else {
31526                this.headers.set(key, existing);
31527              }
31528            }
31529            break;
31530        }
31531      }
31532      addHeaderEntry(name, value) {
31533        const key = name.toLowerCase();
31534        this.maybeSetNormalizedName(name, key);
31535        if (this.headers.has(key)) {
31536          this.headers.get(key).push(value);
31537        } else {
31538          this.headers.set(key, [value]);
31539        }
31540      }
31541      setHeaderEntries(name, values) {
31542        const headerValues = (Array.isArray(values) ? values : [values]).map((value) => value.toString());
31543        const key = name.toLowerCase();
31544        this.headers.set(key, headerValues);
31545        this.maybeSetNormalizedName(name, key);
31546      }
31547      /**
31548       * @internal
31549       */
31550      forEach(fn) {
31551        this.init();
31552        Array.from(this.normalizedNames.keys()).forEach((key) => fn(this.normalizedNames.get(key), this.headers.get(key)));
31553      }
31554    };
31555    HttpUrlEncodingCodec = class {
31556      /**
31557       * Encodes a key name for a URL parameter or query-string.
31558       * @param key The key name.
31559       * @returns The encoded key name.
31560       */
31561      encodeKey(key) {
31562        return standardEncoding(key);
31563      }
31564      /**
31565       * Encodes the value of a URL parameter or query-string.
31566       * @param value The value.
31567       * @returns The encoded value.
31568       */
31569      encodeValue(value) {
31570        return standardEncoding(value);
31571      }
31572      /**
31573       * Decodes an encoded URL parameter or query-string key.
31574       * @param key The encoded key name.
31575       * @returns The decoded key name.
31576       */
31577      decodeKey(key) {
31578        return decodeURIComponent(key);
31579      }
31580      /**
31581       * Decodes an encoded URL parameter or query-string value.
31582       * @param value The encoded value.
31583       * @returns The decoded value.
31584       */
31585      decodeValue(value) {
31586        return decodeURIComponent(value);
31587      }
31588    };
31589    STANDARD_ENCODING_REGEX = /%(\d[a-f0-9])/gi;
31590    STANDARD_ENCODING_REPLACEMENTS = {
31591      "40": "@",
31592      "3A": ":",
31593      "24": "$",
31594      "2C": ",",
31595      "3B": ";",
31596      "3D": "=",
31597      "3F": "?",
31598      "2F": "/"
31599    };
31600    HttpParams = class _HttpParams {
31601      map;
31602      encoder;
31603      updates = null;
31604      cloneFrom = null;
31605      constructor(options = {}) {
31606        this.encoder = options.encoder || new HttpUrlEncodingCodec();
31607        if (options.fromString) {
31608          if (options.fromObject) {
31609            throw new RuntimeError(2805, ngDevMode && "Cannot specify both fromString and fromObject.");
31610          }
31611          this.map = paramParser(options.fromString, this.encoder);
31612        } else if (!!options.fromObject) {
31613          this.map = /* @__PURE__ */ new Map();
31614          Object.keys(options.fromObject).forEach((key) => {
31615            const value = options.fromObject[key];
31616            const values = Array.isArray(value) ? value.map(valueToString) : [valueToString(value)];
31617            this.map.set(key, values);
31618          });
31619        } else {
31620          this.map = null;
31621        }
31622      }
31623      /**
31624       * Reports whether the body includes one or more values for a given parameter.
31625       * @param param The parameter name.
31626       * @returns True if the parameter has one or more values,
31627       * false if it has no value or is not present.
31628       */
31629      has(param) {
31630        this.init();
31631        return this.map.has(param);
31632      }
31633      /**
31634       * Retrieves the first value for a parameter.
31635       * @param param The parameter name.
31636       * @returns The first value of the given parameter,
31637       * or `null` if the parameter is not present.
31638       */
31639      get(param) {
31640        this.init();
31641        const res = this.map.get(param);
31642        return !!res ? res[0] : null;
31643      }
31644      /**
31645       * Retrieves all values for a  parameter.
31646       * @param param The parameter name.
31647       * @returns All values in a string array,
31648       * or `null` if the parameter not present.
31649       */
31650      getAll(param) {
31651        this.init();
31652        return this.map.get(param) || null;
31653      }
31654      /**
31655       * Retrieves all the parameters for this body.
31656       * @returns The parameter names in a string array.
31657       */
31658      keys() {
31659        this.init();
31660        return Array.from(this.map.keys());
31661      }
31662      /**
31663       * Appends a new value to existing values for a parameter.
31664       * @param param The parameter name.
31665       * @param value The new value to add.
31666       * @return A new body with the appended value.
31667       */
31668      append(param, value) {
31669        return this.clone({
31670          param,
31671          value,
31672          op: "a"
31673        });
31674      }
31675      /**
31676       * Constructs a new body with appended values for the given parameter name.
31677       * @param params parameters and values
31678       * @return A new body with the new value.
31679       */
31680      appendAll(params) {
31681        const updates = [];
31682        Object.keys(params).forEach((param) => {
31683          const value = params[param];
31684          if (Array.isArray(value)) {
31685            value.forEach((_value) => {
31686              updates.push({
31687                param,
31688                value: _value,
31689                op: "a"
31690              });
31691            });
31692          } else {
31693            updates.push({
31694              param,
31695              value,
31696              op: "a"
31697            });
31698          }
31699        });
31700        return this.clone(updates);
31701      }
31702      /**
31703       * Replaces the value for a parameter.
31704       * @param param The parameter name.
31705       * @param value The new value.
31706       * @return A new body with the new value.
31707       */
31708      set(param, value) {
31709        return this.clone({
31710          param,
31711          value,
31712          op: "s"
31713        });
31714      }
31715      /**
31716       * Removes a given value or all values from a parameter.
31717       * @param param The parameter name.
31718       * @param value The value to remove, if provided.
31719       * @return A new body with the given value removed, or with all values
31720       * removed if no value is specified.
31721       */
31722      delete(param, value) {
31723        return this.clone({
31724          param,
31725          value,
31726          op: "d"
31727        });
31728      }
31729      /**
31730       * Serializes the body to an encoded string, where key-value pairs (separated by `=`) are
31731       * separated by `&`s.
31732       */
31733      toString() {
31734        this.init();
31735        return this.keys().map((key) => {
31736          const eKey = this.encoder.encodeKey(key);
31737          return this.map.get(key).map((value) => eKey + "=" + this.encoder.encodeValue(value)).join("&");
31738        }).filter((param) => param !== "").join("&");
31739      }
31740      clone(update) {
31741        const clone = new _HttpParams({
31742          encoder: this.encoder
31743        });
31744        clone.cloneFrom = this.cloneFrom || this;
31745        clone.updates = (this.updates || []).concat(update);
31746        return clone;
31747      }
31748      init() {
31749        if (this.map === null) {
31750          this.map = /* @__PURE__ */ new Map();
31751        }
31752        if (this.cloneFrom !== null) {
31753          this.cloneFrom.init();
31754          this.cloneFrom.keys().forEach((key) => this.map.set(key, this.cloneFrom.map.get(key)));
31755          this.updates.forEach((update) => {
31756            switch (update.op) {
31757              case "a":
31758              case "s":
31759                const base = (update.op === "a" ? this.map.get(update.param) : void 0) || [];
31760                base.push(valueToString(update.value));
31761                this.map.set(update.param, base);
31762                break;
31763              case "d":
31764                if (update.value !== void 0) {
31765                  let base2 = this.map.get(update.param) || [];
31766                  const idx = base2.indexOf(valueToString(update.value));
31767                  if (idx !== -1) {
31768                    base2.splice(idx, 1);
31769                  }
31770                  if (base2.length > 0) {
31771                    this.map.set(update.param, base2);
31772                  } else {
31773                    this.map.delete(update.param);
31774                  }
31775                } else {
31776                  this.map.delete(update.param);
31777                  break;
31778                }
31779            }
31780          });
31781          this.cloneFrom = this.updates = null;
31782        }
31783      }
31784    };
31785    HttpContext = class {
31786      map = /* @__PURE__ */ new Map();
31787      /**
31788       * Store a value in the context. If a value is already present it will be overwritten.
31789       *
31790       * @param token The reference to an instance of `HttpContextToken`.
31791       * @param value The value to store.
31792       *
31793       * @returns A reference to itself for easy chaining.
31794       */
31795      set(token, value) {
31796        this.map.set(token, value);
31797        return this;
31798      }
31799      /**
31800       * Retrieve the value associated with the given token.
31801       *
31802       * @param token The reference to an instance of `HttpContextToken`.
31803       *
31804       * @returns The stored value or default if one is defined.
31805       */
31806      get(token) {
31807        if (!this.map.has(token)) {
31808          this.map.set(token, token.defaultValue());
31809        }
31810        return this.map.get(token);
31811      }
31812      /**
31813       * Delete the value associated with the given token.
31814       *
31815       * @param token The reference to an instance of `HttpContextToken`.
31816       *
31817       * @returns A reference to itself for easy chaining.
31818       */
31819      delete(token) {
31820        this.map.delete(token);
31821        return this;
31822      }
31823      /**
31824       * Checks for existence of a given token.
31825       *
31826       * @param token The reference to an instance of `HttpContextToken`.
31827       *
31828       * @returns True if the token exists, false otherwise.
31829       */
31830      has(token) {
31831        return this.map.has(token);
31832      }
31833      /**
31834       * @returns a list of tokens currently stored in the context.
31835       */
31836      keys() {
31837        return this.map.keys();
31838      }
31839    };
31840    CONTENT_TYPE_HEADER = "Content-Type";
31841    ACCEPT_HEADER = "Accept";
31842    X_REQUEST_URL_HEADER = "X-Request-URL";
31843    TEXT_CONTENT_TYPE = "text/plain";
31844    JSON_CONTENT_TYPE = "application/json";
31845    ACCEPT_HEADER_VALUE = `${JSON_CONTENT_TYPE}, ${TEXT_CONTENT_TYPE}, */*`;
31846    HttpRequest = class _HttpRequest {
31847      url;
31848      /**
31849       * The request body, or `null` if one isn't set.
31850       *
31851       * Bodies are not enforced to be immutable, as they can include a reference to any
31852       * user-defined data type. However, interceptors should take care to preserve
31853       * idempotence by treating them as such.
31854       */
31855      body = null;
31856      /**
31857       * Outgoing headers for this request.
31858       */
31859      headers;
31860      /**
31861       * Shared and mutable context that can be used by interceptors
31862       */
31863      context;
31864      /**
31865       * Whether this request should be made in a way that exposes progress events.
31866       *
31867       * Progress events are expensive (change detection runs on each event) and so
31868       * they should only be requested if the consumer intends to monitor them.
31869       *
31870       * Note: The `FetchBackend` doesn't support progress report on uploads.
31871       */
31872      reportProgress = false;
31873      /**
31874       * Whether this request should be sent with outgoing credentials (cookies).
31875       */
31876      withCredentials = false;
31877      /**
31878       *  The credentials mode of the request, which determines how cookies and HTTP authentication are handled.
31879       *  This can affect whether cookies are sent with the request, and how authentication is handled.
31880       */
31881      credentials;
31882      /**
31883       * When using the fetch implementation and set to `true`, the browser will not abort the associated request if the page that initiated it is unloaded before the request is complete.
31884       */
31885      keepalive = false;
31886      /**
31887       * Controls how the request will interact with the browser's HTTP cache.
31888       * This affects whether a response is retrieved from the cache, how it is stored, or if it bypasses the cache altogether.
31889       */
31890      cache;
31891      /**
31892       * Indicates the relative priority of the request. This may be used by the browser to decide the order in which requests are dispatched and resources fetched.
31893       */
31894      priority;
31895      /**
31896       * The mode of the request, which determines how the request will interact with the browser's security model.
31897       * This can affect things like CORS (Cross-Origin Resource Sharing) and same-origin policies.
31898       */
31899      mode;
31900      /**
31901       * The redirect mode of the request, which determines how redirects are handled.
31902       * This can affect whether the request follows redirects automatically, or if it fails when a redirect occurs.
31903       */
31904      redirect;
31905      /**
31906       * The referrer of the request, which can be used to indicate the origin of the request.
31907       * This is useful for security and analytics purposes.
31908       * Value is a same-origin URL, "about:client", or the empty string, to set request's referrer.
31909       */
31910      referrer;
31911      /**
31912       * The integrity metadata of the request, which can be used to ensure the request is made with the expected content.
31913       * A cryptographic hash of the resource to be fetched by request
31914       */
31915      integrity;
31916      /**
31917       * The expected response type of the server.
31918       *
31919       * This is used to parse the response appropriately before returning it to
31920       * the requestee.
31921       */
31922      responseType = "json";
31923      /**
31924       * The outgoing HTTP request method.
31925       */
31926      method;
31927      /**
31928       * Outgoing URL parameters.
31929       *
31930       * To pass a string representation of HTTP parameters in the URL-query-string format,
31931       * the `HttpParamsOptions`' `fromString` may be used. For example:
31932       *
31933       * ```ts
31934       * new HttpParams({fromString: 'angular=awesome'})
31935       * ```
31936       */
31937      params;
31938      /**
31939       * The outgoing URL with all URL parameters set.
31940       */
31941      urlWithParams;
31942      /**
31943       * The HttpTransferCache option for the request
31944       */
31945      transferCache;
31946      /**
31947       * The timeout for the backend HTTP request in ms.
31948       */
31949      timeout;
31950      constructor(method, url, third, fourth) {
31951        this.url = url;
31952        this.method = method.toUpperCase();
31953        let options;
31954        if (mightHaveBody(this.method) || !!fourth) {
31955          this.body = third !== void 0 ? third : null;
31956          options = fourth;
31957        } else {
31958          options = third;
31959        }
31960        if (options) {
31961          this.reportProgress = !!options.reportProgress;
31962          this.withCredentials = !!options.withCredentials;
31963          this.keepalive = !!options.keepalive;
31964          if (!!options.responseType) {
31965            this.responseType = options.responseType;
31966          }
31967          if (options.headers) {
31968            this.headers = options.headers;
31969          }
31970          if (options.context) {
31971            this.context = options.context;
31972          }
31973          if (options.params) {
31974            this.params = options.params;
31975          }
31976          if (options.priority) {
31977            this.priority = options.priority;
31978          }
31979          if (options.cache) {
31980            this.cache = options.cache;
31981          }
31982          if (options.credentials) {
31983            this.credentials = options.credentials;
31984          }
31985          if (typeof options.timeout === "number") {
31986            if (options.timeout < 1 || !Number.isInteger(options.timeout)) {
31987              throw new RuntimeError(2822, ngDevMode ? "`timeout` must be a positive integer value" : "");
31988            }
31989            this.timeout = options.timeout;
31990          }
31991          if (options.mode) {
31992            this.mode = options.mode;
31993          }
31994          if (options.redirect) {
31995            this.redirect = options.redirect;
31996          }
31997          if (options.integrity) {
31998            this.integrity = options.integrity;
31999          }
32000          if (options.referrer) {
32001            this.referrer = options.referrer;
32002          }
32003          this.transferCache = options.transferCache;
32004        }
32005        this.headers ??= new HttpHeaders();
32006        this.context ??= new HttpContext();
32007        if (!this.params) {
32008          this.params = new HttpParams();
32009          this.urlWithParams = url;
32010        } else {
32011          const params = this.params.toString();
32012          if (params.length === 0) {
32013            this.urlWithParams = url;
32014          } else {
32015            const qIdx = url.indexOf("?");
32016            const sep = qIdx === -1 ? "?" : qIdx < url.length - 1 ? "&" : "";
32017            this.urlWithParams = url + sep + params;
32018          }
32019        }
32020      }
32021      /**
32022       * Transform the free-form body into a serialized format suitable for
32023       * transmission to the server.
32024       */
32025      serializeBody() {
32026        if (this.body === null) {
32027          return null;
32028        }
32029        if (typeof this.body === "string" || isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) || isUrlSearchParams(this.body)) {
32030          return this.body;
32031        }
32032        if (this.body instanceof HttpParams) {
32033          return this.body.toString();
32034        }
32035        if (typeof this.body === "object" || typeof this.body === "boolean" || Array.isArray(this.body)) {
32036          return JSON.stringify(this.body);
32037        }
32038        return this.body.toString();
32039      }
32040      /**
32041       * Examine the body and attempt to infer an appropriate MIME type
32042       * for it.
32043       *
32044       * If no such type can be inferred, this method will return `null`.
32045       */
32046      detectContentTypeHeader() {
32047        if (this.body === null) {
32048          return null;
32049        }
32050        if (isFormData(this.body)) {
32051          return null;
32052        }
32053        if (isBlob(this.body)) {
32054          return this.body.type || null;
32055        }
32056        if (isArrayBuffer(this.body)) {
32057          return null;
32058        }
32059        if (typeof this.body === "string") {
32060          return TEXT_CONTENT_TYPE;
32061        }
32062        if (this.body instanceof HttpParams) {
32063          return "application/x-www-form-urlencoded;charset=UTF-8";
32064        }
32065        if (typeof this.body === "object" || typeof this.body === "number" || typeof this.body === "boolean") {
32066          return JSON_CONTENT_TYPE;
32067        }
32068        return null;
32069      }
32070      clone(update = {}) {
32071        const method = update.method || this.method;
32072        const url = update.url || this.url;
32073        const responseType = update.responseType || this.responseType;
32074        const keepalive = update.keepalive ?? this.keepalive;
32075        const priority = update.priority || this.priority;
32076        const cache = update.cache || this.cache;
32077        const mode = update.mode || this.mode;
32078        const redirect = update.redirect || this.redirect;
32079        const credentials = update.credentials || this.credentials;
32080        const referrer = update.referrer || this.referrer;
32081        const integrity = update.integrity || this.integrity;
32082        const transferCache = update.transferCache ?? this.transferCache;
32083        const timeout = update.timeout ?? this.timeout;
32084        const body = update.body !== void 0 ? update.body : this.body;
32085        const withCredentials = update.withCredentials ?? this.withCredentials;
32086        const reportProgress = update.reportProgress ?? this.reportProgress;
32087        let headers = update.headers || this.headers;
32088        let params = update.params || this.params;
32089        const context2 = update.context ?? this.context;
32090        if (update.setHeaders !== void 0) {
32091          headers = Object.keys(update.setHeaders).reduce((headers2, name) => headers2.set(name, update.setHeaders[name]), headers);
32092        }
32093        if (update.setParams) {
32094          params = Object.keys(update.setParams).reduce((params2, param) => params2.set(param, update.setParams[param]), params);
32095        }
32096        return new _HttpRequest(method, url, body, {
32097          params,
32098          headers,
32099          context: context2,
32100          reportProgress,
32101          responseType,
32102          withCredentials,
32103          transferCache,
32104          keepalive,
32105          cache,
32106          priority,
32107          timeout,
32108          mode,
32109          redirect,
32110          credentials,
32111          referrer,
32112          integrity
32113        });
32114      }
32115    };
32116    (function(HttpEventType2) {
32117      HttpEventType2[HttpEventType2["Sent"] = 0] = "Sent";
32118      HttpEventType2[HttpEventType2["UploadProgress"] = 1] = "UploadProgress";
32119      HttpEventType2[HttpEventType2["ResponseHeader"] = 2] = "ResponseHeader";
32120      HttpEventType2[HttpEventType2["DownloadProgress"] = 3] = "DownloadProgress";
32121      HttpEventType2[HttpEventType2["Response"] = 4] = "Response";
32122      HttpEventType2[HttpEventType2["User"] = 5] = "User";
32123    })(HttpEventType || (HttpEventType = {}));
32124    HttpResponseBase = class {
32125      /**
32126       * All response headers.
32127       */
32128      headers;
32129      /**
32130       * Response status code.
32131       */
32132      status;
32133      /**
32134       * Textual description of response status code, defaults to OK.
32135       *
32136       * Do not depend on this.
32137       */
32138      statusText;
32139      /**
32140       * URL of the resource retrieved, or null if not available.
32141       */
32142      url;
32143      /**
32144       * Whether the status code falls in the 2xx range.
32145       */
32146      ok;
32147      /**
32148       * Type of the response, narrowed to either the full response or the header.
32149       */
32150      type;
32151      /**
32152       * Indicates whether the HTTP response was redirected during the request.
32153       * This property is only available when using the Fetch API using `withFetch()`
32154       * When using the default XHR Request this property will be `undefined`
32155       */
32156      redirected;
32157      /**
32158       * Super-constructor for all responses.
32159       *
32160       * The single parameter accepted is an initialization hash. Any properties
32161       * of the response passed there will override the default values.
32162       */
32163      constructor(init, defaultStatus = 200, defaultStatusText = "OK") {
32164        this.headers = init.headers || new HttpHeaders();
32165        this.status = init.status !== void 0 ? init.status : defaultStatus;
32166        this.statusText = init.statusText || defaultStatusText;
32167        this.url = init.url || null;
32168        this.redirected = init.redirected;
32169        this.ok = this.status >= 200 && this.status < 300;
32170      }
32171    };
32172    HttpHeaderResponse = class _HttpHeaderResponse extends HttpResponseBase {
32173      /**
32174       * Create a new `HttpHeaderResponse` with the given parameters.
32175       */
32176      constructor(init = {}) {
32177        super(init);
32178      }
32179      type = HttpEventType.ResponseHeader;
32180      /**
32181       * Copy this `HttpHeaderResponse`, overriding its contents with the
32182       * given parameter hash.
32183       */
32184      clone(update = {}) {
32185        return new _HttpHeaderResponse({
32186          headers: update.headers || this.headers,
32187          status: update.status !== void 0 ? update.status : this.status,
32188          statusText: update.statusText || this.statusText,
32189          url: update.url || this.url || void 0
32190        });
32191      }
32192    };
32193    HttpResponse = class _HttpResponse extends HttpResponseBase {
32194      /**
32195       * The response body, or `null` if one was not returned.
32196       */
32197      body;
32198      /**
32199       * Construct a new `HttpResponse`.
32200       */
32201      constructor(init = {}) {
32202        super(init);
32203        this.body = init.body !== void 0 ? init.body : null;
32204      }
32205      type = HttpEventType.Response;
32206      clone(update = {}) {
32207        return new _HttpResponse({
32208          body: update.body !== void 0 ? update.body : this.body,
32209          headers: update.headers || this.headers,
32210          status: update.status !== void 0 ? update.status : this.status,
32211          statusText: update.statusText || this.statusText,
32212          url: update.url || this.url || void 0,
32213          redirected: update.redirected ?? this.redirected
32214        });
32215      }
32216    };
32217    HttpErrorResponse = class extends HttpResponseBase {
32218      name = "HttpErrorResponse";
32219      message;
32220      error;
32221      /**
32222       * Errors are never okay, even when the status code is in the 2xx success range.
32223       */
32224      ok = false;
32225      constructor(init) {
32226        super(init, 0, "Unknown Error");
32227        if (this.status >= 200 && this.status < 300) {
32228          this.message = `Http failure during parsing for ${init.url || "(unknown url)"}`;
32229        } else {
32230          this.message = `Http failure response for ${init.url || "(unknown url)"}: ${init.status} ${init.statusText}`;
32231        }
32232        this.error = init.error || null;
32233      }
32234    };
32235    HTTP_STATUS_CODE_OK = 200;
32236    HTTP_STATUS_CODE_NO_CONTENT = 204;
32237    (function(HttpStatusCode2) {
32238      HttpStatusCode2[HttpStatusCode2["Continue"] = 100] = "Continue";
32239      HttpStatusCode2[HttpStatusCode2["SwitchingProtocols"] = 101] = "SwitchingProtocols";
32240      HttpStatusCode2[HttpStatusCode2["Processing"] = 102] = "Processing";
32241      HttpStatusCode2[HttpStatusCode2["EarlyHints"] = 103] = "EarlyHints";
32242      HttpStatusCode2[HttpStatusCode2["Ok"] = 200] = "Ok";
32243      HttpStatusCode2[HttpStatusCode2["Created"] = 201] = "Created";
32244      HttpStatusCode2[HttpStatusCode2["Accepted"] = 202] = "Accepted";
32245      HttpStatusCode2[HttpStatusCode2["NonAuthoritativeInformation"] = 203] = "NonAuthoritativeInformation";
32246      HttpStatusCode2[HttpStatusCode2["NoContent"] = 204] = "NoContent";
32247      HttpStatusCode2[HttpStatusCode2["ResetContent"] = 205] = "ResetContent";
32248      HttpStatusCode2[HttpStatusCode2["PartialContent"] = 206] = "PartialContent";
32249      HttpStatusCode2[HttpStatusCode2["MultiStatus"] = 207] = "MultiStatus";
32250      HttpStatusCode2[HttpStatusCode2["AlreadyReported"] = 208] = "AlreadyReported";
32251      HttpStatusCode2[HttpStatusCode2["ImUsed"] = 226] = "ImUsed";
32252      HttpStatusCode2[HttpStatusCode2["MultipleChoices"] = 300] = "MultipleChoices";
32253      HttpStatusCode2[HttpStatusCode2["MovedPermanently"] = 301] = "MovedPermanently";
32254      HttpStatusCode2[HttpStatusCode2["Found"] = 302] = "Found";
32255      HttpStatusCode2[HttpStatusCode2["SeeOther"] = 303] = "SeeOther";
32256      HttpStatusCode2[HttpStatusCode2["NotModified"] = 304] = "NotModified";
32257      HttpStatusCode2[HttpStatusCode2["UseProxy"] = 305] = "UseProxy";
32258      HttpStatusCode2[HttpStatusCode2["Unused"] = 306] = "Unused";
32259      HttpStatusCode2[HttpStatusCode2["TemporaryRedirect"] = 307] = "TemporaryRedirect";
32260      HttpStatusCode2[HttpStatusCode2["PermanentRedirect"] = 308] = "PermanentRedirect";
32261      HttpStatusCode2[HttpStatusCode2["BadRequest"] = 400] = "BadRequest";
32262      HttpStatusCode2[HttpStatusCode2["Unauthorized"] = 401] = "Unauthorized";
32263      HttpStatusCode2[HttpStatusCode2["PaymentRequired"] = 402] = "PaymentRequired";
32264      HttpStatusCode2[HttpStatusCode2["Forbidden"] = 403] = "Forbidden";
32265      HttpStatusCode2[HttpStatusCode2["NotFound"] = 404] = "NotFound";
32266      HttpStatusCode2[HttpStatusCode2["MethodNotAllowed"] = 405] = "MethodNotAllowed";
32267      HttpStatusCode2[HttpStatusCode2["NotAcceptable"] = 406] = "NotAcceptable";
32268      HttpStatusCode2[HttpStatusCode2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
32269      HttpStatusCode2[HttpStatusCode2["RequestTimeout"] = 408] = "RequestTimeout";
32270      HttpStatusCode2[HttpStatusCode2["Conflict"] = 409] = "Conflict";
32271      HttpStatusCode2[HttpStatusCode2["Gone"] = 410] = "Gone";
32272      HttpStatusCode2[HttpStatusCode2["LengthRequired"] = 411] = "LengthRequired";
32273      HttpStatusCode2[HttpStatusCode2["PreconditionFailed"] = 412] = "PreconditionFailed";
32274      HttpStatusCode2[HttpStatusCode2["PayloadTooLarge"] = 413] = "PayloadTooLarge";
32275      HttpStatusCode2[HttpStatusCode2["UriTooLong"] = 414] = "UriTooLong";
32276      HttpStatusCode2[HttpStatusCode2["UnsupportedMediaType"] = 415] = "UnsupportedMediaType";
32277      HttpStatusCode2[HttpStatusCode2["RangeNotSatisfiable"] = 416] = "RangeNotSatisfiable";
32278      HttpStatusCode2[HttpStatusCode2["ExpectationFailed"] = 417] = "ExpectationFailed";
32279      HttpStatusCode2[HttpStatusCode2["ImATeapot"] = 418] = "ImATeapot";
32280      HttpStatusCode2[HttpStatusCode2["MisdirectedRequest"] = 421] = "MisdirectedRequest";
32281      HttpStatusCode2[HttpStatusCode2["UnprocessableEntity"] = 422] = "UnprocessableEntity";
32282      HttpStatusCode2[HttpStatusCode2["Locked"] = 423] = "Locked";
32283      HttpStatusCode2[HttpStatusCode2["FailedDependency"] = 424] = "FailedDependency";
32284      HttpStatusCode2[HttpStatusCode2["TooEarly"] = 425] = "TooEarly";
32285      HttpStatusCode2[HttpStatusCode2["UpgradeRequired"] = 426] = "UpgradeRequired";
32286      HttpStatusCode2[HttpStatusCode2["PreconditionRequired"] = 428] = "PreconditionRequired";
32287      HttpStatusCode2[HttpStatusCode2["TooManyRequests"] = 429] = "TooManyRequests";
32288      HttpStatusCode2[HttpStatusCode2["RequestHeaderFieldsTooLarge"] = 431] = "RequestHeaderFieldsTooLarge";
32289      HttpStatusCode2[HttpStatusCode2["UnavailableForLegalReasons"] = 451] = "UnavailableForLegalReasons";
32290      HttpStatusCode2[HttpStatusCode2["InternalServerError"] = 500] = "InternalServerError";
32291      HttpStatusCode2[HttpStatusCode2["NotImplemented"] = 501] = "NotImplemented";
32292      HttpStatusCode2[HttpStatusCode2["BadGateway"] = 502] = "BadGateway";
32293      HttpStatusCode2[HttpStatusCode2["ServiceUnavailable"] = 503] = "ServiceUnavailable";
32294      HttpStatusCode2[HttpStatusCode2["GatewayTimeout"] = 504] = "GatewayTimeout";
32295      HttpStatusCode2[HttpStatusCode2["HttpVersionNotSupported"] = 505] = "HttpVersionNotSupported";
32296      HttpStatusCode2[HttpStatusCode2["VariantAlsoNegotiates"] = 506] = "VariantAlsoNegotiates";
32297      HttpStatusCode2[HttpStatusCode2["InsufficientStorage"] = 507] = "InsufficientStorage";
32298      HttpStatusCode2[HttpStatusCode2["LoopDetected"] = 508] = "LoopDetected";
32299      HttpStatusCode2[HttpStatusCode2["NotExtended"] = 510] = "NotExtended";
32300      HttpStatusCode2[HttpStatusCode2["NetworkAuthenticationRequired"] = 511] = "NetworkAuthenticationRequired";
32301    })(HttpStatusCode || (HttpStatusCode = {}));
32302    HttpClient = class _HttpClient {
32303      handler;
32304      constructor(handler) {
32305        this.handler = handler;
32306      }
32307      /**
32308       * Constructs an observable for a generic HTTP request that, when subscribed,
32309       * fires the request through the chain of registered interceptors and on to the
32310       * server.
32311       *
32312       * You can pass an `HttpRequest` directly as the only parameter. In this case,
32313       * the call returns an observable of the raw `HttpEvent` stream.
32314       *
32315       * Alternatively you can pass an HTTP method as the first parameter,
32316       * a URL string as the second, and an options hash containing the request body as the third.
32317       * See `addBody()`. In this case, the specified `responseType` and `observe` options determine the
32318       * type of returned observable.
32319       *   * The `responseType` value determines how a successful response body is parsed.
32320       *   * If `responseType` is the default `json`, you can pass a type interface for the resulting
32321       * object as a type parameter to the call.
32322       *
32323       * The `observe` value determines the return type, according to what you are interested in
32324       * observing.
32325       *   * An `observe` value of events returns an observable of the raw `HttpEvent` stream, including
32326       * progress events by default.
32327       *   * An `observe` value of response returns an observable of `HttpResponse<T>`,
32328       * where the `T` parameter depends on the `responseType` and any optionally provided type
32329       * parameter.
32330       *   * An `observe` value of body returns an observable of `<T>` with the same `T` body type.
32331       *
32332       */
32333      request(first, url, options = {}) {
32334        let req;
32335        if (first instanceof HttpRequest) {
32336          req = first;
32337        } else {
32338          let headers = void 0;
32339          if (options.headers instanceof HttpHeaders) {
32340            headers = options.headers;
32341          } else {
32342            headers = new HttpHeaders(options.headers);
32343          }
32344          let params = void 0;
32345          if (!!options.params) {
32346            if (options.params instanceof HttpParams) {
32347              params = options.params;
32348            } else {
32349              params = new HttpParams({
32350                fromObject: options.params
32351              });
32352            }
32353          }
32354          req = new HttpRequest(first, url, options.body !== void 0 ? options.body : null, {
32355            headers,
32356            context: options.context,
32357            params,
32358            reportProgress: options.reportProgress,
32359            // By default, JSON is assumed to be returned for all calls.
32360            responseType: options.responseType || "json",
32361            withCredentials: options.withCredentials,
32362            transferCache: options.transferCache,
32363            keepalive: options.keepalive,
32364            priority: options.priority,
32365            cache: options.cache,
32366            mode: options.mode,
32367            redirect: options.redirect,
32368            credentials: options.credentials,
32369            referrer: options.referrer,
32370            integrity: options.integrity,
32371            timeout: options.timeout
32372          });
32373        }
32374        const events$ = of(req).pipe(concatMap((req2) => this.handler.handle(req2)));
32375        if (first instanceof HttpRequest || options.observe === "events") {
32376          return events$;
32377        }
32378        const res$ = events$.pipe(filter((event) => event instanceof HttpResponse));
32379        switch (options.observe || "body") {
32380          case "body":
32381            switch (req.responseType) {
32382              case "arraybuffer":
32383                return res$.pipe(map((res) => {
32384                  if (res.body !== null && !(res.body instanceof ArrayBuffer)) {
32385                    throw new RuntimeError(2806, ngDevMode && "Response is not an ArrayBuffer.");
32386                  }
32387                  return res.body;
32388                }));
32389              case "blob":
32390                return res$.pipe(map((res) => {
32391                  if (res.body !== null && !(res.body instanceof Blob)) {
32392                    throw new RuntimeError(2807, ngDevMode && "Response is not a Blob.");
32393                  }
32394                  return res.body;
32395                }));
32396              case "text":
32397                return res$.pipe(map((res) => {
32398                  if (res.body !== null && typeof res.body !== "string") {
32399                    throw new RuntimeError(2808, ngDevMode && "Response is not a string.");
32400                  }
32401                  return res.body;
32402                }));
32403              case "json":
32404              default:
32405                return res$.pipe(map((res) => res.body));
32406            }
32407          case "response":
32408            return res$;
32409          default:
32410            throw new RuntimeError(2809, ngDevMode && `Unreachable: unhandled observe type ${options.observe}}`);
32411        }
32412      }
32413      /**
32414       * Constructs an observable that, when subscribed, causes the configured
32415       * `DELETE` request to execute on the server. See the individual overloads for
32416       * details on the return type.
32417       *
32418       * @param url     The endpoint URL.
32419       * @param options The HTTP options to send with the request.
32420       *
32421       */
32422      delete(url, options = {}) {
32423        return this.request("DELETE", url, options);
32424      }
32425      /**
32426       * Constructs an observable that, when subscribed, causes the configured
32427       * `GET` request to execute on the server. See the individual overloads for
32428       * details on the return type.
32429       */
32430      get(url, options = {}) {
32431        return this.request("GET", url, options);
32432      }
32433      /**
32434       * Constructs an observable that, when subscribed, causes the configured
32435       * `HEAD` request to execute on the server. The `HEAD` method returns
32436       * meta information about the resource without transferring the
32437       * resource itself. See the individual overloads for
32438       * details on the return type.
32439       */
32440      head(url, options = {}) {
32441        return this.request("HEAD", url, options);
32442      }
32443      /**
32444       * Constructs an `Observable` that, when subscribed, causes a request with the special method
32445       * `JSONP` to be dispatched via the interceptor pipeline.
32446       * The [JSONP pattern](https://en.wikipedia.org/wiki/JSONP) works around limitations of certain
32447       * API endpoints that don't support newer,
32448       * and preferable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) protocol.
32449       * JSONP treats the endpoint API as a JavaScript file and tricks the browser to process the
32450       * requests even if the API endpoint is not located on the same domain (origin) as the client-side
32451       * application making the request.
32452       * The endpoint API must support JSONP callback for JSONP requests to work.
32453       * The resource API returns the JSON response wrapped in a callback function.
32454       * You can pass the callback function name as one of the query parameters.
32455       * Note that JSONP requests can only be used with `GET` requests.
32456       *
32457       * @param url The resource URL.
32458       * @param callbackParam The callback function name.
32459       *
32460       */
32461      jsonp(url, callbackParam) {
32462        return this.request("JSONP", url, {
32463          params: new HttpParams().append(callbackParam, "JSONP_CALLBACK"),
32464          observe: "body",
32465          responseType: "json"
32466        });
32467      }
32468      /**
32469       * Constructs an `Observable` that, when subscribed, causes the configured
32470       * `OPTIONS` request to execute on the server. This method allows the client
32471       * to determine the supported HTTP methods and other capabilities of an endpoint,
32472       * without implying a resource action. See the individual overloads for
32473       * details on the return type.
32474       */
32475      options(url, options = {}) {
32476        return this.request("OPTIONS", url, options);
32477      }
32478      /**
32479       * Constructs an observable that, when subscribed, causes the configured
32480       * `PATCH` request to execute on the server. See the individual overloads for
32481       * details on the return type.
32482       */
32483      patch(url, body, options = {}) {
32484        return this.request("PATCH", url, addBody(options, body));
32485      }
32486      /**
32487       * Constructs an observable that, when subscribed, causes the configured
32488       * `POST` request to execute on the server. The server responds with the location of
32489       * the replaced resource. See the individual overloads for
32490       * details on the return type.
32491       */
32492      post(url, body, options = {}) {
32493        return this.request("POST", url, addBody(options, body));
32494      }
32495      /**
32496       * Constructs an observable that, when subscribed, causes the configured
32497       * `PUT` request to execute on the server. The `PUT` method replaces an existing resource
32498       * with a new set of values.
32499       * See the individual overloads for details on the return type.
32500       */
32501      put(url, body, options = {}) {
32502        return this.request("PUT", url, addBody(options, body));
32503      }
32504      static \u0275fac = function HttpClient_Factory(__ngFactoryType__) {
32505        return new (__ngFactoryType__ || _HttpClient)(\u0275\u0275inject(HttpHandler));
32506      };
32507      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
32508        token: _HttpClient,
32509        factory: _HttpClient.\u0275fac
32510      });
32511    };
32512    (() => {
32513      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(HttpClient, [{
32514        type: Injectable
32515      }], () => [{
32516        type: HttpHandler
32517      }], null);
32518    })();
32519    XSSI_PREFIX$1 = /^\)\]\}',?\n/;
32520    FETCH_BACKEND = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "FETCH_BACKEND" : "");
32521    FetchBackend = class _FetchBackend {
32522      // We use an arrow function to always reference the current global implementation of `fetch`.
32523      // This is helpful for cases when the global `fetch` implementation is modified by external code,
32524      // see https://github.com/angular/angular/issues/57527.
32525      fetchImpl = inject2(FetchFactory, {
32526        optional: true
32527      })?.fetch ?? ((...args) => globalThis.fetch(...args));
32528      ngZone = inject2(NgZone);
32529      destroyRef = inject2(DestroyRef);
32530      handle(request) {
32531        return new Observable((observer) => {
32532          const aborter = new AbortController();
32533          this.doRequest(request, aborter.signal, observer).then(noop3, (error) => observer.error(new HttpErrorResponse({
32534            error
32535          })));
32536          let timeoutId;
32537          if (request.timeout) {
32538            timeoutId = this.ngZone.runOutsideAngular(() => setTimeout(() => {
32539              if (!aborter.signal.aborted) {
32540                aborter.abort(new DOMException("signal timed out", "TimeoutError"));
32541              }
32542            }, request.timeout));
32543          }
32544          return () => {
32545            if (timeoutId !== void 0) {
32546              clearTimeout(timeoutId);
32547            }
32548            aborter.abort();
32549          };
32550        });
32551      }
32552      doRequest(request, signal2, observer) {
32553        return __async(this, null, function* () {
32554          const init = this.createRequestInit(request);
32555          let response;
32556          try {
32557            const fetchPromise = this.ngZone.runOutsideAngular(() => this.fetchImpl(request.urlWithParams, __spreadValues({
32558              signal: signal2
32559            }, init)));
32560            silenceSuperfluousUnhandledPromiseRejection(fetchPromise);
32561            observer.next({
32562              type: HttpEventType.Sent
32563            });
32564            response = yield fetchPromise;
32565          } catch (error) {
32566            observer.error(new HttpErrorResponse({
32567              error,
32568              status: error.status ?? 0,
32569              statusText: error.statusText,
32570              url: request.urlWithParams,
32571              headers: error.headers
32572            }));
32573            return;
32574          }
32575          const headers = new HttpHeaders(response.headers);
32576          const statusText = response.statusText;
32577          const url = getResponseUrl$1(response) ?? request.urlWithParams;
32578          let status = response.status;
32579          let body = null;
32580          if (request.reportProgress) {
32581            observer.next(new HttpHeaderResponse({
32582              headers,
32583              status,
32584              statusText,
32585              url
32586            }));
32587          }
32588          if (response.body) {
32589            const contentLength = response.headers.get("content-length");
32590            const chunks = [];
32591            const reader = response.body.getReader();
32592            let receivedLength = 0;
32593            let decoder;
32594            let partialText;
32595            const reqZone = typeof Zone !== "undefined" && Zone.current;
32596            let canceled = false;
32597            yield this.ngZone.runOutsideAngular(() => __async(this, null, function* () {
32598              while (true) {
32599                if (this.destroyRef.destroyed) {
32600                  yield reader.cancel();
32601                  canceled = true;
32602                  break;
32603                }
32604                const {
32605                  done,
32606                  value
32607                } = yield reader.read();
32608                if (done) {
32609                  break;
32610                }
32611                chunks.push(value);
32612                receivedLength += value.length;
32613                if (request.reportProgress) {
32614                  partialText = request.responseType === "text" ? (partialText ?? "") + (decoder ??= new TextDecoder()).decode(value, {
32615                    stream: true
32616                  }) : void 0;
32617                  const reportProgress = () => observer.next({
32618                    type: HttpEventType.DownloadProgress,
32619                    total: contentLength ? +contentLength : void 0,
32620                    loaded: receivedLength,
32621                    partialText
32622                  });
32623                  reqZone ? reqZone.run(reportProgress) : reportProgress();
32624                }
32625              }
32626            }));
32627            if (canceled) {
32628              observer.complete();
32629              return;
32630            }
32631            const chunksAll = this.concatChunks(chunks, receivedLength);
32632            try {
32633              const contentType = response.headers.get(CONTENT_TYPE_HEADER) ?? "";
32634              body = this.parseBody(request, chunksAll, contentType, status);
32635            } catch (error) {
32636              observer.error(new HttpErrorResponse({
32637                error,
32638                headers: new HttpHeaders(response.headers),
32639                status: response.status,
32640                statusText: response.statusText,
32641                url: getResponseUrl$1(response) ?? request.urlWithParams
32642              }));
32643              return;
32644            }
32645          }
32646          if (status === 0) {
32647            status = body ? HTTP_STATUS_CODE_OK : 0;
32648          }
32649          const ok = status >= 200 && status < 300;
32650          const redirected = response.redirected;
32651          if (ok) {
32652            observer.next(new HttpResponse({
32653              body,
32654              headers,
32655              status,
32656              statusText,
32657              url,
32658              redirected
32659            }));
32660            observer.complete();
32661          } else {
32662            observer.error(new HttpErrorResponse({
32663              error: body,
32664              headers,
32665              status,
32666              statusText,
32667              url,
32668              redirected
32669            }));
32670          }
32671        });
32672      }
32673      parseBody(request, binContent, contentType, status) {
32674        switch (request.responseType) {
32675          case "json":
32676            const text = new TextDecoder().decode(binContent).replace(XSSI_PREFIX$1, "");
32677            if (text === "") {
32678              return null;
32679            }
32680            try {
32681              return JSON.parse(text);
32682            } catch (e) {
32683              if (status < 200 || status >= 300) {
32684                return text;
32685              }
32686              throw e;
32687            }
32688          case "text":
32689            return new TextDecoder().decode(binContent);
32690          case "blob":
32691            return new Blob([binContent], {
32692              type: contentType
32693            });
32694          case "arraybuffer":
32695            return binContent.buffer;
32696        }
32697      }
32698      createRequestInit(req) {
32699        const headers = {};
32700        let credentials;
32701        credentials = req.credentials;
32702        if (req.withCredentials) {
32703          (typeof ngDevMode === "undefined" || ngDevMode) && warningOptionsMessage(req);
32704          credentials = "include";
32705        }
32706        req.headers.forEach((name, values) => headers[name] = values.join(","));
32707        if (!req.headers.has(ACCEPT_HEADER)) {
32708          headers[ACCEPT_HEADER] = ACCEPT_HEADER_VALUE;
32709        }
32710        if (!req.headers.has(CONTENT_TYPE_HEADER)) {
32711          const detectedType = req.detectContentTypeHeader();
32712          if (detectedType !== null) {
32713            headers[CONTENT_TYPE_HEADER] = detectedType;
32714          }
32715        }
32716        return {
32717          body: req.serializeBody(),
32718          method: req.method,
32719          headers,
32720          credentials,
32721          keepalive: req.keepalive,
32722          cache: req.cache,
32723          priority: req.priority,
32724          mode: req.mode,
32725          redirect: req.redirect,
32726          referrer: req.referrer,
32727          integrity: req.integrity
32728        };
32729      }
32730      concatChunks(chunks, totalLength) {
32731        const chunksAll = new Uint8Array(totalLength);
32732        let position = 0;
32733        for (const chunk of chunks) {
32734          chunksAll.set(chunk, position);
32735          position += chunk.length;
32736        }
32737        return chunksAll;
32738      }
32739      static \u0275fac = function FetchBackend_Factory(__ngFactoryType__) {
32740        return new (__ngFactoryType__ || _FetchBackend)();
32741      };
32742      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
32743        token: _FetchBackend,
32744        factory: _FetchBackend.\u0275fac
32745      });
32746    };
32747    (() => {
32748      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(FetchBackend, [{
32749        type: Injectable
32750      }], null, null);
32751    })();
32752    FetchFactory = class {
32753    };
32754    HTTP_INTERCEPTORS = new InjectionToken(ngDevMode ? "HTTP_INTERCEPTORS" : "");
32755    HTTP_INTERCEPTOR_FNS = new InjectionToken(ngDevMode ? "HTTP_INTERCEPTOR_FNS" : "");
32756    HTTP_ROOT_INTERCEPTOR_FNS = new InjectionToken(ngDevMode ? "HTTP_ROOT_INTERCEPTOR_FNS" : "");
32757    REQUESTS_CONTRIBUTE_TO_STABILITY = new InjectionToken(ngDevMode ? "REQUESTS_CONTRIBUTE_TO_STABILITY" : "", {
32758      providedIn: "root",
32759      factory: () => true
32760    });
32761    fetchBackendWarningDisplayed = false;
32762    HttpInterceptorHandler = class _HttpInterceptorHandler extends HttpHandler {
32763      backend;
32764      injector;
32765      chain = null;
32766      pendingTasks = inject2(PendingTasks);
32767      contributeToStability = inject2(REQUESTS_CONTRIBUTE_TO_STABILITY);
32768      constructor(backend, injector) {
32769        super();
32770        this.backend = backend;
32771        this.injector = injector;
32772        if ((typeof ngDevMode === "undefined" || ngDevMode) && !fetchBackendWarningDisplayed) {
32773          const isTestingBackend = this.backend.isTestingBackend;
32774          if (false) {
32775            fetchBackendWarningDisplayed = true;
32776            injector.get(Console).warn(formatRuntimeError(2801, "Angular detected that `HttpClient` is not configured to use `fetch` APIs. It's strongly recommended to enable `fetch` for applications that use Server-Side Rendering for better performance and compatibility. To enable `fetch`, add the `withFetch()` to the `provideHttpClient()` call at the root of the application."));
32777          }
32778        }
32779      }
32780      handle(initialRequest) {
32781        if (this.chain === null) {
32782          const dedupedInterceptorFns = Array.from(/* @__PURE__ */ new Set([...this.injector.get(HTTP_INTERCEPTOR_FNS), ...this.injector.get(HTTP_ROOT_INTERCEPTOR_FNS, [])]));
32783          this.chain = dedupedInterceptorFns.reduceRight((nextSequencedFn, interceptorFn) => chainedInterceptorFn(nextSequencedFn, interceptorFn, this.injector), interceptorChainEndFn);
32784        }
32785        if (this.contributeToStability) {
32786          const removeTask = this.pendingTasks.add();
32787          return this.chain(initialRequest, (downstreamRequest) => this.backend.handle(downstreamRequest)).pipe(finalize(removeTask));
32788        } else {
32789          return this.chain(initialRequest, (downstreamRequest) => this.backend.handle(downstreamRequest));
32790        }
32791      }
32792      static \u0275fac = function HttpInterceptorHandler_Factory(__ngFactoryType__) {
32793        return new (__ngFactoryType__ || _HttpInterceptorHandler)(\u0275\u0275inject(HttpBackend), \u0275\u0275inject(EnvironmentInjector));
32794      };
32795      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
32796        token: _HttpInterceptorHandler,
32797        factory: _HttpInterceptorHandler.\u0275fac
32798      });
32799    };
32800    (() => {
32801      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(HttpInterceptorHandler, [{
32802        type: Injectable
32803      }], () => [{
32804        type: HttpBackend
32805      }, {
32806        type: EnvironmentInjector
32807      }], null);
32808    })();
32809    nextRequestId = 0;
32810    JSONP_ERR_NO_CALLBACK = "JSONP injected script did not invoke callback.";
32811    JSONP_ERR_WRONG_METHOD = "JSONP requests must use JSONP request method.";
32812    JSONP_ERR_WRONG_RESPONSE_TYPE = "JSONP requests must use Json response type.";
32813    JSONP_ERR_HEADERS_NOT_SUPPORTED = "JSONP requests do not support headers.";
32814    JsonpCallbackContext = class {
32815    };
32816    JsonpClientBackend = class _JsonpClientBackend {
32817      callbackMap;
32818      document;
32819      /**
32820       * A resolved promise that can be used to schedule microtasks in the event handlers.
32821       */
32822      resolvedPromise = Promise.resolve();
32823      constructor(callbackMap, document2) {
32824        this.callbackMap = callbackMap;
32825        this.document = document2;
32826      }
32827      /**
32828       * Get the name of the next callback method, by incrementing the global `nextRequestId`.
32829       */
32830      nextCallback() {
32831        return `ng_jsonp_callback_${nextRequestId++}`;
32832      }
32833      /**
32834       * Processes a JSONP request and returns an event stream of the results.
32835       * @param req The request object.
32836       * @returns An observable of the response events.
32837       *
32838       */
32839      handle(req) {
32840        if (req.method !== "JSONP") {
32841          throw new RuntimeError(2810, ngDevMode && JSONP_ERR_WRONG_METHOD);
32842        } else if (req.responseType !== "json") {
32843          throw new RuntimeError(2811, ngDevMode && JSONP_ERR_WRONG_RESPONSE_TYPE);
32844        }
32845        if (req.headers.keys().length > 0) {
32846          throw new RuntimeError(2812, ngDevMode && JSONP_ERR_HEADERS_NOT_SUPPORTED);
32847        }
32848        return new Observable((observer) => {
32849          const callback = this.nextCallback();
32850          const url = req.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/, `=${callback}$1`);
32851          const node = this.document.createElement("script");
32852          node.src = url;
32853          let body = null;
32854          let finished = false;
32855          this.callbackMap[callback] = (data) => {
32856            delete this.callbackMap[callback];
32857            body = data;
32858            finished = true;
32859          };
32860          const cleanup = () => {
32861            node.removeEventListener("load", onLoad);
32862            node.removeEventListener("error", onError);
32863            node.remove();
32864            delete this.callbackMap[callback];
32865          };
32866          const onLoad = () => {
32867            this.resolvedPromise.then(() => {
32868              cleanup();
32869              if (!finished) {
32870                observer.error(new HttpErrorResponse({
32871                  url,
32872                  status: 0,
32873                  statusText: "JSONP Error",
32874                  error: new Error(JSONP_ERR_NO_CALLBACK)
32875                }));
32876                return;
32877              }
32878              observer.next(new HttpResponse({
32879                body,
32880                status: HTTP_STATUS_CODE_OK,
32881                statusText: "OK",
32882                url
32883              }));
32884              observer.complete();
32885            });
32886          };
32887          const onError = (error) => {
32888            cleanup();
32889            observer.error(new HttpErrorResponse({
32890              error,
32891              status: 0,
32892              statusText: "JSONP Error",
32893              url
32894            }));
32895          };
32896          node.addEventListener("load", onLoad);
32897          node.addEventListener("error", onError);
32898          this.document.body.appendChild(node);
32899          observer.next({
32900            type: HttpEventType.Sent
32901          });
32902          return () => {
32903            if (!finished) {
32904              this.removeListeners(node);
32905            }
32906            cleanup();
32907          };
32908        });
32909      }
32910      removeListeners(script) {
32911        foreignDocument ??= this.document.implementation.createHTMLDocument();
32912        foreignDocument.adoptNode(script);
32913      }
32914      static \u0275fac = function JsonpClientBackend_Factory(__ngFactoryType__) {
32915        return new (__ngFactoryType__ || _JsonpClientBackend)(\u0275\u0275inject(JsonpCallbackContext), \u0275\u0275inject(DOCUMENT));
32916      };
32917      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
32918        token: _JsonpClientBackend,
32919        factory: _JsonpClientBackend.\u0275fac
32920      });
32921    };
32922    (() => {
32923      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(JsonpClientBackend, [{
32924        type: Injectable
32925      }], () => [{
32926        type: JsonpCallbackContext
32927      }, {
32928        type: void 0,
32929        decorators: [{
32930          type: Inject,
32931          args: [DOCUMENT]
32932        }]
32933      }], null);
32934    })();
32935    JsonpInterceptor = class _JsonpInterceptor {
32936      injector;
32937      constructor(injector) {
32938        this.injector = injector;
32939      }
32940      /**
32941       * Identifies and handles a given JSONP request.
32942       * @param initialRequest The outgoing request object to handle.
32943       * @param next The next interceptor in the chain, or the backend
32944       * if no interceptors remain in the chain.
32945       * @returns An observable of the event stream.
32946       */
32947      intercept(initialRequest, next) {
32948        return runInInjectionContext(this.injector, () => jsonpInterceptorFn(initialRequest, (downstreamRequest) => next.handle(downstreamRequest)));
32949      }
32950      static \u0275fac = function JsonpInterceptor_Factory(__ngFactoryType__) {
32951        return new (__ngFactoryType__ || _JsonpInterceptor)(\u0275\u0275inject(EnvironmentInjector));
32952      };
32953      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
32954        token: _JsonpInterceptor,
32955        factory: _JsonpInterceptor.\u0275fac
32956      });
32957    };
32958    (() => {
32959      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(JsonpInterceptor, [{
32960        type: Injectable
32961      }], () => [{
32962        type: EnvironmentInjector
32963      }], null);
32964    })();
32965    XSSI_PREFIX = /^\)\]\}',?\n/;
32966    X_REQUEST_URL_REGEXP = RegExp(`^${X_REQUEST_URL_HEADER}:`, "m");
32967    HttpXhrBackend = class _HttpXhrBackend {
32968      xhrFactory;
32969      constructor(xhrFactory) {
32970        this.xhrFactory = xhrFactory;
32971      }
32972      /**
32973       * Processes a request and returns a stream of response events.
32974       * @param req The request object.
32975       * @returns An observable of the response events.
32976       */
32977      handle(req) {
32978        if (req.method === "JSONP") {
32979          throw new RuntimeError(-2800, (typeof ngDevMode === "undefined" || ngDevMode) && `Cannot make a JSONP request without JSONP support. To fix the problem, either add the \`withJsonpSupport()\` call (if \`provideHttpClient()\` is used) or import the \`HttpClientJsonpModule\` in the root NgModule.`);
32980        }
32981        ngDevMode && validateXhrCompatibility(req);
32982        const xhrFactory = this.xhrFactory;
32983        const source = (
32984          // Note that `ɵloadImpl` is never defined in client bundles and can be
32985          // safely dropped whenever we're running in the browser.
32986          // This branching is redundant.
32987          // The `ngServerMode` guard also enables tree-shaking of the `from()`
32988          // function from the common bundle, as it's only used in server code.
32989          false ? from(xhrFactory.\u0275loadImpl()) : of(null)
32990        );
32991        return source.pipe(switchMap(() => {
32992          return new Observable((observer) => {
32993            const xhr = xhrFactory.build();
32994            xhr.open(req.method, req.urlWithParams);
32995            if (req.withCredentials) {
32996              xhr.withCredentials = true;
32997            }
32998            req.headers.forEach((name, values) => xhr.setRequestHeader(name, values.join(",")));
32999            if (!req.headers.has(ACCEPT_HEADER)) {
33000              xhr.setRequestHeader(ACCEPT_HEADER, ACCEPT_HEADER_VALUE);
33001            }
33002            if (!req.headers.has(CONTENT_TYPE_HEADER)) {
33003              const detectedType = req.detectContentTypeHeader();
33004              if (detectedType !== null) {
33005                xhr.setRequestHeader(CONTENT_TYPE_HEADER, detectedType);
33006              }
33007            }
33008            if (req.timeout) {
33009              xhr.timeout = req.timeout;
33010            }
33011            if (req.responseType) {
33012              const responseType = req.responseType.toLowerCase();
33013              xhr.responseType = responseType !== "json" ? responseType : "text";
33014            }
33015            const reqBody = req.serializeBody();
33016            let headerResponse = null;
33017            const partialFromXhr = () => {
33018              if (headerResponse !== null) {
33019                return headerResponse;
33020              }
33021              const statusText = xhr.statusText || "OK";
33022              const headers = new HttpHeaders(xhr.getAllResponseHeaders());
33023              const url = getResponseUrl(xhr) || req.url;
33024              headerResponse = new HttpHeaderResponse({
33025                headers,
33026                status: xhr.status,
33027                statusText,
33028                url
33029              });
33030              return headerResponse;
33031            };
33032            const onLoad = () => {
33033              let {
33034                headers,
33035                status,
33036                statusText,
33037                url
33038              } = partialFromXhr();
33039              let body = null;
33040              if (status !== HTTP_STATUS_CODE_NO_CONTENT) {
33041                body = typeof xhr.response === "undefined" ? xhr.responseText : xhr.response;
33042              }
33043              if (status === 0) {
33044                status = !!body ? HTTP_STATUS_CODE_OK : 0;
33045              }
33046              let ok = status >= 200 && status < 300;
33047              if (req.responseType === "json" && typeof body === "string") {
33048                const originalBody = body;
33049                body = body.replace(XSSI_PREFIX, "");
33050                try {
33051                  body = body !== "" ? JSON.parse(body) : null;
33052                } catch (error) {
33053                  body = originalBody;
33054                  if (ok) {
33055                    ok = false;
33056                    body = {
33057                      error,
33058                      text: body
33059                    };
33060                  }
33061                }
33062              }
33063              if (ok) {
33064                observer.next(new HttpResponse({
33065                  body,
33066                  headers,
33067                  status,
33068                  statusText,
33069                  url: url || void 0
33070                }));
33071                observer.complete();
33072              } else {
33073                observer.error(new HttpErrorResponse({
33074                  // The error in this case is the response body (error from the server).
33075                  error: body,
33076                  headers,
33077                  status,
33078                  statusText,
33079                  url: url || void 0
33080                }));
33081              }
33082            };
33083            const onError = (error) => {
33084              const {
33085                url
33086              } = partialFromXhr();
33087              const res = new HttpErrorResponse({
33088                error,
33089                status: xhr.status || 0,
33090                statusText: xhr.statusText || "Unknown Error",
33091                url: url || void 0
33092              });
33093              observer.error(res);
33094            };
33095            let onTimeout = onError;
33096            if (req.timeout) {
33097              onTimeout = (_) => {
33098                const {
33099                  url
33100                } = partialFromXhr();
33101                const res = new HttpErrorResponse({
33102                  error: new DOMException("Request timed out", "TimeoutError"),
33103                  status: xhr.status || 0,
33104                  statusText: xhr.statusText || "Request timeout",
33105                  url: url || void 0
33106                });
33107                observer.error(res);
33108              };
33109            }
33110            let sentHeaders = false;
33111            const onDownProgress = (event) => {
33112              if (!sentHeaders) {
33113                observer.next(partialFromXhr());
33114                sentHeaders = true;
33115              }
33116              let progressEvent = {
33117                type: HttpEventType.DownloadProgress,
33118                loaded: event.loaded
33119              };
33120              if (event.lengthComputable) {
33121                progressEvent.total = event.total;
33122              }
33123              if (req.responseType === "text" && !!xhr.responseText) {
33124                progressEvent.partialText = xhr.responseText;
33125              }
33126              observer.next(progressEvent);
33127            };
33128            const onUpProgress = (event) => {
33129              let progress = {
33130                type: HttpEventType.UploadProgress,
33131                loaded: event.loaded
33132              };
33133              if (event.lengthComputable) {
33134                progress.total = event.total;
33135              }
33136              observer.next(progress);
33137            };
33138            xhr.addEventListener("load", onLoad);
33139            xhr.addEventListener("error", onError);
33140            xhr.addEventListener("timeout", onTimeout);
33141            xhr.addEventListener("abort", onError);
33142            if (req.reportProgress) {
33143              xhr.addEventListener("progress", onDownProgress);
33144              if (reqBody !== null && xhr.upload) {
33145                xhr.upload.addEventListener("progress", onUpProgress);
33146              }
33147            }
33148            xhr.send(reqBody);
33149            observer.next({
33150              type: HttpEventType.Sent
33151            });
33152            return () => {
33153              xhr.removeEventListener("error", onError);
33154              xhr.removeEventListener("abort", onError);
33155              xhr.removeEventListener("load", onLoad);
33156              xhr.removeEventListener("timeout", onTimeout);
33157              if (req.reportProgress) {
33158                xhr.removeEventListener("progress", onDownProgress);
33159                if (reqBody !== null && xhr.upload) {
33160                  xhr.upload.removeEventListener("progress", onUpProgress);
33161                }
33162              }
33163              if (xhr.readyState !== xhr.DONE) {
33164                xhr.abort();
33165              }
33166            };
33167          });
33168        }));
33169      }
33170      static \u0275fac = function HttpXhrBackend_Factory(__ngFactoryType__) {
33171        return new (__ngFactoryType__ || _HttpXhrBackend)(\u0275\u0275inject(XhrFactory));
33172      };
33173      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
33174        token: _HttpXhrBackend,
33175        factory: _HttpXhrBackend.\u0275fac
33176      });
33177    };
33178    (() => {
33179      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(HttpXhrBackend, [{
33180        type: Injectable
33181      }], () => [{
33182        type: XhrFactory
33183      }], null);
33184    })();
33185    XSRF_ENABLED = new InjectionToken(ngDevMode ? "XSRF_ENABLED" : "");
33186    XSRF_DEFAULT_COOKIE_NAME = "XSRF-TOKEN";
33187    XSRF_COOKIE_NAME = new InjectionToken(ngDevMode ? "XSRF_COOKIE_NAME" : "", {
33188      providedIn: "root",
33189      factory: () => XSRF_DEFAULT_COOKIE_NAME
33190    });
33191    XSRF_DEFAULT_HEADER_NAME = "X-XSRF-TOKEN";
33192    XSRF_HEADER_NAME = new InjectionToken(ngDevMode ? "XSRF_HEADER_NAME" : "", {
33193      providedIn: "root",
33194      factory: () => XSRF_DEFAULT_HEADER_NAME
33195    });
33196    HttpXsrfTokenExtractor = class {
33197    };
33198    HttpXsrfCookieExtractor = class _HttpXsrfCookieExtractor {
33199      doc;
33200      cookieName;
33201      lastCookieString = "";
33202      lastToken = null;
33203      /**
33204       * @internal for testing
33205       */
33206      parseCount = 0;
33207      constructor(doc, cookieName) {
33208        this.doc = doc;
33209        this.cookieName = cookieName;
33210      }
33211      getToken() {
33212        if (false) {
33213          return null;
33214        }
33215        const cookieString = this.doc.cookie || "";
33216        if (cookieString !== this.lastCookieString) {
33217          this.parseCount++;
33218          this.lastToken = parseCookieValue(cookieString, this.cookieName);
33219          this.lastCookieString = cookieString;
33220        }
33221        return this.lastToken;
33222      }
33223      static \u0275fac = function HttpXsrfCookieExtractor_Factory(__ngFactoryType__) {
33224        return new (__ngFactoryType__ || _HttpXsrfCookieExtractor)(\u0275\u0275inject(DOCUMENT), \u0275\u0275inject(XSRF_COOKIE_NAME));
33225      };
33226      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
33227        token: _HttpXsrfCookieExtractor,
33228        factory: _HttpXsrfCookieExtractor.\u0275fac
33229      });
33230    };
33231    (() => {
33232      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(HttpXsrfCookieExtractor, [{
33233        type: Injectable
33234      }], () => [{
33235        type: void 0,
33236        decorators: [{
33237          type: Inject,
33238          args: [DOCUMENT]
33239        }]
33240      }, {
33241        type: void 0,
33242        decorators: [{
33243          type: Inject,
33244          args: [XSRF_COOKIE_NAME]
33245        }]
33246      }], null);
33247    })();
33248    ABSOLUTE_URL_REGEX = /^(?:https?:)?\/\//i;
33249    HttpXsrfInterceptor = class _HttpXsrfInterceptor {
33250      injector;
33251      constructor(injector) {
33252        this.injector = injector;
33253      }
33254      intercept(initialRequest, next) {
33255        return runInInjectionContext(this.injector, () => xsrfInterceptorFn(initialRequest, (downstreamRequest) => next.handle(downstreamRequest)));
33256      }
33257      static \u0275fac = function HttpXsrfInterceptor_Factory(__ngFactoryType__) {
33258        return new (__ngFactoryType__ || _HttpXsrfInterceptor)(\u0275\u0275inject(EnvironmentInjector));
33259      };
33260      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
33261        token: _HttpXsrfInterceptor,
33262        factory: _HttpXsrfInterceptor.\u0275fac
33263      });
33264    };
33265    (() => {
33266      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(HttpXsrfInterceptor, [{
33267        type: Injectable
33268      }], () => [{
33269        type: EnvironmentInjector
33270      }], null);
33271    })();
33272    (function(HttpFeatureKind2) {
33273      HttpFeatureKind2[HttpFeatureKind2["Interceptors"] = 0] = "Interceptors";
33274      HttpFeatureKind2[HttpFeatureKind2["LegacyInterceptors"] = 1] = "LegacyInterceptors";
33275      HttpFeatureKind2[HttpFeatureKind2["CustomXsrfConfiguration"] = 2] = "CustomXsrfConfiguration";
33276      HttpFeatureKind2[HttpFeatureKind2["NoXsrfProtection"] = 3] = "NoXsrfProtection";
33277      HttpFeatureKind2[HttpFeatureKind2["JsonpSupport"] = 4] = "JsonpSupport";
33278      HttpFeatureKind2[HttpFeatureKind2["RequestsMadeViaParent"] = 5] = "RequestsMadeViaParent";
33279      HttpFeatureKind2[HttpFeatureKind2["Fetch"] = 6] = "Fetch";
33280    })(HttpFeatureKind || (HttpFeatureKind = {}));
33281    LEGACY_INTERCEPTOR_FN = new InjectionToken(ngDevMode ? "LEGACY_INTERCEPTOR_FN" : "");
33282    HttpClientXsrfModule = class _HttpClientXsrfModule {
33283      /**
33284       * Disable the default XSRF protection.
33285       */
33286      static disable() {
33287        return {
33288          ngModule: _HttpClientXsrfModule,
33289          providers: [withNoXsrfProtection().\u0275providers]
33290        };
33291      }
33292      /**
33293       * Configure XSRF protection.
33294       * @param options An object that can specify either or both
33295       * cookie name or header name.
33296       * - Cookie name default is `XSRF-TOKEN`.
33297       * - Header name default is `X-XSRF-TOKEN`.
33298       *
33299       */
33300      static withOptions(options = {}) {
33301        return {
33302          ngModule: _HttpClientXsrfModule,
33303          providers: withXsrfConfiguration(options).\u0275providers
33304        };
33305      }
33306      static \u0275fac = function HttpClientXsrfModule_Factory(__ngFactoryType__) {
33307        return new (__ngFactoryType__ || _HttpClientXsrfModule)();
33308      };
33309      static \u0275mod = /* @__PURE__ */ \u0275\u0275defineNgModule({
33310        type: _HttpClientXsrfModule
33311      });
33312      static \u0275inj = /* @__PURE__ */ \u0275\u0275defineInjector({
33313        providers: [HttpXsrfInterceptor, {
33314          provide: HTTP_INTERCEPTORS,
33315          useExisting: HttpXsrfInterceptor,
33316          multi: true
33317        }, {
33318          provide: HttpXsrfTokenExtractor,
33319          useClass: HttpXsrfCookieExtractor
33320        }, withXsrfConfiguration({
33321          cookieName: XSRF_DEFAULT_COOKIE_NAME,
33322          headerName: XSRF_DEFAULT_HEADER_NAME
33323        }).\u0275providers, {
33324          provide: XSRF_ENABLED,
33325          useValue: true
33326        }]
33327      });
33328    };
33329    (() => {
33330      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(HttpClientXsrfModule, [{
33331        type: NgModule,
33332        args: [{
33333          providers: [HttpXsrfInterceptor, {
33334            provide: HTTP_INTERCEPTORS,
33335            useExisting: HttpXsrfInterceptor,
33336            multi: true
33337          }, {
33338            provide: HttpXsrfTokenExtractor,
33339            useClass: HttpXsrfCookieExtractor
33340          }, withXsrfConfiguration({
33341            cookieName: XSRF_DEFAULT_COOKIE_NAME,
33342            headerName: XSRF_DEFAULT_HEADER_NAME
33343          }).\u0275providers, {
33344            provide: XSRF_ENABLED,
33345            useValue: true
33346          }]
33347        }]
33348      }], null, null);
33349    })();
33350    HttpClientModule = class _HttpClientModule {
33351      static \u0275fac = function HttpClientModule_Factory(__ngFactoryType__) {
33352        return new (__ngFactoryType__ || _HttpClientModule)();
33353      };
33354      static \u0275mod = /* @__PURE__ */ \u0275\u0275defineNgModule({
33355        type: _HttpClientModule
33356      });
33357      static \u0275inj = /* @__PURE__ */ \u0275\u0275defineInjector({
33358        providers: [provideHttpClient(withInterceptorsFromDi())]
33359      });
33360    };
33361    (() => {
33362      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(HttpClientModule, [{
33363        type: NgModule,
33364        args: [{
33365          /**
33366           * Configures the dependency injector where it is imported
33367           * with supporting services for HTTP communications.
33368           */
33369          providers: [provideHttpClient(withInterceptorsFromDi())]
33370        }]
33371      }], null, null);
33372    })();
33373    HttpClientJsonpModule = class _HttpClientJsonpModule {
33374      static \u0275fac = function HttpClientJsonpModule_Factory(__ngFactoryType__) {
33375        return new (__ngFactoryType__ || _HttpClientJsonpModule)();
33376      };
33377      static \u0275mod = /* @__PURE__ */ \u0275\u0275defineNgModule({
33378        type: _HttpClientJsonpModule
33379      });
33380      static \u0275inj = /* @__PURE__ */ \u0275\u0275defineInjector({
33381        providers: [withJsonpSupport().\u0275providers]
33382      });
33383    };
33384    (() => {
33385      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(HttpClientJsonpModule, [{
33386        type: NgModule,
33387        args: [{
33388          providers: [withJsonpSupport().\u0275providers]
33389        }]
33390      }], null, null);
33391    })();
33392  }
33393});
33394
vendor: 5,712 bytes, lines 33395-33538
33395// node_modules/@angular/common/fesm2022/http.mjs
33396function makeHttpResourceFn(responseType) {
33397  return function httpResource2(request, options) {
33398    if (ngDevMode && !options?.injector) {
33399      assertInInjectionContext(httpResource2);
33400    }
33401    const injector = options?.injector ?? inject2(Injector);
33402    return new HttpResourceImpl(injector, () => normalizeRequest(request, responseType), options?.defaultValue, options?.parse, options?.equal);
33403  };
33404}
33405function normalizeRequest(request, responseType) {
33406  let unwrappedRequest = typeof request === "function" ? request() : request;
33407  if (unwrappedRequest === void 0) {
33408    return void 0;
33409  } else if (typeof unwrappedRequest === "string") {
33410    unwrappedRequest = { url: unwrappedRequest };
33411  }
33412  const headers = unwrappedRequest.headers instanceof HttpHeaders ? unwrappedRequest.headers : new HttpHeaders(unwrappedRequest.headers);
33413  const params = unwrappedRequest.params instanceof HttpParams ? unwrappedRequest.params : new HttpParams({ fromObject: unwrappedRequest.params });
33414  return new HttpRequest(unwrappedRequest.method ?? "GET", unwrappedRequest.url, unwrappedRequest.body ?? null, {
33415    headers,
33416    params,
33417    reportProgress: unwrappedRequest.reportProgress,
33418    withCredentials: unwrappedRequest.withCredentials,
33419    keepalive: unwrappedRequest.keepalive,
33420    cache: unwrappedRequest.cache,
33421    priority: unwrappedRequest.priority,
33422    mode: unwrappedRequest.mode,
33423    redirect: unwrappedRequest.redirect,
33424    responseType,
33425    context: unwrappedRequest.context,
33426    transferCache: unwrappedRequest.transferCache,
33427    credentials: unwrappedRequest.credentials,
33428    referrer: unwrappedRequest.referrer,
33429    integrity: unwrappedRequest.integrity,
33430    timeout: unwrappedRequest.timeout
33431  });
33432}
33433var httpResource, HttpResourceImpl, HTTP_TRANSFER_CACHE_ORIGIN_MAP, CACHE_OPTIONS;
33434var init_http = __esm({
33435  "node_modules/@angular/common/fesm2022/http.mjs"() {
33436    "use strict";
33437    init_module();
33438    init_module();
33439    init_core();
33440    httpResource = (() => {
33441      const jsonFn = makeHttpResourceFn("json");
33442      jsonFn.arrayBuffer = makeHttpResourceFn("arraybuffer");
33443      jsonFn.blob = makeHttpResourceFn("blob");
33444      jsonFn.text = makeHttpResourceFn("text");
33445      return jsonFn;
33446    })();
33447    HttpResourceImpl = class extends ResourceImpl {
33448      client;
33449      _headers = linkedSignal(...ngDevMode ? [{
33450        debugName: "_headers",
33451        source: this.extRequest,
33452        computation: () => void 0
33453      }] : [{
33454        source: this.extRequest,
33455        computation: () => void 0
33456      }]);
33457      _progress = linkedSignal(...ngDevMode ? [{
33458        debugName: "_progress",
33459        source: this.extRequest,
33460        computation: () => void 0
33461      }] : [{
33462        source: this.extRequest,
33463        computation: () => void 0
33464      }]);
33465      _statusCode = linkedSignal(...ngDevMode ? [{
33466        debugName: "_statusCode",
33467        source: this.extRequest,
33468        computation: () => void 0
33469      }] : [{
33470        source: this.extRequest,
33471        computation: () => void 0
33472      }]);
33473      headers = computed(() => this.status() === "resolved" || this.status() === "error" ? this._headers() : void 0, ...ngDevMode ? [{ debugName: "headers" }] : []);
33474      progress = this._progress.asReadonly();
33475      statusCode = this._statusCode.asReadonly();
33476      constructor(injector, request, defaultValue, parse, equal) {
33477        super(request, ({ params: request2, abortSignal }) => {
33478          let sub;
33479          const onAbort = () => sub.unsubscribe();
33480          abortSignal.addEventListener("abort", onAbort);
33481          const stream = signal({ value: void 0 }, ...ngDevMode ? [{ debugName: "stream" }] : []);
33482          let resolve;
33483          const promise = new Promise((r) => resolve = r);
33484          const send = (value) => {
33485            stream.set(value);
33486            resolve?.(stream);
33487            resolve = void 0;
33488          };
33489          sub = this.client.request(request2).subscribe({
33490            next: (event) => {
33491              switch (event.type) {
33492                case HttpEventType.Response:
33493                  this._headers.set(event.headers);
33494                  this._statusCode.set(event.status);
33495                  try {
33496                    send({ value: parse ? parse(event.body) : event.body });
33497                  } catch (error) {
33498                    send({ error: encapsulateResourceError(error) });
33499                  }
33500                  break;
33501                case HttpEventType.DownloadProgress:
33502                  this._progress.set(event);
33503                  break;
33504              }
33505            },
33506            error: (error) => {
33507              if (error instanceof HttpErrorResponse) {
33508                this._headers.set(error.headers);
33509                this._statusCode.set(error.status);
33510              }
33511              send({ error });
33512              abortSignal.removeEventListener("abort", onAbort);
33513            },
33514            complete: () => {
33515              if (resolve) {
33516                send({
33517                  error: new RuntimeError(991, ngDevMode && "Resource completed before producing a value")
33518                });
33519              }
33520              abortSignal.removeEventListener("abort", onAbort);
33521            }
33522          });
33523          return promise;
33524        }, defaultValue, equal, injector);
33525        this.client = injector.get(HttpClient);
33526      }
33527      set(value) {
33528        super.set(value);
33529        this._headers.set(void 0);
33530        this._progress.set(void 0);
33531        this._statusCode.set(void 0);
33532      }
33533    };
33534    HTTP_TRANSFER_CACHE_ORIGIN_MAP = new InjectionToken(ngDevMode ? "HTTP_TRANSFER_CACHE_ORIGIN_MAP" : "");
33535    CACHE_OPTIONS = new InjectionToken(ngDevMode ? "HTTP_TRANSFER_STATE_CACHE_OPTIONS" : "");
33536  }
33537});
33538
vendor: 21,556 bytes, lines 33539-34121
33539// node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs
33540var Meta, META_KEYS_MAP, Title, EVENT_NAMES, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerGesturesPlugin, HammerModule, DomSanitizer, DomSanitizerImpl, HydrationFeatureKind;
33541var init_platform_browser = __esm({
33542  "node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs"() {
33543    "use strict";
33544    init_browser();
33545    init_common();
33546    init_core();
33547    init_core();
33548    init_dom_renderer();
33549    Meta = class _Meta {
33550      _doc;
33551      _dom;
33552      constructor(_doc) {
33553        this._doc = _doc;
33554        this._dom = getDOM();
33555      }
33556      /**
33557       * Retrieves or creates a specific `<meta>` tag element in the current HTML document.
33558       * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
33559       * values in the provided tag definition, and verifies that all other attribute values are equal.
33560       * If an existing element is found, it is returned and is not modified in any way.
33561       * @param tag The definition of a `<meta>` element to match or create.
33562       * @param forceCreation True to create a new element without checking whether one already exists.
33563       * @returns The existing element with the same attributes and values if found,
33564       * the new element if no match is found, or `null` if the tag parameter is not defined.
33565       */
33566      addTag(tag, forceCreation = false) {
33567        if (!tag) return null;
33568        return this._getOrCreateElement(tag, forceCreation);
33569      }
33570      /**
33571       * Retrieves or creates a set of `<meta>` tag elements in the current HTML document.
33572       * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
33573       * values in the provided tag definition, and verifies that all other attribute values are equal.
33574       * @param tags An array of tag definitions to match or create.
33575       * @param forceCreation True to create new elements without checking whether they already exist.
33576       * @returns The matching elements if found, or the new elements.
33577       */
33578      addTags(tags, forceCreation = false) {
33579        if (!tags) return [];
33580        return tags.reduce((result, tag) => {
33581          if (tag) {
33582            result.push(this._getOrCreateElement(tag, forceCreation));
33583          }
33584          return result;
33585        }, []);
33586      }
33587      /**
33588       * Retrieves a `<meta>` tag element in the current HTML document.
33589       * @param attrSelector The tag attribute and value to match against, in the format
33590       * `"tag_attribute='value string'"`.
33591       * @returns The matching element, if any.
33592       */
33593      getTag(attrSelector) {
33594        if (!attrSelector) return null;
33595        return this._doc.querySelector(`meta[${attrSelector}]`) || null;
33596      }
33597      /**
33598       * Retrieves a set of `<meta>` tag elements in the current HTML document.
33599       * @param attrSelector The tag attribute and value to match against, in the format
33600       * `"tag_attribute='value string'"`.
33601       * @returns The matching elements, if any.
33602       */
33603      getTags(attrSelector) {
33604        if (!attrSelector) return [];
33605        const list = this._doc.querySelectorAll(`meta[${attrSelector}]`);
33606        return list ? [].slice.call(list) : [];
33607      }
33608      /**
33609       * Modifies an existing `<meta>` tag element in the current HTML document.
33610       * @param tag The tag description with which to replace the existing tag content.
33611       * @param selector A tag attribute and value to match against, to identify
33612       * an existing tag. A string in the format `"tag_attribute=`value string`"`.
33613       * If not supplied, matches a tag with the same `name` or `property` attribute value as the
33614       * replacement tag.
33615       * @return The modified element.
33616       */
33617      updateTag(tag, selector) {
33618        if (!tag) return null;
33619        selector = selector || this._parseSelector(tag);
33620        const meta = this.getTag(selector);
33621        if (meta) {
33622          return this._setMetaElementAttributes(tag, meta);
33623        }
33624        return this._getOrCreateElement(tag, true);
33625      }
33626      /**
33627       * Removes an existing `<meta>` tag element from the current HTML document.
33628       * @param attrSelector A tag attribute and value to match against, to identify
33629       * an existing tag. A string in the format `"tag_attribute=`value string`"`.
33630       */
33631      removeTag(attrSelector) {
33632        this.removeTagElement(this.getTag(attrSelector));
33633      }
33634      /**
33635       * Removes an existing `<meta>` tag element from the current HTML document.
33636       * @param meta The tag definition to match against to identify an existing tag.
33637       */
33638      removeTagElement(meta) {
33639        if (meta) {
33640          this._dom.remove(meta);
33641        }
33642      }
33643      _getOrCreateElement(meta, forceCreation = false) {
33644        if (!forceCreation) {
33645          const selector = this._parseSelector(meta);
33646          const elem = this.getTags(selector).filter((elem2) => this._containsAttributes(meta, elem2))[0];
33647          if (elem !== void 0) return elem;
33648        }
33649        const element = this._dom.createElement("meta");
33650        this._setMetaElementAttributes(meta, element);
33651        const head = this._doc.getElementsByTagName("head")[0];
33652        head.appendChild(element);
33653        return element;
33654      }
33655      _setMetaElementAttributes(tag, el) {
33656        Object.keys(tag).forEach((prop) => el.setAttribute(this._getMetaKeyMap(prop), tag[prop]));
33657        return el;
33658      }
33659      _parseSelector(tag) {
33660        const attr = tag.name ? "name" : "property";
33661        return `${attr}="${tag[attr]}"`;
33662      }
33663      _containsAttributes(tag, elem) {
33664        return Object.keys(tag).every((key) => elem.getAttribute(this._getMetaKeyMap(key)) === tag[key]);
33665      }
33666      _getMetaKeyMap(prop) {
33667        return META_KEYS_MAP[prop] || prop;
33668      }
33669      static \u0275fac = function Meta_Factory(__ngFactoryType__) {
33670        return new (__ngFactoryType__ || _Meta)(\u0275\u0275inject(DOCUMENT));
33671      };
33672      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
33673        token: _Meta,
33674        factory: _Meta.\u0275fac,
33675        providedIn: "root"
33676      });
33677    };
33678    (() => {
33679      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Meta, [{
33680        type: Injectable,
33681        args: [{
33682          providedIn: "root"
33683        }]
33684      }], () => [{
33685        type: void 0,
33686        decorators: [{
33687          type: Inject,
33688          args: [DOCUMENT]
33689        }]
33690      }], null);
33691    })();
33692    META_KEYS_MAP = {
33693      httpEquiv: "http-equiv"
33694    };
33695    Title = class _Title {
33696      _doc;
33697      constructor(_doc) {
33698        this._doc = _doc;
33699      }
33700      /**
33701       * Get the title of the current HTML document.
33702       */
33703      getTitle() {
33704        return this._doc.title;
33705      }
33706      /**
33707       * Set the title of the current HTML document.
33708       * @param newTitle
33709       */
33710      setTitle(newTitle) {
33711        this._doc.title = newTitle || "";
33712      }
33713      static \u0275fac = function Title_Factory(__ngFactoryType__) {
33714        return new (__ngFactoryType__ || _Title)(\u0275\u0275inject(DOCUMENT));
33715      };
33716      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
33717        token: _Title,
33718        factory: _Title.\u0275fac,
33719        providedIn: "root"
33720      });
33721    };
33722    (() => {
33723      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Title, [{
33724        type: Injectable,
33725        args: [{
33726          providedIn: "root"
33727        }]
33728      }], () => [{
33729        type: void 0,
33730        decorators: [{
33731          type: Inject,
33732          args: [DOCUMENT]
33733        }]
33734      }], null);
33735    })();
33736    EVENT_NAMES = {
33737      // pan
33738      "pan": true,
33739      "panstart": true,
33740      "panmove": true,
33741      "panend": true,
33742      "pancancel": true,
33743      "panleft": true,
33744      "panright": true,
33745      "panup": true,
33746      "pandown": true,
33747      // pinch
33748      "pinch": true,
33749      "pinchstart": true,
33750      "pinchmove": true,
33751      "pinchend": true,
33752      "pinchcancel": true,
33753      "pinchin": true,
33754      "pinchout": true,
33755      // press
33756      "press": true,
33757      "pressup": true,
33758      // rotate
33759      "rotate": true,
33760      "rotatestart": true,
33761      "rotatemove": true,
33762      "rotateend": true,
33763      "rotatecancel": true,
33764      // swipe
33765      "swipe": true,
33766      "swipeleft": true,
33767      "swiperight": true,
33768      "swipeup": true,
33769      "swipedown": true,
33770      // tap
33771      "tap": true,
33772      "doubletap": true
33773    };
33774    HAMMER_GESTURE_CONFIG = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "HammerGestureConfig" : "");
33775    HAMMER_LOADER = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "HammerLoader" : "");
33776    HammerGestureConfig = class _HammerGestureConfig {
33777      /**
33778       * A set of supported event names for gestures to be used in Angular.
33779       * Angular supports all built-in recognizers, as listed in
33780       * [HammerJS documentation](https://hammerjs.github.io/).
33781       */
33782      events = [];
33783      /**
33784       * Maps gesture event names to a set of configuration options
33785       * that specify overrides to the default values for specific properties.
33786       *
33787       * The key is a supported event name to be configured,
33788       * and the options object contains a set of properties, with override values
33789       * to be applied to the named recognizer event.
33790       * For example, to disable recognition of the rotate event, specify
33791       *  `{"rotate": {"enable": false}}`.
33792       *
33793       * Properties that are not present take the HammerJS default values.
33794       * For information about which properties are supported for which events,
33795       * and their allowed and default values, see
33796       * [HammerJS documentation](https://hammerjs.github.io/).
33797       *
33798       */
33799      overrides = {};
33800      /**
33801       * Properties whose default values can be overridden for a given event.
33802       * Different sets of properties apply to different events.
33803       * For information about which properties are supported for which events,
33804       * and their allowed and default values, see
33805       * [HammerJS documentation](https://hammerjs.github.io/).
33806       */
33807      options;
33808      /**
33809       * Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)
33810       * and attaches it to a given HTML element.
33811       * @param element The element that will recognize gestures.
33812       * @returns A HammerJS event-manager object.
33813       */
33814      buildHammer(element) {
33815        const mc = new Hammer(element, this.options);
33816        mc.get("pinch").set({
33817          enable: true
33818        });
33819        mc.get("rotate").set({
33820          enable: true
33821        });
33822        for (const eventName in this.overrides) {
33823          mc.get(eventName).set(this.overrides[eventName]);
33824        }
33825        return mc;
33826      }
33827      static \u0275fac = function HammerGestureConfig_Factory(__ngFactoryType__) {
33828        return new (__ngFactoryType__ || _HammerGestureConfig)();
33829      };
33830      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
33831        token: _HammerGestureConfig,
33832        factory: _HammerGestureConfig.\u0275fac
33833      });
33834    };
33835    (() => {
33836      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(HammerGestureConfig, [{
33837        type: Injectable
33838      }], null, null);
33839    })();
33840    HammerGesturesPlugin = class _HammerGesturesPlugin extends EventManagerPlugin {
33841      _config;
33842      _injector;
33843      loader;
33844      _loaderPromise = null;
33845      constructor(doc, _config, _injector, loader) {
33846        super(doc);
33847        this._config = _config;
33848        this._injector = _injector;
33849        this.loader = loader;
33850      }
33851      supports(eventName) {
33852        if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {
33853          return false;
33854        }
33855        if (!window.Hammer && !this.loader) {
33856          if (typeof ngDevMode === "undefined" || ngDevMode) {
33857            const _console = this._injector.get(Console);
33858            _console.warn(`The "${eventName}" event cannot be bound because Hammer.JS is not loaded and no custom loader has been specified.`);
33859          }
33860          return false;
33861        }
33862        return true;
33863      }
33864      addEventListener(element, eventName, handler) {
33865        const zone = this.manager.getZone();
33866        eventName = eventName.toLowerCase();
33867        if (!window.Hammer && this.loader) {
33868          this._loaderPromise = this._loaderPromise || zone.runOutsideAngular(() => this.loader());
33869          let cancelRegistration = false;
33870          let deregister = () => {
33871            cancelRegistration = true;
33872          };
33873          zone.runOutsideAngular(() => this._loaderPromise.then(() => {
33874            if (!window.Hammer) {
33875              if (typeof ngDevMode === "undefined" || ngDevMode) {
33876                const _console = this._injector.get(Console);
33877                _console.warn(`The custom HAMMER_LOADER completed, but Hammer.JS is not present.`);
33878              }
33879              deregister = () => {
33880              };
33881              return;
33882            }
33883            if (!cancelRegistration) {
33884              deregister = this.addEventListener(element, eventName, handler);
33885            }
33886          }).catch(() => {
33887            if (typeof ngDevMode === "undefined" || ngDevMode) {
33888              const _console = this._injector.get(Console);
33889              _console.warn(`The "${eventName}" event cannot be bound because the custom Hammer.JS loader failed.`);
33890            }
33891            deregister = () => {
33892            };
33893          }));
33894          return () => {
33895            deregister();
33896          };
33897        }
33898        return zone.runOutsideAngular(() => {
33899          const mc = this._config.buildHammer(element);
33900          const callback = function(eventObj) {
33901            zone.runGuarded(function() {
33902              handler(eventObj);
33903            });
33904          };
33905          mc.on(eventName, callback);
33906          return () => {
33907            mc.off(eventName, callback);
33908            if (typeof mc.destroy === "function") {
33909              mc.destroy();
33910            }
33911          };
33912        });
33913      }
33914      isCustomEvent(eventName) {
33915        return this._config.events.indexOf(eventName) > -1;
33916      }
33917      static \u0275fac = function HammerGesturesPlugin_Factory(__ngFactoryType__) {
33918        return new (__ngFactoryType__ || _HammerGesturesPlugin)(\u0275\u0275inject(DOCUMENT), \u0275\u0275inject(HAMMER_GESTURE_CONFIG), \u0275\u0275inject(Injector), \u0275\u0275inject(HAMMER_LOADER, 8));
33919      };
33920      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
33921        token: _HammerGesturesPlugin,
33922        factory: _HammerGesturesPlugin.\u0275fac
33923      });
33924    };
33925    (() => {
33926      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(HammerGesturesPlugin, [{
33927        type: Injectable
33928      }], () => [{
33929        type: void 0,
33930        decorators: [{
33931          type: Inject,
33932          args: [DOCUMENT]
33933        }]
33934      }, {
33935        type: HammerGestureConfig,
33936        decorators: [{
33937          type: Inject,
33938          args: [HAMMER_GESTURE_CONFIG]
33939        }]
33940      }, {
33941        type: Injector
33942      }, {
33943        type: void 0,
33944        decorators: [{
33945          type: Optional
33946        }, {
33947          type: Inject,
33948          args: [HAMMER_LOADER]
33949        }]
33950      }], null);
33951    })();
33952    HammerModule = class _HammerModule {
33953      static \u0275fac = function HammerModule_Factory(__ngFactoryType__) {
33954        return new (__ngFactoryType__ || _HammerModule)();
33955      };
33956      static \u0275mod = /* @__PURE__ */ \u0275\u0275defineNgModule({
33957        type: _HammerModule
33958      });
33959      static \u0275inj = /* @__PURE__ */ \u0275\u0275defineInjector({
33960        providers: [{
33961          provide: EVENT_MANAGER_PLUGINS,
33962          useClass: HammerGesturesPlugin,
33963          multi: true,
33964          deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, Injector, [new Optional(), HAMMER_LOADER]]
33965        }, {
33966          provide: HAMMER_GESTURE_CONFIG,
33967          useClass: HammerGestureConfig
33968        }]
33969      });
33970    };
33971    (() => {
33972      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(HammerModule, [{
33973        type: NgModule,
33974        args: [{
33975          providers: [{
33976            provide: EVENT_MANAGER_PLUGINS,
33977            useClass: HammerGesturesPlugin,
33978            multi: true,
33979            deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, Injector, [new Optional(), HAMMER_LOADER]]
33980          }, {
33981            provide: HAMMER_GESTURE_CONFIG,
33982            useClass: HammerGestureConfig
33983          }]
33984        }]
33985      }], null, null);
33986    })();
33987    DomSanitizer = class _DomSanitizer {
33988      static \u0275fac = function DomSanitizer_Factory(__ngFactoryType__) {
33989        return new (__ngFactoryType__ || _DomSanitizer)();
33990      };
33991      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
33992        token: _DomSanitizer,
33993        factory: function DomSanitizer_Factory(__ngFactoryType__) {
33994          let __ngConditionalFactory__ = null;
33995          if (__ngFactoryType__) {
33996            __ngConditionalFactory__ = new (__ngFactoryType__ || _DomSanitizer)();
33997          } else {
33998            __ngConditionalFactory__ = \u0275\u0275inject(DomSanitizerImpl);
33999          }
34000          return __ngConditionalFactory__;
34001        },
34002        providedIn: "root"
34003      });
34004    };
34005    (() => {
34006      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(DomSanitizer, [{
34007        type: Injectable,
34008        args: [{
34009          providedIn: "root",
34010          useExisting: forwardRef(() => DomSanitizerImpl)
34011        }]
34012      }], null, null);
34013    })();
34014    DomSanitizerImpl = class _DomSanitizerImpl extends DomSanitizer {
34015      _doc;
34016      constructor(_doc) {
34017        super();
34018        this._doc = _doc;
34019      }
34020      sanitize(ctx, value) {
34021        if (value == null) return null;
34022        switch (ctx) {
34023          case SecurityContext.NONE:
34024            return value;
34025          case SecurityContext.HTML:
34026            if (allowSanitizationBypassAndThrow(
34027              value,
34028              "HTML"
34029              /* BypassType.Html */
34030            )) {
34031              return unwrapSafeValue(value);
34032            }
34033            return _sanitizeHtml(this._doc, String(value)).toString();
34034          case SecurityContext.STYLE:
34035            if (allowSanitizationBypassAndThrow(
34036              value,
34037              "Style"
34038              /* BypassType.Style */
34039            )) {
34040              return unwrapSafeValue(value);
34041            }
34042            return value;
34043          case SecurityContext.SCRIPT:
34044            if (allowSanitizationBypassAndThrow(
34045              value,
34046              "Script"
34047              /* BypassType.Script */
34048            )) {
34049              return unwrapSafeValue(value);
34050            }
34051            throw new RuntimeError(5200, (typeof ngDevMode === "undefined" || ngDevMode) && "unsafe value used in a script context");
34052          case SecurityContext.URL:
34053            if (allowSanitizationBypassAndThrow(
34054              value,
34055              "URL"
34056              /* BypassType.Url */
34057            )) {
34058              return unwrapSafeValue(value);
34059            }
34060            return _sanitizeUrl(String(value));
34061          case SecurityContext.RESOURCE_URL:
34062            if (allowSanitizationBypassAndThrow(
34063              value,
34064              "ResourceURL"
34065              /* BypassType.ResourceUrl */
34066            )) {
34067              return unwrapSafeValue(value);
34068            }
34069            throw new RuntimeError(5201, (typeof ngDevMode === "undefined" || ngDevMode) && `unsafe value used in a resource URL context (see ${XSS_SECURITY_URL})`);
34070          default:
34071            throw new RuntimeError(5202, (typeof ngDevMode === "undefined" || ngDevMode) && `Unexpected SecurityContext ${ctx} (see ${XSS_SECURITY_URL})`);
34072        }
34073      }
34074      bypassSecurityTrustHtml(value) {
34075        return bypassSanitizationTrustHtml(value);
34076      }
34077      bypassSecurityTrustStyle(value) {
34078        return bypassSanitizationTrustStyle(value);
34079      }
34080      bypassSecurityTrustScript(value) {
34081        return bypassSanitizationTrustScript(value);
34082      }
34083      bypassSecurityTrustUrl(value) {
34084        return bypassSanitizationTrustUrl(value);
34085      }
34086      bypassSecurityTrustResourceUrl(value) {
34087        return bypassSanitizationTrustResourceUrl(value);
34088      }
34089      static \u0275fac = function DomSanitizerImpl_Factory(__ngFactoryType__) {
34090        return new (__ngFactoryType__ || _DomSanitizerImpl)(\u0275\u0275inject(DOCUMENT));
34091      };
34092      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({
34093        token: _DomSanitizerImpl,
34094        factory: _DomSanitizerImpl.\u0275fac,
34095        providedIn: "root"
34096      });
34097    };
34098    (() => {
34099      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(DomSanitizerImpl, [{
34100        type: Injectable,
34101        args: [{
34102          providedIn: "root"
34103        }]
34104      }], () => [{
34105        type: void 0,
34106        decorators: [{
34107          type: Inject,
34108          args: [DOCUMENT]
34109        }]
34110      }], null);
34111    })();
34112    (function(HydrationFeatureKind2) {
34113      HydrationFeatureKind2[HydrationFeatureKind2["NoHttpTransferCache"] = 0] = "NoHttpTransferCache";
34114      HydrationFeatureKind2[HydrationFeatureKind2["HttpTransferCacheOptions"] = 1] = "HttpTransferCacheOptions";
34115      HydrationFeatureKind2[HydrationFeatureKind2["I18nSupport"] = 2] = "I18nSupport";
34116      HydrationFeatureKind2[HydrationFeatureKind2["EventReplay"] = 3] = "EventReplay";
34117      HydrationFeatureKind2[HydrationFeatureKind2["IncrementalHydration"] = 4] = "IncrementalHydration";
34118    })(HydrationFeatureKind || (HydrationFeatureKind = {}));
34119  }
34120});
34121
34122// src/enum/selector.ts
34123var Selector;
34124var init_selector = __esm({
34125  "src/enum/selector.ts"() {
34126    "use strict";
34127    Selector = class {
34128      static CHAT_ICON = "vpb-chat-icon";
34129    };
34130  }
34131});
34132
34133// src/enum/message-type.ts
34134var MessageType;
34135var init_message_type = __esm({
34136  "src/enum/message-type.ts"() {
34137    "use strict";
34138    (function(MessageType2) {
34139      MessageType2[MessageType2["BOT"] = 1] = "BOT";
34140      MessageType2[MessageType2["USER"] = 2] = "USER";
34141      MessageType2[MessageType2["BOT_RESULT"] = 3] = "BOT_RESULT";
34142    })(MessageType || (MessageType = {}));
34143  }
34144});
34145
34146// src/model/tree-item.ts
34147var TreeItem;
34148var init_tree_item = __esm({
34149  "src/model/tree-item.ts"() {
34150    "use strict";
34151    TreeItem = class {
34152      text;
34153      type;
34154      children;
34155      id;
34156      constructor(text, type, children) {
34157        this.text = text;
34158        this.type = type;
34159        this.children = children;
34160        this.id = this.generateId();
34161      }
34162      generateId() {
34163        return Math.random().toString(36).substr(2, 9);
34164      }
34165    };
34166  }
34167});
34168
34169// src/enum/tree-item-type.ts
34170var TreeItemType;
34171var init_tree_item_type = __esm({
34172  "src/enum/tree-item-type.ts"() {
34173    "use strict";
34174    (function(TreeItemType2) {
34175      TreeItemType2["KEYWORD"] = "keyword";
34176      TreeItemType2["QUESTION1"] = "question1";
34177      TreeItemType2["QUESTION2"] = "question2";
34178      TreeItemType2["ANSWER"] = "answer";
34179      TreeItemType2["RESTART"] = "restart";
34180    })(TreeItemType || (TreeItemType = {}));
34181  }
34182});
34183
34184// src/service/data.service.ts
34185var DataService;
34186var init_data_service = __esm({
34187  "src/service/data.service.ts"() {
34188    "use strict";
34189    init_core();
34190    init_core();
34191    init_tree_item();
34192    init_core();
34193    DataService = class _DataService {
34194      closeChatWindowTrigger = signal(0, ...ngDevMode ? [{ debugName: "closeChatWindowTrigger" }] : []);
34195      dataReady = signal(false, ...ngDevMode ? [{ debugName: "dataReady" }] : []);
34196      tree = [];
34197      constructor() {
34198        this.loadData();
34199      }
34200      triggerCloseChatWindow() {
34201        this.closeChatWindowTrigger.set(this.closeChatWindowTrigger() + 1);
34202      }
34203      loadData() {
34204        return __async(this, null, function* () {
34205          yield new Promise((resolve) => setTimeout(resolve, 500));
34206          this.tree = this.convertToTreeItems(this.data);
34207          this.dataReady.set(true);
34208        });
34209      }
34210      convertToTreeItems(data) {
34211        return data.map((item) => new TreeItem(item.text, item.type, item.children ? this.convertToTreeItems(item.children) : void 0));
34212      }
34213      data = [
34214        {
34215          "text": "Baubeschreibung",
34216          "type": "keyword",
34217          "children": [
34218            {
34219              "text": "Eine Baubeschreibung liegt Ihnen vor.",
34220              "type": "question1",
34221              "children": [
34222                {
34223                  "text": "Sie suchen einen Experten, der Ihnen den Inhalt der Baubeschreibung erl\xE4utert.",
34224                  "type": "question2",
34225                  "children": [
34226                    {
34227                      "text": 'Wenn Sie so fr\xFCh zur Beratung kommen, dann machen Sie alles richtig! Je sorgf\xE4ltiger Sie jetzt planen, umso besser wird das Ergebnis. Ihr <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Berater aus dem Netzwerk des VPB</a> pr\xFCft f\xFCr Sie das Angebot samt <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Neues-Bauvertragsrecht-Baubeschreibung.pdf">Baubeschreibung</a> aus bautechnischer Sicht und macht Sie auf eventuelle Probleme aufmerksam. So erfahren Sie fr\xFChzeitig, was auf Sie zukommt, und k\xF6nnen sich bewusst f\xFCr oder auch gegen ein Angebot entscheiden.',
34228                      "type": "answer"
34229                    }
34230                  ]
34231                },
34232                {
34233                  "text": "Sie m\xF6chten die vorliegende Baubeschreibung um wichtige eigene W\xFCnsche erg\xE4nzen.",
34234                  "type": "question2",
34235                  "children": [
34236                    {
34237                      "text": 'Ohne eigenen Architekten ist die Baubeschreibung meist ein Angebot der Schl\xFCsselfertig-Baufirma. Das entspricht eventuell nicht alles Ihren Vorstellungen. Besprechen Sie mit Ihrem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Berater aus dem Netzwerk des VPB</a>, was Sie brauchen und haben m\xF6chten, und verhandeln Sie das alles in den <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Neues-Bauvertragsrecht-Baubeschreibung.pdf">Bauvertrag</a> hinein! Das ist Ihr gutes Recht. Wenn die Firma unwillig ist, auf Ihre W\xFCnsche einzugehen, suchen Sie sich lieber eine andere Firma als sich ewig zu \xE4rgern.',
34238                      "type": "answer"
34239                    }
34240                  ]
34241                },
34242                {
34243                  "text": "Sie m\xFCssen jetzt Angebote vergleichen und brauchen Unterst\xFCtzung bei all dem Fach-Chinesisch.",
34244                  "type": "question2",
34245                  "children": [
34246                    {
34247                      "text": 'Vieles in der Baubeschreibung liest sich wie Fachchinesisch. Die <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Neues-Bauvertragsrecht-Baubeschreibung.pdf">Baubeschreibung</a> soll aber f\xFCr Laien verst\xE4ndlich sein. So will es das Gesetz! Andererseits ist Bauen komplex und nicht alles l\xE4sst sich in einfachen Worten erkl\xE4ren. Sprechen Sie mit ihrem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Berater aus dem Netzwerk des VPB</a>. Er kann Ihre W\xFCnsche in die Fachsprache \xFCbersetzen und umgekehrt.',
34248                      "type": "answer"
34249                    }
34250                  ]
34251                }
34252              ]
34253            },
34254            {
34255              "text": "Eine Baubeschreibung liegt  Ihnen nicht vor und Sie fragen sich, ob die Baufirma das neue Bauvertragsrecht einh\xE4lt und Ihre Rechte ernst nimmt.",
34256              "type": "question1",
34257              "children": [
34258                {
34259                  "text": 'Das neue <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/7_Shop/7-5_Weitere_Produkte/Bauvertragsrecht_Information-fuer-Verbraucherbauherren.pdf">Bauvertragsrecht</a>
34259 gilt schon seit Anfang 2018, leider setzen es immer noch nicht alle Firmen zu 100% um. Ihre Rechte erfahren Sie aus der vom VPB herausgegebenen und vom Bundesministerium der Justiz und f\xFCr Verbraucherschutz gef\xF6rderten Gratisbrosch\xFCre zum neuen Bauvertragsrecht. Bei Zweifeln, ob die Baufirma sich an geltendes Recht h\xE4lt oder nicht, empfiehlt sich Rechtsberatung. Machen Sie hier keine Kompromisse!',
34260                  "type": "answer"
34261                }
34262              ]
34263            }
34264          ]
34265        },
34266        {
34267          "text": "Grundst\xFCckskauf",
34268          "type": "keyword",
34269          "children": [
34270            {
34271              "text": "Sie m\xF6chten ein Grundst\xFCck von Privatleuten kaufen.",
34272              "type": "question1",
34273              "children": [
34274                {
34275                  "text": 'Kl\xE4ren Sie im Vorfeld, ob es sich bei dem angebotenen Grundst\xFCck \xFCberhaupt um Bauland handelt. Fragen Sie die zust\xE4ndige Baubeh\xF6rde! Dort erfahren Sie auch gleich, ob ein <a target="_blank" rel="noopener" href="https://www.vpb.de/ratgeber/vpb-experteninterview/detail/bebauungsplan-schon-im-vorfeld-mit-dem-bebauungsplan-beschaeftigen">Bebauungsplan</a> existiert und welche Vorgaben Sie beim Bauen beachten m\xFCssen.',
34276                  "type": "answer"
34277                }
34278              ]
34279            },
34280            {
34281              "text": "Sie m\xF6chten ein Grundst\xFCck vom Bautr\xE4ger kaufen.",
34282              "type": "question1",
34283              "children": [
34284                {
34285                  "text": 'Achtung: Sie bekommen ein Grundst\xFCck vom <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Bautraegervertrag.pdf">Bautr\xE4ger</a> nur, wenn Sie auch das Haus mit ihm bauen. Wollen Sie das?',
34286                  "type": "answer"
34287                }
34288              ]
34289            },
34290            {
34291              "text": "Sie m\xF6chten ein Grundst\xFCck \xFCber einen Makler oder eine Baufirma kaufen.",
34292              "type": "question1",
34293              "children": [
34294                {
34295                  "text": 'Kl\xE4ren Sie, ob Sie wirklich nur das Grundst\xFCck kaufen und frei dar\xFCber verf\xFCgen k\xF6nnen, oder ob Sie sich mit dem Grundst\xFCckskauf auch zum Bau eines bestimmten Hauses bei einer <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Wer-ist-Wer-am-Bau.pdf">Firma</a> verpflichten!',
34296                  "type": "answer"
34297                }
34298              ]
34299            },
34300            {
34301              "text": "Sie m\xF6chten ein Abrissgrundst\xFCck kaufen.",
34302              "type": "question1",
34303              "children": [
34304                {
34305                  "text": 'Sprechen Sie fr\xFChzeitig mit dem Bauamt, ob Sie nach dem Abbruch auf dem Areal \xFCberhaupt bauen k\xF6nnen, was Sie m\xF6chten! Das funktioniert n\xE4mlich nicht immer! Was steht dazu im <a target="_blank" rel="noopener" href="https://www.vpb.de/presse/serviceartikel/detail/bebauungsplan-vor-dem-grundstueckskauf-immer-erst-bebauungsplan-einsehen">Bebauungsplan</a>? Denken Sie auch an m\xF6gliche <a target="_blank" rel="noopener" href="https://www.vpb.de/presse/presseportal/detail/vpb-raet-erst-den-baugrund-pruefen-dann-das-grundstueck-kaufen">Altlasten</a>!',
34306                  "type": "answer"
34307                }
34308              ]
34309            },
34310            {
34311              "text": "Sie m\xF6chten ein Erbbaugrundst\xFCck kaufen.",
34312              "type": "question1",
34313              "children": [
34314                {
34315                  "text": 'Erbbau ist eine gute M\xF6glichkeit, ein Grundst\xFCck in attraktiver Lage nach eigenen Vorstellungen im Rahmen des \xF6ffentlichen Baurechts bebauen zu d\xFCrfen. Allerdings m\xFCssen Sie dazu einen Erbbauvertrag schlie\xDFen. Den sollten Sie genau pr\xFCfen. Lesen Sie dazu den VPB-Ratgeber \u201E<a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Erbbau.pdf">Erbpacht oder Erbbaurecht \u2013 Eine Alternative zum Grundst\xFCckskauf?</a>\u201C',
34316                  "type": "answer"
34317                }
34318              ]
34319            }
34320          ]
34321        },
34322        {
34323          "text": "Neubau",
34324          "type": "keyword",
34325          "children": [
34326            {
34327              "text": "Sie brauchen Basis-Wissen f\xFCr den Hausbau.",
34328              "type": "question1",
34329              "children": [
34330                {
34331                  "text": 'Vern\xFCnftige Idee: Lesen Sie sich ein! Holen Sie sich hier gleich den kostenlosen <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/7_Shop/7-5_Weitere_Produkte/Bauvertragsrecht_Information-fuer-Verbraucherbauherren.pdf">Leitfaden zum Bauvertragsrecht</a>. Sinnvoll ist auch das <a target="_blank" rel="noopener" href="https://www.vpb.de/ihre-mitgliedschaft/einstiegspakete/einstiegspaket-neubau">VPB-Einstiegspaket Neubau</a>!',
34332                  "type": "answer"
34333                }
34334              ]
34335            },
34336            {
34337              "text": "Sie m\xF6chten ein Haus mit eigenem freien Architekten bauen.",
34338              "type": "question1",
34339              "children": [
34340                {
34341                  "text": 'Ein Architektenhaus wird immer individuell geplant, nach Ihren Bed\xFCrfnissen. Freie Architekten, die Sie beauftragen und bezahlen, sind Ihre Sachwalter und k\xF6nnen Sie durch das gesamte Bauvorhaben begleiten. Achtung: Der Architekt der Schl\xFCsselbaufirma steht nicht auf Ihrer Seite! Er arbeitet f\xFCr die Baufirma! Erfahren Sie mehr zum <a target="_blank" rel="noopener" href="https://www.vpb.de/
34341presse/serviceartikel/detail/bauvertragsrecht-architektenvertrag-klaert-pflichten-und-rechte">Architektenvertrag</a>.',
34342                  "type": "answer"
34343                }
34344              ]
34345            },
34346            {
34347              "text": "Sie m\xF6chten ein Haus mit  Generalunternehmer oder General\xFCbernehmer bauen \u2013 also ein Schl\xFCsselfertighaus aus dem Netz, einem Katalog oder einer Bauausstellung.",
34348              "type": "question1",
34349              "children": [
34350                {
34351                  "text": 'Wenn Sie schl\xFCsselfertig auf eigenem Grundst\xFCck \u201Eaus einer Hand\u201C bauen, beauftragen Sie dazu einen General\xFCbernehmer (G\xDC) oder einen Generalunternehmer (GU). Vorsicht: Schl\xFCsselfertig hei\xDFt nicht bezugsfertig! Lassen Sie unbedingt den Bauvertrag vor der Unterschrift vom Bausachverst\xE4ndigen und vom Rechtsanwalt pr\xFCfen! Bei <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Experten aus dem Netzwerk des VPB</a> k\xF6nne Sie sicher sein, dass diese produkt- und firmenneutral sind!',
34352                  "type": "answer"
34353                }
34354              ]
34355            },
34356            {
34357              "text": "Sie m\xF6chten ein Haus mit Bautr\xE4ger errichten.",
34358              "type": "question1",
34359              "children": [
34360                {
34361                  "text": 'Bautr\xE4ger (BT) verkaufen immer Haus und Grund aus einer Hand! Wenn Sie vom BT kaufen, sind Sie selbst gar nicht Bauherren! Sie schlie\xDFen dazu einen <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Bautraegervertrag.pdf">Bautr\xE4gervertrag</a>, der beim Notar beurkundet wird. Achtung: der Erwerb vom Bautr\xE4ger birgt <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Bautraeger-pleite.pdf">besondere Risiken</a>! Die m\xFCssen Sie kennen! Sprechen Sie dar\xFCber mit Ihren Bausachverst\xE4ndigen und Rechtsberatern aus dem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Netzwerk des VPB</a>.',
34362                  "type": "answer"
34363                }
34364              ]
34365            },
34366            {
34367              "text": "Sie m\xF6chten ein Fertighaus bauen.",
34368              "type": "question1",
34369              "children": [
34370                {
34371                  "text": '<a target="_blank" rel="noopener" href="https://www.vpb.de/glossar/begriff/fertighaus">Fertigh\xE4user</a> sind H\xE4user, die im Werk weitgehend vorfabriziert und dann auf der Baustelle schnell zusammengesetzt werden. Dabei m\xFCssen Sie vieles beachten. Lassen Sie sowohl <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Neues-Bauvertragsrecht-Baubeschreibung.pdf">Baubeschreibung</a> als auch Bauvertrag von Experten aus dem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Netzwerk des VPB</a> pr\xFCfen!',
34372                  "type": "answer"
34373                }
34374              ]
34375            },
34376            {
34377              "text": "Sie wollen beim Bau Ihres Hauses von Anfang an Barrieren vermeiden?",
34378              "type": "question1",
34379              "children": [
34380                {
34381                  "text": 'Gute Entscheidung! Wenn Sie f\xFCr sich selbst bauen, sind Sie bei diesem Thema auf Eigeninitiative angewiesen. Besprechen Sie das Thema fr\xFChzeitig mit Ihrem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Berater aus dem Netzwerk</a> des VPB, denn gerade bei Schl\xFCsselfertigh\xE4usern muss meist etliches angepasst werden, um Barrieren zu vermeiden. Machen Sie sich vorher schlau! Lesen Sie den VPB-Leitfaden \u201E<a target="_blank" rel="noopener" href="https://www.vpb.de/shop/produkt/leitfaden-barrierearm-bauen">Vorbauen und Umbauen: barrierearm und altersgerecht</a>\u201C',
34382                  "type": "answer"
34383                }
34384              ]
34385            },
34386            {
34387              "text": "Sie oder andere Familienmitglieder leiden an Allergien. Darauf m\xFCssen Sie beim Bauen R\xFCcksicht nehmen.",
34388              "type": "question1",
34389              "children": [
34390                {
34391                  "text": 'Wenn Sie unter Allergien oder <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Gesund-bauen.pdf">wohnraumbedingten Erkrankungen</a> leiden, m\xFCssen Sie beim eigenen Hausbau besonders aufpassen, damit das neue Haus Sie gesundheitlich nicht beeintr\xE4chtigt. Holen Sie sich Unterst\xFCtzung beim Berater aus dem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Netzwerk des VPB</a>. Die Experten unterst\xFCtzen Sie bei der Auswahl der <a target="_blank" rel="noopener" href="https://www.vpb.de/
34391presse/serviceartikel/detail/gesunde-baustoffe-gesunde-baustoffe-im-bauvertrag-festschreiben">passenden Baustoffe</a> und helfen Ihnen, wie Sie diese auch in Ihren Bauvertrag hinein verhandeln.',
34392                  "type": "answer"
34393                }
34394              ]
34395            }
34396          ]
34397        },
34398        {
34399          "text": "Bauvertrag",
34400          "type": "keyword",
34401          "children": [
34402            {
34403              "text": "Ihnen liegen eine oder mehrere Baubeschreibungen vor. Diese m\xF6chten Sie mit einem Sachverst\xE4ndigen durchsprechen.",
34404              "type": "question1",
34405              "children": [
34406                {
34407                  "text": 'Das sollten Sie tun! Ihre Berater aus dem Netzwerk des VPB sind Spezialisten f\xFCr solche Fragen. Sie wissen, was sich hinter Materialbezeichnungen, Zahlen und DIN-Normen verbirgt, erkennen sofort, was in der Beschreibung noch fehlt und wo Extrakosten lauern k\xF6nnten. Machen Sie am besten <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">gleich einen Termin aus</a>!',
34408                  "type": "answer"
34409                }
34410              ]
34411            },
34412            {
34413              "text": "Ihre Baufirma hat Ihnen keine Baubeschreibung \xFCbergeben.",
34414              "type": "question1",
34415              "children": [
34416                {
34417                  "text": 'Wenn Sie einen Bautr\xE4gervertrag oder einen Verbraucherbauvertrag ohne eigenen Architekten schlie\xDFen m\xF6chten, haben Sie ein Recht auf eine vor Vertragsschluss zu \xFCbergebende Baubeschreibung. Zu den Vertragsformen und Ihren Rechten als Verbraucher informiert Sie gratis die vom VPB herausgegebene und vom Bundesministerium der Justiz und f\xFCr Verbraucherschutz gef\xF6rderte <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/7_Shop/7-5_Weitere_Produkte/Bauvertragsrecht_Information-fuer-Verbraucherbauherren.pdf">Brosch\xFCre</a>.',
34418                  "type": "answer"
34419                }
34420              ]
34421            }
34422          ]
34423        },
34424        {
34425          "text": "Baubegleitung",
34426          "type": "keyword",
34427          "children": [
34428            {
34429              "text": "Bald geht\u2019s los mit dem Bauen. Sie suchen einen unabh\xE4ngigen Berater.",
34430              "type": "question1",
34431              "children": [
34432                {
34433                  "text": 'Wenn Sie schl\xFCsselfertig bauen, haben Sie in der Regel keinen eigenen freien Architekten an Ihrer Seite. Sie sind dann auf sich allein gestellt. Der Architekt der Schl\xFCsselbaufirma steht nicht auf Ihrer Seite, sondern arbeitet f\xFCr die Baufirma! Kommen Sie zum VPB! <a target="_blank" rel="noopener" href="https://www.vpb.de/ueber-den-vpb/verbandsarbeit/verbandsvorstellung">Der VPB</a> wurde f\xFCr Bauherren wie Sie gegr\xFCndet - von <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/standesregeln">Bauherren f\xFCr Bauherren</a>! Als Mitglied haben Sie dabei auch die M\xF6glichkeit, Fachleute mit Ihrer Beratung zu beauftragen, die vom VPB u. a. auf Firmenneutralit\xE4t \xFCberpr\xFCft werden. Der Umfang der Beratung richtet sich dabei ganz nach Ihren W\xFCnschen und Bedarfen.',
34434                  "type": "answer"
34435                }
34436              ]
34437            },
34438            {
34439              "text": "Sie sind schon am Bauen \u2013 und jetzt gibt\u2018s Probleme.",
34440              "type": "question1",
34441              "children": [
34442                {
34443                  "text": 'Vereinbaren Sie schnellstm\xF6glich einen Termin mit dem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Berater aus dem Netzwerk des VPB vor Ort</a>! Die Sachverst\xE4ndigen kennen sich technisch bestens aus und unterst\xFCtzen Sie, damit Sie auf Augenh\xF6he mit der Baufirma verhandeln k\xF6nnen. Sie sind schlie\xDFlich die Bauherren!',
34444                  "type": "answer"
34445                }
34446              ]
34447            },
34448            {
34449              "text": "Die Abnahme steht kurz bevor, aber Sie haben kein gutes Gef\xFChl.",
34450              "type": "question1",
34451              "children": [
34452                {
34453                  "text": 'H\xF6ren Sie diesmal auf Ihr Gef\xFChl! Die <a target="_blank" rel="noopener" href="https://www.vpb.de/beratung/neubau/bauabnahme">
34453Abnahme</a> ist einer der wichtigsten Schritte beim Bauen. Bereiten Sie die <a target="_blank" rel="noopener" href="https://www.vpb.de/beratung/neubau/bauabnahme">Abnahme</a> deshalb mit Ihrem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Berater aus dem Netzwerk des VPB</a> gr\xFCndlich vor. Manches, was Ihnen ein mulmiges Gef\xFChl bereitet, kl\xE4rt sich dann und einiges, was Ihnen nicht aufgefallen ist, wird der Baufachmann als beanstandenswert erkennen.',
34454                  "type": "answer"
34455                }
34456              ]
34457            },
34458            {
34459              "text": "Die Baufirma hat Sie h\xE4ngen lassen.",
34460              "type": "question1",
34461              "children": [
34462                {
34463                  "text": 'Oha! ganz schlecht! So k\xFCndigen sich mitunter Insolvenzen an! Wenn Sie nichts mehr von Ihrer Baufirma h\xF6ren und diese auch nicht mehr erreichen, sollten Sie sich schnell mit Ihren Experten aus dem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">VPB-Netzwerk</a> in Verbindung setzen, einmal, damit auf der vernachl\xE4ssigten Baustelle nichts kaputt geht und zum Zweiten, damit Sie technisch und juristisch keine voreiligen falschen Entscheidungen treffen.',
34464                  "type": "answer"
34465                }
34466              ]
34467            }
34468          ]
34469        },
34470        {
34471          "text": "Bauabnahme",
34472          "type": "keyword",
34473          "children": [
34474            {
34475              "text": 'Die <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Bauabnahme.pdf">Bauabnahme</a> geh\xF6rt neben der Unterzeichnung des Bauvertrags zu den wichtigsten Rechtsschritten beim Bauen. Damit Sie hier nichts falsch machen und M\xE4ngel \xFCbersehen, sollten Sie die Abnahme mit Ihrem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Experten aus dem Netzwerk des VPB</a> gut vorbereiten!',
34476              "type": "answer"
34477            }
34478          ]
34479        },
34480        {
34481          "text": "Bautagebuch",
34482          "type": "keyword",
34483          "children": [
34484            {
34485              "text": 'Ein Bautagebuch zu f\xFChren, ist eine gute Idee! Ihr <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Berater aus dem Netzwerk des VPB</a> kommt zwar immer, wenn Sie ihn bestellen und auf Wunsch auch zu allen wichtigen Bauabschnitten, aber er kann nicht tagt\xE4glich nach dem Rechten sehen. Das m\xFCssen Sie selbst machen. Dazu lohnt es sich, ein Bautagebuch zu f\xFChren. Der VPB hat im Netz eine kostenlose <a target="_blank" rel="noopener" href="https://www.vpb.de/ratgeber/bauherrentagebuch-by-vpb">Bautagebuch-Vorlage</a> f\xFCr Sie vorbereitet. Sie m\xFCssen sie nur noch herunterladen. Lesen Sie im <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Bautagebuch.pdf">VPB-Ratgeber</a> auch, wie Sie das Bautagebuch dann systematisch und richtig f\xFChren!',
34486              "type": "answer"
34487            }
34488          ]
34489        },
34490        {
34491          "text": "Eigentumswohnung",
34492          "type": "keyword",
34493          "children": [
34494            {
34495              "text": "Sie m\xF6chten eine Neubau-Eigentumswohnung kaufen?",
34496              "type": "question1",
34497              "children": [
34498                {
34499                  "text": "Sie \xFCberlegen noch, was Sie genau f\xFCr eine Eigentumswohnung im Neubau suchen.",
34500                  "type": "question2",
34501                  "children": [
34502                    {
34503                      "text": 'Die Eigentumswohnung ist f\xFCr viele Menschen der Einstieg ins Wohneigentum. Zunehmend interessieren sich auch Senioren nach der Familienphase f\xFCr komfortable, barrierearme Eigentumswohnungen in attraktiver Lage. Bevor Sie auf Besichtigungstour gehen, \xFCberlegen Sie, was Sie brauchen! Dabei hilft das <a target="_blank" rel="noopener" href="https://www.vpb.de/ihre-mitgliedschaft/einstiegspakete/einstiegspaket-weg">VPB-Einstiegspaket WEG</a>.',
34504                      "type": "answer"
34505                    }
34506                  ]
34507                },
34508                {
34509                  "text": "Ihre k\xFCnftige Eigentumswohnung befindet sich in der Planung.",
34510                  "type": "question2",
34511                  "children": [
34512                    {
34513                      "text": "Neubauanlagen werden in der Regel von Bautr\xE4gern gebaut und verkauft. Damit sind verschiedene Probleme verbunden, die Sie kennen sollten. Zum Beispiel, welche Rechte und Pflichten Sie als Erwerber haben.",
34514                      "type": "answer"
34515                    }
34516                  ]
34517                },
34518                {
34519                  "text": "Ihre k\xFCnftige Eigentumswohnung befindet sich im Bau.",
34520                  "type": "question2",
34521                  "children": [
34522                    {
34523                      "text": 'Wenn Sie eine Eigentumswohnung kaufen, erwerben Sie nicht nur die Wohnung als Sondereigentum, sondern auch Ihren Anteil am erheblich gr\xF6\xDFeren und wertvolleren <a target="_blank" rel="noopener" href="https://www.vpb.de/presse/serviceartikel/detail/baukontrolle-etw-laufende-baukontrolle-ist-auch-bei-eigentumswohnungen-sinnvoll">Gemeinschaftseigentum</a>. Auch dort m\xFCssen Sie pr\xFCfen, dass bei der Abnahme alles m\xE4ngelfrei ist. Dabei unterst\xFCtzt Sie ihr <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Berater aus dem Netzwerk des VPB</a>.',
34524                      "type": "answer"
34525                    }
34526                  ]
34527                }
34528              ]
34529            },
34530            {
34531              "text": "Sie m\xF6chten eine Eigentumswohnung im Bestand kaufen.",
34532              "type": "question1",
34533              "children": [
34534                {
34535                  "text": "Die Eigentumswohnung befindet sich in einer gr\xF6\xDFeren Anlage.",
34536                  "type": "question2",
34537                  "children": [
34538                    {
34539                      "text": 'Denken Sie daran: Mit dem Kauf einer Eigentumswohnung werden Sie Mitglieder der rechtsf\xE4higen \u201EGemeinschaft der Wohnungseigent\xFCmer\u201C. Sie sollten wissen, was das f\xFCr Sie bedeutet. Lesen Sie dazu unseren <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Eigentumswohnung.pdf">VPB-Ratgeber \u201EDie Eigentumswohnung\u201C</a>.',
34540                      "type": "answer"
34541                    }
34542                  ]
34543                },
34544                {
34545                  "text": "Die Eigentumswohnung befindet sich in einer kleineren Anlage.",
34546                  "type": "question2",
34547                  "children": [
34548                    {
34549                      "text": 'Auch in einer kleinen Anlage gilt das <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Eigentumswohnung.pdf">Wohnungseigentumsgesetz</a>. Machen Sie sich vor dem Kauf schlau und besichtigen Sie sowohl die Wohnung als auch das Gemeinschaftseigentum vorab mit Ihrem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Berater aus dem Netzwerk des VPB</a>.',
34550                      "type": "answer"
34551                    }
34552                  ]
34553                },
34554                {
34555                  "text": "Die Eigentumswohnung stammt aus einer Zwangsversteigerung.",
34556                  "type": "question2",
34557                  "children": [
34558                    {
34559                      "text": 'Achtung: Zwangsversteigerungen sind keine Schn\xE4ppchenb\xF6rsen. Die Einstiegsgebote orientieren sich am Verkehrswert! Versuchen Sie im Vorfeld so viel wie m\xF6glich \xFCber die Immobilie zu erfahren. Dabei helfen Ihnen der <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Berater aus dem Netzwerk des VPB</a> und unser <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Zwangsversteigerung.pdf">Ratgeber \u201EZwangsversteigerungen\u201C</a>.',
34560                      "type": "answer"
34561                    }
34562                  ]
34563                },
34564                {
34565                  "text": "Sie erw\xE4gen, Ihre bisherige Mietwohnung zu kaufen.",
34566                  "type": "question2",
34567                  "children": [
34568                    {
34569                      "text": 'Warum nicht? Sie kennen ja bereits die Immobilie und die Umgebung. Aber werden auch die Nachbarn mitziehen? Oder gibt es einen neuen <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Vom-Mieter-zum-Eigentuemer.pdf">Mehrheitseigent\xFCmer</a>, der Sie in Zukunft \xE4rgern kann? Informieren Sie sich im Vorfeld f\xFCr die Optionen und lassen Sie Ihren <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Berater aus dem Netzwerk des VPB</a> die Bausubstanz pr\xFCfen. Schlie\xDFlich wollen Sie nicht zu viel bezahlen!',
34570                      "type": "answer"
34571                    }
34572                  ]
34573                }
34574              ]
34575            },
34576            {
34577              "text": "Sie m\xF6chten eine Eigentumswohnung in einem denkmalgesch\xFCtzten Haus kaufen.",
34578              "type": "question1",
34579              "children": [
34580                {
34581                  "text": "Sie haben Fragen zum potenziellen Aufwand durch den Denkmalschutz und zu steuerlicher Entlastung.",
34582                  "type": "question2",
34583                  "children": [
34584                    {
34585                      "text": '<a target="_blank" rel="noopener" href="https://www.vpb.de/presse/serviceartikel/detail/denkmalschutz-private-bauherren-geniessen-steuerverguenstigungen-im-baudenkmal">Baudenkm\xE4ler</a> sind etwas ganz Besonderes, brauchen aber etwas mehr Zuwendung. Deshalb k\xF6nnen Sie den denkmalpflegerischen Mehraufwand <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Wohnen-im-Baudenkmal.pdf">steuerlich geltend</a> machen. Diesen Vorteil gew\xE4hrt der Fiskus aber nicht ohne Grund, denn der Mehraufwand im Vergleich zu anderen Bauten ist oft sehr erheblich. Auch hier muss genau gerechnet werden.',
34586                      "type": "answer"
34587                    }
34588                  ]
34589                },
34590                {
34591                  "text": "Das Haus ist sanierungsbed\xFCrftig.",
34592                  "type": "question2",
34593                  "children": [
34594                    {
34595                      "text": 'Die <a target="_blank" rel="noopener" href="https://www.vpb.de/presse/serviceartikel/detail/sanieren-aber-richtig-energetische-sanierung-beginnt-mit-unabhaengigem-gutachten">Sanierung</a> m\xFCssen Sie als Eigent\xFCmer anteilig mitbezahlen. Deshalb sollten Sie auch sicher sein, dass die Gemeinschaft die richtigen baulichen Ma\xDFnahmen beschlie\xDFt. Holen Sie sich Rat beim Experten. Die Sachverst\xE4ndigen aus dem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Netzwerk des VPB</a> beraten auch <a target="_blank" rel="noopener" href="https://www.vpb.de/presse/serviceartikel/detail/baukontrolle-etw-laufende-baukontrolle-ist-auch-bei-eigentumswohnungen-sinnvoll">Eigent\xFCmergemeinschaften</a> \u2013 unabh\xE4ngig, firmen- und produktneutral \u2013 und sie helfen bei der \xDCberwachung der Umsetzung der Sanierungsma\xDFnahmen!',
34596                      "type": "answer"
34597                    }
34598                  ]
34599                }
34600              ]
34601            },
34602            {
34603              "text": "Sie m\xF6chten eine Seniorenwohnung kaufen.",
34604              "type": "question1",
34605              "children": [
34606                {
34607                  "text": 'Lassen Sie den Kaufvertrag vorab bautechnisch vom <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Bausachverst\xE4ndigen aus dem Netzwerk des VPB</a> pr\xFCfen, damit Sie auch wirklich eine <a target="_blank" rel="noopener" href="https://www.vpb.de/presse/serviceartikel/detail/seniorenwohnung-seniorenwohnungen-nicht-nur-nach-prospekt-kaufen">f\xFCr Senioren</a> geeignete Wohnung bekommen und nicht irgendwelchen Werbebotschaften aufsitzen.',
34608                  "type": "answer"
34609                }
34610              ]
34611            },
34612            {
34613              "text": "Sie \xFCberlegen, in eine Baugemeinschaft einzusteigen.",
34614              "type": "question1",
34615              "children": [
34616                {
34617                  "text": "Sie wollen mit einem Projektsteuerer in eine Baugemeinschaft einsteigen.",
34618                  "type": "question2",
34619                  "children": [
34620                    {
34621                      "text": '<a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Baugruppen.pdf">Baugemeinschaften</a> k\xF6nnen gro\xDFartige Projekte entwickeln und beim gemeinsamen Bauen auch Geld sparen. Aber Sie m\xFCssen es richtig angehen! Dabei kommt es auf die richtigen Vertragspartner an. <a target="_blank" rel="noopener" href="https://www.vpb.de/presse/serviceartikel/detail/projektsteuerung-vorsicht-bei-vertraegen-mit-baubetreuern-und-projektsteuerern">Projektsteurer</a> sind f\xFCr private Bauherren nicht unbedingt die beste L\xF6sung!',
34622                      "type": "answer"
34623                    }
34624                  ]
34625                },
34626                {
34627                  "text": "Sie sind selbst aktiv in der Baugemeinschaft.",
34628                  "type": "question2",
34629                  "children": [
34630                    {
34631                      "text": 'Gemeinsam mit anderen k\xF6nnen Sie in der <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Baugruppen.pdf">Baugemeinschaft oder Baugruppe</a> eigene Ideen verwirklichen. Holen Sie sich dazu gute Planer und unabh\xE4ngige Berater.',
34632                      "type": "answer"
34633                    }
34634                  ]
34635                }
34636              ]
34637            },
34638            {
34639              "text": "Sie denken \xFCber ein Mehrgenerationenhaus nach.",
34640              "type": "question1",
34641              "children": [
34642                {
34643                  "text": "Sie wollen ein Mehrgenerationenhaus neu bauen.",
34644                  "type": "question2",
34645                  "children": [
34646                    {
34647                      "text": 'Ein Mehrgenerationenhaus ist mehr als nur ein Neubau: Sie m\xFCssen neben dem Bauvorhaben auch noch die Interessen Ihrer zuk\xFCnftigen Mitbewohner unter einen Hut bringen. Am besten, Sie besprechen das Projekt in all seinen Facetten gleich einmal mit Ihrem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Berater aus dem Netzwerk des VPB</a>.',
34648                      "type": "answer"
34649                    }
34650                  ]
34651                },
34652                {
34653                  "text": "Sie denken an den Umbau eines Bestandsgeb\xE4udes zum Mehrgenerationenhaus.",
34654                  "type": "question2",
34655                  "children": [
34656                    {
34657                      "text": 'Gute Idee: Machen Sie doch aus Ihrem Ein- oder Zweifamilienhaus ein <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Mehrgenerationenhaus.pdf">Mehrgenerationenprojekt</a>! Das ist meist mit einer Komplettsanierung des Altbaus verbunden. Besprechen Sie sich fr\xFChzeitig mit Ihrem Berater aus dem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Netzwerk des VPB</a>, welche M\xF6glichkeiten Sie haben und was da an Aufwand und Kosten auf Sie zukommen kann.',
34658                      "type": "answer"
34659                    }
34660                  ]
34661                }
34662              ]
34663            }
34664          ]
34665        },
34666        {
34667          "text": "Altbaukauf",
34668          "type": "keyword",
34669          "children": [
34670            {
34671              "text": "Sie m\xF6chten ein Ein- oder Zweifamilienhaus im Bestand aus Privatbesitz kaufen.",
34672              "type": "question1",
34673              "children": [
34674                {
34675                  "text": 'Auch wenn es schnell gehen soll, verlassen Sie sich nicht auf die Aussagen von Verk\xE4ufer und Makler. Lassen Sie die <a target="_blank" rel="noopener" href="https://www.vpb.de/
34675presse/serviceartikel/detail/altbau-altbau-vor-dem-kauf-begutachten-lassen">Immobilie</a> von Ihrem eigenen <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Berater aus dem Netzwerk des VPB</a> begutachten. So erhalten Sie neutrale Ausk\xFCnfte dar\xFCber, was Sie kaufen, ob die Immobilie ihr Geld wert ist, ob sich Ihre Umbauw\xFCnsche realisieren lassen und was an Sanierungskosten auf Sie zukommen k\xF6nnte.',
34676                  "type": "answer"
34677                }
34678              ]
34679            },
34680            {
34681              "text": "Sie m\xFCssen sich schnell entscheiden, ob Sie ein Ein- oder Zweifamilienhaus im Bestand kaufen.",
34682              "type": "question1",
34683              "children": [
34684                {
34685                  "text": 'In manchen Regionen sind Immobilien knapp. Um die gesuchten Objekte entwickeln sich wahre <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Immobilienkauf_Zeitdruck.pdf">Bieter-Kriege</a>. Lassen Sie sich nicht unter Zeitdruck setzen. Auch wenn es eilt, k\xF6nnen Sie eine ganze Menge kl\xE4ren, damit Sie keine Fehlentscheidung treffen!',
34686                  "type": "answer"
34687                }
34688              ]
34689            },
34690            {
34691              "text": "Sie wollen ein Ein- oder Zweifamilienhaus im Bestand aus einer Zwangsversteigerung kaufen.",
34692              "type": "question1",
34693              "children": [
34694                {
34695                  "text": 'Kaufen Sie nicht die Katze im Sack! Bei <a target="_blank" rel="noopener" href="https://www.vpb.de/presse/serviceartikel/detail/zwangsversteigerungen-nicht-die-katze-im-sack-kaufen">Zwangsversteigerungen</a> haben Sie meist keine Gelegenheit, die Immobilie vorab zu besichtigen! Sie wissen nicht, was auf Sie zukommt. Fragen Sie Ihren Berater <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">aus dem Netzwerk des VPB</a>. Er kann Ihnen aus der Erfahrung raten \u2013 und Ihnen das Gutachten des Gerichts erl\xE4utern. Informieren Sie sich vorab \xFCber die <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Zwangsversteigerung.pdf">Modalit\xE4ten der Zwangsversteigerung</a>!',
34696                  "type": "answer"
34697                }
34698              ]
34699            },
34700            {
34701              "text": "Sie haben ein Ein- oder Zweifamilienhaus geerbt.",
34702              "type": "question1",
34703              "children": [
34704                {
34705                  "text": 'Wollen Sie das Anwesen \xFCbernehmen? M\xFCssen Sie Geschwister ausbezahlen? Dann sollten Sie genau wissen, <a target="_blank" rel="noopener" href="https://www.vpb.de/beratung/kaufen/wertermittlung-immobilie">was die Immobilie wert ist</a> und was mit der \xDCbernahme und Sanierung finanziell auf Sie zukommt.',
34706                  "type": "answer"
34707                }
34708              ]
34709            },
34710            {
34711              "text": "Das Ein- oder Zweifamilienhaus steht unter Denkmalschutz.",
34712              "type": "question1",
34713              "children": [
34714                {
34715                  "text": 'Das muss kein entscheidendes Problem sein. Zwar d\xFCrfen Sie bei einem Denkmal nicht nach Belieben um- oder anbauen, aber Sie haben sich ja auch bewusst f\xFCr das au\xDFergew\xF6hnliche Objekt interessiert, weil es Ihnen gef\xE4llt, wie es ist. Kl\xE4ren Sie mit Denkmalschutzbeh\xF6rde und Ihrem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Berater aus dem Netzwerk des VPB</a> die M\xF6glichkeiten. F\xFCr die denkmalpflegerischen Mehrkosten, die auf Sie zukommen, kommt Ihnen der Staat mit Steuererleichterungen entgegen. Weitere Informationen finden Sie im <a target="_blank" rel="noopener" href="https://www.vpb.de/fileadmin/user_upload/2_Unser_Wissen/2.4_VPB-Ratgeber/VPB-Ratgeber_Wohnen-im-Baudenkmal.pdf">VPB-Ratgeber \u201EWohnen im Baudenkmal\u201C</a>.',
34716                  "type": "answer"
34717                }
34718              ]
34719            }
34720          ]
34721        },
34722        {
34723          "text": "Modernisierung",
34724          "type": "keyword",
34725          "children": [
34726            {
34727              "text": "Sie m\xF6chten ein Ein- oder Zweifamilienhaus modernisieren.",
34728              "type": "question1",
34729              "children": [
34730                {
34731                  "text": 'Da sind Sie in guter Gesellschaft: Immer mehr junge Familien nutzen dazu staatliche F\xF6rderung! Der Staat legt dabei den Schwerpunkt vor allem auf die F\xF6rderung energetischer Modernisierung. Es lohnt sich, zuerst den <a target="_blank" rel="noopener" href="https://www.vpb.de/
34731presse/serviceartikel/detail/altbau-altbau-vor-dem-kauf-begutachten-lassen">Altbau zu begutachten</a> und dann zu kl\xE4ren, welche Ma\xDFnahmen mit welchem Budget zeitlich vern\xFCnftig aufeinander abgestimmt durchzuf\xFChren sind. Lassen Sie dazu vorab von den Experten aus dem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">VPB-Netzwerk</a> beraten!',
34732                  "type": "answer"
34733                }
34734              ]
34735            },
34736            {
34737              "text": "Sie m\xF6chten Ihre Eigentumswohnung sowie das Haus modernisieren.",
34738              "type": "question1",
34739              "children": [
34740                {
34741                  "text": 'Sie sind Mitglied der Eigent\xFCmergemeinschaft? Dann sollten Sie sich mit Ihren Miteigent\xFCmern zusammenschlie\xDFen und die <a target="_blank" rel="noopener" href="https://www.vpb.de/presse/serviceartikel/detail/energetische-sanierung-energetische-sanierung-gut-vorbereiten">Modernisierung</a> systematisch angehen. Dazu geh\xF6ren vor allem unabh\xE4ngige, firmen- und produktneutrale Beratung und solide Vorbereitung. Sie k\xF6nnen sich dazu gemeinsam an den <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Berater aus dem VPB-Netzwerk</a> in Ihrer N\xE4he wenden.',
34742                  "type": "answer"
34743                }
34744              ]
34745            }
34746          ]
34747        },
34748        {
34749          "text": "Energetische Sanierung",
34750          "type": "keyword",
34751          "children": [
34752            {
34753              "text": 'Eine Immobilie energetisch zu sanieren, ist eine gute Idee! Selten zuvor gab es so viele staatliche Hilfen \u2013 Steuererleichterungen und Zusch\xFCsse. Als erster Schritt sollte ein individueller <a target="_blank" rel="noopener" href="https://www.vpb.de/presse/serviceartikel/detail/energetische-sanierung-energetische-sanierung-gut-vorbereiten">Sanierungsfahrplan</a> erstellt werden, damit Sie bei der Planung und Umsetzung der energetischen Sanierung nichts falsch machen. Fragen dazu k\xF6nnen Sie mit den Experten aus dem Netzwerk der <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">VPB-Regionalb\xFCros</a> besprechen.',
34754              "type": "answer"
34755            }
34756          ]
34757        },
34758        {
34759          "text": "Schimmel",
34760          "type": "keyword",
34761          "children": [
34762            {
34763              "text": "Sie haben Schimmel in Ihrem neuen Haus.",
34764              "type": "question1",
34765              "children": [
34766                {
34767                  "text": 'Sie sind mit dem Problem nicht allein. Hauptursachen f\xFCr den zunehmenden <a target="_blank" rel="noopener" href="https://www.vpb.de/presse/serviceartikel/detail/schimmel-neubau-schimmel-belastet-zunehmend-auch-neubauten">Schimmelbefall in Neubauten</a> sind <a target="_blank" rel="noopener" href="https://www.vpb.de/vpb-einstiegspaket-schadstoffe.html">Feuchtigkeit und N\xE4sse</a> w\xE4hrend der Bauphase sowie unbeheizte Baustellen. Wenden Sie sich so schnell wie m\xF6glich an Ihren Berater aus dem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Netzwerk des VPB</a> und lassen Sie die Ursachen des Problems vom unabh\xE4ngigen Experten abkl\xE4ren. Es geht nicht nur um M\xE4ngelrechte gegen\xFCber dem Hausbauer oder -verk\xE4ufer oder Ihr Geld, sondern um Ihre Gesundheit.',
34768                  "type": "answer"
34769                }
34770              ]
34771            },
34772            {
34773              "text": "Sie haben Schimmel in Ihrem Altbau.",
34774              "type": "question1",
34775              "children": [
34776                {
34777                  "text": '<a target="_blank" rel="noopener" href="https://www.vpb.de/presse/serviceartikel/detail/schimmel-ursachen-fuer-schimmel-im-altbau-suchen-und-korrekt-beseitigen">Schimmel in Altbauten</a> muss saniert werden, denn er verursacht gesundheitliche Probleme und sch\xE4digt die Bausubstanz. Aber gehen Sie nicht einfach nur mit Hausmitteln ans Werk! Beauftragen Sie einen <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Berater aus dem Netzwerk des VPB</a>
34777 mit der Suche nach der Schadensursache. Erst wenn die abgekl\xE4rt ist, wissen Sie, wie Sie fachlich richtig sanieren m\xFCssen. Sie wollen ja nicht, dass der Schimmel sp\xE4ter wiederkommt!',
34778                  "type": "answer"
34779                }
34780              ]
34781            }
34782          ]
34783        },
34784        {
34785          "text": "Schadstoffe",
34786          "type": "keyword",
34787          "children": [
34788            {
34789              "text": 'Sie haben unerkl\xE4rliche Beschwerden und Ihr Arzt findet die Ursache nicht? Dann leiden Sie m\xF6glicherweise an einer <a target="_blank" rel="noopener" href="https://www.vpb.de/presse/serviceartikel/detail/gesund-bauen-bei-gesundheitsbeschwerden-auch-das-haus-untersuchen">geb\xE4udebedingten Erkrankung</a>! Fragen Sie Ihren Sachverst\xE4ndigen aus dem <a target="_blank" rel="noopener" href="https://www.vpb.de/regionalbueros/sachverstaendige-finden">Netzwerk des VPB</a> um Rat! Eventuell ist eine Innenraumanalyse bei Ihnen zu Hause sinnvoll, um den Ausl\xF6ser Ihrer Beschwerden zu finden. Ist die Ursache gefunden, kann das Haus oder die Wohnung gezielt saniert werden.',
34790              "type": "answer"
34791            }
34792          ]
34793        }
34794      ];
34795      static \u0275fac = function DataService_Factory(__ngFactoryType__) {
34796        return new (__ngFactoryType__ || _DataService)();
34797      };
34798      static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _DataService, factory: _DataService.\u0275fac, providedIn: "root" });
34799    };
34800    (() => {
34801      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(DataService, [{
34802        type: Injectable,
34803        args: [{
34804          providedIn: "root"
34805        }]
34806      }], () => [], null);
34807    })();
34808  }
34809});
34810
34811// src/component/chat-window/chat-window.component.ts
34812function ChatWindowComponent_For_13_Template(rf, ctx) {
34813  if (rf & 1) {
34814    \u0275\u0275domElement(0, "div", 13);
34815  }
34816  if (rf & 2) {
34817    const item_r1 = ctx.$implicit;
34818    const ctx_r1 = \u0275\u0275nextContext();
34819    \u0275\u0275classMap(ctx_r1.getItemClass(item_r1.type));
34820    \u0275\u0275domProperty("innerHTML", item_r1.text, \u0275\u0275sanitizeHtml);
34821  }
34822}
34823function ChatWindowComponent_For_16_Template(rf, ctx) {
34824  if (rf & 1) {
34825    const _r3 = \u0275\u0275getCurrentView();
34826    \u0275\u0275domElementStart(0, "button", 14);
34827    \u0275\u0275domListener("click", function ChatWindowComponent_For_16_Template_button_click_0_listener() {
34828      const answer_r4 = \u0275\u0275restoreView(_r3).$implicit;
34829      const ctx_r1 = \u0275\u0275nextContext();
34830      return \u0275\u0275resetView(ctx_r1.onAnswerSelect(answer_r4));
34831    });
34832    \u0275\u0275domElementEnd();
34833  }
34834  if (rf & 2) {
34835    const answer_r4 = ctx.$implicit;
34836    \u0275\u0275domProperty("innerHTML", answer_r4.text, \u0275\u0275sanitizeHtml);
34837  }
34838}
34839var ChatWindowComponent;
34840var init_chat_window_component = __esm({
34841  "src/component/chat-window/chat-window.component.ts"() {
34842    "use strict";
34843    init_core();
34844    init_common();
34845    init_message_type();
34846    init_tree_item();
34847    init_tree_item_type();
34848    init_core();
34849    init_data_service();
34850    ChatWindowComponent = class _ChatWindowComponent {
34851      dataService;
34852      initialMessage = "Willkommen! W\xE4hlen Sie bitte ein Thema aus.";
34853      finalMessage = 'M\xF6chten Sie sich pers\xF6nlich beraten lassen? <a target="_blank" rel="noopener" href="/kontakt">Kontaktieren Sie unsere VPB-Experten</a> \u2013 wir stehen Ihnen gerne zur Verf\xFCgung.';
34854      answerOptions = [];
34855      history = [];
34856      isDragging = false;
34857      startX = 0;
34858      startY = 0;
34859      initialX = 0;
34860      initialY = 0;
34861      hasDragged = false;
34862      constructor(dataService) {
34863        this.dataService = dataService;
34864        this.reset();
34865      }
34866      reset() {
34867        this.history = [];
34868        this.addMessage(this.initialMessage, MessageType.BOT, "");
34869        this.answerOptions = this.getAnswerOptions();
34870      }
34871      closeChatWindow() {
34872        this.dataService.triggerCloseChatWindow();
34873      }
34874      goBack() {
34875        if (this.history.length > 1) {
34876          if (!this.history[this.history.length - 1].id) {
34877            this.history.pop();
34878            this.history.pop();
34879          }
34880          this.history.pop();
34881          const allItems = this.flattenTree(this.dataService.tree);
34882          const lastAnswer = allItems.find((item) => item.id === this.history[this.history.length - 1].id);
34883          this.answerOptions = this.getAnswerOptions(lastAnswer);
34884        }
34885      }
34886      onAnswerSelect(answer) {
34887        if (answer.type === TreeItemType.RESTART) {
34888          this.reset();
34889          return;
34890        }
34891        this.addMessage(answer.text, MessageType.USER, answer.id);
34892        const answers = this.getAnswerOptions(answer);
34893        if (answers.length === 1 && answers[0].type === TreeItemType.ANSWER) {
34894          this.addMessage(answers[0].text, MessageType.BOT_RESULT, answer.id);
34895          this.addMessage(this.finalMessage, MessageType.BOT, "");
34896          this.answerOptions = [new TreeItem("Neue Anfrage starten", TreeItemType.RESTART, [])];
34897        } else {
34898          this.answerOptions = this.getAnswerOptions(answer);
34899        }
34900        this.scrollToBottom();
34901      }
34902      addMessage(text, type, id) {
34903        this.history.push({ text, type, id });
34904      }
34905      scrollToBottom() {
34906        return __async(this, null, function* () {
34907          yield new Promise((resolve) => setTimeout(resolve, 100));
34908          const messageContainerEl = document.querySelector("#messageContainer");
34909          if (messageContainerEl) {
34910            messageContainerEl.scrollTo({
34911              top: messageContainerEl.scrollHeight,
34912              left: 0,
34913              behavior: "smooth"
34914            });
34915          }
34916        });
34917      }
34918      getItemClass(type) {
34919        switch (type) {
34920          case MessageType.BOT:
34921            return "bot-message";
34922          case MessageType.BOT_RESULT:
34923            return "answer-box";
34924          case MessageType.USER:
34925            return "user-selection";
34926          default:
34927            return "";
34928        }
34929      }
34930      flattenTree(items) {
34931        const result = [];
34932        for (const item of items) {
34933          result.push(item);
34934          if (item.children) {
34935            result.push(...this.flattenTree(item.children));
34936          }
34937        }
34938        return result;
34939      }
34940      onHeaderMouseDown(event) {
34941        if (event.button !== 0 || event.target?.nodeName === "BUTTON") {
34942          return;
34943        }
34944        ;
34945        debugger;
34946        this.isDragging = true;
34947        this.hasDragged = false;
34948        this.startX = event.clientX;
34949        this.startY = event.clientY;
34950        const element = document.querySelector(".decision-chat");
34951        const rect = element.getBoundingClientRect();
34952        this.initialX = rect.left;
34953        this.initialY = rect.top;
34954        event.preventDefault();
34955      }
34956      onMouseMove(event) {
34957        if (!this.isDragging) {
34958          return;
34959        }
34960        ;
34961        const deltaX = event.clientX - this.startX;
34962        const deltaY = event.clientY - this.startY;
34963        if (Math.abs(deltaX) > 5 || Math.abs(deltaY) > 5) {
34964          this.hasDragged = true;
34965        }
34966        const element = document.querySelector(".decision-chat");
34967        const appElement = document.querySelector("app-chat-window");
34968        if (element && appElement) {
34969          const windowWidth = document.body.clientWidth || window.innerWidth;
34970          const windowHeight = window.innerHeight;
34971          const elementWidth = element.offsetWidth;
34972          const elementHeight = element.offsetHeight;
34973          let newLeft = this.initialX + deltaX;
34974          let newTop = this.initialY + deltaY;
34975          newLeft = Math.max(0, Math.min(newLeft, windowWidth - elementWidth));
34976          newTop = Math.max(0, Math.min(newTop, windowHeight - elementHeight));
34977          element.style.position = "fixed";
34978          element.style.left = `${newLeft}px`;
34979          element.style.top = `${newTop}px`;
34980          element.style.right = "auto";
34981          element.style.bottom = "auto";
34982          appElement.classList.add("dragging");
34983        }
34984      }
34985      onMouseUp(event) {
34986        if (event.button !== 0 || !this.isDragging) {
34987          return;
34988        }
34989        debugger;
34990        this.isDragging = false;
34991        this.hasDragged = false;
34992        const appElement = document.querySelector("app-chat-window");
34993        if (appElement) {
34994          appElement.classList.remove("dragging");
34995          appElement.style.transform = "none";
34996        }
34997      }
34998      getAnswerOptions(item) {
34999        if (!item) {
35000          return this.dataService.tree.filter((item2) => item2.type === TreeItemType.KEYWORD);
35001        } else {
35002          return item.children || [];
35003        }
35004      }
35005      static \u0275fac = function ChatWindowComponent_Factory(__ngFactoryType__) {
35006        return new (__ngFactoryType__ || _ChatWindowComponent)(\u0275\u0275directiveInject(DataService));
35007      };
35008      static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _ChatWindowComponent, selectors: [["app-chat-window"]], hostBindings: function ChatWindowComponent_HostBindings(rf, ctx) {
35009        if (rf & 1) {
35010          \u0275\u0275listener("mousemove", function ChatWindowComponent_mousemove_HostBindingHandler($event) {
35011            return ctx.onMouseMove($event);
35012          }, \u0275\u0275resolveDocument)("mouseup", function ChatWindowComponent_mouseup_HostBindingHandler($event) {
35013            return ctx.onMouseUp($event);
35014          }, \u0275\u0275resolveDocument);
35015        }
35016      }, decls: 17, vars: 0, consts: [[1, "decision-chat"], [1, "chat-header", 3, "mousedown"], [1, "btn", "btn-primary", "btnCtrl", 3, "click"], ["viewBox", "0 0 256 256", "fill", "#000"], ["d", "M160,220a11.96287,11.96287,0,0,1-8.48535-3.51465l-80-80a12.00062,12.00062,0,0,1,0-16.9707l80-80a12.0001,12.0001,0,0,1,16.9707,16.9707L96.9707,128l71.51465,71.51465A12,12,0,0,1,160,220Z"], [1, "navigatorTitle"], ["viewBox", "0 0 24 24"], ["x1", "16.9999", "y1", "7", "x2", "7.00001", "y2", "16.9999", "stroke", "#fafafa", "stroke-width", "2", "stroke-linecap", "round"], ["x1", "7.00006", "y1", "7", "x2", "17", "y2", "16.9999", "stroke", "#fafafa", "stroke-width", "2", "stroke-linecap", "round"], ["id", "messageContainer", 1, "chat-messages"], [3, "class", "innerHTML"], [1, "quick-replies"], [1, "quick-reply-btn", 3, "innerHTML"], [3, "innerHTML"], [1, "quick-reply-btn", 3, "click", "innerHTML"]], template: function ChatWindowComponent_Template(rf, ctx) {
35017        if (rf & 1) {
35018          \u0275\u0275domElementStart(0, "div", 0)(1, "div", 1);
35019          \u0275\u0275domListener("mousedown", function ChatWindowComponent_Template_div_mousedown_1_listener($event) {
35020            return ctx.onHeaderMouseDown($event);
35021          });
35022          \u0275\u0275domElementStart(2, "button", 2);
35023          \u0275\u0275domListener("click", function ChatWindowComponent_Template_button_click_2_listener($event) {
35024            ctx.goBack();
35025            return $event.stopPropagation();
35026          });
35027          \u0275\u0275namespaceSVG();
35028          \u0275\u0275domElementStart(3, "svg", 3);
35029          \u0275\u0275domElement(4, "path", 4);
35030          \u0275\u0275domElementEnd()();
35031          \u0275\u0275namespaceHTML();
35032          \u0275\u0275domElementStart(5, "div", 5);
35033          \u0275\u0275text(6, "VPB-Navigator");
35034          \u0275\u0275domElementEnd();
35035          \u0275\u0275domElementStart(7, "button", 2);
35036          \u0275\u0275domListener("click", function ChatWindowComponent_Template_button_click_7_listener($event) {
35037            ctx.closeChatWindow();
35038            return $event.stopPropagation();
35039          });
35040          \u0275\u0275namespaceSVG();
35041          \u0275\u0275domElementStart(8, "svg", 6);
35042          \u0275\u0275domElement(9, "line", 7)(10, "line", 8);
35043          \u0275\u0275domElementEnd()()();
35044          \u0275\u0275namespaceHTML();
35045          \u0275\u0275domElementStart(11, "div", 9);
35046          \u0275\u0275repeaterCreate(12, ChatWindowComponent_For_13_Template, 1, 3, "div", 10, \u0275\u0275repeaterTrackByIndex);
35047          \u0275\u0275domElementEnd();
35048          \u0275\u0275domElementStart(14, "div", 11);
35049          \u0275\u0275repeaterCreate(15, ChatWindowComponent_For_16_Template, 1, 1, "button", 12, \u0275\u0275repeaterTrackByIndex);
35050          \u0275\u0275domElementEnd()();
35051        }
35052        if (rf & 2) {
35053          \u0275\u0275advance(12);
35054          \u0275\u0275repeater(ctx.history);
35055          \u0275\u0275advance(3);
35056          \u0275\u0275repeater(ctx.answerOptions);
35057        }
35058      }, dependencies: [CommonModule], encapsulation: 2 });
35059    };
35060    (() => {
35061      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ChatWindowComponent, [{
35062        type: Component,
35063        args: [{ selector: "app-chat-window", standalone: true, imports: [CommonModule], template: '<div class="decision-chat">\n\n    <div class="chat-header" (mousedown)="onHeaderMouseDown($event)">\n        <button class="btn btn-primary btnCtrl" (click)="goBack(); $event.stopPropagation()">\n            <svg viewBox="0 0 256 256" fill="#000">\n                <path d="M160,220a11.96287,11.96287,0,0,1-8.48535-3.51465l-80-80a12.00062,12.00062,0,0,1,0-16.9707l80-80a12.0001,12.0001,0,0,1,16.9707,16.9707L96.9707,128l71.51465,71.51465A12,12,0,0,1,160,220Z" />\n            </svg>\n\n        </button>\n        <div class="navigatorTitle">VPB-Navigator</div>\n        <button class="btn btn-primary btnCtrl" (click)="closeChatWindow(); $event.stopPropagation()">\n            <svg viewBox="0 0 24 24">\n                <line x1="16.9999" y1="7" x2="7.00001" y2="16.9999" stroke="#fafafa" stroke-width="2" stroke-linecap="round" />\n                <line x1="7.00006" y1="7" x2="17" y2="16.9999" stroke="#fafafa" stroke-width="2" stroke-linecap="round" />\n            </svg>\n        </button>\n    </div>\n\n    <div class="chat-messages" id="messageContainer">\n        @for (item of history; track $index) {\n        <div class="{{ getItemClass(item.type) }}" [innerHTML]="item.text"></div>\n        }\n    </div>\n\n    <div class="quick-replies">\n        @for (answer of answerOptions; track $index) {\n        <button class="quick-reply-btn" [innerHTML]="answer.text" (click)="onAnswerSelect(answer)"></button>\n        }\n    </div>\n\n</div>\n' }]
35064      }], () => [{ type: DataService }], { onMouseMove: [{
35065        type: HostListener,
35066        args: ["document:mousemove", ["$event"]]
35067      }], onMouseUp: [{
35068        type: HostListener,
35069        args: ["document:mouseup", ["$event"]]
35070      }] });
35071    })();
35072    (() => {
35073      (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(ChatWindowComponent, { className: "ChatWindowComponent", filePath: "src/component/chat-window/chat-window.component.ts", lineNumber: 14 });
35074    })();
35075  }
35076});
35077
35078// src/component/chat-icon/chat-icon.component.ts
35079function ChatIconComponent_Conditional_4_Template(rf, ctx) {
35080  if (rf & 1) {
35081    \u0275\u0275element(0, "app-chat-window");
35082  }
35083}
35084var ChatIconComponent;
35085var init_chat_icon_component = __esm({
35086  "src/component/chat-icon/chat-icon.component.ts"() {
35087    "use strict";
35088    init_core();
35089    init_common();
35090    init_selector();
35091    init_chat_window_component();
35092    init_core();
35093    init_core();
35094    init_data_service();
35095    ChatIconComponent = class _ChatIconComponent {
35096      dataService;
35097      dataReady = false;
35098      chatWindowVisible = false;
35099      constructor(dataService) {
35100        this.dataService = dataService;
35101        effect(() => {
35102          const triggerValue = this.dataService.closeChatWindowTrigger();
35103          if (triggerValue > 0) {
35104            this.closeChatWindow();
35105          }
35106        });
35107        effect(() => {
35108          if (this.dataService.dataReady()) {
35109            this.dataReady = true;
35110          }
35111        });
35112      }
35113      toggleChatWindow() {
35114        if (this.chatWindowVisible) {
35115          this.closeChatWindow();
35116        } else {
35117          this.openChatWindow();
35118        }
35119      }
35120      openChatWindow() {
35121        this.chatWindowVisible = true;
35122        const bodyEl = document.querySelector("body");
35123        if (bodyEl) {
35124          bodyEl.insertAdjacentHTML("beforeend", '<div id="vpbChatBackdrop" class="navigatorBackdrop"></div>');
35125        }
35126      }
35127      closeChatWindow() {
35128        this.chatWindowVisible = false;
35129        const backdropEl = document.querySelector("#vpbChatBackdrop");
35130        if (backdropEl) {
35131          backdropEl.remove();
35132        }
35133      }
35134      static \u0275fac = function ChatIconComponent_Factory(__ngFactoryType__) {
35135        return new (__ngFactoryType__ || _ChatIconComponent)(\u0275\u0275directiveInject(DataService));
35136      };
35137      static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _ChatIconComponent, selectors: [["vpb-chat-icon"]], decls: 5, vars: 3, consts: [[1, "btn", "btn-lg", "btn-primary", "btnNavigatorOpen", 3, "click"], ["viewBox", "0 0 64 64", "xmlns", "http://www.w3.org/2000/svg"], ["fill", "currentColor", "d", "m57.174 10.726h-3.016c-.553 0-1-.448-1-1v-4.703l-6.102 5.448c-.184.164-.42.254-.666.254h-26.036c-1.553 0-2.816 1.263-2.816 2.816v6.855h26.104c2.658 0 4.821 2.163 4.821 4.821v16.387h8.711c1.559 0 2.826-1.263 2.826-2.816v-25.246c0-1.553-1.268-2.816-2.826-2.816z"], ["fill", "currentColor", "d", "m43.642 22.396h-36.821c-1.556 0-2.821 1.266-2.821 2.821v25.238c0 1.556 1.266 2.821 2.821 2.821h3.02c.553 0 1 .448 1 1v4.699l6.096-5.445c.184-.164.42-.254.666-.254h26.039c1.556 0 2.821-1.266 2.821-2.821v-7.847s0-.003 0-.005 0-.003 0-.005v-17.381c0-1.555-1.266-2.821-2.821-2.821zm-17.41 23.378c0 .552-.447 1-1 1s-1-.448-1-1v-.435c0-.552.447-1 1-1s1 .448 1 1zm.694-6.277c-.422.143-.694.492-.694.889v1.07c0 .552-.447 1-1 1s-1-.448-1-1v-1.047c0-1.271.824-2.39 2.052-2.806 1.37-.464 2.264-1.75 2.224-3.198-.048-1.707-1.475-3.134-3.182-3.182-.905-.026-1.739.304-2.379.927s-.992 1.457-.992 2.349c0 .552-.447 1-1 1s-1-.448-1-1c0-1.437.567-2.78 1.598-3.782 1.03-1.001 2.406-1.53 3.828-1.492 2.75.076 5.05 2.375 5.127 5.125.063 2.332-1.376 4.4-3.581 5.148z"]], template: function ChatIconComponent_Template(rf, ctx) {
35138        if (rf & 1) {
35139          \u0275\u0275elementStart(0, "div", 0);
35140          \u0275\u0275listener("click", function ChatIconComponent_Template_div_click_0_listener() {
35141            return ctx.toggleChatWindow();
35142          });
35143          \u0275\u0275namespaceSVG();
35144          \u0275\u0275elementStart(1, "svg", 1);
35145          \u0275\u0275element(2, "path", 2)(3, "path", 3);
35146          \u0275\u0275elementEnd()();
35147          \u0275\u0275conditionalCreate(4, ChatIconComponent_Conditional_4_Template, 1, 0, "app-chat-window");
35148        }
35149        if (rf & 2) {
35150          \u0275\u0275classProp("disabled", !ctx.dataReady);
35151          \u0275\u0275advance(4);
35152          \u0275\u0275conditional(ctx.chatWindowVisible ? 4 : -1);
35153        }
35154      }, dependencies: [
35155        CommonModule,
35156        ChatWindowComponent
35157      ], encapsulation: 2 });
35158    };
35159    (() => {
35160      (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ChatIconComponent, [{
35161        type: Component,
35162        args: [{ selector: Selector.CHAT_ICON, standalone: true, imports: [
35163          CommonModule,
35164          ChatWindowComponent
35165        ], template: '<div class="btn btn-lg btn-primary btnNavigatorOpen" (click)="toggleChatWindow()" [class.disabled]="!dataReady">\n    <svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
35165\n        <path fill="currentColor" d="m57.174 10.726h-3.016c-.553 0-1-.448-1-1v-4.703l-6.102 5.448c-.184.164-.42.254-.666.254h-26.036c-1.553 0-2.816 1.263-2.816 2.816v6.855h26.104c2.658 0 4.821 2.163 4.821 4.821v16.387h8.711c1.559 0 2.826-1.263 2.826-2.816v-25.246c0-1.553-1.268-2.816-2.826-2.816z" />\n        <path fill="currentColor" d="m43.642 22.396h-36.821c-1.556 0-2.821 1.266-2.821 2.821v25.238c0 1.556 1.266 2.821 2.821 2.821h3.02c.553 0 1 .448 1 1v4.699l6.096-5.445c.184-.164.42-.254.666-.254h26.039c1.556 0 2.821-1.266 2.821-2.821v-7.847s0-.003 0-.005 0-.003 0-.005v-17.381c0-1.555-1.266-2.821-2.821-2.821zm-17.41 23.378c0 .552-.447 1-1 1s-1-.448-1-1v-.435c0-.552.447-1 1-1s1 .448 1 1zm.694-6.277c-.422.143-.694.492-.694.889v1.07c0 .552-.447 1-1 1s-1-.448-1-1v-1.047c0-1.271.824-2.39 2.052-2.806 1.37-.464 2.264-1.75 2.224-3.198-.048-1.707-1.475-3.134-3.182-3.182-.905-.026-1.739.304-2.379.927s-.992 1.457-.992 2.349c0 .552-.447 1-1 1s-1-.448-1-1c0-1.437.567-2.78 1.598-3.782 1.03-1.001 2.406-1.53 3.828-1.492 2.75.076 5.05 2.375 5.127 5.125.063 2.332-1.376 4.4-3.581 5.148z" />\n    </svg>\n</div>\n\n@if (chatWindowVisible) {\n    <app-chat-window></app-chat-window>\n}\n' }]
35166      }], () => [{ type: DataService }], null);
35167    })();
35168    (() => {
35169      (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(ChatIconComponent, { className: "ChatIconComponent", filePath: "src/component/chat-icon/chat-icon.component.ts", lineNumber: 17 });
35170    })();
35171  }
35172});
35173
35174// src/main.ts
35175var require_main = __commonJS({
35176  "src/main.ts"(exports) {
35177    init_elements();
35178    init_platform_browser();
35179    init_http();
35180    init_selector();
35181    init_chat_icon_component();
35182    (() => __async(null, null, function* () {
35183      const app = yield createApplication({
35184        providers: [
35185          provideHttpClient()
35186        ]
35187      });
35188      function defineComponent(component, selector) {
35189        customElements.define(selector, createCustomElement(component, { injector: app.injector }));
35190      }
35191      defineComponent(ChatIconComponent, Selector.CHAT_ICON);
35192    }))();
35193  }
35194});
35195export default require_main();
35196/*! Bundled license information:
35197
35198@angular/core/fesm2022/not_found.mjs:
35199@angular/core/fesm2022/signal.mjs:
35200@angular/core/fesm2022/effect.mjs:
35201@angular/core/fesm2022/primitives/signals.mjs:
35202@angular/core/fesm2022/primitives/di.mjs:
35203@angular/core/fesm2022/root_effect_scheduler.mjs:
35204@angular/core/fesm2022/resource.mjs:
35205@angular/elements/fesm2022/elements.mjs:
35206@angular/common/fesm2022/location.mjs:
35207@angular/common/fesm2022/common_module.mjs:
35208@angular/common/fesm2022/xhr.mjs:
35209@angular/common/fesm2022/common.mjs:
35210@angular/platform-browser/fesm2022/dom_renderer.mjs:
35211@angular/platform-browser/fesm2022/browser.mjs:
35212@angular/common/fesm2022/module.mjs:
35213@angular/common/fesm2022/http.mjs:
35214@angular/platform-browser/fesm2022/platform-browser.mjs:
35215  (**
35216   * @license Angular v20.3.15
35217   * (c) 2010-2025 Google LLC. https://angular.dev/
35218   * License: MIT
35219   *)
35220
35221@angular/core/fesm2022/debug_node.mjs:
35222@angular/core/fesm2022/core.mjs:
35223  (**
35224   * @license Angular v20.3.15
35225   * (c) 2010-2025 Google LLC. https://angular.dev/
35226   * License: MIT
35227   *)
35228  (*!
35229   * @license
35230   * Copyright Google LLC All Rights Reserved.
35231   *
35232   * Use of this source code is governed by an MIT-style license that can be
35233   * found in the LICENSE file at https://angular.dev/license
35234   *)
35235*/
35236//# sourceMappingURL=main.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.