var __create = Object.create; var __defProp = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropNames = Object.getOwnPropertyNames; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a, b) => { for (var prop in b ||= {}) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); } return a; }; var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); var __objRest = (source, exclude) => { var target = {}; for (var prop in source) if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop]; if (source != null && __getOwnPropSymbols) for (var prop of __getOwnPropSymbols(source)) { if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) target[prop] = source[prop]; } return target; }; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __copyProps = (to, from2, except, desc) => { if (from2 && typeof from2 === "object" || typeof from2 === "function") { for (let key of __getOwnPropNames(from2)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); // ../../../../node_modules/rxjs/dist/esm/internal/util/isFunction.js function isFunction(value) { return typeof value === "function"; } // ../../../../node_modules/rxjs/dist/esm/internal/util/createErrorClass.js function createErrorClass(createImpl) { const _super = (instance) => { Error.call(instance); instance.stack = new Error().stack; }; const ctorFunc = createImpl(_super); ctorFunc.prototype = Object.create(Error.prototype); ctorFunc.prototype.constructor = ctorFunc; return ctorFunc; } // ../../../../node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js var UnsubscriptionError = createErrorClass((_super) => function UnsubscriptionErrorImpl(errors) { _super(this); this.message = errors ? `${errors.length} errors occurred during unsubscription: ${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join("\n ")}` : ""; this.name = "UnsubscriptionError"; this.errors = errors; }); // ../../../../node_modules/rxjs/dist/esm/internal/util/arrRemove.js function arrRemove(arr, item) { if (arr) { const index = arr.indexOf(item); 0 <= index && arr.splice(index, 1); } } // ../../../../node_modules/rxjs/dist/esm/internal/Subscription.js var Subscription = class _Subscription { constructor(initialTeardown) { this.initialTeardown = initialTeardown; this.closed = false; this._parentage = null; this._finalizers = null; } unsubscribe() { let errors; if (!this.closed) { this.closed = true; const { _parentage } = this; if (_parentage) { this._parentage = null; if (Array.isArray(_parentage)) { for (const parent of _parentage) { parent.remove(this); } } else { _parentage.remove(this); } } const { initialTeardown: initialFinalizer } = this; if (isFunction(initialFinalizer)) { try { initialFinalizer(); } catch (e) { errors = e instanceof UnsubscriptionError ? e.errors : [e]; } } const { _finalizers } = this; if (_finalizers) { this._finalizers = null; for (const finalizer of _finalizers) { try { execFinalizer(finalizer); } catch (err) { errors = errors !== null && errors !== void 0 ? errors : []; if (err instanceof UnsubscriptionError) { errors = [...errors, ...err.errors]; } else { errors.push(err); } } } } if (errors) { throw new UnsubscriptionError(errors); } } } add(teardown) { var _a; if (teardown && teardown !== this) { if (this.closed) { execFinalizer(teardown); } else { if (teardown instanceof _Subscription) { if (teardown.closed || teardown._hasParent(this)) { return; } teardown._addParent(this); } (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown); } } } _hasParent(parent) { const { _parentage } = this; return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent); } _addParent(parent) { const { _parentage } = this; this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; } _removeParent(parent) { const { _parentage } = this; if (_parentage === parent) { this._parentage = null; } else if (Array.isArray(_parentage)) { arrRemove(_parentage, parent); } } remove(teardown) { const { _finalizers } = this; _finalizers && arrRemove(_finalizers, teardown); if (teardown instanceof _Subscription) { teardown._removeParent(this); } } }; Subscription.EMPTY = (() => { const empty = new Subscription(); empty.closed = true; return empty; })(); var EMPTY_SUBSCRIPTION = Subscription.EMPTY; function isSubscription(value) { return value instanceof Subscription || value && "closed" in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe); } function execFinalizer(finalizer) { if (isFunction(finalizer)) { finalizer(); } else { finalizer.unsubscribe(); } } // ../../../../node_modules/rxjs/dist/esm/internal/config.js var config = { onUnhandledError: null, onStoppedNotification: null, Promise: void 0, useDeprecatedSynchronousErrorHandling: false, useDeprecatedNextContext: false }; // ../../../../node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js var timeoutProvider = { setTimeout(handler, timeout, ...args) { const { delegate } = timeoutProvider; if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) { return delegate.setTimeout(handler, timeout, ...args); } return setTimeout(handler, timeout, ...args); }, clearTimeout(handle) { const { delegate } = timeoutProvider; return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); }, delegate: void 0 }; // ../../../../node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js function reportUnhandledError(err) { timeoutProvider.setTimeout(() => { const { onUnhandledError } = config; if (onUnhandledError) { onUnhandledError(err); } else { throw err; } }); } // ../../../../node_modules/rxjs/dist/esm/internal/util/noop.js function noop() { } // ../../../../node_modules/rxjs/dist/esm/internal/NotificationFactories.js var COMPLETE_NOTIFICATION = (() => createNotification("C", void 0, void 0))(); function errorNotification(error) { return createNotification("E", void 0, error); } function nextNotification(value) { return createNotification("N", value, void 0); } function createNotification(kind, value, error) { return { kind, value, error }; } // ../../../../node_modules/rxjs/dist/esm/internal/util/errorContext.js var context = null; function errorContext(cb) { if (config.useDeprecatedSynchronousErrorHandling) { const isRoot = !context; if (isRoot) { context = { errorThrown: false, error: null }; } cb(); if (isRoot) { const { errorThrown, error } = context; context = null; if (errorThrown) { throw error; } } } else { cb(); } } function captureError(err) { if (config.useDeprecatedSynchronousErrorHandling && context) { context.errorThrown = true; context.error = err; } } // ../../../../node_modules/rxjs/dist/esm/internal/Subscriber.js var Subscriber = class extends Subscription { constructor(destination) { super(); this.isStopped = false; if (destination) { this.destination = destination; if (isSubscription(destination)) { destination.add(this); } } else { this.destination = EMPTY_OBSERVER; } } static create(next, error, complete) { return new SafeSubscriber(next, error, complete); } next(value) { if (this.isStopped) { handleStoppedNotification(nextNotification(value), this); } else { this._next(value); } } error(err) { if (this.isStopped) { handleStoppedNotification(errorNotification(err), this); } else { this.isStopped = true; this._error(err); } } complete() { if (this.isStopped) { handleStoppedNotification(COMPLETE_NOTIFICATION, this); } else { this.isStopped = true; this._complete(); } } unsubscribe() { if (!this.closed) { this.isStopped = true; super.unsubscribe(); this.destination = null; } } _next(value) { this.destination.next(value); } _error(err) { try { this.destination.error(err); } finally { this.unsubscribe(); } } _complete() { try { this.destination.complete(); } finally { this.unsubscribe(); } } }; var _bind = Function.prototype.bind; function bind(fn, thisArg) { return _bind.call(fn, thisArg); } var ConsumerObserver = class { constructor(partialObserver) { this.partialObserver = partialObserver; } next(value) { const { partialObserver } = this; if (partialObserver.next) { try { partialObserver.next(value); } catch (error) { handleUnhandledError(error); } } } error(err) { const { partialObserver } = this; if (partialObserver.error) { try { partialObserver.error(err); } catch (error) { handleUnhandledError(error); } } else { handleUnhandledError(err); } } complete() { const { partialObserver } = this; if (partialObserver.complete) { try { partialObserver.complete(); } catch (error) { handleUnhandledError(error); } } } }; var SafeSubscriber = class extends Subscriber { constructor(observerOrNext, error, complete) { super(); let partialObserver; if (isFunction(observerOrNext) || !observerOrNext) { partialObserver = { next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : void 0, error: error !== null && error !== void 0 ? error : void 0, complete: complete !== null && complete !== void 0 ? complete : void 0 }; } else { let context2; if (this && config.useDeprecatedNextContext) { context2 = Object.create(observerOrNext); context2.unsubscribe = () => this.unsubscribe(); partialObserver = { next: observerOrNext.next && bind(observerOrNext.next, context2), error: observerOrNext.error && bind(observerOrNext.error, context2), complete: observerOrNext.complete && bind(observerOrNext.complete, context2) }; } else { partialObserver = observerOrNext; } } this.destination = new ConsumerObserver(partialObserver); } }; function handleUnhandledError(error) { if (config.useDeprecatedSynchronousErrorHandling) { captureError(error); } else { reportUnhandledError(error); } } function defaultErrorHandler(err) { throw err; } function handleStoppedNotification(notification, subscriber) { const { onStoppedNotification } = config; onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber)); } var EMPTY_OBSERVER = { closed: true, next: noop, error: defaultErrorHandler, complete: noop }; // ../../../../node_modules/rxjs/dist/esm/internal/symbol/observable.js var observable = (() => typeof Symbol === "function" && Symbol.observable || "@@observable")(); // ../../../../node_modules/rxjs/dist/esm/internal/util/identity.js function identity(x) { return x; } // ../../../../node_modules/rxjs/dist/esm/internal/util/pipe.js function pipe(...fns) { return pipeFromArray(fns); } function pipeFromArray(fns) { if (fns.length === 0) { return identity; } if (fns.length === 1) { return fns[0]; } return function piped(input2) { return fns.reduce((prev, fn) => fn(prev), input2); }; } // ../../../../node_modules/rxjs/dist/esm/internal/Observable.js var Observable = class _Observable { constructor(subscribe) { if (subscribe) { this._subscribe = subscribe; } } lift(operator) { const observable2 = new _Observable(); observable2.source = this; observable2.operator = operator; return observable2; } subscribe(observerOrNext, error, complete) { const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete); errorContext(() => { const { operator, source } = this; subscriber.add(operator ? operator.call(subscriber, source) : source ? this._subscribe(subscriber) : this._trySubscribe(subscriber)); }); return subscriber; } _trySubscribe(sink) { try { return this._subscribe(sink); } catch (err) { sink.error(err); } } forEach(next, promiseCtor) { promiseCtor = getPromiseCtor(promiseCtor); return new promiseCtor((resolve, reject) => { const subscriber = new SafeSubscriber({ next: (value) => { try { next(value); } catch (err) { reject(err); subscriber.unsubscribe(); } }, error: reject, complete: resolve }); this.subscribe(subscriber); }); } _subscribe(subscriber) { var _a; return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber); } [observable]() { return this; } pipe(...operations) { return pipeFromArray(operations)(this); } toPromise(promiseCtor) { promiseCtor = getPromiseCtor(promiseCtor); return new promiseCtor((resolve, reject) => { let value; this.subscribe((x) => value = x, (err) => reject(err), () => resolve(value)); }); } }; Observable.create = (subscribe) => { return new Observable(subscribe); }; function getPromiseCtor(promiseCtor) { var _a; return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise; } function isObserver(value) { return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete); } function isSubscriber(value) { return value && value instanceof Subscriber || isObserver(value) && isSubscription(value); } // ../../../../node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js var ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() { _super(this); this.name = "ObjectUnsubscribedError"; this.message = "object unsubscribed"; }); // ../../../../node_modules/rxjs/dist/esm/internal/Subject.js var Subject = class extends Observable { constructor() { super(); this.closed = false; this.currentObservers = null; this.observers = []; this.isStopped = false; this.hasError = false; this.thrownError = null; } lift(operator) { const subject = new AnonymousSubject(this, this); subject.operator = operator; return subject; } _throwIfClosed() { if (this.closed) { throw new ObjectUnsubscribedError(); } } next(value) { errorContext(() => { this._throwIfClosed(); if (!this.isStopped) { if (!this.currentObservers) { this.currentObservers = Array.from(this.observers); } for (const observer of this.currentObservers) { observer.next(value); } } }); } error(err) { errorContext(() => { this._throwIfClosed(); if (!this.isStopped) { this.hasError = this.isStopped = true; this.thrownError = err; const { observers } = this; while (observers.length) { observers.shift().error(err); } } }); } complete() { errorContext(() => { this._throwIfClosed(); if (!this.isStopped) { this.isStopped = true; const { observers } = this; while (observers.length) { observers.shift().complete(); } } }); } unsubscribe() { this.isStopped = this.closed = true; this.observers = this.currentObservers = null; } get observed() { var _a; return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; } _trySubscribe(subscriber) { this._throwIfClosed(); return super._trySubscribe(subscriber); } _subscribe(subscriber) { this._throwIfClosed(); this._checkFinalizedStatuses(subscriber); return this._innerSubscribe(subscriber); } _innerSubscribe(subscriber) { const { hasError, isStopped, observers } = this; if (hasError || isStopped) { return EMPTY_SUBSCRIPTION; } this.currentObservers = null; observers.push(subscriber); return new Subscription(() => { this.currentObservers = null; arrRemove(observers, subscriber); }); } _checkFinalizedStatuses(subscriber) { const { hasError, thrownError, isStopped } = this; if (hasError) { subscriber.error(thrownError); } else if (isStopped) { subscriber.complete(); } } asObservable() { const observable2 = new Observable(); observable2.source = this; return observable2; } }; Subject.create = (destination, source) => { return new AnonymousSubject(destination, source); }; var AnonymousSubject = class extends Subject { constructor(destination, source) { super(); this.destination = destination; this.source = source; } next(value) { var _a, _b; (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value); } error(err) { var _a, _b; (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err); } complete() { var _a, _b; (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a); } _subscribe(subscriber) { var _a, _b; return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION; } }; // ../../../../node_modules/rxjs/dist/esm/internal/BehaviorSubject.js var BehaviorSubject = class extends Subject { constructor(_value) { super(); this._value = _value; } get value() { return this.getValue(); } _subscribe(subscriber) { const subscription = super._subscribe(subscriber); !subscription.closed && subscriber.next(this._value); return subscription; } getValue() { const { hasError, thrownError, _value } = this; if (hasError) { throw thrownError; } this._throwIfClosed(); return _value; } next(value) { super.next(this._value = value); } }; // ../../../../node_modules/tslib/tslib.es6.mjs function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); }); } return new (P || (P = Promise))(function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __values(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function() { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { return this; }, i; function awaitReturn(f) { return function(v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function(v) { return new Promise(function(a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); } function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } } function __asyncValues(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { return this; }, i); function verb(n) { i[n] = o[n] && function(v) { return new Promise(function(resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v2) { resolve({ value: v2, done: d }); }, reject); } } // ../../../../node_modules/rxjs/dist/esm/internal/util/isArrayLike.js var isArrayLike = (x) => x && typeof x.length === "number" && typeof x !== "function"; // ../../../../node_modules/rxjs/dist/esm/internal/util/isPromise.js function isPromise(value) { return isFunction(value === null || value === void 0 ? void 0 : value.then); } // ../../../../node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js function isInteropObservable(input2) { return isFunction(input2[observable]); } // ../../../../node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js function isAsyncIterable(obj) { return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); } // ../../../../node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js function createInvalidObservableTypeError(input2) { 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.`); } // ../../../../node_modules/rxjs/dist/esm/internal/symbol/iterator.js function getSymbolIterator() { if (typeof Symbol !== "function" || !Symbol.iterator) { return "@@iterator"; } return Symbol.iterator; } var iterator = getSymbolIterator(); // ../../../../node_modules/rxjs/dist/esm/internal/util/isIterable.js function isIterable(input2) { return isFunction(input2 === null || input2 === void 0 ? void 0 : input2[iterator]); } // ../../../../node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js function readableStreamLikeToAsyncGenerator(readableStream) { return __asyncGenerator(this, arguments, function* readableStreamLikeToAsyncGenerator_1() { const reader = readableStream.getReader(); try { while (true) { const { value, done } = yield __await(reader.read()); if (done) { return yield __await(void 0); } yield yield __await(value); } } finally { reader.releaseLock(); } }); } function isReadableStreamLike(obj) { return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); } // ../../../../node_modules/rxjs/dist/esm/internal/observable/innerFrom.js function innerFrom(input2) { if (input2 instanceof Observable) { return input2; } if (input2 != null) { if (isInteropObservable(input2)) { return fromInteropObservable(input2); } if (isArrayLike(input2)) { return fromArrayLike(input2); } if (isPromise(input2)) { return fromPromise(input2); } if (isAsyncIterable(input2)) { return fromAsyncIterable(input2); } if (isIterable(input2)) { return fromIterable(input2); } if (isReadableStreamLike(input2)) { return fromReadableStreamLike(input2); } } throw createInvalidObservableTypeError(input2); } function fromInteropObservable(obj) { return new Observable((subscriber) => { const obs = obj[observable](); if (isFunction(obs.subscribe)) { return obs.subscribe(subscriber); } throw new TypeError("Provided object does not correctly implement Symbol.observable"); }); } function fromArrayLike(array) { return new Observable((subscriber) => { for (let i = 0; i < array.length && !subscriber.closed; i++) { subscriber.next(array[i]); } subscriber.complete(); }); } function fromPromise(promise) { return new Observable((subscriber) => { promise.then((value) => { if (!subscriber.closed) { subscriber.next(value); subscriber.complete(); } }, (err) => subscriber.error(err)).then(null, reportUnhandledError); }); } function fromIterable(iterable) { return new Observable((subscriber) => { for (const value of iterable) { subscriber.next(value); if (subscriber.closed) { return; } } subscriber.complete(); }); } function fromAsyncIterable(asyncIterable) { return new Observable((subscriber) => { process(asyncIterable, subscriber).catch((err) => subscriber.error(err)); }); } function fromReadableStreamLike(readableStream) { return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream)); } function process(asyncIterable, subscriber) { var asyncIterable_1, asyncIterable_1_1; var e_1, _a; return __awaiter(this, void 0, void 0, function* () { try { for (asyncIterable_1 = __asyncValues(asyncIterable); asyncIterable_1_1 = yield asyncIterable_1.next(), !asyncIterable_1_1.done; ) { const value = asyncIterable_1_1.value; subscriber.next(value); if (subscriber.closed) { return; } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return)) yield _a.call(asyncIterable_1); } finally { if (e_1) throw e_1.error; } } subscriber.complete(); }); } // ../../../../node_modules/rxjs/dist/esm/internal/util/executeSchedule.js function executeSchedule(parentSubscription, scheduler, work, delay2 = 0, repeat2 = false) { const scheduleSubscription = scheduler.schedule(function() { work(); if (repeat2) { parentSubscription.add(this.schedule(null, delay2)); } else { this.unsubscribe(); } }, delay2); parentSubscription.add(scheduleSubscription); if (!repeat2) { return scheduleSubscription; } } // ../../../../node_modules/rxjs/dist/esm/internal/util/lift.js function hasLift(source) { return isFunction(source === null || source === void 0 ? void 0 : source.lift); } function operate(init) { return (source) => { if (hasLift(source)) { return source.lift(function(liftedSource) { try { return init(liftedSource, this); } catch (err) { this.error(err); } }); } throw new TypeError("Unable to lift unknown Observable type"); }; } // ../../../../node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); } var OperatorSubscriber = class extends Subscriber { constructor(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) { super(destination); this.onFinalize = onFinalize; this.shouldUnsubscribe = shouldUnsubscribe; this._next = onNext ? function(value) { try { onNext(value); } catch (err) { destination.error(err); } } : super._next; this._error = onError ? function(err) { try { onError(err); } catch (err2) { destination.error(err2); } finally { this.unsubscribe(); } } : super._error; this._complete = onComplete ? function() { try { onComplete(); } catch (err) { destination.error(err); } finally { this.unsubscribe(); } } : super._complete; } unsubscribe() { var _a; if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { const { closed } = this; super.unsubscribe(); !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); } } }; // ../../../../node_modules/rxjs/dist/esm/internal/operators/observeOn.js function observeOn(scheduler, delay2 = 0) { return operate((source, subscriber) => { source.subscribe(createOperatorSubscriber(subscriber, (value) => executeSchedule(subscriber, scheduler, () => subscriber.next(value), delay2), () => executeSchedule(subscriber, scheduler, () => subscriber.complete(), delay2), (err) => executeSchedule(subscriber, scheduler, () => subscriber.error(err), delay2))); }); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js function subscribeOn(scheduler, delay2 = 0) { return operate((source, subscriber) => { subscriber.add(scheduler.schedule(() => source.subscribe(subscriber), delay2)); }); } // ../../../../node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js function scheduleObservable(input2, scheduler) { return innerFrom(input2).pipe(subscribeOn(scheduler), observeOn(scheduler)); } // ../../../../node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js function schedulePromise(input2, scheduler) { return innerFrom(input2).pipe(subscribeOn(scheduler), observeOn(scheduler)); } // ../../../../node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js function scheduleArray(input2, scheduler) { return new Observable((subscriber) => { let i = 0; return scheduler.schedule(function() { if (i === input2.length) { subscriber.complete(); } else { subscriber.next(input2[i++]); if (!subscriber.closed) { this.schedule(); } } }); }); } // ../../../../node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js function scheduleIterable(input2, scheduler) { return new Observable((subscriber) => { let iterator2; executeSchedule(subscriber, scheduler, () => { iterator2 = input2[iterator](); executeSchedule(subscriber, scheduler, () => { let value; let done; try { ({ value, done } = iterator2.next()); } catch (err) { subscriber.error(err); return; } if (done) { subscriber.complete(); } else { subscriber.next(value); } }, 0, true); }); return () => isFunction(iterator2 === null || iterator2 === void 0 ? void 0 : iterator2.return) && iterator2.return(); }); } // ../../../../node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js function scheduleAsyncIterable(input2, scheduler) { if (!input2) { throw new Error("Iterable cannot be null"); } return new Observable((subscriber) => { executeSchedule(subscriber, scheduler, () => { const iterator2 = input2[Symbol.asyncIterator](); executeSchedule(subscriber, scheduler, () => { iterator2.next().then((result) => { if (result.done) { subscriber.complete(); } else { subscriber.next(result.value); } }); }, 0, true); }); }); } // ../../../../node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js function scheduleReadableStreamLike(input2, scheduler) { return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input2), scheduler); } // ../../../../node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js function scheduled(input2, scheduler) { if (input2 != null) { if (isInteropObservable(input2)) { return scheduleObservable(input2, scheduler); } if (isArrayLike(input2)) { return scheduleArray(input2, scheduler); } if (isPromise(input2)) { return schedulePromise(input2, scheduler); } if (isAsyncIterable(input2)) { return scheduleAsyncIterable(input2, scheduler); } if (isIterable(input2)) { return scheduleIterable(input2, scheduler); } if (isReadableStreamLike(input2)) { return scheduleReadableStreamLike(input2, scheduler); } } throw createInvalidObservableTypeError(input2); } // ../../../../node_modules/rxjs/dist/esm/internal/observable/from.js function from(input2, scheduler) { return scheduler ? scheduled(input2, scheduler) : innerFrom(input2); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/map.js function map(project, thisArg) { return operate((source, subscriber) => { let index = 0; source.subscribe(createOperatorSubscriber(subscriber, (value) => { subscriber.next(project.call(thisArg, value, index++)); })); }); } // ../../../../node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js var { isArray } = Array; var { getPrototypeOf, prototype: objectProto, keys: getKeys } = Object; function argsArgArrayOrObject(args) { if (args.length === 1) { const first2 = args[0]; if (isArray(first2)) { return { args: first2, keys: null }; } if (isPOJO(first2)) { const keys = getKeys(first2); return { args: keys.map((key) => first2[key]), keys }; } } return { args, keys: null }; } function isPOJO(obj) { return obj && typeof obj === "object" && getPrototypeOf(obj) === objectProto; } // ../../../../node_modules/rxjs/dist/esm/internal/util/isScheduler.js function isScheduler(value) { return value && isFunction(value.schedule); } // ../../../../node_modules/rxjs/dist/esm/internal/util/args.js function last(arr) { return arr[arr.length - 1]; } function popResultSelector(args) { return isFunction(last(args)) ? args.pop() : void 0; } function popScheduler(args) { return isScheduler(last(args)) ? args.pop() : void 0; } function popNumber(args, defaultValue) { return typeof last(args) === "number" ? args.pop() : defaultValue; } // ../../../../node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js var { isArray: isArray2 } = Array; function callOrApply(fn, args) { return isArray2(args) ? fn(...args) : fn(args); } function mapOneOrManyArgs(fn) { return map((args) => callOrApply(fn, args)); } // ../../../../node_modules/rxjs/dist/esm/internal/util/createObject.js function createObject(keys, values) { return keys.reduce((result, key, i) => (result[key] = values[i], result), {}); } // ../../../../node_modules/rxjs/dist/esm/internal/observable/forkJoin.js function forkJoin(...args) { const resultSelector = popResultSelector(args); const { args: sources, keys } = argsArgArrayOrObject(args); const result = new Observable((subscriber) => { const { length } = sources; if (!length) { subscriber.complete(); return; } const values = new Array(length); let remainingCompletions = length; let remainingEmissions = length; for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) { let hasValue = false; innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, (value) => { if (!hasValue) { hasValue = true; remainingEmissions--; } values[sourceIndex] = value; }, () => remainingCompletions--, void 0, () => { if (!remainingCompletions || !hasValue) { if (!remainingEmissions) { subscriber.next(keys ? createObject(keys, values) : values); } subscriber.complete(); } })); } }); return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; } // ../../../../node_modules/rxjs/dist/esm/internal/operators/filter.js function filter(predicate, thisArg) { return operate((source, subscriber) => { let index = 0; source.subscribe(createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value))); }); } // ../../../../node_modules/rxjs/dist/esm/internal/observable/empty.js var EMPTY = new Observable((subscriber) => subscriber.complete()); // ../../../../node_modules/rxjs/dist/esm/internal/operators/take.js function take(count) { return count <= 0 ? () => EMPTY : operate((source, subscriber) => { let seen = 0; source.subscribe(createOperatorSubscriber(subscriber, (value) => { if (++seen <= count) { subscriber.next(value); if (count <= seen) { subscriber.complete(); } } })); }); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/switchMap.js function switchMap(project, resultSelector) { return operate((source, subscriber) => { let innerSubscriber = null; let index = 0; let isComplete = false; const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete(); source.subscribe(createOperatorSubscriber(subscriber, (value) => { innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); let innerIndex = 0; const outerIndex = index++; innerFrom(project(value, outerIndex)).subscribe(innerSubscriber = createOperatorSubscriber(subscriber, (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => { innerSubscriber = null; checkComplete(); })); }, () => { isComplete = true; checkComplete(); })); }); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/tap.js function tap(observerOrNext, error, complete) { const tapObserver = isFunction(observerOrNext) || error || complete ? { next: observerOrNext, error, complete } : observerOrNext; return tapObserver ? operate((source, subscriber) => { var _a; (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); let isUnsub = true; source.subscribe(createOperatorSubscriber(subscriber, (value) => { var _a2; (_a2 = tapObserver.next) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver, value); subscriber.next(value); }, () => { var _a2; isUnsub = false; (_a2 = tapObserver.complete) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver); subscriber.complete(); }, (err) => { var _a2; isUnsub = false; (_a2 = tapObserver.error) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver, err); subscriber.error(err); }, () => { var _a2, _b; if (isUnsub) { (_a2 = tapObserver.unsubscribe) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver); } (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); })); }) : identity; } // ../../../../node_modules/rxjs/dist/esm/internal/operators/refCount.js function refCount() { return operate((source, subscriber) => { let connection = null; source._refCount++; const refCounter = createOperatorSubscriber(subscriber, void 0, void 0, void 0, () => { if (!source || source._refCount <= 0 || 0 < --source._refCount) { connection = null; return; } const sharedConnection = source._connection; const conn = connection; connection = null; if (sharedConnection && (!conn || sharedConnection === conn)) { sharedConnection.unsubscribe(); } subscriber.unsubscribe(); }); source.subscribe(refCounter); if (!refCounter.closed) { connection = source.connect(); } }); } // ../../../../node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js var ConnectableObservable = class extends Observable { constructor(source, subjectFactory) { super(); this.source = source; this.subjectFactory = subjectFactory; this._subject = null; this._refCount = 0; this._connection = null; if (hasLift(source)) { this.lift = source.lift; } } _subscribe(subscriber) { return this.getSubject().subscribe(subscriber); } getSubject() { const subject = this._subject; if (!subject || subject.isStopped) { this._subject = this.subjectFactory(); } return this._subject; } _teardown() { this._refCount = 0; const { _connection } = this; this._subject = this._connection = null; _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); } connect() { let connection = this._connection; if (!connection) { connection = this._connection = new Subscription(); const subject = this.getSubject(); connection.add(this.source.subscribe(createOperatorSubscriber(subject, void 0, () => { this._teardown(); subject.complete(); }, (err) => { this._teardown(); subject.error(err); }, () => this._teardown()))); if (connection.closed) { this._connection = null; connection = Subscription.EMPTY; } } return connection; } refCount() { return refCount()(this); } }; // ../../../../node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js var animationFrameProvider = { schedule(callback) { let request = requestAnimationFrame; let cancel = cancelAnimationFrame; const { delegate } = animationFrameProvider; if (delegate) { request = delegate.requestAnimationFrame; cancel = delegate.cancelAnimationFrame; } const handle = request((timestamp) => { cancel = void 0; callback(timestamp); }); return new Subscription(() => cancel === null || cancel === void 0 ? void 0 : cancel(handle)); }, requestAnimationFrame(...args) { const { delegate } = animationFrameProvider; return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame)(...args); }, cancelAnimationFrame(...args) { const { delegate } = animationFrameProvider; return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame)(...args); }, delegate: void 0 }; // ../../../../node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js var dateTimestampProvider = { now() { return (dateTimestampProvider.delegate || Date).now(); }, delegate: void 0 }; // ../../../../node_modules/rxjs/dist/esm/internal/ReplaySubject.js var ReplaySubject = class extends Subject { constructor(_bufferSize = Infinity, _windowTime = Infinity, _timestampProvider = dateTimestampProvider) { super(); this._bufferSize = _bufferSize; this._windowTime = _windowTime; this._timestampProvider = _timestampProvider; this._buffer = []; this._infiniteTimeWindow = true; this._infiniteTimeWindow = _windowTime === Infinity; this._bufferSize = Math.max(1, _bufferSize); this._windowTime = Math.max(1, _windowTime); } next(value) { const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this; if (!isStopped) { _buffer.push(value); !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); } this._trimBuffer(); super.next(value); } _subscribe(subscriber) { this._throwIfClosed(); this._trimBuffer(); const subscription = this._innerSubscribe(subscriber); const { _infiniteTimeWindow, _buffer } = this; const copy = _buffer.slice(); for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { subscriber.next(copy[i]); } this._checkFinalizedStatuses(subscriber); return subscription; } _trimBuffer() { const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this; const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); if (!_infiniteTimeWindow) { const now = _timestampProvider.now(); let last3 = 0; for (let i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) { last3 = i; } last3 && _buffer.splice(0, last3 + 1); } } }; // ../../../../node_modules/rxjs/dist/esm/internal/scheduler/Action.js var Action = class extends Subscription { constructor(scheduler, work) { super(); } schedule(state, delay2 = 0) { return this; } }; // ../../../../node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js var intervalProvider = { setInterval(handler, timeout, ...args) { const { delegate } = intervalProvider; if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) { return delegate.setInterval(handler, timeout, ...args); } return setInterval(handler, timeout, ...args); }, clearInterval(handle) { const { delegate } = intervalProvider; return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); }, delegate: void 0 }; // ../../../../node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js var AsyncAction = class extends Action { constructor(scheduler, work) { super(scheduler, work); this.scheduler = scheduler; this.work = work; this.pending = false; } schedule(state, delay2 = 0) { var _a; if (this.closed) { return this; } this.state = state; const id = this.id; const scheduler = this.scheduler; if (id != null) { this.id = this.recycleAsyncId(scheduler, id, delay2); } this.pending = true; this.delay = delay2; this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay2); return this; } requestAsyncId(scheduler, _id, delay2 = 0) { return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay2); } recycleAsyncId(_scheduler, id, delay2 = 0) { if (delay2 != null && this.delay === delay2 && this.pending === false) { return id; } if (id != null) { intervalProvider.clearInterval(id); } return void 0; } execute(state, delay2) { if (this.closed) { return new Error("executing a cancelled action"); } this.pending = false; const error = this._execute(state, delay2); if (error) { return error; } else if (this.pending === false && this.id != null) { this.id = this.recycleAsyncId(this.scheduler, this.id, null); } } _execute(state, _delay) { let errored = false; let errorValue; try { this.work(state); } catch (e) { errored = true; errorValue = e ? e : new Error("Scheduled action threw falsy error"); } if (errored) { this.unsubscribe(); return errorValue; } } unsubscribe() { if (!this.closed) { const { id, scheduler } = this; const { actions } = scheduler; this.work = this.state = this.scheduler = null; this.pending = false; arrRemove(actions, this); if (id != null) { this.id = this.recycleAsyncId(scheduler, id, null); } this.delay = null; super.unsubscribe(); } } }; // ../../../../node_modules/rxjs/dist/esm/internal/util/Immediate.js var nextHandle = 1; var resolved; var activeHandles = {}; function findAndClearHandle(handle) { if (handle in activeHandles) { delete activeHandles[handle]; return true; } return false; } var Immediate = { setImmediate(cb) { const handle = nextHandle++; activeHandles[handle] = true; if (!resolved) { resolved = Promise.resolve(); } resolved.then(() => findAndClearHandle(handle) && cb()); return handle; }, clearImmediate(handle) { findAndClearHandle(handle); } }; // ../../../../node_modules/rxjs/dist/esm/internal/scheduler/immediateProvider.js var { setImmediate, clearImmediate } = Immediate; var immediateProvider = { setImmediate(...args) { const { delegate } = immediateProvider; return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate)(...args); }, clearImmediate(handle) { const { delegate } = immediateProvider; return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle); }, delegate: void 0 }; // ../../../../node_modules/rxjs/dist/esm/internal/scheduler/AsapAction.js var AsapAction = class extends AsyncAction { constructor(scheduler, work) { super(scheduler, work); this.scheduler = scheduler; this.work = work; } requestAsyncId(scheduler, id, delay2 = 0) { if (delay2 !== null && delay2 > 0) { return super.requestAsyncId(scheduler, id, delay2); } scheduler.actions.push(this); return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, void 0))); } recycleAsyncId(scheduler, id, delay2 = 0) { var _a; if (delay2 != null ? delay2 > 0 : this.delay > 0) { return super.recycleAsyncId(scheduler, id, delay2); } const { actions } = scheduler; if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { immediateProvider.clearImmediate(id); if (scheduler._scheduled === id) { scheduler._scheduled = void 0; } } return void 0; } }; // ../../../../node_modules/rxjs/dist/esm/internal/Scheduler.js var Scheduler = class _Scheduler { constructor(schedulerActionCtor, now = _Scheduler.now) { this.schedulerActionCtor = schedulerActionCtor; this.now = now; } schedule(work, delay2 = 0, state) { return new this.schedulerActionCtor(this, work).schedule(state, delay2); } }; Scheduler.now = dateTimestampProvider.now; // ../../../../node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js var AsyncScheduler = class extends Scheduler { constructor(SchedulerAction, now = Scheduler.now) { super(SchedulerAction, now); this.actions = []; this._active = false; } flush(action) { const { actions } = this; if (this._active) { actions.push(action); return; } let error; this._active = true; do { if (error = action.execute(action.state, action.delay)) { break; } } while (action = actions.shift()); this._active = false; if (error) { while (action = actions.shift()) { action.unsubscribe(); } throw error; } } }; // ../../../../node_modules/rxjs/dist/esm/internal/scheduler/AsapScheduler.js var AsapScheduler = class extends AsyncScheduler { flush(action) { this._active = true; const flushId = this._scheduled; this._scheduled = void 0; const { actions } = this; let error; action = action || actions.shift(); do { if (error = action.execute(action.state, action.delay)) { break; } } while ((action = actions[0]) && action.id === flushId && actions.shift()); this._active = false; if (error) { while ((action = actions[0]) && action.id === flushId && actions.shift()) { action.unsubscribe(); } throw error; } } }; // ../../../../node_modules/rxjs/dist/esm/internal/scheduler/asap.js var asapScheduler = new AsapScheduler(AsapAction); // ../../../../node_modules/rxjs/dist/esm/internal/scheduler/async.js var asyncScheduler = new AsyncScheduler(AsyncAction); var async = asyncScheduler; // ../../../../node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js var AnimationFrameAction = class extends AsyncAction { constructor(scheduler, work) { super(scheduler, work); this.scheduler = scheduler; this.work = work; } requestAsyncId(scheduler, id, delay2 = 0) { if (delay2 !== null && delay2 > 0) { return super.requestAsyncId(scheduler, id, delay2); } scheduler.actions.push(this); return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(() => scheduler.flush(void 0))); } recycleAsyncId(scheduler, id, delay2 = 0) { var _a; if (delay2 != null ? delay2 > 0 : this.delay > 0) { return super.recycleAsyncId(scheduler, id, delay2); } const { actions } = scheduler; if (id != null && id === scheduler._scheduled && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { animationFrameProvider.cancelAnimationFrame(id); scheduler._scheduled = void 0; } return void 0; } }; // ../../../../node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js var AnimationFrameScheduler = class extends AsyncScheduler { flush(action) { this._active = true; let flushId; if (action) { flushId = action.id; } else { flushId = this._scheduled; this._scheduled = void 0; } const { actions } = this; let error; action = action || actions.shift(); do { if (error = action.execute(action.state, action.delay)) { break; } } while ((action = actions[0]) && action.id === flushId && actions.shift()); this._active = false; if (error) { while ((action = actions[0]) && action.id === flushId && actions.shift()) { action.unsubscribe(); } throw error; } } }; // ../../../../node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js var animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction); // ../../../../node_modules/rxjs/dist/esm/internal/observable/of.js function of(...args) { const scheduler = popScheduler(args); return from(args, scheduler); } // ../../../../node_modules/rxjs/dist/esm/internal/observable/throwError.js function throwError(errorOrErrorFactory, scheduler) { const errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory; const init = (subscriber) => subscriber.error(errorFactory()); return new Observable(scheduler ? (subscriber) => scheduler.schedule(init, 0, subscriber) : init); } // ../../../../node_modules/rxjs/dist/esm/internal/util/isObservable.js function isObservable(obj) { return !!obj && (obj instanceof Observable || isFunction(obj.lift) && isFunction(obj.subscribe)); } // ../../../../node_modules/rxjs/dist/esm/internal/util/EmptyError.js var EmptyError = createErrorClass((_super) => function EmptyErrorImpl() { _super(this); this.name = "EmptyError"; this.message = "no elements in sequence"; }); // ../../../../node_modules/rxjs/dist/esm/internal/firstValueFrom.js function firstValueFrom(source, config2) { const hasConfig = typeof config2 === "object"; return new Promise((resolve, reject) => { const subscriber = new SafeSubscriber({ next: (value) => { resolve(value); subscriber.unsubscribe(); }, error: reject, complete: () => { if (hasConfig) { resolve(config2.defaultValue); } else { reject(new EmptyError()); } } }); source.subscribe(subscriber); }); } // ../../../../node_modules/rxjs/dist/esm/internal/util/isDate.js function isValidDate(value) { return value instanceof Date && !isNaN(value); } // ../../../../node_modules/rxjs/dist/esm/internal/observable/combineLatest.js function combineLatest(...args) { const scheduler = popScheduler(args); const resultSelector = popResultSelector(args); const { args: observables, keys } = argsArgArrayOrObject(args); if (observables.length === 0) { return from([], scheduler); } const result = new Observable(combineLatestInit(observables, scheduler, keys ? (values) => createObject(keys, values) : identity)); return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; } function combineLatestInit(observables, scheduler, valueTransform = identity) { return (subscriber) => { maybeSchedule(scheduler, () => { const { length } = observables; const values = new Array(length); let active = length; let remainingFirstValues = length; for (let i = 0; i < length; i++) { maybeSchedule(scheduler, () => { const source = from(observables[i], scheduler); let hasFirstValue = false; source.subscribe(createOperatorSubscriber(subscriber, (value) => { values[i] = value; if (!hasFirstValue) { hasFirstValue = true; remainingFirstValues--; } if (!remainingFirstValues) { subscriber.next(valueTransform(values.slice())); } }, () => { if (!--active) { subscriber.complete(); } })); }, subscriber); } }, subscriber); }; } function maybeSchedule(scheduler, execute, subscription) { if (scheduler) { executeSchedule(subscription, scheduler, execute); } else { execute(); } } // ../../../../node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) { const buffer = []; let active = 0; let index = 0; let isComplete = false; const checkComplete = () => { if (isComplete && !buffer.length && !active) { subscriber.complete(); } }; const outerNext = (value) => active < concurrent ? doInnerSub(value) : buffer.push(value); const doInnerSub = (value) => { expand && subscriber.next(value); active++; let innerComplete = false; innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, (innerValue) => { onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); if (expand) { outerNext(innerValue); } else { subscriber.next(innerValue); } }, () => { innerComplete = true; }, void 0, () => { if (innerComplete) { try { active--; while (buffer.length && active < concurrent) { const bufferedValue = buffer.shift(); if (innerSubScheduler) { executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue)); } else { doInnerSub(bufferedValue); } } checkComplete(); } catch (err) { subscriber.error(err); } } })); }; source.subscribe(createOperatorSubscriber(subscriber, outerNext, () => { isComplete = true; checkComplete(); })); return () => { additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer(); }; } // ../../../../node_modules/rxjs/dist/esm/internal/operators/mergeMap.js function mergeMap(project, resultSelector, concurrent = Infinity) { if (isFunction(resultSelector)) { return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent); } else if (typeof resultSelector === "number") { concurrent = resultSelector; } return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent)); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/mergeAll.js function mergeAll(concurrent = Infinity) { return mergeMap(identity, concurrent); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/concatAll.js function concatAll() { return mergeAll(1); } // ../../../../node_modules/rxjs/dist/esm/internal/observable/concat.js function concat(...args) { return concatAll()(from(args, popScheduler(args))); } // ../../../../node_modules/rxjs/dist/esm/internal/observable/defer.js function defer(observableFactory) { return new Observable((subscriber) => { innerFrom(observableFactory()).subscribe(subscriber); }); } // ../../../../node_modules/rxjs/dist/esm/internal/observable/fromEvent.js var nodeEventEmitterMethods = ["addListener", "removeListener"]; var eventTargetMethods = ["addEventListener", "removeEventListener"]; var jqueryMethods = ["on", "off"]; function fromEvent(target, eventName, options, resultSelector) { if (isFunction(options)) { resultSelector = options; options = void 0; } if (resultSelector) { return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector)); } const [add, remove2] = isEventTarget(target) ? eventTargetMethods.map((methodName) => (handler) => target[methodName](eventName, handler, options)) : isNodeStyleEventEmitter(target) ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) : isJQueryStyleEventEmitter(target) ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) : []; if (!add) { if (isArrayLike(target)) { return mergeMap((subTarget) => fromEvent(subTarget, eventName, options))(innerFrom(target)); } } if (!add) { throw new TypeError("Invalid event target"); } return new Observable((subscriber) => { const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]); add(handler); return () => remove2(handler); }); } function toCommonHandlerRegistry(target, eventName) { return (methodName) => (handler) => target[methodName](eventName, handler); } function isNodeStyleEventEmitter(target) { return isFunction(target.addListener) && isFunction(target.removeListener); } function isJQueryStyleEventEmitter(target) { return isFunction(target.on) && isFunction(target.off); } function isEventTarget(target) { return isFunction(target.addEventListener) && isFunction(target.removeEventListener); } // ../../../../node_modules/rxjs/dist/esm/internal/observable/timer.js function timer(dueTime = 0, intervalOrScheduler, scheduler = async) { let intervalDuration = -1; if (intervalOrScheduler != null) { if (isScheduler(intervalOrScheduler)) { scheduler = intervalOrScheduler; } else { intervalDuration = intervalOrScheduler; } } return new Observable((subscriber) => { let due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime; if (due < 0) { due = 0; } let n = 0; return scheduler.schedule(function() { if (!subscriber.closed) { subscriber.next(n++); if (0 <= intervalDuration) { this.schedule(void 0, intervalDuration); } else { subscriber.complete(); } } }, due); }); } // ../../../../node_modules/rxjs/dist/esm/internal/observable/merge.js function merge(...args) { const scheduler = popScheduler(args); const concurrent = popNumber(args, Infinity); const sources = args; return !sources.length ? EMPTY : sources.length === 1 ? innerFrom(sources[0]) : mergeAll(concurrent)(from(sources, scheduler)); } // ../../../../node_modules/rxjs/dist/esm/internal/util/not.js function not(pred, thisArg) { return (value, index) => !pred.call(thisArg, value, index); } // ../../../../node_modules/rxjs/dist/esm/internal/observable/partition.js function partition(source, predicate, thisArg) { return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))]; } // ../../../../node_modules/rxjs/dist/esm/internal/operators/audit.js function audit(durationSelector) { return operate((source, subscriber) => { let hasValue = false; let lastValue = null; let durationSubscriber = null; let isComplete = false; const endDuration = () => { durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); durationSubscriber = null; if (hasValue) { hasValue = false; const value = lastValue; lastValue = null; subscriber.next(value); } isComplete && subscriber.complete(); }; const cleanupDuration = () => { durationSubscriber = null; isComplete && subscriber.complete(); }; source.subscribe(createOperatorSubscriber(subscriber, (value) => { hasValue = true; lastValue = value; if (!durationSubscriber) { innerFrom(durationSelector(value)).subscribe(durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)); } }, () => { isComplete = true; (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); })); }); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/auditTime.js function auditTime(duration, scheduler = asyncScheduler) { return audit(() => timer(duration, scheduler)); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/catchError.js function catchError(selector) { return operate((source, subscriber) => { let innerSub = null; let syncUnsub = false; let handledResult; innerSub = source.subscribe(createOperatorSubscriber(subscriber, void 0, void 0, (err) => { handledResult = innerFrom(selector(err, catchError(selector)(source))); if (innerSub) { innerSub.unsubscribe(); innerSub = null; handledResult.subscribe(subscriber); } else { syncUnsub = true; } })); if (syncUnsub) { innerSub.unsubscribe(); innerSub = null; handledResult.subscribe(subscriber); } }); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/scanInternals.js function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { return (source, subscriber) => { let hasState = hasSeed; let state = seed; let index = 0; source.subscribe(createOperatorSubscriber(subscriber, (value) => { const i = index++; state = hasState ? accumulator(state, value, i) : (hasState = true, value); emitOnNext && subscriber.next(state); }, emitBeforeComplete && (() => { hasState && subscriber.next(state); subscriber.complete(); }))); }; } // ../../../../node_modules/rxjs/dist/esm/internal/operators/concatMap.js function concatMap(project, resultSelector) { return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/debounceTime.js function debounceTime(dueTime, scheduler = asyncScheduler) { return operate((source, subscriber) => { let activeTask = null; let lastValue = null; let lastTime = null; const emit = () => { if (activeTask) { activeTask.unsubscribe(); activeTask = null; const value = lastValue; lastValue = null; subscriber.next(value); } }; function emitWhenIdle() { const targetTime = lastTime + dueTime; const now = scheduler.now(); if (now < targetTime) { activeTask = this.schedule(void 0, targetTime - now); subscriber.add(activeTask); return; } emit(); } source.subscribe(createOperatorSubscriber(subscriber, (value) => { lastValue = value; lastTime = scheduler.now(); if (!activeTask) { activeTask = scheduler.schedule(emitWhenIdle, dueTime); subscriber.add(activeTask); } }, () => { emit(); subscriber.complete(); }, void 0, () => { lastValue = activeTask = null; })); }); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js function defaultIfEmpty(defaultValue) { return operate((source, subscriber) => { let hasValue = false; source.subscribe(createOperatorSubscriber(subscriber, (value) => { hasValue = true; subscriber.next(value); }, () => { if (!hasValue) { subscriber.next(defaultValue); } subscriber.complete(); })); }); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js function ignoreElements() { return operate((source, subscriber) => { source.subscribe(createOperatorSubscriber(subscriber, noop)); }); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/mapTo.js function mapTo(value) { return map(() => value); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/delayWhen.js function delayWhen(delayDurationSelector, subscriptionDelay) { if (subscriptionDelay) { return (source) => concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); } return mergeMap((value, index) => innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value))); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/delay.js function delay(due, scheduler = asyncScheduler) { const duration = timer(due, scheduler); return delayWhen(() => duration); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js function distinctUntilChanged(comparator, keySelector = identity) { comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; return operate((source, subscriber) => { let previousKey; let first2 = true; source.subscribe(createOperatorSubscriber(subscriber, (value) => { const currentKey = keySelector(value); if (first2 || !comparator(previousKey, currentKey)) { first2 = false; previousKey = currentKey; subscriber.next(value); } })); }); } function defaultCompare(a, b) { return a === b; } // ../../../../node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js function throwIfEmpty(errorFactory = defaultErrorFactory) { return operate((source, subscriber) => { let hasValue = false; source.subscribe(createOperatorSubscriber(subscriber, (value) => { hasValue = true; subscriber.next(value); }, () => hasValue ? subscriber.complete() : subscriber.error(errorFactory()))); }); } function defaultErrorFactory() { return new EmptyError(); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/finalize.js function finalize(callback) { return operate((source, subscriber) => { try { source.subscribe(subscriber); } finally { subscriber.add(callback); } }); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/first.js function first(predicate, defaultValue) { const hasDefaultValue = arguments.length >= 2; return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError())); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/takeLast.js function takeLast(count) { return count <= 0 ? () => EMPTY : operate((source, subscriber) => { let buffer = []; source.subscribe(createOperatorSubscriber(subscriber, (value) => { buffer.push(value); count < buffer.length && buffer.shift(); }, () => { for (const value of buffer) { subscriber.next(value); } subscriber.complete(); }, void 0, () => { buffer = null; })); }); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/last.js function last2(predicate, defaultValue) { const hasDefaultValue = arguments.length >= 2; return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError())); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/pairwise.js function pairwise() { return operate((source, subscriber) => { let prev; let hasPrev = false; source.subscribe(createOperatorSubscriber(subscriber, (value) => { const p = prev; prev = value; hasPrev && subscriber.next([p, value]); hasPrev = true; })); }); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/repeat.js function repeat(countOrConfig) { let count = Infinity; let delay2; if (countOrConfig != null) { if (typeof countOrConfig === "object") { ({ count = Infinity, delay: delay2 } = countOrConfig); } else { count = countOrConfig; } } return count <= 0 ? () => EMPTY : operate((source, subscriber) => { let soFar = 0; let sourceSub; const resubscribe = () => { sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe(); sourceSub = null; if (delay2 != null) { const notifier = typeof delay2 === "number" ? timer(delay2) : innerFrom(delay2(soFar)); const notifierSubscriber = createOperatorSubscriber(subscriber, () => { notifierSubscriber.unsubscribe(); subscribeToSource(); }); notifier.subscribe(notifierSubscriber); } else { subscribeToSource(); } }; const subscribeToSource = () => { let syncUnsub = false; sourceSub = source.subscribe(createOperatorSubscriber(subscriber, void 0, () => { if (++soFar < count) { if (sourceSub) { resubscribe(); } else { syncUnsub = true; } } else { subscriber.complete(); } })); if (syncUnsub) { resubscribe(); } }; subscribeToSource(); }); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/scan.js function scan(accumulator, seed) { return operate(scanInternals(accumulator, seed, arguments.length >= 2, true)); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/share.js function share(options = {}) { const { connector = () => new Subject(), resetOnError = true, resetOnComplete = true, resetOnRefCountZero = true } = options; return (wrapperSource) => { let connection; let resetConnection; let subject; let refCount2 = 0; let hasCompleted = false; let hasErrored = false; const cancelReset = () => { resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); resetConnection = void 0; }; const reset = () => { cancelReset(); connection = subject = void 0; hasCompleted = hasErrored = false; }; const resetAndUnsubscribe = () => { const conn = connection; reset(); conn === null || conn === void 0 ? void 0 : conn.unsubscribe(); }; return operate((source, subscriber) => { refCount2++; if (!hasErrored && !hasCompleted) { cancelReset(); } const dest = subject = subject !== null && subject !== void 0 ? subject : connector(); subscriber.add(() => { refCount2--; if (refCount2 === 0 && !hasErrored && !hasCompleted) { resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); } }); dest.subscribe(subscriber); if (!connection && refCount2 > 0) { connection = new SafeSubscriber({ next: (value) => dest.next(value), error: (err) => { hasErrored = true; cancelReset(); resetConnection = handleReset(reset, resetOnError, err); dest.error(err); }, complete: () => { hasCompleted = true; cancelReset(); resetConnection = handleReset(reset, resetOnComplete); dest.complete(); } }); innerFrom(source).subscribe(connection); } })(wrapperSource); }; } function handleReset(reset, on, ...args) { if (on === true) { reset(); return; } if (on === false) { return; } const onSubscriber = new SafeSubscriber({ next: () => { onSubscriber.unsubscribe(); reset(); } }); return innerFrom(on(...args)).subscribe(onSubscriber); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/shareReplay.js function shareReplay(configOrBufferSize, windowTime, scheduler) { let bufferSize; let refCount2 = false; if (configOrBufferSize && typeof configOrBufferSize === "object") { ({ bufferSize = Infinity, windowTime = Infinity, refCount: refCount2 = false, scheduler } = configOrBufferSize); } else { bufferSize = configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity; } return share({ connector: () => new ReplaySubject(bufferSize, windowTime, scheduler), resetOnError: true, resetOnComplete: false, resetOnRefCountZero: refCount2 }); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/skip.js function skip(count) { return filter((_, index) => count <= index); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/skipWhile.js function skipWhile(predicate) { return operate((source, subscriber) => { let taking = false; let index = 0; source.subscribe(createOperatorSubscriber(subscriber, (value) => (taking || (taking = !predicate(value, index++))) && subscriber.next(value))); }); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/startWith.js function startWith(...values) { const scheduler = popScheduler(values); return operate((source, subscriber) => { (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber); }); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/takeUntil.js function takeUntil(notifier) { return operate((source, subscriber) => { innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop)); !subscriber.closed && source.subscribe(subscriber); }); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/takeWhile.js function takeWhile(predicate, inclusive = false) { return operate((source, subscriber) => { let index = 0; source.subscribe(createOperatorSubscriber(subscriber, (value) => { const result = predicate(value, index++); (result || inclusive) && subscriber.next(value); !result && subscriber.complete(); })); }); } // ../../../../node_modules/rxjs/dist/esm/internal/operators/timeInterval.js function timeInterval(scheduler = asyncScheduler) { return operate((source, subscriber) => { let last3 = scheduler.now(); source.subscribe(createOperatorSubscriber(subscriber, (value) => { const now = scheduler.now(); const interval = now - last3; last3 = now; subscriber.next(new TimeInterval(value, interval)); })); }); } var TimeInterval = class { constructor(value, interval) { this.value = value; this.interval = interval; } }; // node_modules/@angular/core/fesm2022/primitives/signals.mjs function defaultEquals(a, b) { return Object.is(a, b); } var activeConsumer = null; var inNotificationPhase = false; var epoch = 1; var postProducerCreatedFn = null; var SIGNAL = /* @__PURE__ */ Symbol("SIGNAL"); function setActiveConsumer(consumer) { const prev = activeConsumer; activeConsumer = consumer; return prev; } function getActiveConsumer() { return activeConsumer; } function isInNotificationPhase() { return inNotificationPhase; } var REACTIVE_NODE = { version: 0, lastCleanEpoch: 0, dirty: false, producerNode: void 0, producerLastReadVersion: void 0, producerIndexOfThis: void 0, nextProducerIndex: 0, liveConsumerNode: void 0, liveConsumerIndexOfThis: void 0, consumerAllowSignalWrites: false, consumerIsAlwaysLive: false, kind: "unknown", producerMustRecompute: () => false, producerRecomputeValue: () => { }, consumerMarkedDirty: () => { }, consumerOnSignalRead: () => { } }; function producerAccessed(node) { if (inNotificationPhase) { throw new Error(typeof ngDevMode !== "undefined" && ngDevMode ? `Assertion error: signal read during notification phase` : ""); } if (activeConsumer === null) { return; } activeConsumer.consumerOnSignalRead(node); const idx = activeConsumer.nextProducerIndex++; assertConsumerNode(activeConsumer); if (idx < activeConsumer.producerNode.length && activeConsumer.producerNode[idx] !== node) { if (consumerIsLive(activeConsumer)) { const staleProducer = activeConsumer.producerNode[idx]; producerRemoveLiveConsumerAtIndex(staleProducer, activeConsumer.producerIndexOfThis[idx]); } } if (activeConsumer.producerNode[idx] !== node) { activeConsumer.producerNode[idx] = node; activeConsumer.producerIndexOfThis[idx] = consumerIsLive(activeConsumer) ? producerAddLiveConsumer(node, activeConsumer, idx) : 0; } activeConsumer.producerLastReadVersion[idx] = node.version; } function producerIncrementEpoch() { epoch++; } function producerUpdateValueVersion(node) { if (consumerIsLive(node) && !node.dirty) { return; } if (!node.dirty && node.lastCleanEpoch === epoch) { return; } if (!node.producerMustRecompute(node) && !consumerPollProducersForChange(node)) { producerMarkClean(node); return; } node.producerRecomputeValue(node); producerMarkClean(node); } function producerNotifyConsumers(node) { if (node.liveConsumerNode === void 0) { return; } const prev = inNotificationPhase; inNotificationPhase = true; try { for (const consumer of node.liveConsumerNode) { if (!consumer.dirty) { consumerMarkDirty(consumer); } } } finally { inNotificationPhase = prev; } } function producerUpdatesAllowed() { return activeConsumer?.consumerAllowSignalWrites !== false; } function consumerMarkDirty(node) { node.dirty = true; producerNotifyConsumers(node); node.consumerMarkedDirty?.(node); } function producerMarkClean(node) { node.dirty = false; node.lastCleanEpoch = epoch; } function consumerBeforeComputation(node) { node && (node.nextProducerIndex = 0); return setActiveConsumer(node); } function consumerAfterComputation(node, prevConsumer) { setActiveConsumer(prevConsumer); if (!node || node.producerNode === void 0 || node.producerIndexOfThis === void 0 || node.producerLastReadVersion === void 0) { return; } if (consumerIsLive(node)) { for (let i = node.nextProducerIndex; i < node.producerNode.length; i++) { producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]); } } while (node.producerNode.length > node.nextProducerIndex) { node.producerNode.pop(); node.producerLastReadVersion.pop(); node.producerIndexOfThis.pop(); } } function consumerPollProducersForChange(node) { assertConsumerNode(node); for (let i = 0; i < node.producerNode.length; i++) { const producer = node.producerNode[i]; const seenVersion = node.producerLastReadVersion[i]; if (seenVersion !== producer.version) { return true; } producerUpdateValueVersion(producer); if (seenVersion !== producer.version) { return true; } } return false; } function consumerDestroy(node) { assertConsumerNode(node); if (consumerIsLive(node)) { for (let i = 0; i < node.producerNode.length; i++) { producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]); } } node.producerNode.length = node.producerLastReadVersion.length = node.producerIndexOfThis.length = 0; if (node.liveConsumerNode) { node.liveConsumerNode.length = node.liveConsumerIndexOfThis.length = 0; } } function producerAddLiveConsumer(node, consumer, indexOfThis) { assertProducerNode(node); if (node.liveConsumerNode.length === 0 && isConsumerNode(node)) { for (let i = 0; i < node.producerNode.length; i++) { node.producerIndexOfThis[i] = producerAddLiveConsumer(node.producerNode[i], node, i); } } node.liveConsumerIndexOfThis.push(indexOfThis); return node.liveConsumerNode.push(consumer) - 1; } function producerRemoveLiveConsumerAtIndex(node, idx) { assertProducerNode(node); if (typeof ngDevMode !== "undefined" && ngDevMode && idx >= node.liveConsumerNode.length) { throw new Error(`Assertion error: active consumer index ${idx} is out of bounds of ${node.liveConsumerNode.length} consumers)`); } if (node.liveConsumerNode.length === 1 && isConsumerNode(node)) { for (let i = 0; i < node.producerNode.length; i++) { producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]); } } const lastIdx = node.liveConsumerNode.length - 1; node.liveConsumerNode[idx] = node.liveConsumerNode[lastIdx]; node.liveConsumerIndexOfThis[idx] = node.liveConsumerIndexOfThis[lastIdx]; node.liveConsumerNode.length--; node.liveConsumerIndexOfThis.length--; if (idx < node.liveConsumerNode.length) { const idxProducer = node.liveConsumerIndexOfThis[idx]; const consumer = node.liveConsumerNode[idx]; assertConsumerNode(consumer); consumer.producerIndexOfThis[idxProducer] = idx; } } function consumerIsLive(node) { return node.consumerIsAlwaysLive || (node?.liveConsumerNode?.length ?? 0) > 0; } function assertConsumerNode(node) { node.producerNode ??= []; node.producerIndexOfThis ??= []; node.producerLastReadVersion ??= []; } function assertProducerNode(node) { node.liveConsumerNode ??= []; node.liveConsumerIndexOfThis ??= []; } function isConsumerNode(node) { return node.producerNode !== void 0; } function runPostProducerCreatedFn(node) { postProducerCreatedFn?.(node); } function createComputed(computation, equal) { const node = Object.create(COMPUTED_NODE); node.computation = computation; if (equal !== void 0) { node.equal = equal; } const computed2 = () => { producerUpdateValueVersion(node); producerAccessed(node); if (node.value === ERRORED) { throw node.error; } return node.value; }; computed2[SIGNAL] = node; runPostProducerCreatedFn(node); return computed2; } var UNSET = /* @__PURE__ */ Symbol("UNSET"); var COMPUTING = /* @__PURE__ */ Symbol("COMPUTING"); var ERRORED = /* @__PURE__ */ Symbol("ERRORED"); var COMPUTED_NODE = /* @__PURE__ */ (() => { return __spreadProps(__spreadValues({}, REACTIVE_NODE), { value: UNSET, dirty: true, error: null, equal: defaultEquals, kind: "computed", producerMustRecompute(node) { return node.value === UNSET || node.value === COMPUTING; }, producerRecomputeValue(node) { if (node.value === COMPUTING) { throw new Error("Detected cycle in computations."); } const oldValue = node.value; node.value = COMPUTING; const prevConsumer = consumerBeforeComputation(node); let newValue; let wasEqual = false; try { newValue = node.computation(); setActiveConsumer(null); wasEqual = oldValue !== UNSET && oldValue !== ERRORED && newValue !== ERRORED && node.equal(oldValue, newValue); } catch (err) { newValue = ERRORED; node.error = err; } finally { consumerAfterComputation(node, prevConsumer); } if (wasEqual) { node.value = oldValue; return; } node.value = newValue; node.version++; } }); })(); function defaultThrowError() { throw new Error(); } var throwInvalidWriteToSignalErrorFn = defaultThrowError; function throwInvalidWriteToSignalError(node) { throwInvalidWriteToSignalErrorFn(node); } function setThrowInvalidWriteToSignalError(fn) { throwInvalidWriteToSignalErrorFn = fn; } var postSignalSetFn = null; function createSignal(initialValue, equal) { const node = Object.create(SIGNAL_NODE); node.value = initialValue; if (equal !== void 0) { node.equal = equal; } const getter = () => { producerAccessed(node); return node.value; }; getter[SIGNAL] = node; runPostProducerCreatedFn(node); return getter; } function signalSetFn(node, newValue) { if (!producerUpdatesAllowed()) { throwInvalidWriteToSignalError(node); } if (!node.equal(node.value, newValue)) { node.value = newValue; signalValueChanged(node); } } function signalUpdateFn(node, updater) { if (!producerUpdatesAllowed()) { throwInvalidWriteToSignalError(node); } signalSetFn(node, updater(node.value)); } var SIGNAL_NODE = /* @__PURE__ */ (() => { return __spreadProps(__spreadValues({}, REACTIVE_NODE), { equal: defaultEquals, value: void 0, kind: "signal" }); })(); function signalValueChanged(node) { node.version++; producerIncrementEpoch(); producerNotifyConsumers(node); postSignalSetFn?.(node); } function createLinkedSignal(sourceFn, computationFn, equalityFn) { const node = Object.create(LINKED_SIGNAL_NODE); node.source = sourceFn; node.computation = computationFn; if (equalityFn != void 0) { node.equal = equalityFn; } const linkedSignalGetter = () => { producerUpdateValueVersion(node); producerAccessed(node); if (node.value === ERRORED) { throw node.error; } return node.value; }; const getter = linkedSignalGetter; getter[SIGNAL] = node; runPostProducerCreatedFn(node); return getter; } function linkedSignalSetFn(node, newValue) { producerUpdateValueVersion(node); signalSetFn(node, newValue); producerMarkClean(node); } function linkedSignalUpdateFn(node, updater) { producerUpdateValueVersion(node); signalUpdateFn(node, updater); producerMarkClean(node); } var LINKED_SIGNAL_NODE = /* @__PURE__ */ (() => { return __spreadProps(__spreadValues({}, REACTIVE_NODE), { value: UNSET, dirty: true, error: null, equal: defaultEquals, producerMustRecompute(node) { return node.value === UNSET || node.value === COMPUTING; }, producerRecomputeValue(node) { if (node.value === COMPUTING) { throw new Error("Detected cycle in computations."); } const oldValue = node.value; node.value = COMPUTING; const prevConsumer = consumerBeforeComputation(node); let newValue; try { const newSourceValue = node.source(); const prev = oldValue === UNSET || oldValue === ERRORED ? void 0 : { source: node.sourceValue, value: oldValue }; newValue = node.computation(newSourceValue, prev); node.sourceValue = newSourceValue; } catch (err) { newValue = ERRORED; node.error = err; } finally { consumerAfterComputation(node, prevConsumer); } if (oldValue !== UNSET && newValue !== ERRORED && node.equal(oldValue, newValue)) { node.value = oldValue; return; } node.value = newValue; node.version++; } }); })(); function untracked(nonReactiveReadsFn) { const prevConsumer = setActiveConsumer(null); try { return nonReactiveReadsFn(); } finally { setActiveConsumer(prevConsumer); } } // node_modules/@angular/core/fesm2022/primitives/di.mjs var _currentInjector = void 0; function getCurrentInjector() { return _currentInjector; } function setCurrentInjector(injector) { const former = _currentInjector; _currentInjector = injector; return former; } var NOT_FOUND = Symbol("NotFound"); // node_modules/@angular/core/fesm2022/core.mjs var ERROR_DETAILS_PAGE_BASE_URL = "https://angular.dev/errors"; var XSS_SECURITY_URL = "https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss"; var RuntimeError = class extends Error { code; constructor(code, message) { super(formatRuntimeError(code, message)); this.code = code; } }; function formatRuntimeError(code, message) { const fullCode = `NG0${Math.abs(code)}`; let errorMessage = `${fullCode}${message ? ": " + message : ""}`; if (ngDevMode && code < 0) { const addPeriodSeparator = !errorMessage.match(/[.,;!?\n]$/); const separator = addPeriodSeparator ? "." : ""; errorMessage = `${errorMessage}${separator} Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/${fullCode}`; } return errorMessage; } var REQUIRED_UNSET_VALUE = /* @__PURE__ */ Symbol("InputSignalNode#UNSET"); var INPUT_SIGNAL_NODE = /* @__PURE__ */ (() => { return __spreadProps(__spreadValues({}, SIGNAL_NODE), { transformFn: void 0, applyValueToInputSignal(node, value) { signalSetFn(node, value); } }); })(); function createInputSignal(initialValue, options) { const node = Object.create(INPUT_SIGNAL_NODE); node.value = initialValue; node.transformFn = options?.transform; function inputValueFn() { producerAccessed(node); if (node.value === REQUIRED_UNSET_VALUE) { let message = null; if (ngDevMode) { const name = options?.debugName ?? options?.alias; message = `Input${name ? ` "${name}"` : ""}\uC740(\uB294) \uD544\uC218\uC774\uBA70, \uC544\uC9C1 \uC0AC\uC6A9\uD560 \uC218 \uC788\uB294 \uAC12\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.`; } throw new RuntimeError(-950, message); } return node.value; } inputValueFn[SIGNAL] = node; if (ngDevMode) { inputValueFn.toString = () => `[Input Signal: ${inputValueFn()}]`; node.debugName = options?.debugName; } return inputValueFn; } function noSideEffects(fn) { return { toString: fn }.toString(); } var ANNOTATIONS = "__annotations__"; var PARAMETERS = "__parameters__"; var PROP_METADATA = "__prop__metadata__"; function makeDecorator(name, props, parentClass, additionalProcessing, typeFn) { return noSideEffects(() => { const metaCtor = makeMetadataCtor(props); function DecoratorFactory(...args) { if (this instanceof DecoratorFactory) { metaCtor.call(this, ...args); return this; } const annotationInstance = new DecoratorFactory(...args); return function TypeDecorator(cls) { if (typeFn) typeFn(cls, ...args); const annotations = cls.hasOwnProperty(ANNOTATIONS) ? cls[ANNOTATIONS] : Object.defineProperty(cls, ANNOTATIONS, { value: [] })[ANNOTATIONS]; annotations.push(annotationInstance); return cls; }; } if (parentClass) { DecoratorFactory.prototype = Object.create(parentClass.prototype); } DecoratorFactory.prototype.ngMetadataName = name; DecoratorFactory.annotationCls = DecoratorFactory; return DecoratorFactory; }); } function makeMetadataCtor(props) { return function ctor(...args) { if (props) { const values = props(...args); for (const propName in values) { this[propName] = values[propName]; } } }; } function makeParamDecorator(name, props, parentClass) { return noSideEffects(() => { const metaCtor = makeMetadataCtor(props); function ParamDecoratorFactory(...args) { if (this instanceof ParamDecoratorFactory) { metaCtor.apply(this, args); return this; } const annotationInstance = new ParamDecoratorFactory(...args); ParamDecorator.annotation = annotationInstance; return ParamDecorator; function ParamDecorator(cls, unusedKey, index) { const parameters = cls.hasOwnProperty(PARAMETERS) ? cls[PARAMETERS] : Object.defineProperty(cls, PARAMETERS, { value: [] })[PARAMETERS]; while (parameters.length <= index) { parameters.push(null); } (parameters[index] = parameters[index] || []).push(annotationInstance); return cls; } } ParamDecoratorFactory.prototype.ngMetadataName = name; ParamDecoratorFactory.annotationCls = ParamDecoratorFactory; return ParamDecoratorFactory; }); } function makePropDecorator(name, props, parentClass, additionalProcessing) { return noSideEffects(() => { const metaCtor = makeMetadataCtor(props); function PropDecoratorFactory(...args) { if (this instanceof PropDecoratorFactory) { metaCtor.apply(this, args); return this; } const decoratorInstance = new PropDecoratorFactory(...args); function PropDecorator(target, name2) { if (target === void 0) { throw new Error("\uD45C\uC900 Angular \uD544\uB4DC \uB370\uCF54\uB808\uC774\uD130\uB294 JIT \uBAA8\uB4DC\uC5D0\uC11C \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."); } const constructor = target.constructor; const meta = constructor.hasOwnProperty(PROP_METADATA) ? constructor[PROP_METADATA] : Object.defineProperty(constructor, PROP_METADATA, { value: {} })[PROP_METADATA]; meta[name2] = meta.hasOwnProperty(name2) && meta[name2] || []; meta[name2].unshift(decoratorInstance); } return PropDecorator; } if (parentClass) { PropDecoratorFactory.prototype = Object.create(parentClass.prototype); } PropDecoratorFactory.prototype.ngMetadataName = name; PropDecoratorFactory.annotationCls = PropDecoratorFactory; return PropDecoratorFactory; }); } var _global = globalThis; function ngDevModeResetPerfCounters() { const locationString = typeof location !== "undefined" ? location.toString() : ""; const newCounters = { namedConstructors: locationString.indexOf("ngDevMode=namedConstructors") != -1, firstCreatePass: 0, tNode: 0, tView: 0, hydratedNodes: 0, hydratedComponents: 0, dehydratedViewsRemoved: 0, dehydratedViewsCleanupRuns: 0, componentsSkippedHydration: 0, deferBlocksWithIncrementalHydration: 0 }; const allowNgDevModeTrue = locationString.indexOf("ngDevMode=false") === -1; if (!allowNgDevModeTrue) { _global["ngDevMode"] = false; } else { if (typeof _global["ngDevMode"] !== "object") { _global["ngDevMode"] = {}; } Object.assign(_global["ngDevMode"], newCounters); } return newCounters; } function initNgDevMode() { if (typeof ngDevMode === "undefined" || ngDevMode) { if (typeof ngDevMode !== "object" || Object.keys(ngDevMode).length === 0) { ngDevModeResetPerfCounters(); } return typeof ngDevMode !== "undefined" && !!ngDevMode; } return false; } function getClosureSafeProperty(objWithPropertyToExtract) { for (let key in objWithPropertyToExtract) { if (objWithPropertyToExtract[key] === getClosureSafeProperty) { return key; } } throw Error("Could not find renamed property on target object."); } function fillProperties(target, source) { for (const key in source) { if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) { target[key] = source[key]; } } } function stringify(token) { if (typeof token === "string") { return token; } if (Array.isArray(token)) { return `[${token.map(stringify).join(", ")}]`; } if (token == null) { return "" + token; } const name = token.overriddenName || token.name; if (name) { return `${name}`; } const result = token.toString(); if (result == null) { return "" + result; } const newLineIndex = result.indexOf("\n"); return newLineIndex >= 0 ? result.slice(0, newLineIndex) : result; } function concatStringsWithSpace(before, after) { if (!before) return after || ""; if (!after) return before; return `${before} ${after}`; } function truncateMiddle(str, maxLength = 100) { if (!str || maxLength < 1 || str.length <= maxLength) return str; if (maxLength == 1) return str.substring(0, 1) + "..."; const halfLimit = Math.round(maxLength / 2); return str.substring(0, halfLimit) + "..." + str.substring(str.length - halfLimit); } var __forward_ref__ = getClosureSafeProperty({ __forward_ref__: getClosureSafeProperty }); function forwardRef(forwardRefFn) { forwardRefFn.__forward_ref__ = forwardRef; forwardRefFn.toString = function() { return stringify(this()); }; return forwardRefFn; } function resolveForwardRef(type) { return isForwardRef(type) ? type() : type; } function isForwardRef(fn) { return typeof fn === "function" && fn.hasOwnProperty(__forward_ref__) && fn.__forward_ref__ === forwardRef; } function assertNumber(actual, msg) { if (!(typeof actual === "number")) { throwError2(msg, typeof actual, "number", "==="); } } function assertNumberInRange(actual, minInclusive, maxInclusive) { assertNumber(actual, "Expected a number"); assertLessThanOrEqual(actual, maxInclusive, "Expected number to be less than or equal to"); assertGreaterThanOrEqual(actual, minInclusive, "Expected number to be greater than or equal to"); } function assertString(actual, msg) { if (!(typeof actual === "string")) { throwError2(msg, actual === null ? "null" : typeof actual, "string", "==="); } } function assertFunction(actual, msg) { if (!(typeof actual === "function")) { throwError2(msg, actual === null ? "null" : typeof actual, "function", "==="); } } function assertEqual(actual, expected, msg) { if (!(actual == expected)) { throwError2(msg, actual, expected, "=="); } } function assertNotEqual(actual, expected, msg) { if (!(actual != expected)) { throwError2(msg, actual, expected, "!="); } } function assertSame(actual, expected, msg) { if (!(actual === expected)) { throwError2(msg, actual, expected, "==="); } } function assertNotSame(actual, expected, msg) { if (!(actual !== expected)) { throwError2(msg, actual, expected, "!=="); } } function assertLessThan(actual, expected, msg) { if (!(actual < expected)) { throwError2(msg, actual, expected, "<"); } } function assertLessThanOrEqual(actual, expected, msg) { if (!(actual <= expected)) { throwError2(msg, actual, expected, "<="); } } function assertGreaterThan(actual, expected, msg) { if (!(actual > expected)) { throwError2(msg, actual, expected, ">"); } } function assertGreaterThanOrEqual(actual, expected, msg) { if (!(actual >= expected)) { throwError2(msg, actual, expected, ">="); } } function assertDefined(actual, msg) { if (actual == null) { throwError2(msg, actual, null, "!="); } } function throwError2(msg, actual, expected, comparison) { throw new Error(`ASSERTION ERROR: ${msg}` + (comparison == null ? "" : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`)); } function assertDomNode(node) { if (!(node instanceof Node)) { throwError2(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`); } } function assertElement(node) { if (!(node instanceof Element)) { throwError2(`The provided value must be an element but got ${stringify(node)}`); } } function assertIndexInRange(arr, index) { assertDefined(arr, "Array must be defined."); const maxLen = arr.length; if (index < 0 || index >= maxLen) { throwError2(`Index expected to be less than ${maxLen} but got ${index}`); } } function assertOneOf(value, ...validValues) { if (validValues.indexOf(value) !== -1) return true; throwError2(`Expected value to be one of ${JSON.stringify(validValues)} but was ${JSON.stringify(value)}.`); } function assertNotReactive(fn) { if (getActiveConsumer() !== null) { throwError2(`${fn}() should never be called in a reactive context.`); } } function \u0275\u0275defineInjectable(opts) { return { token: opts.token, providedIn: opts.providedIn || null, factory: opts.factory, value: void 0 }; } function \u0275\u0275defineInjector(options) { return { providers: options.providers || [], imports: options.imports || [] }; } function getInjectableDef(type) { return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF); } function isInjectable(type) { return getInjectableDef(type) !== null; } function getOwnDefinition(type, field) { return type.hasOwnProperty(field) ? type[field] : null; } function getInheritedInjectableDef(type) { const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]); if (def) { ngDevMode && console.warn(`DEPRECATED: DI\uAC00 "@Injectable" \uB370\uCF54\uB808\uC774\uD130\uB97C \uC0C1\uC18D\uD558\uC9C0\uB9CC \uC790\uCCB4\uC801\uC73C\uB85C \uC81C\uACF5\uD558\uC9C0 \uC54A\uB294 \uD1A0\uD070 "${type.name}"\uC744 \uC778\uC2A4\uD134\uC2A4\uD654 \uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4. \uC774\uAC83\uC740 Angular\uC758 \uBBF8\uB798 \uBC84\uC804\uC5D0\uC11C \uC624\uB958\uAC00 \uB420 \uAC83\uC785\uB2C8\uB2E4. "${type.name}" \uD074\uB798\uC2A4\uC5D0 @Injectable()\uC744 \uCD94\uAC00\uD558\uC2ED\uC2DC\uC624.`); return def; } else { return null; } } function getInjectorDef(type) { return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ? type[NG_INJ_DEF] : null; } var NG_PROV_DEF = getClosureSafeProperty({ \u0275prov: getClosureSafeProperty }); var NG_INJ_DEF = getClosureSafeProperty({ \u0275inj: getClosureSafeProperty }); var NG_INJECTABLE_DEF = getClosureSafeProperty({ ngInjectableDef: getClosureSafeProperty }); var NG_INJECTOR_DEF = getClosureSafeProperty({ ngInjectorDef: getClosureSafeProperty }); var InjectionToken = class { _desc; /** @internal */ ngMetadataName = "InjectionToken"; \u0275prov; /** * @param _desc 토큰에 대한 설명, * 디버깅 목적으로만 사용됩니다, * 고유해야 하지만 고유할 필요는 없습니다 * @param options 위에서 설명한 토큰 사용에 대한 옵션 */ constructor(_desc, options) { this._desc = _desc; this.\u0275prov = void 0; if (typeof options == "number") { (typeof ngDevMode === "undefined" || ngDevMode) && assertLessThan(options, 0, "\uC5EC\uAE30\uC11C\uB294 \uC74C\uC218\uB9CC \uC9C0\uC6D0\uB429\uB2C8\uB2E4"); this.__NG_ELEMENT_ID__ = options; } else if (options !== void 0) { this.\u0275prov = \u0275\u0275defineInjectable({ token: this, providedIn: options.providedIn || "root", factory: options.factory }); } } /** * @internal */ get multi() { return this; } toString() { return `InjectionToken ${this._desc}`; } }; var _injectorProfilerContext; function getInjectorProfilerContext() { !ngDevMode && throwError2("getInjectorProfilerContext\uB294 \uD504\uB85C\uB355\uC158 \uBAA8\uB4DC\uC5D0\uC11C \uD638\uCD9C\uB418\uC5B4\uC11C\uB294 \uC548\uB429\uB2C8\uB2E4."); return _injectorProfilerContext; } function setInjectorProfilerContext(context2) { !ngDevMode && throwError2("setInjectorProfilerContext\uB294 \uD504\uB85C\uB355\uC158 \uBAA8\uB4DC\uC5D0\uC11C \uD638\uCD9C\uB418\uC5B4\uC11C\uB294 \uC548\uB429\uB2C8\uB2E4."); const previous = _injectorProfilerContext; _injectorProfilerContext = context2; return previous; } var injectorProfilerCallback = null; var setInjectorProfiler = (injectorProfiler2) => { !ngDevMode && throwError2("setInjectorProfiler\uB294 \uD504\uB85C\uB355\uC158 \uBAA8\uB4DC\uC5D0\uC11C \uD638\uCD9C\uB418\uC5B4\uC11C\uB294 \uC548\uB429\uB2C8\uB2E4."); injectorProfilerCallback = injectorProfiler2; }; function injectorProfiler(event) { !ngDevMode && throwError2("Injector \uD504\uB85C\uD30C\uC77C\uB7EC\uB294 \uD504\uB85C\uB355\uC158 \uBAA8\uB4DC\uC5D0\uC11C \uD638\uCD9C\uB418\uC5B4\uC11C\uB294 \uC548\uB429\uB2C8\uB2E4."); if (injectorProfilerCallback != null) { injectorProfilerCallback(event); } } function emitProviderConfiguredEvent(eventProvider, isViewProvider = false) { !ngDevMode && throwError2("Injector \uD504\uB85C\uD30C\uC77C\uB7EC\uB294 \uD504\uB85C\uB355\uC158 \uBAA8\uB4DC\uC5D0\uC11C \uD638\uCD9C\uB418\uC5B4\uC11C\uB294 \uC548\uB429\uB2C8\uB2E4."); let token; if (typeof eventProvider === "function") { token = eventProvider; } else if (eventProvider instanceof InjectionToken) { token = eventProvider; } else { token = resolveForwardRef(eventProvider.provide); } let provider = eventProvider; if (eventProvider instanceof InjectionToken) { provider = eventProvider.\u0275prov || eventProvider; } injectorProfiler({ type: 2, context: getInjectorProfilerContext(), providerRecord: { token, provider, isViewProvider } }); } function emitInjectorToCreateInstanceEvent(token) { !ngDevMode && throwError2("Injector \uD504\uB85C\uD30C\uC77C\uB7EC\uB294 \uD504\uB85C\uB355\uC158 \uBAA8\uB4DC\uC5D0\uC11C \uD638\uCD9C\uB418\uC5B4\uC11C\uB294 \uC548\uB429\uB2C8\uB2E4."); injectorProfiler({ type: 4, context: getInjectorProfilerContext(), token }); } function emitInstanceCreatedByInjectorEvent(instance) { !ngDevMode && throwError2("Injector \uD504\uB85C\uD30C\uC77C\uB7EC\uB294 \uD504\uB85C\uB355\uC158 \uBAA8\uB4DC\uC5D0\uC11C \uD638\uCD9C\uB418\uC5B4\uC11C\uB294 \uC548\uB429\uB2C8\uB2E4."); injectorProfiler({ type: 1, context: getInjectorProfilerContext(), instance: { value: instance } }); } function emitInjectEvent(token, value, flags) { !ngDevMode && throwError2("Injector \uD504\uB85C\uD30C\uC77C\uB7EC\uB294 \uD504\uB85C\uB355\uC158 \uBAA8\uB4DC\uC5D0\uC11C \uD638\uCD9C\uB418\uC5B4\uC11C\uB294 \uC548\uB429\uB2C8\uB2E4."); injectorProfiler({ type: 0, context: getInjectorProfilerContext(), service: { token, value, flags } }); } function emitEffectCreatedEvent(effect2) { !ngDevMode && throwError2("Injector \uD504\uB85C\uD30C\uC77C\uB7EC\uB294 \uD504\uB85C\uB355\uC158 \uBAA8\uB4DC\uC5D0\uC11C \uD638\uCD9C\uB418\uC5B4\uC11C\uB294 \uC548\uB429\uB2C8\uB2E4."); injectorProfiler({ type: 3, context: getInjectorProfilerContext(), effect: effect2 }); } function runInInjectorProfilerContext(injector, token, callback) { !ngDevMode && throwError2("runInInjectorProfilerContext\uB294 \uD504\uB85C\uB355\uC158 \uBAA8\uB4DC\uC5D0\uC11C \uD638\uCD9C\uB418\uC5B4\uC11C\uB294 \uC548\uB429\uB2C8\uB2E4."); const prevInjectContext = setInjectorProfilerContext({ injector, token }); try { callback(); } finally { setInjectorProfilerContext(prevInjectContext); } } function isEnvironmentProviders(value) { return value && !!value.\u0275providers; } var NG_COMP_DEF = getClosureSafeProperty({ \u0275cmp: getClosureSafeProperty }); var NG_DIR_DEF = getClosureSafeProperty({ \u0275dir: getClosureSafeProperty }); var NG_PIPE_DEF = getClosureSafeProperty({ \u0275pipe: getClosureSafeProperty }); var NG_MOD_DEF = getClosureSafeProperty({ \u0275mod: getClosureSafeProperty }); var NG_FACTORY_DEF = getClosureSafeProperty({ \u0275fac: getClosureSafeProperty }); var NG_ELEMENT_ID = getClosureSafeProperty({ __NG_ELEMENT_ID__: getClosureSafeProperty }); var NG_ENV_ID = getClosureSafeProperty({ __NG_ENV_ID__: getClosureSafeProperty }); function renderStringify(value) { if (typeof value === "string") return value; if (value == null) return ""; return String(value); } function stringifyForError(value) { if (typeof value === "function") return value.name || value.toString(); if (typeof value === "object" && value != null && typeof value.type === "function") { return value.type.name || value.type.toString(); } return renderStringify(value); } function throwCyclicDependencyError(token, path) { throw new RuntimeError(-200, ngDevMode ? `DI\uC5D0\uC11C ${token}\uC5D0 \uB300\uD55C \uC21C\uD658 \uC758\uC874\uC131\uC774 \uAC10\uC9C0\uB428${path ? `. \uC758\uC874\uC131 \uACBD\uB85C: ${path.join(" > ")} > ${token}` : ""}` : token); } function throwMixedMultiProviderError() { throw new Error(`\uB2E4\uC911 \uACF5\uAE09\uC790\uC640 \uC77C\uBC18 \uACF5\uAE09\uC790\uB97C \uD63C\uD569\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4`); } function throwInvalidProviderError(ngModuleType, providers, provider) { if (ngModuleType && providers) { const providerDetail = providers.map((v) => v == provider ? "?" + provider + "?" : "..."); throw new Error(`NgModule '${stringify(ngModuleType)}'\uC5D0 \uB300\uD55C \uC798\uBABB\uB41C \uACF5\uAE09\uC790 - Provider \uBC0F Type\uC758 \uC778\uC2A4\uD134\uC2A4\uB9CC \uD5C8\uC6A9\uB418\uBA70, \uB2E4\uC74C\uC774 \uD3EC\uD568\uB418\uC5C8\uC2B5\uB2C8\uB2E4: [${providerDetail.join(", ")}]`); } else if (isEnvironmentProviders(provider)) { if (provider.\u0275fromNgModule) { throw new RuntimeError(207, `'importProvidersFrom'\uC5D0\uC11C \uAC00\uC838\uC628 \uC798\uBABB\uB41C \uACF5\uAE09\uC790\uAC00 \uD658\uACBD\uC774 \uC544\uB2CC \uC8FC\uC785\uAE30\uC5D0 \uC874\uC7AC\uD569\uB2C8\uB2E4. 'importProvidersFrom'\uC740 \uAD6C\uC131 \uC694\uC18C \uACF5\uAE09\uC790\uC5D0 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`); } else { throw new RuntimeError(207, `\uD658\uACBD\uC774 \uC544\uB2CC \uC8FC\uC785\uAE30\uC5D0 \uC798\uBABB\uB41C \uACF5\uAE09\uC790\uAC00 \uC874\uC7AC\uD569\uB2C8\uB2E4. 'EnvironmentProviders'\uB294 \uAD6C\uC131 \uC694\uC18C \uACF5\uAE09\uC790\uC5D0 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`); } } else { throw new Error("\uC798\uBABB\uB41C \uACF5\uAE09\uC790"); } } function throwProviderNotFoundError(token, injectorName) { const errorMessage = ngDevMode && `${stringifyForError(token)}\uC5D0 \uB300\uD55C \uACF5\uAE09\uC790\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4${injectorName ? ` ${injectorName}\uC5D0\uC11C` : ""}`; throw new RuntimeError(-201, errorMessage); } var _injectImplementation; function getInjectImplementation() { return _injectImplementation; } function setInjectImplementation(impl) { const previous = _injectImplementation; _injectImplementation = impl; return previous; } function injectRootLimpMode(token, notFoundValue, flags) { const injectableDef = getInjectableDef(token); if (injectableDef && injectableDef.providedIn == "root") { return injectableDef.value === void 0 ? injectableDef.value = injectableDef.factory() : injectableDef.value; } if (flags & 8) return null; if (notFoundValue !== void 0) return notFoundValue; throwProviderNotFoundError(token, "Injector"); } function assertInjectImplementationNotEqual(fn) { ngDevMode && assertNotEqual(_injectImplementation, fn, "Calling \u0275\u0275inject would cause infinite recursion"); } var _THROW_IF_NOT_FOUND = {}; var THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND; var DI_DECORATOR_FLAG = "__NG_DI_FLAG__"; var RetrievingInjector = class { injector; constructor(injector) { this.injector = injector; } retrieve(token, options) { const flags = convertToBitFlags(options) || 0; return this.injector.get( token, // 선택적 플래그로 의존성이 요청되면 DI는 기본값으로 null을 반환합니다. flags & 8 ? null : void 0, flags ); } }; var NG_TEMP_TOKEN_PATH = "ngTempTokenPath"; var NG_TOKEN_PATH = "ngTokenPath"; var NEW_LINE = /\n/gm; var NO_NEW_LINE = "\u0275"; var SOURCE = "__source"; function injectInjectorOnly(token, flags = 0) { const currentInjector = getCurrentInjector(); if (currentInjector === void 0) { throw new RuntimeError(-203, ngDevMode && `\`${stringify(token)}\` \uD1A0\uD070 \uC8FC\uC785\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \`inject()\` \uD568\uC218\uB294 \uC0DD\uC131\uC790, \uD329\uD1A0\uB9AC \uD568\uC218, \uD544\uB4DC \uCD08\uAE30\uD654\uAE30 \uB610\uB294 \`runInInjectionContext\`\uC640 \uD568\uAED8 \uC0AC\uC6A9\uB418\uB294 \uD568\uC218\uC640 \uAC19\uC740 \uC8FC\uC785 \uCEE8\uD14D\uC2A4\uD2B8\uC5D0\uC11C \uD638\uCD9C\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.`); } else if (currentInjector === null) { return injectRootLimpMode(token, void 0, flags); } else { const value = currentInjector.retrieve(token, convertToInjectOptions(flags)); ngDevMode && emitInjectEvent(token, value, flags); return value; } } function \u0275\u0275inject(token, flags = 0) { return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token), flags); } function \u0275\u0275invalidFactoryDep(index) { throw new RuntimeError(202, ngDevMode && `\uC774 \uC0DD\uC131\uC790\uB294 Angular \uC758\uC874\uC131 \uC8FC\uC785\uACFC \uD638\uD658\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC778\uB371\uC2A4 ${index}\uC758 \uB9E4\uAC1C\uBCC0\uC218 \uBAA9\uB85D\uC5D0\uC11C \uD574\uB2F9 \uC758\uC874\uC131\uC774 \uC720\uD6A8\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC774\uB294 \uC758\uC874\uC131 \uC720\uD615\uC774 \uBB38\uC790\uC5F4\uACFC \uAC19\uC740 \uC6D0\uC2DC \uC720\uD615\uC778 \uACBD\uC6B0\uB098 \uC774 \uD074\uB798\uC2A4\uC758 \uC870\uC0C1\uC774 Angular \uB370\uCF54\uB808\uC774\uD130\uAC00 \uC5C6\uB294 \uACBD\uC6B0 \uBC1C\uC0DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. 1) \uC778\uB371\uC2A4 ${index}\uC758 \uB9E4\uAC1C\uBCC0\uC218 \uC720\uD615\uC774 \uC62C\uBC14\uB978\uC9C0 \uD655\uC778\uD558\uACE0, 2) \uC774 \uD074\uB798\uC2A4 \uBC0F \uADF8 \uC870\uC0C1\uC5D0 \uB300\uD574 \uC62C\uBC14\uB978 Angular \uB370\uCF54\uB808\uC774\uD130\uAC00 \uC815\uC758\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694.`); } function inject(token, options) { return \u0275\u0275inject(token, convertToBitFlags(options)); } function convertToBitFlags(flags) { if (typeof flags === "undefined" || typeof flags === "number") { return flags; } return 0 | // formatter에서 강제로 줄 바꿈을 생성하기 위한 주석 (flags.optional && 8) | (flags.host && 1) | (flags.self && 2) | (flags.skipSelf && 4); } function convertToInjectOptions(flags) { return { optional: !!(flags & 8), host: !!(flags & 1), self: !!(flags & 2), skipSelf: !!(flags & 4) }; } function injectArgs(types) { const args = []; for (let i = 0; i < types.length; i++) { const arg = resolveForwardRef(types[i]); if (Array.isArray(arg)) { if (arg.length === 0) { throw new RuntimeError(900, ngDevMode && "\uC778\uC218 \uBC30\uC5F4\uC740 \uC778\uC218\uB97C \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4."); } let type = void 0; let flags = 0; for (let j = 0; j < arg.length; j++) { const meta = arg[j]; const flag = getInjectFlag(meta); if (typeof flag === "number") { if (flag === -1) { type = meta.token; } else { flags |= flag; } } else { type = meta; } } args.push(\u0275\u0275inject(type, flags)); } else { args.push(\u0275\u0275inject(arg)); } } return args; } function attachInjectFlag(decorator, flag) { decorator[DI_DECORATOR_FLAG] = flag; decorator.prototype[DI_DECORATOR_FLAG] = flag; return decorator; } function getInjectFlag(token) { return token[DI_DECORATOR_FLAG]; } function catchInjectorError(e, token, injectorErrorName, source) { const tokenPath = e[NG_TEMP_TOKEN_PATH]; if (token[SOURCE]) { tokenPath.unshift(token[SOURCE]); } e.message = formatError("\n" + e.message, tokenPath, injectorErrorName, source); e[NG_TOKEN_PATH] = tokenPath; e[NG_TEMP_TOKEN_PATH] = null; throw e; } function formatError(text, obj, injectorErrorName, source = null) { text = text && text.charAt(0) === "\n" && text.charAt(1) == NO_NEW_LINE ? text.slice(2) : text; let context2 = stringify(obj); if (Array.isArray(obj)) { context2 = obj.map(stringify).join(" -> "); } else if (typeof obj === "object") { let parts = []; for (let key in obj) { if (obj.hasOwnProperty(key)) { let value = obj[key]; parts.push(key + ":" + (typeof value === "string" ? JSON.stringify(value) : stringify(value))); } } context2 = `{${parts.join(", ")}}`; } return `${injectorErrorName}${source ? "(" + source + ")" : ""}[${context2}]: ${text.replace(NEW_LINE, "\n ")}`; } var Inject = attachInjectFlag( // Tslint를 비활성화합니다. `DecoratorFlags`는 인라인 처리되는(const enum) 상수 입니다. makeParamDecorator("Inject", (token) => ({ token })), -1 /* DecoratorFlags.Inject */ ); var Optional = ( // Tslint를 비활성화합니다. `InternalInjectFlags`는 인라인 처리되는(const enum) 상수입니다. // tslint:disable-next-line: no-toplevel-property-access attachInjectFlag( makeParamDecorator("Optional"), 8 /* InternalInjectFlags.Optional */ ) ); var Self = ( // Tslint를 비활성화합니다. `InternalInjectFlags`는 인라인 처리되는(const enum) 상수입니다. // tslint:disable-next-line: no-toplevel-property-access attachInjectFlag( makeParamDecorator("Self"), 2 /* InternalInjectFlags.Self */ ) ); var SkipSelf = ( // Tslint를 비활성화합니다. `InternalInjectFlags`는 인라인 처리되는(const enum) 상수입니다. // tslint:disable-next-line: no-toplevel-property-access attachInjectFlag( makeParamDecorator("SkipSelf"), 4 /* InternalInjectFlags.SkipSelf */ ) ); var Host = ( // Tslint를 비활성화합니다. `InternalInjectFlags`는 인라인 처리되는(const enum) 상수입니다. // tslint:disable-next-line: no-toplevel-property-access attachInjectFlag( makeParamDecorator("Host"), 1 /* InternalInjectFlags.Host */ ) ); function getFactoryDef(type, throwNotFound) { const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF); if (!hasFactoryDef && throwNotFound === true && ngDevMode) { throw new Error(`\uD0C0\uC785 ${stringify(type)}\uB294 '\u0275fac' \uC18D\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.`); } return hasFactoryDef ? type[NG_FACTORY_DEF] : null; } function arrayEquals(a, b, identityAccessor) { if (a.length !== b.length) return false; for (let i = 0; i < a.length; i++) { let valueA = a[i]; let valueB = b[i]; if (identityAccessor) { valueA = identityAccessor(valueA); valueB = identityAccessor(valueB); } if (valueB !== valueA) { return false; } } return true; } function flatten(list) { return list.flat(Number.POSITIVE_INFINITY); } function deepForEach(input2, fn) { input2.forEach((value) => Array.isArray(value) ? deepForEach(value, fn) : fn(value)); } function addToArray(arr, index, value) { if (index >= arr.length) { arr.push(value); } else { arr.splice(index, 0, value); } } function removeFromArray(arr, index) { if (index >= arr.length - 1) { return arr.pop(); } else { return arr.splice(index, 1)[0]; } } function newArray(size, value) { const list = []; for (let i = 0; i < size; i++) { list.push(value); } return list; } function arraySplice(array, index, count) { const length = array.length - count; while (index < length) { array[index] = array[index + count]; index++; } while (count--) { array.pop(); } } function arrayInsert2(array, index, value1, value2) { ngDevMode && assertLessThanOrEqual(index, array.length, "\uBC30\uC5F4\uC758 \uB05D\uC744 \uB118\uC5B4 \uC0BD\uC785\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."); let end = array.length; if (end == index) { array.push(value1, value2); } else if (end === 1) { array.push(value2, array[0]); array[0] = value1; } else { end--; array.push(array[end - 1], array[end]); while (end > index) { const previousEnd = end - 2; array[end] = array[previousEnd]; end--; } array[index] = value1; array[index + 1] = value2; } } function keyValueArraySet(keyValueArray, key, value) { let index = keyValueArrayIndexOf(keyValueArray, key); if (index >= 0) { keyValueArray[index | 1] = value; } else { index = ~index; arrayInsert2(keyValueArray, index, key, value); } return index; } function keyValueArrayGet(keyValueArray, key) { const index = keyValueArrayIndexOf(keyValueArray, key); if (index >= 0) { return keyValueArray[index | 1]; } return void 0; } function keyValueArrayIndexOf(keyValueArray, key) { return _arrayIndexOfSorted(keyValueArray, key, 1); } function _arrayIndexOfSorted(array, value, shift) { ngDevMode && assertEqual(Array.isArray(array), true, "\uBC30\uC5F4\uC744 \uAE30\uB300\uD569\uB2C8\uB2E4"); let start = 0; let end = array.length >> shift; while (end !== start) { const middle = start + (end - start >> 1); const current = array[middle << shift]; if (value === current) { return middle << shift; } else if (current > value) { end = middle; } else { start = middle + 1; } } return ~(end << shift); } var EMPTY_OBJ = {}; var EMPTY_ARRAY = []; if ((typeof ngDevMode === "undefined" || ngDevMode) && initNgDevMode()) { Object.freeze(EMPTY_OBJ); Object.freeze(EMPTY_ARRAY); } var ENVIRONMENT_INITIALIZER = new InjectionToken(ngDevMode ? "ENVIRONMENT_INITIALIZER" : ""); var INJECTOR$1 = new InjectionToken( ngDevMode ? "INJECTOR" : "", // 이거는 최상위 속성 접근이 아닌 인라인되는 const enum이기 때문에 tslint를 비활성화 합니다. // tslint:disable-next-line: no-toplevel-property-access -1 /* InjectorMarkers.Injector */ ); var INJECTOR_DEF_TYPES = new InjectionToken(ngDevMode ? "INJECTOR_DEF_TYPES" : ""); var NullInjector = class { get(token, notFoundValue = THROW_IF_NOT_FOUND) { if (notFoundValue === THROW_IF_NOT_FOUND) { const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`); error.name = "NullInjectorError"; throw error; } return notFoundValue; } }; function getNgModuleDef(type, throwIfNotFound) { const ngModuleDef = type[NG_MOD_DEF] || null; if (!ngModuleDef && throwIfNotFound) { throw new RuntimeError(915, (typeof ngDevMode === "undefined" || ngDevMode) && `\uD0C0\uC785 ${stringify(type)}\uC5D0 '\u0275mod' \uC18D\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.`); } return ngModuleDef; } function getComponentDef(type) { return type[NG_COMP_DEF] || null; } function getDirectiveDef(type, throwIfNotFound) { const def = type[NG_DIR_DEF] || null; if (!def && throwIfNotFound) { throw new RuntimeError(916, (typeof ngDevMode === "undefined" || ngDevMode) && `\uD0C0\uC785 ${stringify(type)}\uC5D0 '\u0275dir' \uC18D\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.`); } return def; } function getPipeDef$1(type) { return type[NG_PIPE_DEF] || null; } function isStandalone(type) { const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef$1(type); return def !== null && def.standalone; } function makeEnvironmentProviders(providers) { return { \u0275providers: providers }; } function provideEnvironmentInitializer(initializerFn) { return makeEnvironmentProviders([{ provide: ENVIRONMENT_INITIALIZER, multi: true, useValue: initializerFn }]); } function importProvidersFrom(...sources) { return { \u0275providers: internalImportProvidersFrom(true, sources), \u0275fromNgModule: true }; } function internalImportProvidersFrom(checkForStandaloneCmp, ...sources) { const providersOut = []; const dedup = /* @__PURE__ */ new Set(); let injectorTypesWithProviders; const collectProviders = (provider) => { providersOut.push(provider); }; deepForEach(sources, (source) => { if ((typeof ngDevMode === "undefined" || ngDevMode) && checkForStandaloneCmp) { const cmpDef = getComponentDef(source); if (cmpDef?.standalone) { throw new RuntimeError(800, `\uD504\uB85C\uBC14\uC774\uB354 \uAC00\uC838\uC624\uAE30\uB294 NgModule \uB610\uB294 ModuleWithProviders\uB97C \uC9C0\uC6D0\uD558\uC9C0\uB9CC \uB3C5\uB9BD\uD615 \uCEF4\uD3EC\uB10C\uD2B8 "${stringifyForError(source)}"\uB97C \uC5BB\uC5C8\uC2B5\uB2C8\uB2E4.`); } } const internalSource = source; if (walkProviderTree(internalSource, collectProviders, [], dedup)) { injectorTypesWithProviders ||= []; injectorTypesWithProviders.push(internalSource); } }); if (injectorTypesWithProviders !== void 0) { processInjectorTypesWithProviders(injectorTypesWithProviders, collectProviders); } return providersOut; } function processInjectorTypesWithProviders(typesWithProviders, visitor) { for (let i = 0; i < typesWithProviders.length; i++) { const { ngModule, providers } = typesWithProviders[i]; deepForEachProvider(providers, (provider) => { ngDevMode && validateProvider(provider, providers || EMPTY_ARRAY, ngModule); visitor(provider, ngModule); }); } } function walkProviderTree(container, visitor, parents, dedup) { container = resolveForwardRef(container); if (!container) return false; let defType = null; let injDef = getInjectorDef(container); const cmpDef = !injDef && getComponentDef(container); if (!injDef && !cmpDef) { const ngModule = container.ngModule; injDef = getInjectorDef(ngModule); if (injDef) { defType = ngModule; } else { return false; } } else if (cmpDef && !cmpDef.standalone) { return false; } else { defType = container; } if (ngDevMode && parents.indexOf(defType) !== -1) { const defName = stringify(defType); const path = parents.map(stringify); throwCyclicDependencyError(defName, path); } const isDuplicate = dedup.has(defType); if (cmpDef) { if (isDuplicate) { return false; } dedup.add(defType); if (cmpDef.dependencies) { const deps = typeof cmpDef.dependencies === "function" ? cmpDef.dependencies() : cmpDef.dependencies; for (const dep of deps) { walkProviderTree(dep, visitor, parents, dedup); } } } else if (injDef) { if (injDef.imports != null && !isDuplicate) { ngDevMode && parents.push(defType); dedup.add(defType); let importTypesWithProviders; try { deepForEach(injDef.imports, (imported) => { if (walkProviderTree(imported, visitor, parents, dedup)) { importTypesWithProviders ||= []; importTypesWithProviders.push(imported); } }); } finally { ngDevMode && parents.pop(); } if (importTypesWithProviders !== void 0) { processInjectorTypesWithProviders(importTypesWithProviders, visitor); } } if (!isDuplicate) { const factory = getFactoryDef(defType) || (() => new defType()); visitor({ provide: defType, useFactory: factory, deps: EMPTY_ARRAY }, defType); visitor({ provide: INJECTOR_DEF_TYPES, useValue: defType, multi: true }, defType); visitor({ provide: ENVIRONMENT_INITIALIZER, useValue: () => \u0275\u0275inject(defType), multi: true }, defType); } const defProviders = injDef.providers; if (defProviders != null && !isDuplicate) { const injectorType = container; deepForEachProvider(defProviders, (provider) => { ngDevMode && validateProvider(provider, defProviders, injectorType); visitor(provider, injectorType); }); } } else { return false; } return defType !== container && container.providers !== void 0; } function validateProvider(provider, providers, containerType) { if (isTypeProvider(provider) || isValueProvider(provider) || isFactoryProvider(provider) || isExistingProvider(provider)) { return; } const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide)); if (!classRef) { throwInvalidProviderError(containerType, providers, provider); } } function deepForEachProvider(providers, fn) { for (let provider of providers) { if (isEnvironmentProviders(provider)) { provider = provider.\u0275providers; } if (Array.isArray(provider)) { deepForEachProvider(provider, fn); } else { fn(provider); } } } var USE_VALUE$1 = getClosureSafeProperty({ provide: String, useValue: getClosureSafeProperty }); function isValueProvider(value) { return value !== null && typeof value == "object" && USE_VALUE$1 in value; } function isExistingProvider(value) { return !!(value && value.useExisting); } function isFactoryProvider(value) { return !!(value && value.useFactory); } function isTypeProvider(value) { return typeof value === "function"; } function isClassProvider(value) { return !!value.useClass; } var INJECTOR_SCOPE = new InjectionToken(ngDevMode ? "Set Injector scope." : ""); var NOT_YET = {}; var CIRCULAR = {}; var NULL_INJECTOR = void 0; function getNullInjector() { if (NULL_INJECTOR === void 0) { NULL_INJECTOR = new NullInjector(); } return NULL_INJECTOR; } var EnvironmentInjector = class { }; var R3Injector = class extends EnvironmentInjector { parent; source; scopes; /** * 토큰과 해당 토큰의 인스턴스를 포함하는 레코드의 맵. * - `null` 값은 레코드가 없음을 의미합니다. 추가 검색을 방지하기 위해 트리-쉐이커블 주입기에서 사용됨. */ records = /* @__PURE__ */ new Map(); /** * 이 주입기에 의해 인스턴스화된 값의 집합으로, `ngOnDestroy` 생명주기 훅을 포함합니다. */ _ngOnDestroyHooks = /* @__PURE__ */ new Set(); _onDestroyHooks = []; /** * 이 주입기가 이전에 파괴되었음을 나타내는 플래그. */ get destroyed() { return this._destroyed; } _destroyed = false; injectorDefTypes; constructor(providers, parent, source, scopes) { super(); this.parent = parent; this.source = source; this.scopes = scopes; forEachSingleProvider(providers, (provider) => this.processProvider(provider)); this.records.set(INJECTOR$1, makeRecord(void 0, this)); if (scopes.has("environment")) { this.records.set(EnvironmentInjector, makeRecord(void 0, this)); } const record = this.records.get(INJECTOR_SCOPE); if (record != null && typeof record.value === "string") { this.scopes.add(record.value); } this.injectorDefTypes = new Set(this.get(INJECTOR_DEF_TYPES, EMPTY_ARRAY, { self: true })); } retrieve(token, options) { const flags = convertToBitFlags(options) || 0; return this.get( token, // 의존성이 선택적 플래그로 요청될 때 DI는 NULL을 기본값으로 반환합니다. flags & 8 ? null : void 0, flags ); } /** * 주입기를 파괴하고 그것과 연관된 모든 인스턴스 또는 제공자에 대한 참조를 해제합니다. * * 또한 훅이 발견된 경우 생성된 모든 인스턴스의 `OnDestroy` 생명주기 훅을 호출합니다. */ destroy() { assertNotDestroyed(this); this._destroyed = true; const prevConsumer = setActiveConsumer(null); try { for (const service of this._ngOnDestroyHooks) { service.ngOnDestroy(); } const onDestroyHooks = this._onDestroyHooks; this._onDestroyHooks = []; for (const hook of onDestroyHooks) { hook(); } } finally { this.records.clear(); this._ngOnDestroyHooks.clear(); this.injectorDefTypes.clear(); setActiveConsumer(prevConsumer); } } onDestroy(callback) { assertNotDestroyed(this); this._onDestroyHooks.push(callback); return () => this.removeOnDestroy(callback); } runInContext(fn) { assertNotDestroyed(this); const previousInjector = setCurrentInjector(this); const previousInjectImplementation = setInjectImplementation(void 0); let prevInjectContext; if (ngDevMode) { prevInjectContext = setInjectorProfilerContext({ injector: this, token: null }); } try { return fn(); } finally { setCurrentInjector(previousInjector); setInjectImplementation(previousInjectImplementation); ngDevMode && setInjectorProfilerContext(prevInjectContext); } } get(token, notFoundValue = THROW_IF_NOT_FOUND, options) { assertNotDestroyed(this); if (token.hasOwnProperty(NG_ENV_ID)) { return token[NG_ENV_ID](this); } const flags = convertToBitFlags(options); let prevInjectContext; if (ngDevMode) { prevInjectContext = setInjectorProfilerContext({ injector: this, token }); } const previousInjector = setCurrentInjector(this); const previousInjectImplementation = setInjectImplementation(void 0); try { if (!(flags & 4)) { let record = this.records.get(token); if (record === void 0) { const def = couldBeInjectableType(token) && getInjectableDef(token); if (def && this.injectableDefInScope(def)) { if (ngDevMode) { runInInjectorProfilerContext(this, token, () => { emitProviderConfiguredEvent(token); }); } record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET); } else { record = null; } this.records.set(token, record); } if (record != null) { return this.hydrate(token, record); } } const nextInjector = !(flags & 2) ? this.parent : getNullInjector(); notFoundValue = flags & 8 && notFoundValue === THROW_IF_NOT_FOUND ? null : notFoundValue; return nextInjector.get(token, notFoundValue); } catch (e) { if (e.name === "NullInjectorError") { const path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || []; path.unshift(stringify(token)); if (previousInjector) { throw e; } else { return catchInjectorError(e, token, "R3InjectorError", this.source); } } else { throw e; } } finally { setInjectImplementation(previousInjectImplementation); setCurrentInjector(previousInjector); ngDevMode && setInjectorProfilerContext(prevInjectContext); } } /** @internal */ resolveInjectorInitializers() { const prevConsumer = setActiveConsumer(null); const previousInjector = setCurrentInjector(this); const previousInjectImplementation = setInjectImplementation(void 0); let prevInjectContext; if (ngDevMode) { prevInjectContext = setInjectorProfilerContext({ injector: this, token: null }); } try { const initializers = this.get(ENVIRONMENT_INITIALIZER, EMPTY_ARRAY, { self: true }); if (ngDevMode && !Array.isArray(initializers)) { throw new RuntimeError(-209, `\uC608\uC0C1\uACFC \uB2E4\uB978 \`ENVIRONMENT_INITIALIZER\` \uD1A0\uD070 \uAC12\uC758 \uC720\uD615 (\uBC30\uC5F4\uC774 \uC608\uC0C1\uB418\uC9C0\uB9CC ${typeof initializers}\uAC00 \uD655\uC778\uB428). \`ENVIRONMENT_INITIALIZER\` \uD1A0\uD070\uC774 \`multi: true\` \uC81C\uACF5\uC790\uB85C \uAD6C\uC131\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.`); } for (const initializer of initializers) { initializer(); } } finally { setCurrentInjector(previousInjector); setInjectImplementation(previousInjectImplementation); ngDevMode && setInjectorProfilerContext(prevInjectContext); setActiveConsumer(prevConsumer); } } toString() { const tokens = []; const records = this.records; for (const token of records.keys()) { tokens.push(stringify(token)); } return `R3Injector[${tokens.join(", ")}]`; } /** * `SingleProvider`를 처리하고 추가합니다. */ processProvider(provider) { provider = resolveForwardRef(provider); let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide); const record = providerToRecord(provider); if (ngDevMode) { runInInjectorProfilerContext(this, token, () => { if (isValueProvider(provider)) { emitInjectorToCreateInstanceEvent(token); emitInstanceCreatedByInjectorEvent(provider.useValue); } emitProviderConfiguredEvent(provider); }); } if (!isTypeProvider(provider) && provider.multi === true) { let multiRecord = this.records.get(token); if (multiRecord) { if (ngDevMode && multiRecord.multi === void 0) { throwMixedMultiProviderError(); } } else { multiRecord = makeRecord(void 0, NOT_YET, true); multiRecord.factory = () => injectArgs(multiRecord.multi); this.records.set(token, multiRecord); } token = provider; multiRecord.multi.push(provider); } else { if (ngDevMode) { const existing = this.records.get(token); if (existing && existing.multi !== void 0) { throwMixedMultiProviderError(); } } } this.records.set(token, record); } hydrate(token, record) { const prevConsumer = setActiveConsumer(null); try { if (record.value === CIRCULAR) { throwCyclicDependencyError(stringify(token)); } else if (record.value === NOT_YET) { record.value = CIRCULAR; if (ngDevMode) { runInInjectorProfilerContext(this, token, () => { emitInjectorToCreateInstanceEvent(token); record.value = record.factory(); emitInstanceCreatedByInjectorEvent(record.value); }); } else { record.value = record.factory(); } } if (typeof record.value === "object" && record.value && hasOnDestroy(record.value)) { this._ngOnDestroyHooks.add(record.value); } return record.value; } finally { setActiveConsumer(prevConsumer); } } injectableDefInScope(def) { if (!def.providedIn) { return false; } const providedIn = resolveForwardRef(def.providedIn); if (typeof providedIn === "string") { return providedIn === "any" || this.scopes.has(providedIn); } else { return this.injectorDefTypes.has(providedIn); } } removeOnDestroy(callback) { const destroyCBIdx = this._onDestroyHooks.indexOf(callback); if (destroyCBIdx !== -1) { this._onDestroyHooks.splice(destroyCBIdx, 1); } } }; function injectableDefOrInjectorDefFactory(token) { const injectableDef = getInjectableDef(token); const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token); if (factory !== null) { return factory; } if (token instanceof InjectionToken) { throw new RuntimeError(204, ngDevMode && `\uD1A0\uD070 ${stringify(token)}\uC5D0 \u0275prov \uC815\uC758\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.`); } if (token instanceof Function) { return getUndecoratedInjectableFactory(token); } throw new RuntimeError(204, ngDevMode && "\uB3C4\uB2EC \uBD88\uAC00\uB2A5"); } function getUndecoratedInjectableFactory(token) { const paramLength = token.length; if (paramLength > 0) { throw new RuntimeError(204, ngDevMode && `${stringify(token)}\uC758 \uBAA8\uB4E0 \uB9E4\uAC1C\uBCC0\uC218\uB97C \uD574\uACB0\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: (${newArray(paramLength, "?").join(", ")}).`); } const inheritedInjectableDef = getInheritedInjectableDef(token); if (inheritedInjectableDef !== null) { return () => inheritedInjectableDef.factory(token); } else { return () => new token(); } } function providerToRecord(provider) { if (isValueProvider(provider)) { return makeRecord(void 0, provider.useValue); } else { const factory = providerToFactory(provider); return makeRecord(factory, NOT_YET); } } function providerToFactory(provider, ngModuleType, providers) { let factory = void 0; if (ngDevMode && isEnvironmentProviders(provider)) { throwInvalidProviderError(void 0, providers, provider); } if (isTypeProvider(provider)) { const unwrappedProvider = resolveForwardRef(provider); return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider); } else { if (isValueProvider(provider)) { factory = () => resolveForwardRef(provider.useValue); } else if (isFactoryProvider(provider)) { factory = () => provider.useFactory(...injectArgs(provider.deps || [])); } else if (isExistingProvider(provider)) { factory = () => \u0275\u0275inject(resolveForwardRef(provider.useExisting)); } else { const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide)); if (ngDevMode && !classRef) { throwInvalidProviderError(ngModuleType, providers, provider); } if (hasDeps(provider)) { factory = () => new classRef(...injectArgs(provider.deps)); } else { return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef); } } } return factory; } function assertNotDestroyed(injector) { if (injector.destroyed) { throw new RuntimeError(205, ngDevMode && "\uC8FC\uC785\uAE30\uAC00 \uC774\uBBF8 \uD30C\uAD34\uB418\uC5C8\uC2B5\uB2C8\uB2E4."); } } function makeRecord(factory, value, multi = false) { return { factory, value, multi: multi ? [] : void 0 }; } function hasDeps(value) { return !!value.deps; } function hasOnDestroy(value) { return value !== null && typeof value === "object" && typeof value.ngOnDestroy === "function"; } function couldBeInjectableType(value) { return typeof value === "function" || typeof value === "object" && value instanceof InjectionToken; } function forEachSingleProvider(providers, fn) { for (const provider of providers) { if (Array.isArray(provider)) { forEachSingleProvider(provider, fn); } else if (provider && isEnvironmentProviders(provider)) { forEachSingleProvider(provider.\u0275providers, fn); } else { fn(provider); } } } function runInInjectionContext(injector, fn) { let internalInjector; if (injector instanceof R3Injector) { assertNotDestroyed(injector); internalInjector = injector; } else { internalInjector = new RetrievingInjector(injector); } let prevInjectorProfilerContext; if (ngDevMode) { prevInjectorProfilerContext = setInjectorProfilerContext({ injector, token: null }); } const prevInjector = setCurrentInjector(internalInjector); const previousInjectImplementation = setInjectImplementation(void 0); try { return fn(); } finally { setCurrentInjector(prevInjector); ngDevMode && setInjectorProfilerContext(prevInjectorProfilerContext); setInjectImplementation(previousInjectImplementation); } } function isInInjectionContext() { return getInjectImplementation() !== void 0 || getCurrentInjector() != null; } function assertInInjectionContext(debugFn) { if (!isInInjectionContext()) { throw new RuntimeError(-203, ngDevMode && debugFn.name + "()\uB294 \uC0DD\uC131\uC790, \uD329\uD1A0\uB9AC \uD568\uC218, \uD544\uB4DC \uCD08\uAE30\uD654\uAE30 \uB610\uB294 `runInInjectionContext`\uC640 \uD568\uAED8 \uC0AC\uC6A9\uB418\uB294 \uD568\uC218\uC640 \uAC19\uC740 \uC8FC\uC785 \uCEE8\uD14D\uC2A4\uD2B8 \uB0B4\uBD80\uC5D0\uC11C\uB9CC \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."); } } var FactoryTarget; (function(FactoryTarget2) { FactoryTarget2[FactoryTarget2["Directive"] = 0] = "Directive"; FactoryTarget2[FactoryTarget2["Component"] = 1] = "Component"; FactoryTarget2[FactoryTarget2["Injectable"] = 2] = "Injectable"; FactoryTarget2[FactoryTarget2["Pipe"] = 3] = "Pipe"; FactoryTarget2[FactoryTarget2["NgModule"] = 4] = "NgModule"; })(FactoryTarget || (FactoryTarget = {})); var R3TemplateDependencyKind; (function(R3TemplateDependencyKind2) { R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive"; R3TemplateDependencyKind2[R3TemplateDependencyKind2["Pipe"] = 1] = "Pipe"; R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule"; })(R3TemplateDependencyKind || (R3TemplateDependencyKind = {})); var ViewEncapsulation$1; (function(ViewEncapsulation2) { ViewEncapsulation2[ViewEncapsulation2["Emulated"] = 0] = "Emulated"; ViewEncapsulation2[ViewEncapsulation2["None"] = 2] = "None"; ViewEncapsulation2[ViewEncapsulation2["ShadowDom"] = 3] = "ShadowDom"; })(ViewEncapsulation$1 || (ViewEncapsulation$1 = {})); function getCompilerFacade(request) { const globalNg = _global["ng"]; if (globalNg && globalNg.\u0275compilerFacade) { return globalNg.\u0275compilerFacade; } if (typeof ngDevMode === "undefined" || ngDevMode) { console.error(`JIT compilation failed for ${request.kind}`, request.type); let message = `The ${request.kind} '${request.type.name}' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available. `; if (request.usage === 1) { message += `The ${request.kind} is part of a library that has been partially compiled. `; message += `However, the Angular Linker has not processed the library such that JIT compilation is used as fallback. `; message += "\n"; message += `Ideally, the library is processed using the Angular Linker to become fully AOT compiled. `; } else { message += `JIT compilation is discouraged for production use-cases! Consider using AOT mode instead. `; } message += `Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server', `; message += `or manually provide the compiler with 'import "@angular/compiler";' before bootstrapping.`; throw new Error(message); } else { throw new Error("JIT compiler unavailable"); } } var angularCoreDiEnv = { "\u0275\u0275defineInjectable": \u0275\u0275defineInjectable, "\u0275\u0275defineInjector": \u0275\u0275defineInjector, "\u0275\u0275inject": \u0275\u0275inject, "\u0275\u0275invalidFactoryDep": \u0275\u0275invalidFactoryDep, "resolveForwardRef": resolveForwardRef }; var Type = Function; function isType(v) { return typeof v === "function"; } var ES5_DELEGATE_CTOR = /^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*(arguments|(?:[^()]+\(\[\],)?[^()]+\(arguments\).*)\)/; var ES2015_INHERITED_CLASS = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/; var ES2015_INHERITED_CLASS_WITH_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/; var ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{[^}]*super\(\.\.\.arguments\)/; function isDelegateCtor(typeStr) { 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); } var ReflectionCapabilities = class { _reflect; constructor(reflect) { this._reflect = reflect || _global["Reflect"]; } factory(t) { return (...args) => new t(...args); } /** @internal */ _zipTypesAndAnnotations(paramTypes, paramAnnotations) { let result; if (typeof paramTypes === "undefined") { result = newArray(paramAnnotations.length); } else { result = newArray(paramTypes.length); } for (let i = 0; i < result.length; i++) { if (typeof paramTypes === "undefined") { result[i] = []; } else if (paramTypes[i] && paramTypes[i] != Object) { result[i] = [paramTypes[i]]; } else { result[i] = []; } if (paramAnnotations && paramAnnotations[i] != null) { result[i] = result[i].concat(paramAnnotations[i]); } } return result; } _ownParameters(type, parentCtor) { const typeStr = type.toString(); if (isDelegateCtor(typeStr)) { return null; } if (type.parameters && type.parameters !== parentCtor.parameters) { return type.parameters; } const tsickleCtorParams = type.ctorParameters; if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) { const ctorParameters = typeof tsickleCtorParams === "function" ? tsickleCtorParams() : tsickleCtorParams; const paramTypes2 = ctorParameters.map((ctorParam) => ctorParam && ctorParam.type); const paramAnnotations2 = ctorParameters.map((ctorParam) => ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators)); return this._zipTypesAndAnnotations(paramTypes2, paramAnnotations2); } const paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS]; const paramTypes = this._reflect && this._reflect.getOwnMetadata && this._reflect.getOwnMetadata("design:paramtypes", type); if (paramTypes || paramAnnotations) { return this._zipTypesAndAnnotations(paramTypes, paramAnnotations); } return newArray(type.length); } parameters(type) { if (!isType(type)) { return []; } const parentCtor = getParentCtor(type); let parameters = this._ownParameters(type, parentCtor); if (!parameters && parentCtor !== Object) { parameters = this.parameters(parentCtor); } return parameters || []; } _ownAnnotations(typeOrFunc, parentCtor) { if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) { let annotations = typeOrFunc.annotations; if (typeof annotations === "function" && annotations.annotations) { annotations = annotations.annotations; } return annotations; } if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) { return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators); } if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) { return typeOrFunc[ANNOTATIONS]; } return null; } annotations(typeOrFunc) { if (!isType(typeOrFunc)) { return []; } const parentCtor = getParentCtor(typeOrFunc); const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || []; const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : []; return parentAnnotations.concat(ownAnnotations); } _ownPropMetadata(typeOrFunc, parentCtor) { if (typeOrFunc.propMetadata && typeOrFunc.propMetadata !== parentCtor.propMetadata) { let propMetadata = typeOrFunc.propMetadata; if (typeof propMetadata === "function" && propMetadata.propMetadata) { propMetadata = propMetadata.propMetadata; } return propMetadata; } if (typeOrFunc.propDecorators && typeOrFunc.propDecorators !== parentCtor.propDecorators) { const propDecorators = typeOrFunc.propDecorators; const propMetadata = {}; Object.keys(propDecorators).forEach((prop) => { propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]); }); return propMetadata; } if (typeOrFunc.hasOwnProperty(PROP_METADATA)) { return typeOrFunc[PROP_METADATA]; } return null; } propMetadata(typeOrFunc) { if (!isType(typeOrFunc)) { return {}; } const parentCtor = getParentCtor(typeOrFunc); const propMetadata = {}; if (parentCtor !== Object) { const parentPropMetadata = this.propMetadata(parentCtor); Object.keys(parentPropMetadata).forEach((propName) => { propMetadata[propName] = parentPropMetadata[propName]; }); } const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor); if (ownPropMetadata) { Object.keys(ownPropMetadata).forEach((propName) => { const decorators = []; if (propMetadata.hasOwnProperty(propName)) { decorators.push(...propMetadata[propName]); } decorators.push(...ownPropMetadata[propName]); propMetadata[propName] = decorators; }); } return propMetadata; } ownPropMetadata(typeOrFunc) { if (!isType(typeOrFunc)) { return {}; } return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {}; } hasLifecycleHook(type, lcProperty) { return type instanceof Type && lcProperty in type.prototype; } }; function convertTsickleDecoratorIntoMetadata(decoratorInvocations) { if (!decoratorInvocations) { return []; } return decoratorInvocations.map((decoratorInvocation) => { const decoratorType = decoratorInvocation.type; const annotationCls = decoratorType.annotationCls; const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : []; return new annotationCls(...annotationArgs); }); } function getParentCtor(ctor) { const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null; const parentCtor = parentProto ? parentProto.constructor : null; return parentCtor || Object; } var HOST = 0; var TVIEW = 1; var FLAGS = 2; var PARENT = 3; var NEXT = 4; var T_HOST = 5; var HYDRATION = 6; var CLEANUP = 7; var CONTEXT = 8; var INJECTOR = 9; var ENVIRONMENT = 10; var RENDERER = 11; var CHILD_HEAD = 12; var CHILD_TAIL = 13; var DECLARATION_VIEW = 14; var DECLARATION_COMPONENT_VIEW = 15; var DECLARATION_LCONTAINER = 16; var PREORDER_HOOK_FLAGS = 17; var QUERIES = 18; var ID = 19; var EMBEDDED_VIEW_INJECTOR = 20; var ON_DESTROY_HOOKS = 21; var EFFECTS_TO_SCHEDULE = 22; var EFFECTS = 23; var REACTIVE_TEMPLATE_CONSUMER = 24; var AFTER_RENDER_SEQUENCES_TO_ADD = 25; var HEADER_OFFSET = 26; var TYPE = 1; var DEHYDRATED_VIEWS = 6; var NATIVE = 7; var VIEW_REFS = 8; var MOVED_VIEWS = 9; var CONTAINER_HEADER_OFFSET = 10; function isLView(value) { return Array.isArray(value) && typeof value[TYPE] === "object"; } function isLContainer(value) { return Array.isArray(value) && value[TYPE] === true; } function isContentQueryHost(tNode) { return (tNode.flags & 4) !== 0; } function isComponentHost(tNode) { return tNode.componentOffset > -1; } function isDirectiveHost(tNode) { return (tNode.flags & 1) === 1; } function isComponentDef(def) { return !!def.template; } function isRootView(target) { return (target[FLAGS] & 512) !== 0; } function isDestroyed(lView) { return (lView[FLAGS] & 256) === 256; } function assertTNodeForLView(tNode, lView) { assertTNodeForTView(tNode, lView[TVIEW]); } function assertTNodeForTView(tNode, tView) { assertTNode(tNode); const tData = tView.data; for (let i = HEADER_OFFSET; i < tData.length; i++) { if (tData[i] === tNode) { return; } } throwError2("\uC774 TNode\uB294 \uC774 TView\uC5D0 \uC18D\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."); } function assertTNode(tNode) { assertDefined(tNode, "TNode\uB294 \uC815\uC758\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4"); if (!(tNode && typeof tNode === "object" && tNode.hasOwnProperty("directiveStylingLast"))) { throwError2("TNode \uC720\uD615\uC774 \uC544\uB2D9\uB2C8\uB2E4, \uBC1B\uC544\uC628 \uAC12: " + tNode); } } function assertTIcu(tIcu) { assertDefined(tIcu, "TIcu\uB294 \uC815\uC758\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4"); if (!(typeof tIcu.currentCaseLViewIndex === "number")) { throwError2("\uAC1D\uCCB4\uB294 TIcu \uD0C0\uC785\uC774 \uC544\uB2D9\uB2C8\uB2E4."); } } function assertComponentType(actual, msg = "\uC804\uB2EC\uB41C \uC720\uD615\uC740 ComponentType\uC774 \uC544\uB2D9\uB2C8\uB2E4, '\u0275cmp' \uC18D\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.") { if (!getComponentDef(actual)) { throwError2(msg); } } function assertNgModuleType(actual, msg = "\uC804\uB2EC\uB41C \uC720\uD615\uC740 NgModuleType\uC774 \uC544\uB2D9\uB2C8\uB2E4, '\u0275mod' \uC18D\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.") { if (!getNgModuleDef(actual)) { throwError2(msg); } } function assertHasParent(tNode) { assertDefined(tNode, "currentTNode\uB294 \uC874\uC7AC\uD574\uC57C \uD569\uB2C8\uB2E4!"); assertDefined(tNode.parent, "currentTNode\uB294 \uBD80\uBAA8\uB97C \uAC00\uC838\uC57C \uD569\uB2C8\uB2E4"); } function assertLContainer(value) { assertDefined(value, "LContainer\uB294 \uC815\uC758\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4"); assertEqual(isLContainer(value), true, "LContainer\uB97C \uC608\uC0C1\uD569\uB2C8\uB2E4"); } function assertLViewOrUndefined(value) { value && assertEqual(isLView(value), true, "LView \uB610\uB294 undefined \uB610\uB294 null\uC744 \uC608\uC0C1\uD569\uB2C8\uB2E4"); } function assertLView(value) { assertDefined(value, "LView\uB294 \uC815\uC758\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4"); assertEqual(isLView(value), true, "LView\uB97C \uC608\uC0C1\uD569\uB2C8\uB2E4"); } function assertFirstCreatePass(tView, errMessage) { assertEqual(tView.firstCreatePass, true, errMessage || "\uCCAB \uBC88\uC9F8 \uC0DD\uC131 \uD328\uC2A4\uC5D0\uC11C\uB9CC \uD638\uCD9C\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4."); } function assertFirstUpdatePass(tView, errMessage) { assertEqual(tView.firstUpdatePass, true, "\uCCAB \uBC88\uC9F8 \uC5C5\uB370\uC774\uD2B8 \uD328\uC2A4\uC5D0\uC11C\uB9CC \uD638\uCD9C\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4."); } function assertDirectiveDef(obj) { if (obj.type === void 0 || obj.selectors == void 0 || obj.inputs === void 0) { throwError2(`DirectiveDef/ComponentDef\uB97C \uC608\uC0C1\uD588\uC73C\uB098 \uC774 \uAC1D\uCCB4\uB294 \uC608\uC0C1\uD558\uB294 \uD615\uD0DC\uAC00 \uC544\uB2CC \uAC83 \uAC19\uC2B5\uB2C8\uB2E4.`); } } function assertIndexInDeclRange(tView, index) { assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index); } function assertIndexInExpandoRange(lView, index) { const tView = lView[1]; assertBetween(tView.expandoStartIndex, lView.length, index); } function assertBetween(lower, upper, index) { if (!(lower <= index && index < upper)) { throwError2(`\uC778\uB371\uC2A4\uAC00 \uBC94\uC704\uB97C \uBC97\uC5B4\uB0AC\uC2B5\uB2C8\uB2E4 (\uC608\uC0C1: ${lower} <= ${index} < ${upper})`); } } function assertProjectionSlots(lView, errMessage) { assertDefined(lView[DECLARATION_COMPONENT_VIEW], "Component views\uB294 \uC874\uC7AC\uD574\uC57C \uD569\uB2C8\uB2E4."); assertDefined(lView[DECLARATION_COMPONENT_VIEW][T_HOST].projection, "\uD504\uB85C\uC81D\uC158 \uB178\uB4DC()\uAC00 \uC788\uB294 \uAD6C\uC131 \uC694\uC18C\uB294 \uC815\uC758\uB41C \uD504\uB85C\uC81D\uC158 \uC2AC\uB86F\uC744 \uAC00\uC838\uC57C \uD569\uB2C8\uB2E4."); } function assertParentView(lView, errMessage) { assertDefined(lView, "Component views\uB294 \uD56D\uC0C1 \uBD80\uBAA8 \uBDF0(\uAD6C\uC131 \uC694\uC18C\uC758 \uD638\uC2A4\uD2B8 \uBDF0)\uB97C \uAC00\uC838\uC57C \uD569\uB2C8\uB2E4."); } function assertNodeInjector(lView, injectorIndex) { assertIndexInExpandoRange(lView, injectorIndex); assertIndexInExpandoRange( lView, injectorIndex + 8 /* NodeInjectorOffset.PARENT */ ); assertNumber(lView[injectorIndex + 0], "injectorIndex\uB294 \uBE14\uB8F8 \uD544\uD130\uB97C \uAC00\uB9AC\uCF1C\uC57C \uD569\uB2C8\uB2E4"); assertNumber(lView[injectorIndex + 1], "injectorIndex\uB294 \uBE14\uB8F8 \uD544\uD130\uB97C \uAC00\uB9AC\uCF1C\uC57C \uD569\uB2C8\uB2E4"); assertNumber(lView[injectorIndex + 2], "injectorIndex\uB294 \uBE14\uB8F8 \uD544\uD130\uB97C \uAC00\uB9AC\uCF1C\uC57C \uD569\uB2C8\uB2E4"); assertNumber(lView[injectorIndex + 3], "injectorIndex\uB294 \uBE14\uB8F8 \uD544\uD130\uB97C \uAC00\uB9AC\uCF1C\uC57C \uD569\uB2C8\uB2E4"); assertNumber(lView[injectorIndex + 4], "injectorIndex\uB294 \uBE14\uB8F8 \uD544\uD130\uB97C \uAC00\uB9AC\uCF1C\uC57C \uD569\uB2C8\uB2E4"); assertNumber(lView[injectorIndex + 5], "injectorIndex\uB294 \uBE14\uB8F8 \uD544\uD130\uB97C \uAC00\uB9AC\uCF1C\uC57C \uD569\uB2C8\uB2E4"); assertNumber(lView[injectorIndex + 6], "injectorIndex\uB294 \uBE14\uB8F8 \uD544\uD130\uB97C \uAC00\uB9AC\uCF1C\uC57C \uD569\uB2C8\uB2E4"); assertNumber(lView[injectorIndex + 7], "injectorIndex\uB294 \uBE14\uB8F8 \uD544\uD130\uB97C \uAC00\uB9AC\uCF1C\uC57C \uD569\uB2C8\uB2E4"); assertNumber(lView[ injectorIndex + 8 /* NodeInjectorOffset.PARENT */ ], "injectorIndex\uB294 \uBD80\uBAA8 \uC8FC\uC785\uAE30\uB97C \uAC00\uB9AC\uCF1C\uC57C \uD569\uB2C8\uB2E4"); } var SimpleChange = class { previousValue; currentValue; firstChange; constructor(previousValue, currentValue, firstChange) { this.previousValue = previousValue; this.currentValue = currentValue; this.firstChange = firstChange; } /** * 새 값이 할당된 첫 번째 값인지 여부를 확인합니다. */ isFirstChange() { return this.firstChange; } }; function applyValueToInputField(instance, inputSignalNode, privateName, value) { if (inputSignalNode !== null) { inputSignalNode.applyValueToInputSignal(inputSignalNode, value); } else { instance[privateName] = value; } } var \u0275\u0275NgOnChangesFeature = /* @__PURE__ */ (() => { const \u0275\u0275NgOnChangesFeatureImpl = () => NgOnChangesFeatureImpl; \u0275\u0275NgOnChangesFeatureImpl.ngInherit = true; return \u0275\u0275NgOnChangesFeatureImpl; })(); function NgOnChangesFeatureImpl(definition) { if (definition.type.prototype.ngOnChanges) { definition.setInput = ngOnChangesSetInput; } return rememberChangeHistoryAndInvokeOnChangesHook; } function rememberChangeHistoryAndInvokeOnChangesHook() { const simpleChangesStore = getSimpleChangesStore(this); const current = simpleChangesStore?.current; if (current) { const previous = simpleChangesStore.previous; if (previous === EMPTY_OBJ) { simpleChangesStore.previous = current; } else { for (let key in current) { previous[key] = current[key]; } } simpleChangesStore.current = null; this.ngOnChanges(current); } } function ngOnChangesSetInput(instance, inputSignalNode, value, publicName, privateName) { const declaredName = this.declaredInputs[publicName]; ngDevMode && assertString(declaredName, "ngOnChanges\uC758 \uC785\uB825 \uC774\uB984\uC740 \uBB38\uC790\uC5F4\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4."); const simpleChangesStore = getSimpleChangesStore(instance) || setSimpleChangesStore(instance, { previous: EMPTY_OBJ, current: null }); const current = simpleChangesStore.current || (simpleChangesStore.current = {}); const previous = simpleChangesStore.previous; const previousChange = previous[declaredName]; current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ); applyValueToInputField(instance, inputSignalNode, privateName, value); } var SIMPLE_CHANGES_STORE = "__ngSimpleChanges__"; function getSimpleChangesStore(instance) { return instance[SIMPLE_CHANGES_STORE] || null; } function setSimpleChangesStore(instance, store2) { return instance[SIMPLE_CHANGES_STORE] = store2; } var profilerCallback = null; var setProfiler = (profiler2) => { profilerCallback = profiler2; }; var profiler = function(event, instance = null, eventFn) { if (profilerCallback != null) { profilerCallback(event, instance, eventFn); } }; var SVG_NAMESPACE = "svg"; var MATH_ML_NAMESPACE = "math"; function unwrapRNode(value) { while (Array.isArray(value)) { value = value[HOST]; } return value; } function unwrapLView(value) { while (Array.isArray(value)) { if (typeof value[TYPE] === "object") return value; value = value[HOST]; } return null; } function getNativeByIndex(index, lView) { ngDevMode && assertIndexInRange(lView, index); ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, "HEADER_OFFSET\uC744 \uCD08\uACFC\uD574\uC57C \uD569\uB2C8\uB2E4."); return unwrapRNode(lView[index]); } function getNativeByTNode(tNode, lView) { ngDevMode && assertTNodeForLView(tNode, lView); ngDevMode && assertIndexInRange(lView, tNode.index); const node = unwrapRNode(lView[tNode.index]); return node; } function getTNode(tView, index) { ngDevMode && assertGreaterThan(index, -1, "TNode\uC758 \uC798\uBABB\uB41C \uC778\uB371\uC2A4"); ngDevMode && assertLessThan(index, tView.data.length, "TNode\uC758 \uC798\uBABB\uB41C \uC778\uB371\uC2A4"); const tNode = tView.data[index]; ngDevMode && tNode !== null && assertTNode(tNode); return tNode; } function load(view, index) { ngDevMode && assertIndexInRange(view, index); return view[index]; } function getComponentLViewByIndex(nodeIndex, hostView) { ngDevMode && assertIndexInRange(hostView, nodeIndex); const slotValue = hostView[nodeIndex]; const lView = isLView(slotValue) ? slotValue : slotValue[HOST]; return lView; } function isCreationMode(view) { return (view[FLAGS] & 4) === 4; } function viewAttachedToChangeDetector(view) { return (view[FLAGS] & 128) === 128; } function viewAttachedToContainer(view) { return isLContainer(view[PARENT]); } function getConstant(consts, index) { if (index === null || index === void 0) return null; ngDevMode && assertIndexInRange(consts, index); return consts[index]; } function resetPreOrderHookFlags(lView) { lView[PREORDER_HOOK_FLAGS] = 0; } function markViewForRefresh(lView) { if (lView[FLAGS] & 1024) { return; } lView[FLAGS] |= 1024; if (viewAttachedToChangeDetector(lView)) { markAncestorsForTraversal(lView); } } function walkUpViews(nestingLevel, currentView) { while (nestingLevel > 0) { ngDevMode && assertDefined(currentView[DECLARATION_VIEW], "\uC911\uCCA9 \uC218\uC900\uC774 0\uBCF4\uB2E4 \uD070 \uACBD\uC6B0 \uC120\uC5B8 \uBDF0\uB294 \uC815\uC758\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4."); currentView = currentView[DECLARATION_VIEW]; nestingLevel--; } return currentView; } function requiresRefreshOrTraversal(lView) { return !!(lView[FLAGS] & (1024 | 8192) || lView[REACTIVE_TEMPLATE_CONSUMER]?.dirty); } function updateAncestorTraversalFlagsOnAttach(lView) { lView[ENVIRONMENT].changeDetectionScheduler?.notify( 8 /* NotificationSource.ViewAttached */ ); if (lView[FLAGS] & 64) { lView[FLAGS] |= 1024; } if (requiresRefreshOrTraversal(lView)) { markAncestorsForTraversal(lView); } } function markAncestorsForTraversal(lView) { lView[ENVIRONMENT].changeDetectionScheduler?.notify( 0 /* NotificationSource.MarkAncestorsForTraversal */ ); let parent = getLViewParent(lView); while (parent !== null) { if (parent[FLAGS] & 8192) { break; } parent[FLAGS] |= 8192; if (!viewAttachedToChangeDetector(parent)) { break; } parent = getLViewParent(parent); } } function storeLViewOnDestroy(lView, onDestroyCallback) { if (isDestroyed(lView)) { throw new RuntimeError(911, ngDevMode && "\uBDF0\uAC00 \uC774\uBBF8 \uD30C\uAD34\uB418\uC5C8\uC2B5\uB2C8\uB2E4."); } if (lView[ON_DESTROY_HOOKS] === null) { lView[ON_DESTROY_HOOKS] = []; } lView[ON_DESTROY_HOOKS].push(onDestroyCallback); } function removeLViewOnDestroy(lView, onDestroyCallback) { if (lView[ON_DESTROY_HOOKS] === null) return; const destroyCBIdx = lView[ON_DESTROY_HOOKS].indexOf(onDestroyCallback); if (destroyCBIdx !== -1) { lView[ON_DESTROY_HOOKS].splice(destroyCBIdx, 1); } } function getLViewParent(lView) { ngDevMode && assertLView(lView); const parent = lView[PARENT]; return isLContainer(parent) ? parent[PARENT] : parent; } function getOrCreateLViewCleanup(view) { return view[CLEANUP] ??= []; } function getOrCreateTViewCleanup(tView) { return tView.cleanup ??= []; } function storeCleanupWithContext(tView, lView, context2, cleanupFn) { const lCleanup = getOrCreateLViewCleanup(lView); ngDevMode && assertDefined(context2, "\uD504\uB808\uC784\uC6CC\uD06C \uC218\uC900\uC758 \uD30C\uAD34 \uD6C5\uC744 \uB4F1\uB85D\uD560 \uB54C \uD074\uB9B0\uC5C5 \uCEE8\uD14D\uC2A4\uD2B8\uB294 \uD544\uC218\uC785\uB2C8\uB2E4."); lCleanup.push(context2); if (tView.firstCreatePass) { getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1); } else { if (ngDevMode) { Object.freeze(getOrCreateTViewCleanup(tView)); } } } var instructionState = { lFrame: createLFrame(null), bindingsEnabled: true, skipHydrationRootTNode: null }; var CheckNoChangesMode; (function(CheckNoChangesMode2) { CheckNoChangesMode2[CheckNoChangesMode2["Off"] = 0] = "Off"; CheckNoChangesMode2[CheckNoChangesMode2["Exhaustive"] = 1] = "Exhaustive"; CheckNoChangesMode2[CheckNoChangesMode2["OnlyDirtyViews"] = 2] = "OnlyDirtyViews"; })(CheckNoChangesMode || (CheckNoChangesMode = {})); var _checkNoChangesMode = 0; var _isRefreshingViews = false; function getElementDepthCount() { return instructionState.lFrame.elementDepthCount; } function increaseElementDepthCount() { instructionState.lFrame.elementDepthCount++; } function decreaseElementDepthCount() { instructionState.lFrame.elementDepthCount--; } function getBindingsEnabled() { return instructionState.bindingsEnabled; } function isInSkipHydrationBlock$1() { return instructionState.skipHydrationRootTNode !== null; } function isSkipHydrationRootTNode(tNode) { return instructionState.skipHydrationRootTNode === tNode; } function \u0275\u0275enableBindings() { instructionState.bindingsEnabled = true; } function enterSkipHydrationBlock(tNode) { instructionState.skipHydrationRootTNode = tNode; } function \u0275\u0275disableBindings() { instructionState.bindingsEnabled = false; } function leaveSkipHydrationBlock() { instructionState.skipHydrationRootTNode = null; } function getLView() { return instructionState.lFrame.lView; } function getTView() { return instructionState.lFrame.tView; } function \u0275\u0275restoreView(viewToRestore) { instructionState.lFrame.contextLView = viewToRestore; return viewToRestore[CONTEXT]; } function \u0275\u0275resetView(value) { instructionState.lFrame.contextLView = null; return value; } function getCurrentTNode() { let currentTNode = getCurrentTNodePlaceholderOk(); while (currentTNode !== null && currentTNode.type === 64) { currentTNode = currentTNode.parent; } return currentTNode; } function getCurrentTNodePlaceholderOk() { return instructionState.lFrame.currentTNode; } function getCurrentParentTNode() { const lFrame = instructionState.lFrame; const currentTNode = lFrame.currentTNode; return lFrame.isParent ? currentTNode : currentTNode.parent; } function setCurrentTNode(tNode, isParent) { ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView); const lFrame = instructionState.lFrame; lFrame.currentTNode = tNode; lFrame.isParent = isParent; } function isCurrentTNodeParent() { return instructionState.lFrame.isParent; } function setCurrentTNodeAsNotParent() { instructionState.lFrame.isParent = false; } function getContextLView() { const contextLView = instructionState.lFrame.contextLView; ngDevMode && assertDefined(contextLView, "contextLView must be defined."); return contextLView; } function isInCheckNoChangesMode() { !ngDevMode && throwError2("Must never be called in production mode"); return _checkNoChangesMode !== CheckNoChangesMode.Off; } function isExhaustiveCheckNoChanges() { !ngDevMode && throwError2("Must never be called in production mode"); return _checkNoChangesMode === CheckNoChangesMode.Exhaustive; } function setIsInCheckNoChangesMode(mode) { !ngDevMode && throwError2("Must never be called in production mode"); _checkNoChangesMode = mode; } function isRefreshingViews() { return _isRefreshingViews; } function setIsRefreshingViews(mode) { const prev = _isRefreshingViews; _isRefreshingViews = mode; return prev; } function getBindingRoot() { const lFrame = instructionState.lFrame; let index = lFrame.bindingRootIndex; if (index === -1) { index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex; } return index; } function getBindingIndex() { return instructionState.lFrame.bindingIndex; } function setBindingIndex(value) { return instructionState.lFrame.bindingIndex = value; } function nextBindingIndex() { return instructionState.lFrame.bindingIndex++; } function incrementBindingIndex(count) { const lFrame = instructionState.lFrame; const index = lFrame.bindingIndex; lFrame.bindingIndex = lFrame.bindingIndex + count; return index; } function isInI18nBlock() { return instructionState.lFrame.inI18n; } function setInI18nBlock(isInI18nBlock2) { instructionState.lFrame.inI18n = isInI18nBlock2; } function setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) { const lFrame = instructionState.lFrame; lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex; setCurrentDirectiveIndex(currentDirectiveIndex); } function getCurrentDirectiveIndex() { return instructionState.lFrame.currentDirectiveIndex; } function setCurrentDirectiveIndex(currentDirectiveIndex) { instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex; } function getCurrentDirectiveDef(tData) { const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex; return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex]; } function getCurrentQueryIndex() { return instructionState.lFrame.currentQueryIndex; } function setCurrentQueryIndex(value) { instructionState.lFrame.currentQueryIndex = value; } function getDeclarationTNode(lView) { const tView = lView[TVIEW]; if (tView.type === 2) { ngDevMode && assertDefined(tView.declTNode, "Embedded TNodes should have declaration parents."); return tView.declTNode; } if (tView.type === 1) { return lView[T_HOST]; } return null; } function enterDI(lView, tNode, flags) { ngDevMode && assertLViewOrUndefined(lView); if (flags & 4) { ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]); let parentTNode = tNode; let parentLView = lView; while (true) { ngDevMode && assertDefined(parentTNode, "Parent TNode should be defined"); parentTNode = parentTNode.parent; if (parentTNode === null && !(flags & 1)) { parentTNode = getDeclarationTNode(parentLView); if (parentTNode === null) break; ngDevMode && assertDefined(parentLView, "Parent LView should be defined"); parentLView = parentLView[DECLARATION_VIEW]; if (parentTNode.type & (2 | 8)) { break; } } else { break; } } if (parentTNode === null) { return false; } else { tNode = parentTNode; lView = parentLView; } } ngDevMode && assertTNodeForLView(tNode, lView); const lFrame = instructionState.lFrame = allocLFrame(); lFrame.currentTNode = tNode; lFrame.lView = lView; return true; } function enterView(newView) { ngDevMode && assertNotEqual(newView[0], newView[1], "????"); ngDevMode && assertLViewOrUndefined(newView); const newLFrame = allocLFrame(); if (ngDevMode) { assertEqual(newLFrame.isParent, true, "Expected clean LFrame"); assertEqual(newLFrame.lView, null, "Expected clean LFrame"); assertEqual(newLFrame.tView, null, "Expected clean LFrame"); assertEqual(newLFrame.selectedIndex, -1, "Expected clean LFrame"); assertEqual(newLFrame.elementDepthCount, 0, "Expected clean LFrame"); assertEqual(newLFrame.currentDirectiveIndex, -1, "Expected clean LFrame"); assertEqual(newLFrame.currentNamespace, null, "Expected clean LFrame"); assertEqual(newLFrame.bindingRootIndex, -1, "Expected clean LFrame"); assertEqual(newLFrame.currentQueryIndex, 0, "Expected clean LFrame"); } const tView = newView[TVIEW]; instructionState.lFrame = newLFrame; ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView); newLFrame.currentTNode = tView.firstChild; newLFrame.lView = newView; newLFrame.tView = tView; newLFrame.contextLView = newView; newLFrame.bindingIndex = tView.bindingStartIndex; newLFrame.inI18n = false; } function allocLFrame() { const currentLFrame = instructionState.lFrame; const childLFrame = currentLFrame === null ? null : currentLFrame.child; const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame; return newLFrame; } function createLFrame(parent) { const lFrame = { currentTNode: null, isParent: true, lView: null, tView: null, selectedIndex: -1, contextLView: null, elementDepthCount: 0, currentNamespace: null, currentDirectiveIndex: -1, bindingRootIndex: -1, bindingIndex: -1, currentQueryIndex: 0, parent, child: null, inI18n: false }; parent !== null && (parent.child = lFrame); return lFrame; } function leaveViewLight() { const oldLFrame = instructionState.lFrame; instructionState.lFrame = oldLFrame.parent; oldLFrame.currentTNode = null; oldLFrame.lView = null; return oldLFrame; } var leaveDI = leaveViewLight; function leaveView() { const oldLFrame = leaveViewLight(); oldLFrame.isParent = true; oldLFrame.tView = null; oldLFrame.selectedIndex = -1; oldLFrame.contextLView = null; oldLFrame.elementDepthCount = 0; oldLFrame.currentDirectiveIndex = -1; oldLFrame.currentNamespace = null; oldLFrame.bindingRootIndex = -1; oldLFrame.bindingIndex = -1; oldLFrame.currentQueryIndex = 0; } function nextContextImpl(level) { const contextLView = instructionState.lFrame.contextLView = walkUpViews(level, instructionState.lFrame.contextLView); return contextLView[CONTEXT]; } function getSelectedIndex() { return instructionState.lFrame.selectedIndex; } function setSelectedIndex(index) { ngDevMode && index !== -1 && assertGreaterThanOrEqual(index, HEADER_OFFSET, "Index must be past HEADER_OFFSET (or -1)."); ngDevMode && assertLessThan(index, instructionState.lFrame.lView.length, "Can't set index passed end of LView"); instructionState.lFrame.selectedIndex = index; } function getSelectedTNode() { const lFrame = instructionState.lFrame; return getTNode(lFrame.tView, lFrame.selectedIndex); } function \u0275\u0275namespaceSVG() { instructionState.lFrame.currentNamespace = SVG_NAMESPACE; } function \u0275\u0275namespaceMathML() { instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE; } function \u0275\u0275namespaceHTML() { namespaceHTMLInternal(); } function namespaceHTMLInternal() { instructionState.lFrame.currentNamespace = null; } function getNamespace() { return instructionState.lFrame.currentNamespace; } var _wasLastNodeCreated = true; function wasLastNodeCreated() { return _wasLastNodeCreated; } function lastNodeWasCreated(flag) { _wasLastNodeCreated = flag; } function registerPreOrderHooks(directiveIndex, directiveDef, tView) { ngDevMode && assertFirstCreatePass(tView); const { ngOnChanges, ngOnInit, ngDoCheck } = directiveDef.type.prototype; if (ngOnChanges) { const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef); (tView.preOrderHooks ??= []).push(directiveIndex, wrappedOnChanges); (tView.preOrderCheckHooks ??= []).push(directiveIndex, wrappedOnChanges); } if (ngOnInit) { (tView.preOrderHooks ??= []).push(0 - directiveIndex, ngOnInit); } if (ngDoCheck) { (tView.preOrderHooks ??= []).push(directiveIndex, ngDoCheck); (tView.preOrderCheckHooks ??= []).push(directiveIndex, ngDoCheck); } } function registerPostOrderHooks(tView, tNode) { ngDevMode && assertFirstCreatePass(tView); for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) { const directiveDef = tView.data[i]; ngDevMode && assertDefined(directiveDef, "Expecting DirectiveDef"); const lifecycleHooks = directiveDef.type.prototype; const { ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, ngOnDestroy } = lifecycleHooks; if (ngAfterContentInit) { (tView.contentHooks ??= []).push(-i, ngAfterContentInit); } if (ngAfterContentChecked) { (tView.contentHooks ??= []).push(i, ngAfterContentChecked); (tView.contentCheckHooks ??= []).push(i, ngAfterContentChecked); } if (ngAfterViewInit) { (tView.viewHooks ??= []).push(-i, ngAfterViewInit); } if (ngAfterViewChecked) { (tView.viewHooks ??= []).push(i, ngAfterViewChecked); (tView.viewCheckHooks ??= []).push(i, ngAfterViewChecked); } if (ngOnDestroy != null) { (tView.destroyHooks ??= []).push(i, ngOnDestroy); } } } function executeCheckHooks(lView, hooks, nodeIndex) { callHooks(lView, hooks, 3, nodeIndex); } function executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) { ngDevMode && assertNotEqual(initPhase, 3, "Init pre-order hooks should not be called more than once"); if ((lView[FLAGS] & 3) === initPhase) { callHooks(lView, hooks, initPhase, nodeIndex); } } function incrementInitPhaseFlags(lView, initPhase) { ngDevMode && assertNotEqual(initPhase, 3, "Init hooks phase should not be incremented after all init hooks have been run."); let flags = lView[FLAGS]; if ((flags & 3) === initPhase) { flags &= 16383; flags += 1; lView[FLAGS] = flags; } } function callHooks(currentView, arr, initPhase, currentNodeIndex) { ngDevMode && assertEqual(isInCheckNoChangesMode(), false, "Hooks should never be run when in check no changes mode."); const startIndex = currentNodeIndex !== void 0 ? currentView[PREORDER_HOOK_FLAGS] & 65535 : 0; const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1; const max = arr.length - 1; let lastNodeIndexFound = 0; for (let i = startIndex; i < max; i++) { const hook = arr[i + 1]; if (typeof hook === "number") { lastNodeIndexFound = arr[i]; if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) { break; } } else { const isInitHook = arr[i] < 0; if (isInitHook) { currentView[PREORDER_HOOK_FLAGS] += 65536; } if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) { callHook(currentView, initPhase, arr, i); currentView[PREORDER_HOOK_FLAGS] = (currentView[PREORDER_HOOK_FLAGS] & 4294901760) + i + 2; } i++; } } } function callHookInternal(directive, hook) { profiler(4, directive, hook); const prevConsumer = setActiveConsumer(null); try { hook.call(directive); } finally { setActiveConsumer(prevConsumer); profiler(5, directive, hook); } } function callHook(currentView, initPhase, arr, i) { const isInitHook = arr[i] < 0; const hook = arr[i + 1]; const directiveIndex = isInitHook ? -arr[i] : arr[i]; const directive = currentView[directiveIndex]; if (isInitHook) { const indexWithintInitPhase = currentView[FLAGS] >> 14; if (indexWithintInitPhase < currentView[PREORDER_HOOK_FLAGS] >> 16 && (currentView[FLAGS] & 3) === initPhase) { currentView[FLAGS] += 16384; callHookInternal(directive, hook); } } else { callHookInternal(directive, hook); } } var NO_PARENT_INJECTOR = -1; var NodeInjectorFactory = class { factory; /** * 팩토리를 사용할 때 활성화할 주입 구현. */ injectImpl; /** * 재귀 루프에 진입하고 있는지 확인하기 위해 팩토리 호출 중에 true로 설정된 마커. * 재귀 루프는 오류가 표시되게 합니다. */ resolving = false; /** * 토큰이 같은 노드에서 `viewProviders`에 선언된 다른 토큰을 볼 수 있음을 표시합니다. */ canSeeViewProviders; /** * `multi` 제공자의 경우 사용할 팩토리 배열. */ multi; /** * 구성 요소에 속하는 `multi` 제공자의 수입니다. * * 여러 구성 요소와 지시문이 `multi` 제공자를 선언할 때 올바른 순서로 연결되기 때문에 필요합니다. * * 예시: * * 여기서 선언된 단일 요소에서 활성화된 구성 요소와 지시문이 있는 경우 * ```ts * component: * providers: [ {provide: String, useValue: 'component', multi: true} ], * viewProviders: [ {provide: String, useValue: 'componentView', multi: true} ], * * directive: * providers: [ {provide: String, useValue: 'directive', multi: true} ], * ``` * * 그러면 예상 결과는 다음과 같습니다: * * ```ts * providers: ['component', 'directive'] * viewProviders: ['component', 'componentView', 'directive'] * ``` * * 생각할 수 있는 방법은 `viewProviders`가 구성 요소 뒤에 삽입되고 지시문 앞에 삽입되었다는 것입니다. * 그래서 우리는 구성 요소에 의해 몇 개의 `multi`가 선언되었는지 알아야 합니다. */ componentProviders; /** * `data`의 현재 팩토리 인덱스. `viewProviders` 및 `providers` 병합에 필요합니다. * `providerFactory`를 보십시오. */ index; /** * 같은 `multi` 제공자가 `providers`와 `viewProviders`에 선언될 수 있기 때문에 `viewProviders`가 `providers`를 가릴 수 있습니다. * 이러한 이유로 우리는 `providers`의 `provideFactory`를 저장하여 `providers`를 `viewProviders`로 확장할 수 있도록 합니다. * * 예시: * * 주어진: * ```ts * providers: [ {provide: String, useValue: 'all', multi: true} ], * viewProviders: [ {provide: String, useValue: 'viewOnly', multi: true} ], * ``` * * 우리는 콘텐츠 주입의 경우 `['all']`을 반환해야 하지만, 뷰 주입의 경우 `['all', 'viewOnly']`을 반환해야 합니다. * 우리는 또한 공유 인스턴스(우리 경우 `all`)가 콘텐츠와 뷰 주입 모두에서 정확히 동일한 인스턴스인지 확인해야 합니다. (이중 인스턴스화되지 않도록 해야 합니다.) * 이러한 이유로 `viewProviders`의 `Factory`는 가려진 `providers` 팩토리에 대한 포인터를 가지고 있어야 `providers`(`['all']`)를 인스턴스화한 다음 `viewProviders`(`['all'] + ['viewOnly'] = * ['all', 'viewOnly']`)로 확장할 수 있습니다. */ providerFactory; constructor(factory, isViewProvider, injectImplementation) { this.factory = factory; ngDevMode && assertDefined(factory, "\uD329\uD1A0\uB9AC\uAC00 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."); ngDevMode && assertEqual(typeof factory, "function", "\uD329\uD1A0\uB9AC \uD568\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4."); this.canSeeViewProviders = isViewProvider; this.injectImpl = injectImplementation; } }; function toTNodeTypeAsString(tNodeType) { let text = ""; tNodeType & 1 && (text += "|Text"); tNodeType & 2 && (text += "|Element"); tNodeType & 4 && (text += "|Container"); tNodeType & 8 && (text += "|ElementContainer"); tNodeType & 16 && (text += "|Projection"); tNodeType & 32 && (text += "|IcuContainer"); tNodeType & 64 && (text += "|Placeholder"); tNodeType & 128 && (text += "|LetDeclaration"); return text.length > 0 ? text.substring(1) : text; } function isTNodeShape(value) { return value != null && typeof value === "object" && (value.insertBeforeIndex === null || typeof value.insertBeforeIndex === "number" || Array.isArray(value.insertBeforeIndex)); } function hasClassInput(tNode) { return (tNode.flags & 8) !== 0; } function hasStyleInput(tNode) { return (tNode.flags & 16) !== 0; } function assertTNodeType(tNode, expectedTypes, message) { assertDefined(tNode, "should be called with a TNode"); if ((tNode.type & expectedTypes) === 0) { throwError2(message || `Expected [${toTNodeTypeAsString(expectedTypes)}] but got ${toTNodeTypeAsString(tNode.type)}.`); } } function assertPureTNodeType(type) { if (!(type === 2 || type === 1 || type === 4 || type === 8 || type === 32 || type === 16 || type === 64 || type === 128)) { throwError2(`Expected TNodeType to have only a single type selected, but got ${toTNodeTypeAsString(type)}.`); } } function setUpAttributes(renderer, native, attrs) { let i = 0; while (i < attrs.length) { const value = attrs[i]; if (typeof value === "number") { if (value !== 0) { break; } i++; const namespaceURI = attrs[i++]; const attrName = attrs[i++]; const attrVal = attrs[i++]; renderer.setAttribute(native, attrName, attrVal, namespaceURI); } else { const attrName = value; const attrVal = attrs[++i]; if (isAnimationProp(attrName)) { renderer.setProperty(native, attrName, attrVal); } else { renderer.setAttribute(native, attrName, attrVal); } i++; } } return i; } function isNameOnlyAttributeMarker(marker) { return marker === 3 || marker === 4 || marker === 6; } function isAnimationProp(name) { return name.charCodeAt(0) === 64; } function mergeHostAttrs(dst, src) { if (src === null || src.length === 0) ; else if (dst === null || dst.length === 0) { dst = src.slice(); } else { let srcMarker = -1; for (let i = 0; i < src.length; i++) { const item = src[i]; if (typeof item === "number") { srcMarker = item; } else { if (srcMarker === 0) ; else if (srcMarker === -1 || srcMarker === 2) { mergeHostAttribute(dst, srcMarker, item, null, src[++i]); } else { mergeHostAttribute(dst, srcMarker, item, null, null); } } } } return dst; } function mergeHostAttribute(dst, marker, key1, key2, value) { let i = 0; let markerInsertPosition = dst.length; if (marker === -1) { markerInsertPosition = -1; } else { while (i < dst.length) { const dstValue = dst[i++]; if (typeof dstValue === "number") { if (dstValue === marker) { markerInsertPosition = -1; break; } else if (dstValue > marker) { markerInsertPosition = i - 1; break; } } } } while (i < dst.length) { const item = dst[i]; if (typeof item === "number") { break; } else if (item === key1) { { if (value !== null) { dst[i + 1] = value; } return; } } i++; if (value !== null) i++; } if (markerInsertPosition !== -1) { dst.splice(markerInsertPosition, 0, marker); i = markerInsertPosition + 1; } dst.splice(i++, 0, key1); if (value !== null) { dst.splice(i++, 0, value); } } var NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {}; var ChainedInjector = class { injector; parentInjector; constructor(injector, parentInjector) { this.injector = injector; this.parentInjector = parentInjector; } get(token, notFoundValue, options) { const value = this.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, options); if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR || notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) { return value; } return this.parentInjector.get(token, notFoundValue, options); } }; function hasParentInjector(parentLocation) { return parentLocation !== NO_PARENT_INJECTOR; } function getParentInjectorIndex(parentLocation) { if (ngDevMode) { assertNumber(parentLocation, "\uC22B\uC790\uAC00 \uC608\uC0C1\uB429\uB2C8\uB2E4."); assertNotEqual(parentLocation, -1, "\uC720\uD6A8\uD55C \uC0C1\uD0DC\uAC00 \uC544\uB2D9\uB2C8\uB2E4."); const parentInjectorIndex = parentLocation & 32767; assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, "\uBD80\uBAA8 injector\uB294 HEADER_OFFSET\uC744 \uCD08\uACFC\uD574\uC57C \uD569\uB2C8\uB2E4."); } return parentLocation & 32767; } function getParentInjectorViewOffset(parentLocation) { return parentLocation >> 16; } function getParentInjectorView(location2, startView) { let viewOffset = getParentInjectorViewOffset(location2); let parentView = startView; while (viewOffset > 0) { parentView = parentView[DECLARATION_VIEW]; viewOffset--; } return parentView; } function isRouterOutletInjector(currentInjector) { return currentInjector instanceof ChainedInjector && typeof currentInjector.injector.__ngOutletInjector === "function"; } var includeViewProviders = true; function setIncludeViewProviders(v) { const oldValue = includeViewProviders; includeViewProviders = v; return oldValue; } var BLOOM_SIZE = 256; var BLOOM_MASK = BLOOM_SIZE - 1; var BLOOM_BUCKET_BITS = 5; var nextNgElementId = 0; var NOT_FOUND2 = {}; function bloomAdd(injectorIndex, tView, type) { ngDevMode && assertEqual(tView.firstCreatePass, true, "expected firstCreatePass to be true"); let id; if (typeof type === "string") { id = type.charCodeAt(0) || 0; } else if (type.hasOwnProperty(NG_ELEMENT_ID)) { id = type[NG_ELEMENT_ID]; } if (id == null) { id = type[NG_ELEMENT_ID] = nextNgElementId++; } const bloomHash = id & BLOOM_MASK; const mask = 1 << bloomHash; tView.data[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask; } function getOrCreateNodeInjectorForNode(tNode, lView) { const existingInjectorIndex = getInjectorIndex(tNode, lView); if (existingInjectorIndex !== -1) { return existingInjectorIndex; } const tView = lView[TVIEW]; if (tView.firstCreatePass) { tNode.injectorIndex = lView.length; insertBloom(tView.data, tNode); insertBloom(lView, null); insertBloom(tView.blueprint, null); } const parentLoc = getParentInjectorLocation(tNode, lView); const injectorIndex = tNode.injectorIndex; if (hasParentInjector(parentLoc)) { const parentIndex = getParentInjectorIndex(parentLoc); const parentLView = getParentInjectorView(parentLoc, lView); const parentData = parentLView[TVIEW].data; for (let i = 0; i < 8; i++) { lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i]; } } lView[ injectorIndex + 8 /* NodeInjectorOffset.PARENT */ ] = parentLoc; return injectorIndex; } function insertBloom(arr, footer) { arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer); } function getInjectorIndex(tNode, lView) { if (tNode.injectorIndex === -1 || // 인젝터 인덱스가 부모의 인젝터 인덱스와 동일하면, 해당 인덱스는 부모 노드로부터 // 복사된 것입니다. 이 노드에는 인젝터가 아직 생성되지 않았습니다. tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex || // 첫 번째 템플릿 패스 이후에 인젝터 인덱스가 존재할 수 있지만, 부모 값이 // 이 인스턴스에 대해 아직 계산되지 않았을 수 있습니다. lView[ tNode.injectorIndex + 8 /* NodeInjectorOffset.PARENT */ ] === null) { return -1; } else { ngDevMode && assertIndexInRange(lView, tNode.injectorIndex); return tNode.injectorIndex; } } function getParentInjectorLocation(tNode, lView) { if (tNode.parent && tNode.parent.injectorIndex !== -1) { return tNode.parent.injectorIndex; } let declarationViewOffset = 0; let parentTNode = null; let lViewCursor = lView; while (lViewCursor !== null) { parentTNode = getTNodeFromLView(lViewCursor); if (parentTNode === null) { return NO_PARENT_INJECTOR; } ngDevMode && parentTNode && assertTNodeForLView(parentTNode, lViewCursor[DECLARATION_VIEW]); declarationViewOffset++; lViewCursor = lViewCursor[DECLARATION_VIEW]; if (parentTNode.injectorIndex !== -1) { return parentTNode.injectorIndex | declarationViewOffset << 16; } } return NO_PARENT_INJECTOR; } function diPublicInInjector(injectorIndex, tView, token) { bloomAdd(injectorIndex, tView, token); } function injectAttributeImpl(tNode, attrNameToInject) { ngDevMode && assertTNodeType( tNode, 12 | 3 /* TNodeType.AnyRNode */ ); ngDevMode && assertDefined(tNode, "expecting tNode"); if (attrNameToInject === "class") { return tNode.classes; } if (attrNameToInject === "style") { return tNode.styles; } const attrs = tNode.attrs; if (attrs) { const attrsLength = attrs.length; let i = 0; while (i < attrsLength) { const value = attrs[i]; if (isNameOnlyAttributeMarker(value)) break; if (value === 0) { i = i + 2; } else if (typeof value === "number") { i++; while (i < attrsLength && typeof attrs[i] === "string") { i++; } } else if (value === attrNameToInject) { return attrs[i + 1]; } else { i = i + 2; } } } return null; } function notFoundValueOrThrow(notFoundValue, token, flags) { if (flags & 8 || notFoundValue !== void 0) { return notFoundValue; } else { throwProviderNotFoundError(token, "NodeInjector"); } } function lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) { if (flags & 8 && notFoundValue === void 0) { notFoundValue = null; } if ((flags & (2 | 1)) === 0) { const moduleInjector = lView[INJECTOR]; const previousInjectImplementation = setInjectImplementation(void 0); try { if (moduleInjector) { return moduleInjector.get( token, notFoundValue, flags & 8 /* InternalInjectFlags.Optional */ ); } else { return injectRootLimpMode( token, notFoundValue, flags & 8 /* InternalInjectFlags.Optional */ ); } } finally { setInjectImplementation(previousInjectImplementation); } } return notFoundValueOrThrow(notFoundValue, token, flags); } function getOrCreateInjectable(tNode, lView, token, flags = 0, notFoundValue) { if (tNode !== null) { if (lView[FLAGS] & 2048 && // `Self` 플래그가 설정될 때, 현재 노드 인젝터에서 토큰이 존재해야 하므로 // 내장 뷰 인젝터를건너뛰어야 합니다. !(flags & 2)) { const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, NOT_FOUND2); if (embeddedInjectorValue !== NOT_FOUND2) { return embeddedInjectorValue; } } const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND2); if (value !== NOT_FOUND2) { return value; } } return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue); } function lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue) { const bloomHash = bloomHashBitOrFactory(token); if (typeof bloomHash === "function") { if (!enterDI(lView, tNode, flags)) { return flags & 1 ? notFoundValueOrThrow(notFoundValue, token, flags) : lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue); } try { let value; if (ngDevMode) { runInInjectorProfilerContext(new NodeInjector(getCurrentTNode(), getLView()), token, () => { emitInjectorToCreateInstanceEvent(token); value = bloomHash(flags); emitInstanceCreatedByInjectorEvent(value); }); } else { value = bloomHash(flags); } if (value == null && !(flags & 8)) { throwProviderNotFoundError(token); } else { return value; } } finally { leaveDI(); } } else if (typeof bloomHash === "number") { let previousTView = null; let injectorIndex = getInjectorIndex(tNode, lView); let parentLocation = NO_PARENT_INJECTOR; let hostTElementNode = flags & 1 ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null; if (injectorIndex === -1 || flags & 4) { parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) : lView[ injectorIndex + 8 /* NodeInjectorOffset.PARENT */ ]; if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) { injectorIndex = -1; } else { previousTView = lView[TVIEW]; injectorIndex = getParentInjectorIndex(parentLocation); lView = getParentInjectorView(parentLocation, lView); } } while (injectorIndex !== -1) { ngDevMode && assertNodeInjector(lView, injectorIndex); const tView = lView[TVIEW]; ngDevMode && assertTNodeForLView(tView.data[ injectorIndex + 8 /* NodeInjectorOffset.TNODE */ ], lView); if (bloomHasToken(bloomHash, injectorIndex, tView.data)) { const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode); if (instance !== NOT_FOUND2) { return instance; } } parentLocation = lView[ injectorIndex + 8 /* NodeInjectorOffset.PARENT */ ]; if (parentLocation !== NO_PARENT_INJECTOR && shouldSearchParent(flags, lView[TVIEW].data[ injectorIndex + 8 /* NodeInjectorOffset.TNODE */ ] === hostTElementNode) && bloomHasToken(bloomHash, injectorIndex, lView)) { previousTView = tView; injectorIndex = getParentInjectorIndex(parentLocation); lView = getParentInjectorView(parentLocation, lView); } else { injectorIndex = -1; } } } return notFoundValue; } function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) { const currentTView = lView[TVIEW]; const tNode = currentTView.data[ injectorIndex + 8 /* NodeInjectorOffset.TNODE */ ]; const canAccessViewProviders = previousTView == null ? ( // 1) 첫 번째 호출 `previousTView == null`, 이는 인젝터가 토큰을 검색하기 시작한 // `TNode`에 있는 경우입니다. 이 경우 뷰 프로바이더를 조회할 수 있는 유일한 경우는: // - 우리는 컴포넌트에 있으며 // - 인젝터가 `includeViewProviders`를 true로 설정합니다. (이는 토큰이 컴포넌트이거나 // 필요한 경우 뷰 프로바이더 내에서 선언된 서비스라는 것을 의미합니다.) isComponentHost(tNode) && includeViewProviders ) : ( // 2) `previousTView != null`, 즉 우리는 부모 노드를 가로지고 있습니다. // 이 경우, 뷰 프로바이더를 조회할 수 있는 경우는: // - 컴포넌트의 뷰에 있으며 `previousTView != currentTView`일 경우 // - 그리고 부모 TNode가 요소입니다. // 즉, 우리는 컴포넌트의 뷰에서 나갔고 따라서 뷰 프로바이더를 볼 수 있습니다. previousTView != currentTView && (tNode.type & 3) !== 0 ); const isHostSpecialCase = flags & 1 && hostTElementNode === tNode; const injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase); if (injectableIdx !== null) { return getNodeInjectable(lView, currentTView, injectableIdx, tNode); } else { return NOT_FOUND2; } } function locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) { const nodeProviderIndexes = tNode.providerIndexes; const tInjectables = tView.data; const injectablesStart = nodeProviderIndexes & 1048575; const directivesStart = tNode.directiveStart; const directiveEnd = tNode.directiveEnd; const cptViewProvidersCount = nodeProviderIndexes >> 20; const startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount; const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd; for (let i = startingIndex; i < endIndex; i++) { const providerTokenOrDef = tInjectables[i]; if (i < directivesStart && token === providerTokenOrDef || i >= directivesStart && providerTokenOrDef.type === token) { return i; } } if (isHostSpecialCase) { const dirDef = tInjectables[directivesStart]; if (dirDef && isComponentDef(dirDef) && dirDef.type === token) { return directivesStart; } } return null; } function getNodeInjectable(lView, tView, index, tNode) { let value = lView[index]; const tData = tView.data; if (value instanceof NodeInjectorFactory) { const factory = value; if (factory.resolving) { throwCyclicDependencyError(stringifyForError(tData[index])); } const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders); factory.resolving = true; const token = tData[index].type || tData[index]; let prevInjectContext; if (ngDevMode) { const injector = new NodeInjector(tNode, lView); prevInjectContext = setInjectorProfilerContext({ injector, token }); } const previousInjectImplementation = factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null; const success = enterDI( lView, tNode, 0 /* InternalInjectFlags.Default */ ); ngDevMode && assertEqual(success, true, "\uD50C\uB798\uADF8\uC5D0 `SkipSelf'\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC73C\uBBC0\uB85C \uD56D\uC0C1 \uC131\uACF5\uD560 \uAC83\uC73C\uB85C \uC608\uC0C1\uD569\uB2C8\uB2E4."); try { ngDevMode && emitInjectorToCreateInstanceEvent(token); value = lView[index] = factory.factory(void 0, tData, lView, tNode); ngDevMode && emitInstanceCreatedByInjectorEvent(value); if (tView.firstCreatePass && index >= tNode.directiveStart) { ngDevMode && assertDirectiveDef(tData[index]); registerPreOrderHooks(index, tData[index], tView); } } finally { ngDevMode && setInjectorProfilerContext(prevInjectContext); previousInjectImplementation !== null && setInjectImplementation(previousInjectImplementation); setIncludeViewProviders(previousIncludeViewProviders); factory.resolving = false; leaveDI(); } } return value; } function bloomHashBitOrFactory(token) { ngDevMode && assertDefined(token, "token must be defined"); if (typeof token === "string") { return token.charCodeAt(0) || 0; } const tokenId = ( // 상속된 ID를 가져오지 않기 위해 `hasOwnProperty`로 먼저 확인합니다. token.hasOwnProperty(NG_ELEMENT_ID) ? token[NG_ELEMENT_ID] : void 0 ); if (typeof tokenId === "number") { if (tokenId >= 0) { return tokenId & BLOOM_MASK; } else { ngDevMode && assertEqual(tokenId, -1, "Expecting to get Special Injector Id"); return createNodeInjector; } } else { return tokenId; } } function bloomHasToken(bloomHash, injectorIndex, injectorView) { const mask = 1 << bloomHash; const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)]; return !!(value & mask); } function shouldSearchParent(flags, isFirstHostTNode) { return !(flags & 2) && !(flags & 1 && isFirstHostTNode); } function getNodeInjectorLView(nodeInjector) { return nodeInjector._lView; } function getNodeInjectorTNode(nodeInjector) { return nodeInjector._tNode; } var NodeInjector = class { _tNode; _lView; constructor(_tNode, _lView) { this._tNode = _tNode; this._lView = _lView; } get(token, notFoundValue, flags) { return getOrCreateInjectable(this._tNode, this._lView, token, convertToBitFlags(flags), notFoundValue); } }; function createNodeInjector() { return new NodeInjector(getCurrentTNode(), getLView()); } function \u0275\u0275getInheritedFactory(type) { return noSideEffects(() => { const ownConstructor = type.prototype.constructor; const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor); const objectPrototype = Object.prototype; let parent = Object.getPrototypeOf(type.prototype).constructor; while (parent && parent !== objectPrototype) { const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent); if (factory && factory !== ownFactory) { return factory; } parent = Object.getPrototypeOf(parent); } return (t) => new t(); }); } function getFactoryOf(type) { if (isForwardRef(type)) { return () => { const factory = getFactoryOf(resolveForwardRef(type)); return factory && factory(); }; } return getFactoryDef(type); } function lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundValue) { let currentTNode = tNode; let currentLView = lView; while (currentTNode !== null && currentLView !== null && currentLView[FLAGS] & 2048 && !isRootView(currentLView)) { ngDevMode && assertTNodeForLView(currentTNode, currentLView); const nodeInjectorValue = lookupTokenUsingNodeInjector(currentTNode, currentLView, token, flags | 2, NOT_FOUND2); if (nodeInjectorValue !== NOT_FOUND2) { return nodeInjectorValue; } let parentTNode = currentTNode.parent; if (!parentTNode) { const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR]; if (embeddedViewInjector) { const embeddedViewInjectorValue = embeddedViewInjector.get(token, NOT_FOUND2, flags); if (embeddedViewInjectorValue !== NOT_FOUND2) { return embeddedViewInjectorValue; } } parentTNode = getTNodeFromLView(currentLView); currentLView = currentLView[DECLARATION_VIEW]; } currentTNode = parentTNode; } return notFoundValue; } function getTNodeFromLView(lView) { const tView = lView[TVIEW]; const tViewType = tView.type; if (tViewType === 2) { ngDevMode && assertDefined(tView.declTNode, "Embedded TNodes should have declaration parents."); return tView.declTNode; } else if (tViewType === 1) { return lView[T_HOST]; } return null; } function \u0275\u0275injectAttribute(attrNameToInject) { return injectAttributeImpl(getCurrentTNode(), attrNameToInject); } var Attribute = makeParamDecorator("Attribute", (attributeName) => ({ attributeName, __NG_ELEMENT_ID__: () => \u0275\u0275injectAttribute(attributeName) })); var _reflect = null; function getReflect() { return _reflect = _reflect || new ReflectionCapabilities(); } function reflectDependencies(type) { return convertDependencies(getReflect().parameters(type)); } function convertDependencies(deps) { return deps.map((dep) => reflectDependency(dep)); } function reflectDependency(dep) { const meta = { token: null, attribute: null, host: false, optional: false, self: false, skipSelf: false }; if (Array.isArray(dep) && dep.length > 0) { for (let j = 0; j < dep.length; j++) { const param = dep[j]; if (param === void 0) { continue; } const proto = Object.getPrototypeOf(param); if (param instanceof Optional || proto.ngMetadataName === "Optional") { meta.optional = true; } else if (param instanceof SkipSelf || proto.ngMetadataName === "SkipSelf") { meta.skipSelf = true; } else if (param instanceof Self || proto.ngMetadataName === "Self") { meta.self = true; } else if (param instanceof Host || proto.ngMetadataName === "Host") { meta.host = true; } else if (param instanceof Inject) { meta.token = param.token; } else if (param instanceof Attribute) { if (param.attributeName === void 0) { throw new RuntimeError(204, ngDevMode && `Attribute name must be defined.`); } meta.attribute = param.attributeName; } else { meta.token = param; } } } else if (dep === void 0 || Array.isArray(dep) && dep.length === 0) { meta.token = null; } else { meta.token = dep; } return meta; } function compileInjectable(type, meta) { let ngInjectableDef = null; let ngFactoryDef = null; if (!type.hasOwnProperty(NG_PROV_DEF)) { Object.defineProperty(type, NG_PROV_DEF, { get: () => { if (ngInjectableDef === null) { const compiler = getCompilerFacade({ usage: 0, kind: "injectable", type }); ngInjectableDef = compiler.compileInjectable(angularCoreDiEnv, `ng:///${type.name}/\u0275prov.js`, getInjectableMetadata(type, meta)); } return ngInjectableDef; } }); } if (!type.hasOwnProperty(NG_FACTORY_DEF)) { Object.defineProperty(type, NG_FACTORY_DEF, { get: () => { if (ngFactoryDef === null) { const compiler = getCompilerFacade({ usage: 0, kind: "injectable", type }); ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/\u0275fac.js`, { name: type.name, type, typeArgumentCount: 0, // JIT 모드에서는 타입이 사용 가능하지 않음. deps: reflectDependencies(type), target: compiler.FactoryTarget.Injectable }); } return ngFactoryDef; }, // 이 부분은 조정 가능하게 두어, 디렉티브나 파이프의 팩토리들이 우선순위를 가질 수 있도록 합니다. configurable: true }); } } var USE_VALUE = getClosureSafeProperty({ provide: String, useValue: getClosureSafeProperty }); function isUseClassProvider(meta) { return meta.useClass !== void 0; } function isUseValueProvider(meta) { return USE_VALUE in meta; } function isUseFactoryProvider(meta) { return meta.useFactory !== void 0; } function isUseExistingProvider(meta) { return meta.useExisting !== void 0; } function getInjectableMetadata(type, srcMeta) { const meta = srcMeta || { providedIn: null }; const compilerMeta = { name: type.name, type, typeArgumentCount: 0, providedIn: meta.providedIn }; if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== void 0) { compilerMeta.deps = convertDependencies(meta.deps); } if (isUseClassProvider(meta)) { compilerMeta.useClass = meta.useClass; } else if (isUseValueProvider(meta)) { compilerMeta.useValue = meta.useValue; } else if (isUseFactoryProvider(meta)) { compilerMeta.useFactory = meta.useFactory; } else if (isUseExistingProvider(meta)) { compilerMeta.useExisting = meta.useExisting; } return compilerMeta; } var Injectable = makeDecorator("Injectable", void 0, void 0, void 0, (type, meta) => compileInjectable(type, meta)); function createInjector(defType, parent = null, additionalProviders = null, name) { const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name); injector.resolveInjectorInitializers(); return injector; } function createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name, scopes = /* @__PURE__ */ new Set()) { const providers = [additionalProviders || EMPTY_ARRAY, importProvidersFrom(defType)]; name = name || (typeof defType === "object" ? void 0 : stringify(defType)); return new R3Injector(providers, parent || getNullInjector(), name || null, scopes); } var Injector = class _Injector { static THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND; static NULL = new NullInjector(); static create(options, parent) { if (Array.isArray(options)) { return createInjector({ name: "" }, parent, options, ""); } else { const name = options.name ?? ""; return createInjector({ name }, options.parent, options.providers, name); } } /** @nocollapse */ static \u0275prov = ( /** @pureOrBreakMyCode */ /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _Injector, providedIn: "any", factory: () => \u0275\u0275inject(INJECTOR$1) }) ); /** * @internal * @nocollapse */ static __NG_ELEMENT_ID__ = -1; }; var HostAttributeToken = class { attributeName; constructor(attributeName) { this.attributeName = attributeName; } /** @internal */ __NG_ELEMENT_ID__ = () => \u0275\u0275injectAttribute(this.attributeName); toString() { return `HostAttributeToken ${this.attributeName}`; } }; var HOST_TAG_NAME = new InjectionToken(ngDevMode ? "HOST_TAG_NAME" : ""); HOST_TAG_NAME.__NG_ELEMENT_ID__ = (flags) => { const tNode = getCurrentTNode(); if (tNode === null) { throw new RuntimeError(204, ngDevMode && "HOST_TAG_NAME\uC740 \uC0DD\uC131 \uC2DC(\uD074\uB798\uC2A4 \uC0DD\uC131\uC790 \uB610\uB294 \uD074\uB798\uC2A4 \uD544\uB4DC \uCD08\uAE30\uD654\uAE30\uC5D0\uC11C) \uC9C0\uC2DC\uBB38 \uBC0F \uAD6C\uC131 \uC694\uC18C\uC5D0\uC11C\uB9CC \uC8FC\uC785\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4."); } if (tNode.type & 2) { return tNode.value; } if (flags & 8) { return null; } throw new RuntimeError(204, ngDevMode && `HOST_TAG_NAME\uC740 DOM\uC5D0 \uAE30\uBCF8 \uC694\uC18C\uAC00 \uC5C6\uB294 ${getDevModeNodeName(tNode)}\uC5D0\uC11C \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC774\uB294 \uC720\uD6A8\uD558\uC9C0 \uC54A\uC73C\uBBC0\uB85C \uC885\uC18D\uC131\uC744 \uC120\uD0DD\uC0AC\uD56D\uC73C\uB85C \uD45C\uC2DC\uD574\uC57C \uD569\uB2C8\uB2E4.`); }; function getDevModeNodeName(tNode) { if (tNode.type & 8) { return "an "; } else if (tNode.type & 4) { return "an "; } else if (tNode.type & 128) { return "an @let declaration"; } else { return "a node"; } } var ErrorHandler = class { /** * @internal */ _console = console; handleError(error) { this._console.error("ERROR", error); } }; var INTERNAL_APPLICATION_ERROR_HANDLER = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "internal error handler" : "", { providedIn: "root", factory: () => { const userErrorHandler = inject(ErrorHandler); return (e) => userErrorHandler.handleError(e); } }); var DestroyRef = class { /** * @internal * @nocollapse */ static __NG_ELEMENT_ID__ = injectDestroyRef; /** * @internal * @nocollapse */ static __NG_ENV_ID__ = (injector) => injector; }; var NodeInjectorDestroyRef = class extends DestroyRef { _lView; constructor(_lView) { super(); this._lView = _lView; } onDestroy(callback) { storeLViewOnDestroy(this._lView, callback); return () => removeLViewOnDestroy(this._lView, callback); } }; function injectDestroyRef() { return new NodeInjectorDestroyRef(getLView()); } var OutputEmitterRef = class { destroyed = false; listeners = null; errorHandler = inject(ErrorHandler, { optional: true }); /** @internal */ destroyRef = inject(DestroyRef); constructor() { this.destroyRef.onDestroy(() => { this.destroyed = true; this.listeners = null; }); } subscribe(callback) { if (this.destroyed) { throw new RuntimeError(953, ngDevMode && "\uD30C\uAD34\uB41C `OutputRef`\uC5D0 \uB300\uD55C \uC608\uAE30\uCE58 \uC54A\uC740 \uAD6C\uB3C5\uC785\uB2C8\uB2E4. \uC18C\uC720\uD558\uB294 \uC9C0\uC2DC\uC5B4/\uCEF4\uD3EC\uB10C\uD2B8\uAC00 \uD30C\uAD34\uB418\uC5C8\uC2B5\uB2C8\uB2E4."); } (this.listeners ??= []).push(callback); return { unsubscribe: () => { const idx = this.listeners?.indexOf(callback); if (idx !== void 0 && idx !== -1) { this.listeners?.splice(idx, 1); } } }; } /** 출력을 위한 새 값을 방출합니다. */ emit(value) { if (this.destroyed) { console.warn(formatRuntimeError(953, ngDevMode && "\uD30C\uAD34\uB41C `OutputRef`\uC5D0 \uB300\uD55C \uC608\uAE30\uCE58 \uC54A\uC740 \uBC29\uCD9C\uC785\uB2C8\uB2E4. \uC18C\uC720\uD558\uB294 \uC9C0\uC2DC\uC5B4/\uCEF4\uD3EC\uB10C\uD2B8\uAC00 \uD30C\uAD34\uB418\uC5C8\uC2B5\uB2C8\uB2E4.")); return; } if (this.listeners === null) { return; } const previousConsumer = setActiveConsumer(null); try { for (const listenerFn of this.listeners) { try { listenerFn(value); } catch (err) { this.errorHandler?.handleError(err); } } } finally { setActiveConsumer(previousConsumer); } } }; function getOutputDestroyRef(ref) { return ref.destroyRef; } function output(opts) { ngDevMode && assertInInjectionContext(output); return new OutputEmitterRef(); } function inputFunction(initialValue, opts) { ngDevMode && assertInInjectionContext(input); return createInputSignal(initialValue, opts); } function inputRequiredFunction(opts) { ngDevMode && assertInInjectionContext(input); return createInputSignal(REQUIRED_UNSET_VALUE, opts); } var input = (() => { inputFunction.required = inputRequiredFunction; return inputFunction; })(); function injectElementRef() { return createElementRef(getCurrentTNode(), getLView()); } function createElementRef(tNode, lView) { return new ElementRef(getNativeByTNode(tNode, lView)); } var ElementRef = class { /** *
*
주의하여 사용하십시오
*

* DOM에 대한 직접 접근이 필요할 때 이 API를 마지막 수단으로 사용하십시오. 대신 Angular에서 제공하는 템플릿과 * 데이터 바인딩을 사용하십시오. 또는 안전하게 사용할 수 있는 API를 제공하는 * {@link Renderer2}를 살펴볼 수 있습니다. *

*
*/ nativeElement; constructor(nativeElement) { this.nativeElement = nativeElement; } /** * @internal * @nocollapse */ static __NG_ELEMENT_ID__ = injectElementRef; }; function unwrapElementRef(value) { return value instanceof ElementRef ? value.nativeElement : value; } function isSignal(value) { return typeof value === "function" && value[SIGNAL] !== void 0; } function signal(initialValue, options) { const signalFn = createSignal(initialValue, options?.equal); const node = signalFn[SIGNAL]; signalFn.set = (newValue) => signalSetFn(node, newValue); signalFn.update = (updateFn) => signalUpdateFn(node, updateFn); signalFn.asReadonly = signalAsReadonlyFn.bind(signalFn); if (ngDevMode) { signalFn.toString = () => `[Signal: ${signalFn()}]`; node.debugName = options?.debugName; } return signalFn; } function signalAsReadonlyFn() { const node = this[SIGNAL]; if (node.readonlyFn === void 0) { const readonlyFn = () => this(); readonlyFn[SIGNAL] = node; node.readonlyFn = readonlyFn; } return node.readonlyFn; } function isWritableSignal(value) { return isSignal(value) && typeof value.set === "function"; } function symbolIterator() { return this._results[Symbol.iterator](); } var QueryList = class { _emitDistinctChangesOnly; dirty = true; _onDirty = void 0; _results = []; _changesDetected = false; _changes = void 0; length = 0; first = void 0; last = void 0; /** * 변경 사항을 알리는 `QueryList`의 `Observable`을 반환합니다. */ get changes() { return this._changes ??= new Subject(); } /** * @param emitDistinctChangesOnly 실제 변경이 발생할 때만 `QueryList.changes`가 발생해야 하는지. * 또는 쿼리가 재계산될 때 발생해야 하는지 여부. (재계산이 동일한 결과로 이어질 수 있음) */ constructor(_emitDistinctChangesOnly = false) { this._emitDistinctChangesOnly = _emitDistinctChangesOnly; } /** * `index`에서 QueryList 항목을 반환합니다. */ get(index) { return this._results[index]; } /** * See * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) */ map(fn) { return this._results.map(fn); } filter(fn) { return this._results.filter(fn); } /** * See * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) */ find(fn) { return this._results.find(fn); } /** * See * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce) */ reduce(fn, init) { return this._results.reduce(fn, init); } /** * See * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) */ forEach(fn) { this._results.forEach(fn); } /** * See * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some) */ some(fn) { return this._results.some(fn); } /** * 내부 결과 목록의 복사본을 배열로 반환합니다. */ toArray() { return this._results.slice(); } toString() { return this._results.toString(); } /** * 쿼리 목록의 저장된 데이터를 업데이트하고 `dirty` 플래그를 `false`로 재설정하여 * 변경 감지시 쿼리에 대한 변경 사항을 알리지 않도록 하며, 새 변경 사항이 발생하지 않는 한 * 알리지 않습니다. * * @param resultsTree 저장할 쿼리 결과 * @param identityAccessor 안정적인 객체 식별성을 값에서 추출하기 위한 선택적 함수 * 배열의. 이 함수는 쿼리 결과 목록의 각 요소에 대해 실행되며 * 현재 쿼리 목록과 새 쿼리 목록(첫 번째 인수로 제공됨)을 비교하여 * 목록이 다른지 확인합니다. 함수가 제공되지 않으면 요소는 * 있는 그대로 비교됩니다 (사전 처리 없이). */ reset(resultsTree, identityAccessor) { this.dirty = false; const newResultFlat = flatten(resultsTree); if (this._changesDetected = !arrayEquals(this._results, newResultFlat, identityAccessor)) { this._results = newResultFlat; this.length = newResultFlat.length; this.last = newResultFlat[this.length - 1]; this.first = newResultFlat[0]; } } /** * `changes` {@link EventEmitter}에서 방출하여 변경 이벤트를 발생시킵니다. */ notifyOnChanges() { if (this._changes !== void 0 && (this._changesDetected || !this._emitDistinctChangesOnly)) this._changes.next(this); } /** @internal */ onDirty(cb) { this._onDirty = cb; } /** internal */ setDirty() { this.dirty = true; this._onDirty?.(); } /** internal */ destroy() { if (this._changes !== void 0) { this._changes.complete(); this._changes.unsubscribe(); } } [Symbol.iterator] = /* @__PURE__ */ (() => symbolIterator)(); }; var SKIP_HYDRATION_ATTR_NAME = "ngSkipHydration"; var SKIP_HYDRATION_ATTR_NAME_LOWER_CASE = "ngskiphydration"; function hasSkipHydrationAttrOnTNode(tNode) { const attrs = tNode.mergedAttrs; if (attrs === null) return false; for (let i = 0; i < attrs.length; i += 2) { const value = attrs[i]; if (typeof value === "number") return false; if (typeof value === "string" && value.toLowerCase() === SKIP_HYDRATION_ATTR_NAME_LOWER_CASE) { return true; } } return false; } function hasSkipHydrationAttrOnRElement(rNode) { return rNode.hasAttribute(SKIP_HYDRATION_ATTR_NAME); } function hasInSkipHydrationBlockFlag(tNode) { return (tNode.flags & 128) === 128; } function isInSkipHydrationBlock(tNode) { if (hasInSkipHydrationBlockFlag(tNode)) { return true; } let currentTNode = tNode.parent; while (currentTNode) { if (hasInSkipHydrationBlockFlag(tNode) || hasSkipHydrationAttrOnTNode(currentTNode)) { return true; } currentTNode = currentTNode.parent; } return false; } var ChangeDetectionStrategy; (function(ChangeDetectionStrategy2) { ChangeDetectionStrategy2[ChangeDetectionStrategy2["OnPush"] = 0] = "OnPush"; ChangeDetectionStrategy2[ChangeDetectionStrategy2["Default"] = 1] = "Default"; })(ChangeDetectionStrategy || (ChangeDetectionStrategy = {})); var TRACKED_LVIEWS = /* @__PURE__ */ new Map(); var uniqueIdCounter = 0; function getUniqueLViewId() { return uniqueIdCounter++; } function registerLView(lView) { ngDevMode && assertNumber(lView[ID], "LView\uB294 \uB4F1\uB85D\uB418\uAE30 \uC704\uD574 ID\uB97C \uAC00\uC838\uC57C \uD569\uB2C8\uB2E4"); TRACKED_LVIEWS.set(lView[ID], lView); } function getLViewById(id) { ngDevMode && assertNumber(id, "LView \uAC80\uC0C9\uC5D0 \uC0AC\uC6A9\uB418\uB294 ID\uB294 \uC22B\uC790\uC5EC\uC57C \uD569\uB2C8\uB2E4"); return TRACKED_LVIEWS.get(id) || null; } function unregisterLView(lView) { ngDevMode && assertNumber(lView[ID], "ID\uAC00 \uC5C6\uB294 LView\uC758 \uCD94\uC801\uC744 \uC911\uC9C0\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4"); TRACKED_LVIEWS.delete(lView[ID]); } function getTrackedLViews() { return TRACKED_LVIEWS; } var LContext = class { lViewId; nodeIndex; native; /** * 컴포넌트 노드의 인스턴스입니다. */ component; /** * 이 요소에 존재하는 활성 지시문의 목록입니다. */ directives; /** * 이 요소에 존재하는 지역 참조(지역 참조 이름 => 요소 또는 지시문 인스턴스)의 맵입니다. */ localRefs; /** 컴포넌트 부모 뷰 데이터. */ get lView() { return getLViewById(this.lViewId); } constructor(lViewId, nodeIndex, native) { this.lViewId = lViewId; this.nodeIndex = nodeIndex; this.native = native; } }; function getLContext(target) { let mpValue = readPatchedData(target); if (mpValue) { if (isLView(mpValue)) { const lView = mpValue; let nodeIndex; let component = void 0; let directives = void 0; if (isComponentInstance(target)) { nodeIndex = findViaComponent(lView, target); if (nodeIndex == -1) { throw new Error("\uC81C\uACF5\uB41C \uCEF4\uD3EC\uB10C\uD2B8\uB97C \uC560\uD50C\uB9AC\uCF00\uC774\uC158\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."); } component = target; } else if (isDirectiveInstance(target)) { nodeIndex = findViaDirective(lView, target); if (nodeIndex == -1) { throw new Error("\uC81C\uACF5\uB41C \uC9C0\uC2DC\uC5B4\uB97C \uC560\uD50C\uB9AC\uCF00\uC774\uC158\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."); } directives = getDirectivesAtNodeIndex(nodeIndex, lView); } else { nodeIndex = findViaNativeElement(lView, target); if (nodeIndex == -1) { return null; } } const native = unwrapRNode(lView[nodeIndex]); const existingCtx = readPatchedData(native); const context2 = existingCtx && !Array.isArray(existingCtx) ? existingCtx : createLContext(lView, nodeIndex, native); if (component && context2.component === void 0) { context2.component = component; attachPatchData(context2.component, context2); } if (directives && context2.directives === void 0) { context2.directives = directives; for (let i = 0; i < directives.length; i++) { attachPatchData(directives[i], context2); } } attachPatchData(context2.native, context2); mpValue = context2; } } else { const rElement = target; ngDevMode && assertDomNode(rElement); let parent = rElement; while (parent = parent.parentNode) { const parentContext = readPatchedData(parent); if (parentContext) { const lView = Array.isArray(parentContext) ? parentContext : parentContext.lView; if (!lView) { return null; } const index = findViaNativeElement(lView, rElement); if (index >= 0) { const native = unwrapRNode(lView[index]); const context2 = createLContext(lView, index, native); attachPatchData(native, context2); mpValue = context2; break; } } } } return mpValue || null; } function createLContext(lView, nodeIndex, native) { return new LContext(lView[ID], nodeIndex, native); } function getComponentViewByInstance(componentInstance) { let patchedData = readPatchedData(componentInstance); let lView; if (isLView(patchedData)) { const contextLView = patchedData; const nodeIndex = findViaComponent(contextLView, componentInstance); lView = getComponentLViewByIndex(nodeIndex, contextLView); const context2 = createLContext(contextLView, nodeIndex, lView[HOST]); context2.component = componentInstance; attachPatchData(componentInstance, context2); attachPatchData(context2.native, context2); } else { const context2 = patchedData; const contextLView = context2.lView; ngDevMode && assertLView(contextLView); lView = getComponentLViewByIndex(context2.nodeIndex, contextLView); } return lView; } var MONKEY_PATCH_KEY_NAME = "__ngContext__"; function attachPatchData(target, data) { ngDevMode && assertDefined(target, "\uB300\uC0C1\uC774 \uC608\uC0C1\uB429\uB2C8\uB2E4."); if (isLView(data)) { target[MONKEY_PATCH_KEY_NAME] = data[ID]; registerLView(data); } else { target[MONKEY_PATCH_KEY_NAME] = data; } } function readPatchedData(target) { ngDevMode && assertDefined(target, "\uB300\uC0C1\uC774 \uC608\uC0C1\uB429\uB2C8\uB2E4."); const data = target[MONKEY_PATCH_KEY_NAME]; return typeof data === "number" ? getLViewById(data) : data || null; } function readPatchedLView(target) { const value = readPatchedData(target); if (value) { return isLView(value) ? value : value.lView; } return null; } function isComponentInstance(instance) { return instance && instance.constructor && instance.constructor.\u0275cmp; } function isDirectiveInstance(instance) { return instance && instance.constructor && instance.constructor.\u0275dir; } function findViaNativeElement(lView, target) { const tView = lView[TVIEW]; for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) { if (unwrapRNode(lView[i]) === target) { return i; } } return -1; } function traverseNextElement(tNode) { if (tNode.child) { return tNode.child; } else if (tNode.next) { return tNode.next; } else { while (tNode.parent && !tNode.parent.next) { tNode = tNode.parent; } return tNode.parent && tNode.parent.next; } } function findViaComponent(lView, componentInstance) { const componentIndices = lView[TVIEW].components; if (componentIndices) { for (let i = 0; i < componentIndices.length; i++) { const elementComponentIndex = componentIndices[i]; const componentView = getComponentLViewByIndex(elementComponentIndex, lView); if (componentView[CONTEXT] === componentInstance) { return elementComponentIndex; } } } else { const rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView); const rootComponent = rootComponentView[CONTEXT]; if (rootComponent === componentInstance) { return HEADER_OFFSET; } } return -1; } function findViaDirective(lView, directiveInstance) { let tNode = lView[TVIEW].firstChild; while (tNode) { const directiveIndexStart = tNode.directiveStart; const directiveIndexEnd = tNode.directiveEnd; for (let i = directiveIndexStart; i < directiveIndexEnd; i++) { if (lView[i] === directiveInstance) { return tNode.index; } } tNode = traverseNextElement(tNode); } return -1; } function getDirectivesAtNodeIndex(nodeIndex, lView) { const tNode = lView[TVIEW].data[nodeIndex]; if (tNode.directiveStart === 0) return EMPTY_ARRAY; const results = []; for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) { const directiveInstance = lView[i]; if (!isComponentInstance(directiveInstance)) { results.push(directiveInstance); } } return results; } function getComponentAtNodeIndex(nodeIndex, lView) { const tNode = lView[TVIEW].data[nodeIndex]; return isComponentHost(tNode) ? lView[tNode.directiveStart + tNode.componentOffset] : null; } function getRootView(componentOrLView) { ngDevMode && assertDefined(componentOrLView, "component"); let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView); while (lView && !isRootView(lView)) { lView = getLViewParent(lView); } ngDevMode && assertLView(lView); return lView; } function getRootContext(viewOrComponent) { const rootView = getRootView(viewOrComponent); ngDevMode && assertDefined(rootView[CONTEXT], "Root view has no context. Perhaps it is disconnected?"); return rootView[CONTEXT]; } function getFirstLContainer(lView) { return getNearestLContainer(lView[CHILD_HEAD]); } function getNextLContainer(container) { return getNearestLContainer(container[NEXT]); } function getNearestLContainer(viewOrContainer) { while (viewOrContainer !== null && !isLContainer(viewOrContainer)) { viewOrContainer = viewOrContainer[NEXT]; } return viewOrContainer; } function getComponent(element) { ngDevMode && assertDomElement(element); const context2 = getLContext(element); if (context2 === null) return null; if (context2.component === void 0) { const lView = context2.lView; if (lView === null) { return null; } context2.component = getComponentAtNodeIndex(context2.nodeIndex, lView); } return context2.component; } function getContext(element) { assertDomElement(element); const context2 = getLContext(element); const lView = context2 ? context2.lView : null; return lView === null ? null : lView[CONTEXT]; } function getOwningComponent(elementOrDir) { const context2 = getLContext(elementOrDir); let lView = context2 ? context2.lView : null; if (lView === null) return null; let parent; while (lView[TVIEW].type === 2 && (parent = getLViewParent(lView))) { lView = parent; } return isRootView(lView) ? null : lView[CONTEXT]; } function getRootComponents(elementOrDir) { const lView = readPatchedLView(elementOrDir); return lView !== null ? [getRootContext(lView)] : []; } function getInjector(elementOrDir) { const context2 = getLContext(elementOrDir); const lView = context2 ? context2.lView : null; if (lView === null) return Injector.NULL; const tNode = lView[TVIEW].data[context2.nodeIndex]; return new NodeInjector(tNode, lView); } function getDirectives(node) { if (node instanceof Text) { return []; } const context2 = getLContext(node); const lView = context2 ? context2.lView : null; if (lView === null) { return []; } const tView = lView[TVIEW]; const nodeIndex = context2.nodeIndex; if (!tView?.data[nodeIndex]) { return []; } if (context2.directives === void 0) { context2.directives = getDirectivesAtNodeIndex(nodeIndex, lView); } return context2.directives === null ? [] : [...context2.directives]; } function getDirectiveMetadata$1(directiveOrComponentInstance) { const { constructor } = directiveOrComponentInstance; if (!constructor) { throw new Error("\uC778\uC2A4\uD134\uC2A4 \uC0DD\uC131\uC790\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."); } const componentDef = getComponentDef(constructor); if (componentDef) { const inputs = extractInputDebugMetadata(componentDef.inputs); return { inputs, outputs: componentDef.outputs, encapsulation: componentDef.encapsulation, changeDetection: componentDef.onPush ? ChangeDetectionStrategy.OnPush : ChangeDetectionStrategy.Default }; } const directiveDef = getDirectiveDef(constructor); if (directiveDef) { const inputs = extractInputDebugMetadata(directiveDef.inputs); return { inputs, outputs: directiveDef.outputs }; } return null; } function getHostElement(componentOrDirective) { return getLContext(componentOrDirective).native; } function getListeners(element) { ngDevMode && assertDomElement(element); const lContext = getLContext(element); const lView = lContext === null ? null : lContext.lView; if (lView === null) return []; const tView = lView[TVIEW]; const lCleanup = lView[CLEANUP]; const tCleanup = tView.cleanup; const listeners = []; if (tCleanup && lCleanup) { for (let i = 0; i < tCleanup.length; ) { const firstParam = tCleanup[i++]; const secondParam = tCleanup[i++]; if (typeof firstParam === "string") { const name = firstParam; const listenerElement = unwrapRNode(lView[secondParam]); const callback = lCleanup[tCleanup[i++]]; const useCaptureOrIndx = tCleanup[i++]; const type = typeof useCaptureOrIndx === "boolean" || useCaptureOrIndx >= 0 ? "dom" : "output"; const useCapture = typeof useCaptureOrIndx === "boolean" ? useCaptureOrIndx : false; if (element == listenerElement) { listeners.push({ element, name, callback, useCapture, type }); } } } } listeners.sort(sortListeners); return listeners; } function sortListeners(a, b) { if (a.name == b.name) return 0; return a.name < b.name ? -1 : 1; } function assertDomElement(value) { if (typeof Element !== "undefined" && !(value instanceof Element)) { throw new Error("DOM Element\uC758 \uC778\uC2A4\uD134\uC2A4\uB97C \uAE30\uB300\uD569\uB2C8\uB2E4."); } } function extractInputDebugMetadata(inputs) { const res = {}; for (const key in inputs) { if (inputs.hasOwnProperty(key)) { const value = inputs[key]; if (value !== void 0) { res[key] = value[0]; } } } return res; } var DOCUMENT = void 0; function setDocument(document2) { DOCUMENT = document2; } function getDocument() { if (DOCUMENT !== void 0) { return DOCUMENT; } else if (typeof document !== "undefined") { return document; } throw new RuntimeError(210, (typeof ngDevMode === "undefined" || ngDevMode) && `\uC774 \uCEE8\uD14D\uC2A4\uD2B8\uC5D0\uC11C document \uAC1D\uCCB4\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. DOCUMENT \uC8FC\uC785 \uD1A0\uD070\uC774 \uC81C\uACF5\uB418\uC5C8\uB294\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.`); } var APP_ID = new InjectionToken(ngDevMode ? "AppId" : "", { providedIn: "root", factory: () => DEFAULT_APP_ID }); var DEFAULT_APP_ID = "ng"; var PLATFORM_INITIALIZER = new InjectionToken(ngDevMode ? "Platform Initializer" : ""); var PLATFORM_ID = new InjectionToken(ngDevMode ? "Platform ID" : "", { providedIn: "platform", factory: () => "unknown" // 명시적으로 설정되지 않았을 때 기본 플랫폼 이름 설정 }); var PACKAGE_ROOT_URL = new InjectionToken(ngDevMode ? "Application Packages Root URL" : ""); var ANIMATION_MODULE_TYPE = new InjectionToken(ngDevMode ? "AnimationModuleType" : ""); var CSP_NONCE = new InjectionToken(ngDevMode ? "CSP nonce" : "", { providedIn: "root", factory: () => { return getDocument().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce") || null; } }); var IMAGE_CONFIG_DEFAULTS = { breakpoints: [16, 32, 48, 64, 96, 128, 256, 384, 640, 750, 828, 1080, 1200, 1920, 2048, 3840], placeholderResolution: 30, disableImageSizeWarning: false, disableImageLazyLoadWarning: false }; var IMAGE_CONFIG = new InjectionToken(ngDevMode ? "ImageConfig" : "", { providedIn: "root", factory: () => IMAGE_CONFIG_DEFAULTS }); function makeStateKey(key) { return key; } function initTransferState() { const transferState = new TransferState(); if (true) { transferState.store = retrieveTransferredState(getDocument(), inject(APP_ID)); } return transferState; } var TransferState = class _TransferState { /** @nocollapse */ static \u0275prov = ( /** @pureOrBreakMyCode */ /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _TransferState, providedIn: "root", factory: initTransferState }) ); /** @internal */ store = {}; onSerializeCallbacks = {}; /** * 키에 해당하는 값을 가져옵니다. 키를 찾을 수 없으면 `defaultValue`를 반환합니다. */ get(key, defaultValue) { return this.store[key] !== void 0 ? this.store[key] : defaultValue; } /** * 키에 해당하는 값을 설정합니다. */ set(key, value) { this.store[key] = value; } /** * 저장소에서 키를 제거합니다. */ remove(key) { delete this.store[key]; } /** * 저장소에 키가 존재하는지 여부를 테스트합니다. */ hasKey(key) { return this.store.hasOwnProperty(key); } /** * 상태가 비어 있는지 여부를 나타냅니다. */ get isEmpty() { return Object.keys(this.store).length === 0; } /** * `toJson`이 호출될 때 키에 대한 값을 제공하는 콜백을 등록합니다. */ onSerialize(key, callback) { this.onSerializeCallbacks[key] = callback; } /** * 저장소의 현재 상태를 JSON으로 직렬화합니다. */ toJson() { for (const key in this.onSerializeCallbacks) { if (this.onSerializeCallbacks.hasOwnProperty(key)) { try { this.store[key] = this.onSerializeCallbacks[key](); } catch (e) { console.warn("onSerialize \uCF5C\uBC31 \uC911 \uC608\uC678: ", e); } } } return JSON.stringify(this.store).replace(/ PRESERVE_HOST_CONTENT_DEFAULT }); var IS_I18N_HYDRATION_ENABLED = new InjectionToken(typeof ngDevMode === "undefined" || !!ngDevMode ? "IS_I18N_HYDRATION_ENABLED" : ""); var IS_EVENT_REPLAY_ENABLED = new InjectionToken(typeof ngDevMode === "undefined" || !!ngDevMode ? "IS_EVENT_REPLAY_ENABLED" : ""); var IS_INCREMENTAL_HYDRATION_ENABLED = new InjectionToken(typeof ngDevMode === "undefined" || !!ngDevMode ? "IS_INCREMENTAL_HYDRATION_ENABLED" : ""); var JSACTION_BLOCK_ELEMENT_MAP = new InjectionToken(ngDevMode ? "JSACTION_BLOCK_ELEMENT_MAP" : "", { providedIn: "root", factory: () => /* @__PURE__ */ new Map() }); var TracingAction; (function(TracingAction2) { TracingAction2[TracingAction2["CHANGE_DETECTION"] = 0] = "CHANGE_DETECTION"; TracingAction2[TracingAction2["AFTER_NEXT_RENDER"] = 1] = "AFTER_NEXT_RENDER"; })(TracingAction || (TracingAction = {})); var TracingService = new InjectionToken(ngDevMode ? "TracingService" : ""); var markedFeatures = /* @__PURE__ */ new Set(); function performanceMarkFeature(feature) { if (markedFeatures.has(feature)) { return; } markedFeatures.add(feature); performance?.mark?.("mark_feature_usage", { detail: { feature } }); } function assertNotInReactiveContext(debugFn, extraContext) { if (getActiveConsumer() !== null) { throw new RuntimeError(-602, ngDevMode && `${debugFn.name}()\uB294 \uBC18\uC751\uD615 \uCEE8\uD14D\uC2A4\uD2B8 \uB0B4\uC5D0\uC11C \uD638\uCD9C\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.${extraContext ? ` ${extraContext}` : ""}`); } } var ViewContext = class { view; node; constructor(view, node) { this.view = view; this.node = node; } /** * @internal * @nocollapse */ static __NG_ELEMENT_ID__ = injectViewContext; }; function injectViewContext() { return new ViewContext(getLView(), getCurrentTNode()); } var AfterRenderPhase; (function(AfterRenderPhase2) { AfterRenderPhase2[AfterRenderPhase2["EarlyRead"] = 0] = "EarlyRead"; AfterRenderPhase2[AfterRenderPhase2["Write"] = 1] = "Write"; AfterRenderPhase2[AfterRenderPhase2["MixedReadWrite"] = 2] = "MixedReadWrite"; AfterRenderPhase2[AfterRenderPhase2["Read"] = 3] = "Read"; })(AfterRenderPhase || (AfterRenderPhase = {})); var ChangeDetectionScheduler = class { }; var ZONELESS_ENABLED = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "Zoneless enabled" : "", { providedIn: "root", factory: () => false }); var PROVIDED_ZONELESS = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "Zoneless provided" : "", { providedIn: "root", factory: () => false }); var ZONELESS_SCHEDULER_DISABLED = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "scheduler disabled" : ""); var SCHEDULE_IN_ROOT_ZONE = new InjectionToken(typeof ngDevMode === "undefined" || ngDevMode ? "run changes outside zone in root" : ""); var SCHEDULE_IN_ROOT_ZONE_DEFAULT = false; var PendingTasksInternal = class _PendingTasksInternal { taskId = 0; pendingTasks = /* @__PURE__ */ new Set(); get _hasPendingTasks() { return this.hasPendingTasks.value; } hasPendingTasks = new BehaviorSubject(false); add() { if (!this._hasPendingTasks) { this.hasPendingTasks.next(true); } const taskId = this.taskId++; this.pendingTasks.add(taskId); return taskId; } has(taskId) { return this.pendingTasks.has(taskId); } remove(taskId) { this.pendingTasks.delete(taskId); if (this.pendingTasks.size === 0 && this._hasPendingTasks) { this.hasPendingTasks.next(false); } } ngOnDestroy() { this.pendingTasks.clear(); if (this._hasPendingTasks) { this.hasPendingTasks.next(false); } } /** @nocollapse */ static \u0275prov = ( /** @pureOrBreakMyCode */ /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _PendingTasksInternal, providedIn: "root", factory: () => new _PendingTasksInternal() }) ); }; var PendingTasks = class _PendingTasks { internalPendingTasks = inject(PendingTasksInternal); scheduler = inject(ChangeDetectionScheduler); errorHandler = inject(INTERNAL_APPLICATION_ERROR_HANDLER); /** * 애플리케이션의 안정성을 차단해야 하는 새 작업을 추가합니다. * @returns 호출 시 작업을 제거하는 정리 함수입니다. */ add() { const taskId = this.internalPendingTasks.add(); return () => { if (!this.internalPendingTasks.has(taskId)) { return; } this.scheduler.notify( 11 /* NotificationSource.PendingTaskRemoved */ ); this.internalPendingTasks.remove(taskId); }; } /** * 비동기 함수를 실행하고 함수가 완료될 때까지 애플리케이션의 안정성을 차단합니다. * * ```ts * pendingTasks.run(async () => { * const userData = await fetch('/api/user'); * this.userData.set(userData); * }); * ``` * * @param fn 실행할 비동기 함수 */ run(fn) { const removeTask = this.add(); fn().catch(this.errorHandler).finally(removeTask); } /** @nocollapse */ static \u0275prov = ( /** @pureOrBreakMyCode */ /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _PendingTasks, providedIn: "root", factory: () => new _PendingTasks() }) ); }; var EventEmitter_ = class extends Subject { // tslint:disable-next-line:require-internal-with-underscore __isAsync; destroyRef = void 0; pendingTasks = void 0; constructor(isAsync = false) { super(); this.__isAsync = isAsync; if (isInInjectionContext()) { this.destroyRef = inject(DestroyRef, { optional: true }) ?? void 0; this.pendingTasks = inject(PendingTasksInternal, { optional: true }) ?? void 0; } } emit(value) { const prevConsumer = setActiveConsumer(null); try { super.next(value); } finally { setActiveConsumer(prevConsumer); } } subscribe(observerOrNext, error, complete) { let nextFn = observerOrNext; let errorFn = error || (() => null); let completeFn = complete; if (observerOrNext && typeof observerOrNext === "object") { const observer = observerOrNext; nextFn = observer.next?.bind(observer); errorFn = observer.error?.bind(observer); completeFn = observer.complete?.bind(observer); } if (this.__isAsync) { errorFn = this.wrapInTimeout(errorFn); if (nextFn) { nextFn = this.wrapInTimeout(nextFn); } if (completeFn) { completeFn = this.wrapInTimeout(completeFn); } } const sink = super.subscribe({ next: nextFn, error: errorFn, complete: completeFn }); if (observerOrNext instanceof Subscription) { observerOrNext.add(sink); } return sink; } wrapInTimeout(fn) { return (value) => { const taskId = this.pendingTasks?.add(); setTimeout(() => { fn(value); if (taskId !== void 0) { this.pendingTasks?.remove(taskId); } }); }; } }; var EventEmitter = EventEmitter_; function noop2(...args) { } function scheduleCallbackWithRafRace(callback) { let timeoutId; let animationFrameId; function cleanup() { callback = noop2; try { if (animationFrameId !== void 0 && typeof cancelAnimationFrame === "function") { cancelAnimationFrame(animationFrameId); } if (timeoutId !== void 0) { clearTimeout(timeoutId); } } catch { } } timeoutId = setTimeout(() => { callback(); cleanup(); }); if (typeof requestAnimationFrame === "function") { animationFrameId = requestAnimationFrame(() => { callback(); cleanup(); }); } return () => cleanup(); } function scheduleCallbackWithMicrotask(callback) { queueMicrotask(() => callback()); return () => { callback = noop2; }; } var AsyncStackTaggingZoneSpec = class { createTask; constructor(namePrefix, consoleAsyncStackTaggingImpl = console) { this.name = "asyncStackTagging for " + namePrefix; this.createTask = consoleAsyncStackTaggingImpl?.createTask ?? (() => null); } // ZoneSpec implementation below. name; onScheduleTask(delegate, _current, target, task) { task.consoleTask = this.createTask(`Zone - ${task.source || task.type}`); return delegate.scheduleTask(target, task); } onInvokeTask(delegate, _currentZone, targetZone, task, applyThis, applyArgs) { let ret; if (task.consoleTask) { ret = task.consoleTask.run(() => delegate.invokeTask(targetZone, task, applyThis, applyArgs)); } else { ret = delegate.invokeTask(targetZone, task, applyThis, applyArgs); } return ret; } }; var isAngularZoneProperty = "isAngularZone"; var angularZoneInstanceIdProperty = isAngularZoneProperty + "_ID"; var ngZoneInstanceId = 0; var NgZone = class _NgZone { hasPendingMacrotasks = false; hasPendingMicrotasks = false; /** * 미확인 마이크로작업이나 매크로작업이 없는지 여부. */ isStable = true; /** * 코드가 Angular 존에 들어갈 때 알림을 보냅니다. VM 턴에서 가장 먼저 호출됩니다. */ onUnstable = new EventEmitter(false); /** * 현재 VM 턴에서 더 이상 대기 중인 마이크로작업이 없을 때 알림을 보냅니다. * 이는 Angular가 변경 감지를 수행하게 하여 더 많은 마이크로작업을 큐에 추가할 수 있습니다. * 이러한 이유로 이 이벤트는 VM 턴당 여러 번 호출될 수 있습니다. */ onMicrotaskEmpty = new EventEmitter(false); /** * 마지막 `onMicrotaskEmpty`가 실행되고 더 이상 마이크로작업이 없을 때 알림을 보냅니다. * 이는 우리는 곧 VM 턴을 넘기려 하고 있음을 의미합니다. * 이 이벤트는 한 번만 호출됩니다. */ onStable = new EventEmitter(false); /** * 오류가 발생했음을 알립니다. */ onError = new EventEmitter(false); constructor(options) { const { enableLongStackTrace = false, shouldCoalesceEventChangeDetection = false, shouldCoalesceRunChangeDetection = false, scheduleInRootZone = SCHEDULE_IN_ROOT_ZONE_DEFAULT } = options; if (typeof Zone == "undefined") { throw new RuntimeError(908, ngDevMode && `Angular\uB294 \uC774 \uAD6C\uC131\uC5D0\uC11C Zone.js\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.`); } Zone.assertZonePatched(); const self = this; self._nesting = 0; self._outer = self._inner = Zone.current; if (ngDevMode) { self._inner = self._inner.fork(new AsyncStackTaggingZoneSpec("Angular")); } if (Zone["TaskTrackingZoneSpec"]) { self._inner = self._inner.fork(new Zone["TaskTrackingZoneSpec"]()); } if (enableLongStackTrace && Zone["longStackTraceZoneSpec"]) { self._inner = self._inner.fork(Zone["longStackTraceZoneSpec"]); } self.shouldCoalesceEventChangeDetection = !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection; self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection; self.callbackScheduled = false; self.scheduleInRootZone = scheduleInRootZone; forkInnerZoneWithAngularBehavior(self); } /** 이 메서드는 메서드 호출이 Angular Zone 인스턴스 내에서 이루어지는지 확인합니다. */ static isInAngularZone() { return typeof Zone !== "undefined" && Zone.current.get(isAngularZoneProperty) === true; } /** 메서드가 Angular Zone 내에서 호출되도록 보장합니다. 그렇지 않으면 오류를 발생시킵니다. */ static assertInAngularZone() { if (!_NgZone.isInAngularZone()) { throw new RuntimeError(909, ngDevMode && "Angular Zone \uB0B4\uC5D0 \uC788\uC5B4\uC57C \uD558\uC9C0\uB9CC \uADF8\uB807\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!"); } } /** 메서드가 Angular Zone 외부에서 호출되도록 보장합니다. 그렇지 않으면 오류를 발생시킵니다. */ static assertNotInAngularZone() { if (_NgZone.isInAngularZone()) { throw new RuntimeError(909, ngDevMode && "Angular Zone \uB0B4\uC5D0 \uC788\uC9C0 \uC54A\uC544\uC57C \uD558\uC9C0\uB9CC \uADF8\uB807\uC2B5\uB2C8\uB2E4!"); } } /** * Angular 존 내에서 `fn` 함수를 동기적으로 실행하고, * 함수가 반환한 값을 반환합니다. * * `run`을 통한 함수 실행은 Angular 존 외부에서 실행된 작업에서 Angular 존으로 다시 들어오는 것을 허용합니다 * (일반적으로 {@link #runOutsideAngular}를 통해 시작된). * * 이 함수 내에서 예약된 모든 향후 작업이나 마이크로 작업은 * Angular 존 내에서 계속 실행됩니다. * * 동기 오류가 발생하면 재발생되어 `onError`로 보고되지 않습니다. */ run(fn, applyThis, applyArgs) { return this._inner.run(fn, applyThis, applyArgs); } /** * Angular 존 내에서 `fn` 함수를 동기적으로 작업으로 실행하고, * 함수가 반환한 값을 반환합니다. * * `runTask`를 통한 함수 실행은 Angular 존 외부에서 실행된 작업에서 Angular 존으로 다시 들어오는 것을 허용합니다 * (일반적으로 {@link #runOutsideAngular}를 통해 시작된). * * 이 함수 내에서 예약된 모든 향후 작업이나 마이크로 작업은 * Angular 존 내에서 계속 실행됩니다. * * 동기 오류가 발생하면 재발생되어 `onError`로 보고되지 않습니다. */ runTask(fn, applyThis, applyArgs, name) { const zone = this._inner; const task = zone.scheduleEventTask("NgZoneEvent: " + name, fn, EMPTY_PAYLOAD, noop2, noop2); try { return zone.runTask(task, applyThis, applyArgs); } finally { zone.cancelTask(task); } } /** * `run`과 동일하지만 동기 오류는 잡아서 `onError`로 전달되며 * 재발생되지 않습니다. */ runGuarded(fn, applyThis, applyArgs) { return this._inner.runGuarded(fn, applyThis, applyArgs); } /** * Angular의 부모 존 내에서 `fn` 함수를 동기적으로 실행하고, * 함수가 반환한 값을 반환합니다. * * {@link #runOutsideAngular}를 통한 함수 실행은 Angular의 존에서 벗어나 작업을 수행할 수 있으며, * 이는 Angular 변경 감지를 유발하지 않거나 Angular의 오류 처리를 받습니다. * * 이 함수 내에서 예약된 모든 향후 작업이나 마이크로 작업은 * Angular 존 외부에서 계속 실행됩니다. * * Angular 존으로 다시 들어오려면 {@link #run}을 사용하여 애플리케이션 모델을 업데이트하는 작업을 수행하십시오. */ runOutsideAngular(fn) { return this._outer.run(fn); } }; var EMPTY_PAYLOAD = {}; function checkStable(zone) { if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) { try { zone._nesting++; zone.onMicrotaskEmpty.emit(null); } finally { zone._nesting--; if (!zone.hasPendingMicrotasks) { try { zone.runOutsideAngular(() => zone.onStable.emit(null)); } finally { zone.isStable = true; } } } } } function delayChangeDetectionForEvents(zone) { if (zone.isCheckStableRunning || zone.callbackScheduled) { return; } zone.callbackScheduled = true; function scheduleCheckStable() { scheduleCallbackWithRafRace(() => { zone.callbackScheduled = false; updateMicroTaskStatus(zone); zone.isCheckStableRunning = true; checkStable(zone); zone.isCheckStableRunning = false; }); } if (zone.scheduleInRootZone) { Zone.root.run(() => { scheduleCheckStable(); }); } else { zone._outer.run(() => { scheduleCheckStable(); }); } updateMicroTaskStatus(zone); } function forkInnerZoneWithAngularBehavior(zone) { const delayChangeDetectionForEventsDelegate = () => { delayChangeDetectionForEvents(zone); }; const instanceId = ngZoneInstanceId++; zone._inner = zone._inner.fork({ name: "angular", properties: { [isAngularZoneProperty]: true, [angularZoneInstanceIdProperty]: instanceId, [angularZoneInstanceIdProperty + instanceId]: true }, onInvokeTask: (delegate, current, target, task, applyThis, applyArgs) => { if (shouldBeIgnoredByZone(applyArgs)) { return delegate.invokeTask(target, task, applyThis, applyArgs); } try { onEnter(zone); return delegate.invokeTask(target, task, applyThis, applyArgs); } finally { if (zone.shouldCoalesceEventChangeDetection && task.type === "eventTask" || zone.shouldCoalesceRunChangeDetection) { delayChangeDetectionForEventsDelegate(); } onLeave(zone); } }, onInvoke: (delegate, current, target, callback, applyThis, applyArgs, source) => { try { onEnter(zone); return delegate.invoke(target, callback, applyThis, applyArgs, source); } finally { if (zone.shouldCoalesceRunChangeDetection && // 스케줄러의 틱이 아닌 경우 변경 감지를 지연하지 않습니다. // 우리는 안정성 논리를 동기적으로 트리거할 필요가 있습니다. // 이는 zone 기반 스케줄러가 중복 ApplicationRef.tick을 방지할 수 있도록 하기 위해서입니다. // 이 로직은 다소 우회적이긴 하지만, // 우리는 여전히 zone.run을 종료할 때 모든 올바른 이벤트를 트리거하고 싶습니다 // (`onMicrotaskEmpty` 및 `onStable`이 발생해야 함; 개발자는 이러한 이벤트가 // 변경 감지가 실행된 후 발생하는 코드가 있을 수 있습니다). // 참고: `zone.callbackScheduled`는 이미 delayChangeDetectionForEventsDelegate에 있지만 // 불필요한 applyArgs 읽기를 방지하기 위해 여기에도 추가됩니다. !zone.callbackScheduled && !isSchedulerTick(applyArgs)) { delayChangeDetectionForEventsDelegate(); } onLeave(zone); } }, onHasTask: (delegate, current, target, hasTaskState) => { delegate.hasTask(target, hasTaskState); if (current === target) { if (hasTaskState.change == "microTask") { zone._hasPendingMicrotasks = hasTaskState.microTask; updateMicroTaskStatus(zone); checkStable(zone); } else if (hasTaskState.change == "macroTask") { zone.hasPendingMacrotasks = hasTaskState.macroTask; } } }, onHandleError: (delegate, current, target, error) => { delegate.handleError(target, error); zone.runOutsideAngular(() => zone.onError.emit(error)); return false; } }); } function updateMicroTaskStatus(zone) { if (zone._hasPendingMicrotasks || (zone.shouldCoalesceEventChangeDetection || zone.shouldCoalesceRunChangeDetection) && zone.callbackScheduled === true) { zone.hasPendingMicrotasks = true; } else { zone.hasPendingMicrotasks = false; } } function onEnter(zone) { zone._nesting++; if (zone.isStable) { zone.isStable = false; zone.onUnstable.emit(null); } } function onLeave(zone) { zone._nesting--; checkStable(zone); } var NoopNgZone = class { hasPendingMicrotasks = false; hasPendingMacrotasks = false; isStable = true; onUnstable = new EventEmitter(); onMicrotaskEmpty = new EventEmitter(); onStable = new EventEmitter(); onError = new EventEmitter(); run(fn, applyThis, applyArgs) { return fn.apply(applyThis, applyArgs); } runGuarded(fn, applyThis, applyArgs) { return fn.apply(applyThis, applyArgs); } runOutsideAngular(fn) { return fn(); } runTask(fn, applyThis, applyArgs, name) { return fn.apply(applyThis, applyArgs); } }; function shouldBeIgnoredByZone(applyArgs) { return hasApplyArgsData(applyArgs, "__ignore_ng_zone__"); } function isSchedulerTick(applyArgs) { return hasApplyArgsData(applyArgs, "__scheduler_tick__"); } function hasApplyArgsData(applyArgs, key) { if (!Array.isArray(applyArgs)) { return false; } if (applyArgs.length !== 1) { return false; } return applyArgs[0]?.data?.[key] === true; } function getNgZone(ngZoneToUse = "zone.js", options) { if (ngZoneToUse === "noop") { return new NoopNgZone(); } if (ngZoneToUse === "zone.js") { return new NgZone(options); } return ngZoneToUse; } var AfterRenderManager = class _AfterRenderManager { impl = null; execute() { this.impl?.execute(); } /** @nocollapse */ static \u0275prov = ( /** @pureOrBreakMyCode */ /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _AfterRenderManager, providedIn: "root", factory: () => new _AfterRenderManager() }) ); }; var AFTER_RENDER_PHASES = /* @__PURE__ */ (() => [AfterRenderPhase.EarlyRead, AfterRenderPhase.Write, AfterRenderPhase.MixedReadWrite, AfterRenderPhase.Read])(); var AfterRenderImpl = class _AfterRenderImpl { ngZone = inject(NgZone); scheduler = inject(ChangeDetectionScheduler); errorHandler = inject(ErrorHandler, { optional: true }); /** 현재 활성화된 시퀀스 집합. */ sequences = /* @__PURE__ */ new Set(); /** 현재 실행 집합 동안의 등록 추적. */ deferredRegistrations = /* @__PURE__ */ new Set(); /** 현재 `AfterRenderManager`가 후크를 실행 중인지 여부. */ executing = false; constructor() { inject(TracingService, { optional: true }); } /** * 후크의 단계 시퀀스를 한 번 실행합니다. 후크의 실행 결과로 인해 * 추가적으로 스케줄링될 수 있습니다. */ execute() { const hasSequencesToExecute = this.sequences.size > 0; if (hasSequencesToExecute) { profiler( 16 /* ProfilerEvent.AfterRenderHooksStart */ ); } this.executing = true; for (const phase of AFTER_RENDER_PHASES) { for (const sequence of this.sequences) { if (sequence.erroredOrDestroyed || !sequence.hooks[phase]) { continue; } try { sequence.pipelinedValue = this.ngZone.runOutsideAngular(() => this.maybeTrace(() => { const hookFn = sequence.hooks[phase]; const value = hookFn(sequence.pipelinedValue); return value; }, sequence.snapshot)); } catch (err) { sequence.erroredOrDestroyed = true; this.errorHandler?.handleError(err); } } } this.executing = false; for (const sequence of this.sequences) { sequence.afterRun(); if (sequence.once) { this.sequences.delete(sequence); sequence.destroy(); } } for (const sequence of this.deferredRegistrations) { this.sequences.add(sequence); } if (this.deferredRegistrations.size > 0) { this.scheduler.notify( 7 /* NotificationSource.RenderHook */ ); } this.deferredRegistrations.clear(); if (hasSequencesToExecute) { profiler( 17 /* ProfilerEvent.AfterRenderHooksEnd */ ); } } register(sequence) { const { view } = sequence; if (view !== void 0) { (view[AFTER_RENDER_SEQUENCES_TO_ADD] ??= []).push(sequence); markAncestorsForTraversal(view); view[FLAGS] |= 8192; } else if (!this.executing) { this.addSequence(sequence); } else { this.deferredRegistrations.add(sequence); } } addSequence(sequence) { this.sequences.add(sequence); this.scheduler.notify( 7 /* NotificationSource.RenderHook */ ); } unregister(sequence) { if (this.executing && this.sequences.has(sequence)) { sequence.erroredOrDestroyed = true; sequence.pipelinedValue = void 0; sequence.once = true; } else { this.sequences.delete(sequence); this.deferredRegistrations.delete(sequence); } } maybeTrace(fn, snapshot) { return snapshot ? snapshot.run(TracingAction.AFTER_NEXT_RENDER, fn) : fn(); } /** @nocollapse */ static \u0275prov = ( /** @pureOrBreakMyCode */ /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _AfterRenderImpl, providedIn: "root", factory: () => new _AfterRenderImpl() }) ); }; var AfterRenderSequence = class { impl; hooks; view; once; snapshot; /** * 이 시퀀스가 이 실행 중에 오류가 발생했거나 파괴되었는지 여부, 후크가 더 이상 * 실행되면 안 됩니다. */ erroredOrDestroyed = false; /** * 마지막 후크 실행에서 반환된 값(있는 경우), 다음 * 후크로 파이프라인되기를 기다리고 있습니다. */ pipelinedValue = void 0; unregisterOnDestroy; constructor(impl, hooks, view, once, destroyRef, snapshot = null) { this.impl = impl; this.hooks = hooks; this.view = view; this.once = once; this.snapshot = snapshot; this.unregisterOnDestroy = destroyRef?.onDestroy(() => this.destroy()); } afterRun() { this.erroredOrDestroyed = false; this.pipelinedValue = void 0; this.snapshot?.dispose(); this.snapshot = null; } destroy() { this.impl.unregister(this); this.unregisterOnDestroy?.(); const scheduled2 = this.view?.[AFTER_RENDER_SEQUENCES_TO_ADD]; if (scheduled2) { this.view[AFTER_RENDER_SEQUENCES_TO_ADD] = scheduled2.filter((s) => s !== this); } } }; function afterRender(callbackOrSpec, options) { ngDevMode && assertNotInReactiveContext(afterRender, "\uB9AC\uC561\uD2F0\uBE0C \uCEE8\uD14D\uC2A4\uD2B8\uB97C \uBC97\uC5B4\uB098 `afterRender`\uB97C \uD638\uCD9C\uD558\uC138\uC694. \uC608: \uCEF4\uD3EC\uB10C\uD2B8 \uC0DD\uC131\uC790 \uC548\uC5D0 \uB80C\uB354\uB9C1 \uCF5C\uBC31\uC744 \uC608\uC57D\uD569\uB2C8\uB2E4.`"); !options?.injector && assertInInjectionContext(afterRender); const injector = options?.injector ?? inject(Injector); if (false) { return NOOP_AFTER_RENDER_REF; } performanceMarkFeature("NgAfterRender"); return afterRenderImpl( callbackOrSpec, injector, options, /* once */ false ); } function afterNextRender(callbackOrSpec, options) { !options?.injector && assertInInjectionContext(afterNextRender); const injector = options?.injector ?? inject(Injector); if (false) { return NOOP_AFTER_RENDER_REF; } performanceMarkFeature("NgAfterNextRender"); return afterRenderImpl( callbackOrSpec, injector, options, /* once */ true ); } function getHooks(callbackOrSpec, phase) { if (callbackOrSpec instanceof Function) { const hooks = [void 0, void 0, void 0, void 0]; hooks[phase] = callbackOrSpec; return hooks; } else { return [callbackOrSpec.earlyRead, callbackOrSpec.write, callbackOrSpec.mixedReadWrite, callbackOrSpec.read]; } } function afterRenderImpl(callbackOrSpec, injector, options, once) { const manager = injector.get(AfterRenderManager); manager.impl ??= injector.get(AfterRenderImpl); const tracing = injector.get(TracingService, null, { optional: true }); const hooks = options?.phase ?? AfterRenderPhase.MixedReadWrite; const destroyRef = options?.manualCleanup !== true ? injector.get(DestroyRef) : null; const viewContext = injector.get(ViewContext, null, { optional: true }); const sequence = new AfterRenderSequence(manager.impl, getHooks(callbackOrSpec, hooks), viewContext?.view, once, destroyRef, tracing?.snapshot(null)); manager.impl.register(sequence); return sequence; } var DeferDependenciesLoadingState; (function(DeferDependenciesLoadingState2) { DeferDependenciesLoadingState2[DeferDependenciesLoadingState2["NOT_STARTED"] = 0] = "NOT_STARTED"; DeferDependenciesLoadingState2[DeferDependenciesLoadingState2["IN_PROGRESS"] = 1] = "IN_PROGRESS"; DeferDependenciesLoadingState2[DeferDependenciesLoadingState2["COMPLETE"] = 2] = "COMPLETE"; DeferDependenciesLoadingState2[DeferDependenciesLoadingState2["FAILED"] = 3] = "FAILED"; })(DeferDependenciesLoadingState || (DeferDependenciesLoadingState = {})); var MINIMUM_SLOT = 0; var LOADING_AFTER_SLOT = 1; var DeferBlockState; (function(DeferBlockState2) { DeferBlockState2[DeferBlockState2["Placeholder"] = 0] = "Placeholder"; DeferBlockState2[DeferBlockState2["Loading"] = 1] = "Loading"; DeferBlockState2[DeferBlockState2["Complete"] = 2] = "Complete"; DeferBlockState2[DeferBlockState2["Error"] = 3] = "Error"; })(DeferBlockState || (DeferBlockState = {})); var DeferBlockInternalState; (function(DeferBlockInternalState2) { DeferBlockInternalState2[DeferBlockInternalState2["Initial"] = -1] = "Initial"; })(DeferBlockInternalState || (DeferBlockInternalState = {})); var NEXT_DEFER_BLOCK_STATE = 0; var DEFER_BLOCK_STATE = 1; var STATE_IS_FROZEN_UNTIL = 2; var LOADING_AFTER_CLEANUP_FN = 3; var TRIGGER_CLEANUP_FNS = 4; var PREFETCH_TRIGGER_CLEANUP_FNS = 5; var SSR_UNIQUE_ID = 6; var SSR_BLOCK_STATE = 7; var ON_COMPLETE_FNS = 8; var HYDRATE_TRIGGER_CLEANUP_FNS = 9; var DeferBlockBehavior; (function(DeferBlockBehavior2) { DeferBlockBehavior2[DeferBlockBehavior2["Manual"] = 0] = "Manual"; DeferBlockBehavior2[DeferBlockBehavior2["Playthrough"] = 1] = "Playthrough"; })(DeferBlockBehavior || (DeferBlockBehavior = {})); function storeTriggerCleanupFn(type, lDetails, cleanupFn) { const key = getCleanupFnKeyByType(type); if (lDetails[key] === null) { lDetails[key] = []; } lDetails[key].push(cleanupFn); } function invokeTriggerCleanupFns(type, lDetails) { const key = getCleanupFnKeyByType(type); const cleanupFns = lDetails[key]; if (cleanupFns !== null) { for (const cleanupFn of cleanupFns) { cleanupFn(); } lDetails[key] = null; } } function invokeAllTriggerCleanupFns(lDetails) { invokeTriggerCleanupFns(1, lDetails); invokeTriggerCleanupFns(0, lDetails); invokeTriggerCleanupFns(2, lDetails); } function getCleanupFnKeyByType(type) { let key = TRIGGER_CLEANUP_FNS; if (type === 1) { key = PREFETCH_TRIGGER_CLEANUP_FNS; } else if (type === 2) { key = HYDRATE_TRIGGER_CLEANUP_FNS; } return key; } function getDeferBlockDataIndex(deferBlockIndex) { return deferBlockIndex + 1; } function getLDeferBlockDetails(lView, tNode) { const tView = lView[TVIEW]; const slotIndex = getDeferBlockDataIndex(tNode.index); ngDevMode && assertIndexInDeclRange(tView, slotIndex); return lView[slotIndex]; } function setLDeferBlockDetails(lView, deferBlockIndex, lDetails) { const tView = lView[TVIEW]; const slotIndex = getDeferBlockDataIndex(deferBlockIndex); ngDevMode && assertIndexInDeclRange(tView, slotIndex); lView[slotIndex] = lDetails; } function getTDeferBlockDetails(tView, tNode) { const slotIndex = getDeferBlockDataIndex(tNode.index); ngDevMode && assertIndexInDeclRange(tView, slotIndex); return tView.data[slotIndex]; } function setTDeferBlockDetails(tView, deferBlockIndex, deferBlockConfig) { const slotIndex = getDeferBlockDataIndex(deferBlockIndex); ngDevMode && assertIndexInDeclRange(tView, slotIndex); tView.data[slotIndex] = deferBlockConfig; } function getTemplateIndexForState(newState, hostLView, tNode) { const tView = hostLView[TVIEW]; const tDetails = getTDeferBlockDetails(tView, tNode); switch (newState) { case DeferBlockState.Complete: return tDetails.primaryTmplIndex; case DeferBlockState.Loading: return tDetails.loadingTmplIndex; case DeferBlockState.Error: return tDetails.errorTmplIndex; case DeferBlockState.Placeholder: return tDetails.placeholderTmplIndex; default: ngDevMode && throwError2(`\uC608\uC0C1\uCE58 \uBABB\uD55C \uC9C0\uC5F0 \uBE14\uB85D \uC0C1\uD0DC: ${newState}`); return null; } } function getMinimumDurationForState(tDetails, currentState) { if (currentState === DeferBlockState.Placeholder) { return tDetails.placeholderBlockConfig?.[MINIMUM_SLOT] ?? null; } else if (currentState === DeferBlockState.Loading) { return tDetails.loadingBlockConfig?.[MINIMUM_SLOT] ?? null; } return null; } function getLoadingBlockAfter(tDetails) { return tDetails.loadingBlockConfig?.[LOADING_AFTER_SLOT] ?? null; } function addDepsToRegistry(currentDeps, newDeps) { if (!currentDeps || currentDeps.length === 0) { return newDeps; } const currentDepSet = new Set(currentDeps); for (const dep of newDeps) { currentDepSet.add(dep); } return currentDeps.length === currentDepSet.size ? currentDeps : Array.from(currentDepSet); } function getPrimaryBlockTNode(tView, tDetails) { const adjustedIndex = tDetails.primaryTmplIndex + HEADER_OFFSET; return getTNode(tView, adjustedIndex); } function assertDeferredDependenciesLoaded(tDetails) { assertEqual(tDetails.loadingState, DeferDependenciesLoadingState.COMPLETE, "\uBAA8\uB4E0 \uC9C0\uC5F0\uB41C \uC885\uC18D\uC131\uC774 \uB85C\uB4DC\uB418\uAE30\uB97C \uAE30\uB300\uD569\uB2C8\uB2E4."); } function isTDeferBlockDetails(value) { return value !== null && typeof value === "object" && typeof value.primaryTmplIndex === "number"; } function trackTriggerForDebugging(tView, tNode, textRepresentation) { const tDetails = getTDeferBlockDetails(tView, tNode); tDetails.debug ??= {}; tDetails.debug.triggers ??= /* @__PURE__ */ new Set(); tDetails.debug.triggers.add(textRepresentation); } var eventListenerOptions = { passive: true, capture: true }; var hoverTriggers = /* @__PURE__ */ new WeakMap(); var interactionTriggers = /* @__PURE__ */ new WeakMap(); var viewportTriggers = /* @__PURE__ */ new WeakMap(); var interactionEventNames = ["click", "keydown"]; var hoverEventNames = ["mouseenter", "mouseover", "focusin"]; var intersectionObserver = null; var observedViewportElements = 0; var DeferEventEntry = class { callbacks = /* @__PURE__ */ new Set(); listener = () => { for (const callback of this.callbacks) { callback(); } }; }; function onInteraction(trigger, callback) { let entry = interactionTriggers.get(trigger); if (!entry) { entry = new DeferEventEntry(); interactionTriggers.set(trigger, entry); for (const name of interactionEventNames) { trigger.addEventListener(name, entry.listener, eventListenerOptions); } } entry.callbacks.add(callback); return () => { const { callbacks, listener } = entry; callbacks.delete(callback); if (callbacks.size === 0) { interactionTriggers.delete(trigger); for (const name of interactionEventNames) { trigger.removeEventListener(name, listener, eventListenerOptions); } } }; } function onHover(trigger, callback) { let entry = hoverTriggers.get(trigger); if (!entry) { entry = new DeferEventEntry(); hoverTriggers.set(trigger, entry); for (const name of hoverEventNames) { trigger.addEventListener(name, entry.listener, eventListenerOptions); } } entry.callbacks.add(callback); return () => { const { callbacks, listener } = entry; callbacks.delete(callback); if (callbacks.size === 0) { for (const name of hoverEventNames) { trigger.removeEventListener(name, listener, eventListenerOptions); } hoverTriggers.delete(trigger); } }; } function onViewport(trigger, callback, injector) { const ngZone = injector.get(NgZone); let entry = viewportTriggers.get(trigger); intersectionObserver = intersectionObserver || ngZone.runOutsideAngular(() => { return new IntersectionObserver((entries) => { for (const current of entries) { if (current.isIntersecting && viewportTriggers.has(current.target)) { ngZone.run(viewportTriggers.get(current.target).listener); } } }); }); if (!entry) { entry = new DeferEventEntry(); ngZone.runOutsideAngular(() => intersectionObserver.observe(trigger)); viewportTriggers.set(trigger, entry); observedViewportElements++; } entry.callbacks.add(callback); return () => { if (!viewportTriggers.has(trigger)) { return; } entry.callbacks.delete(callback); if (entry.callbacks.size === 0) { intersectionObserver?.unobserve(trigger); viewportTriggers.delete(trigger); observedViewportElements--; } if (observedViewportElements === 0) { intersectionObserver?.disconnect(); intersectionObserver = null; } }; } function getTriggerLView(deferredHostLView, deferredTNode, walkUpTimes) { if (walkUpTimes == null) { return deferredHostLView; } if (walkUpTimes >= 0) { return walkUpViews(walkUpTimes, deferredHostLView); } const deferredContainer = deferredHostLView[deferredTNode.index]; ngDevMode && assertLContainer(deferredContainer); const triggerLView = deferredContainer[CONTAINER_HEADER_OFFSET] ?? null; if (ngDevMode && triggerLView !== null) { const lDetails = getLDeferBlockDetails(deferredHostLView, deferredTNode); const renderedState = lDetails[DEFER_BLOCK_STATE]; assertEqual(renderedState, DeferBlockState.Placeholder, "\uC774 \uC9C0\uC5F0 \uBE14\uB85D\uC5D0\uC11C \uD50C\uB808\uC774\uC2A4\uD640\uB354\uB97C \uB80C\uB354\uB9C1\uD574\uC57C \uD569\uB2C8\uB2E4."); assertLView(triggerLView); } return triggerLView; } function getTriggerElement(triggerLView, triggerIndex) { const element = getNativeByIndex(HEADER_OFFSET + triggerIndex, triggerLView); ngDevMode && assertElement(element); return element; } function registerDomTrigger(initialLView, tNode, triggerIndex, walkUpTimes, registerFn, callback, type) { const injector = initialLView[INJECTOR]; const zone = injector.get(NgZone); let poll; function pollDomTrigger() { if (isDestroyed(initialLView)) { poll.destroy(); return; } const lDetails = getLDeferBlockDetails(initialLView, tNode); const renderedState = lDetails[DEFER_BLOCK_STATE]; if (renderedState !== DeferBlockInternalState.Initial && renderedState !== DeferBlockState.Placeholder) { poll.destroy(); return; } const triggerLView = getTriggerLView(initialLView, tNode, walkUpTimes); if (!triggerLView) { return; } poll.destroy(); if (isDestroyed(triggerLView)) { return; } const element = getTriggerElement(triggerLView, triggerIndex); const cleanup = registerFn(element, () => { zone.run(() => { if (initialLView !== triggerLView) { removeLViewOnDestroy(triggerLView, cleanup); } callback(); }); }, injector); if (initialLView !== triggerLView) { storeLViewOnDestroy(triggerLView, cleanup); } storeTriggerCleanupFn(type, lDetails, cleanup); } poll = afterRender({ read: pollDomTrigger }, { injector }); } var JSACTION_EVENT_CONTRACT = new InjectionToken(ngDevMode ? "EVENT_CONTRACT_DETAILS" : "", { providedIn: "root", factory: () => ({}) }); var DEHYDRATED_BLOCK_REGISTRY = new InjectionToken(ngDevMode ? "DEHYDRATED_BLOCK_REGISTRY" : ""); var TRANSFER_STATE_TOKEN_ID = "__nghData__"; var NGH_DATA_KEY = makeStateKey(TRANSFER_STATE_TOKEN_ID); var TRANSFER_STATE_DEFER_BLOCKS_INFO = "__nghDeferData__"; var NGH_DEFER_BLOCKS_KEY = makeStateKey(TRANSFER_STATE_DEFER_BLOCKS_INFO); var NGH_ATTR_NAME = "ngh"; var SSR_CONTENT_INTEGRITY_MARKER = "nghm"; var _retrieveHydrationInfoImpl = () => null; function retrieveHydrationInfoImpl(rNode, injector, isRootView2 = false) { let nghAttrValue = rNode.getAttribute(NGH_ATTR_NAME); if (nghAttrValue == null) return null; const [componentViewNgh, rootViewNgh] = nghAttrValue.split("|"); nghAttrValue = isRootView2 ? rootViewNgh : componentViewNgh; if (!nghAttrValue) return null; const rootNgh = rootViewNgh ? `|${rootViewNgh}` : ""; const remainingNgh = isRootView2 ? componentViewNgh : rootNgh; let data = {}; if (nghAttrValue !== "") { const transferState = injector.get(TransferState, null, { optional: true }); if (transferState !== null) { const nghData = transferState.get(NGH_DATA_KEY, []); data = nghData[Number(nghAttrValue)]; ngDevMode && assertDefined(data, "TransferState\uC5D0\uC11C \uC218\uBD84 \uC815\uBCF4\uB97C \uAC80\uC0C9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."); } } const dehydratedView = { data, firstChild: rNode.firstChild ?? null }; if (isRootView2) { dehydratedView.firstChild = rNode; setSegmentHead(dehydratedView, 0, rNode.nextSibling); } if (remainingNgh) { rNode.setAttribute(NGH_ATTR_NAME, remainingNgh); } else { rNode.removeAttribute(NGH_ATTR_NAME); } ngDevMode && markRNodeAsClaimedByHydration( rNode, /* checkIfAlreadyClaimed */ false ); ngDevMode && ngDevMode.hydratedComponents++; return dehydratedView; } function enableRetrieveHydrationInfoImpl() { _retrieveHydrationInfoImpl = retrieveHydrationInfoImpl; } function retrieveHydrationInfo(rNode, injector, isRootView2 = false) { return _retrieveHydrationInfoImpl(rNode, injector, isRootView2); } function getLNodeForHydration(viewRef) { let lView = viewRef._lView; const tView = lView[TVIEW]; if (tView.type === 2) { return null; } if (isRootView(lView)) { lView = lView[HEADER_OFFSET]; } return lView; } function getTextNodeContent(node) { return node.textContent?.replace(/\s/gm, ""); } function processTextNodeMarkersBeforeHydration(node) { const doc = getDocument(); const commentNodesIterator = doc.createNodeIterator(node, NodeFilter.SHOW_COMMENT, { acceptNode(node2) { const content = getTextNodeContent(node2); const isTextNodeMarker = content === "ngetn" || content === "ngtns"; return isTextNodeMarker ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT; } }); let currentNode; const nodes = []; while (currentNode = commentNodesIterator.nextNode()) { nodes.push(currentNode); } for (const node2 of nodes) { if (node2.textContent === "ngetn") { node2.replaceWith(doc.createTextNode("")); } else { node2.remove(); } } } var HydrationStatus; (function(HydrationStatus2) { HydrationStatus2["Hydrated"] = "hydrated"; HydrationStatus2["Skipped"] = "skipped"; HydrationStatus2["Mismatched"] = "mismatched"; })(HydrationStatus || (HydrationStatus = {})); var HYDRATION_INFO_KEY = "__ngDebugHydrationInfo__"; function patchHydrationInfo(node, info) { node[HYDRATION_INFO_KEY] = info; } function readHydrationInfo(node) { return node[HYDRATION_INFO_KEY] ?? null; } function markRNodeAsClaimedByHydration(node, checkIfAlreadyClaimed = true) { if (!ngDevMode) { throw new Error("prod \uBAA8\uB4DC\uC5D0\uC11C `markRNodeAsClaimedByHydration`\uC744 \uD638\uCD9C\uD558\uB294 \uAC83\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC73C\uBA70 \uC2E4\uC218\uC77C \uAC00\uB2A5\uC131\uC774 \uB192\uC2B5\uB2C8\uB2E4."); } if (checkIfAlreadyClaimed && isRNodeClaimedForHydration(node)) { throw new Error("\uC774\uBBF8 \uC8FC\uC7A5\uB41C \uB178\uB4DC\uB97C \uC8FC\uC7A5\uD558\uB824\uACE0 \uD588\uC2B5\uB2C8\uB2E4."); } patchHydrationInfo(node, { status: HydrationStatus.Hydrated }); ngDevMode.hydratedNodes++; } function markRNodeAsSkippedByHydration(node) { if (!ngDevMode) { throw new Error("prod \uBAA8\uB4DC\uC5D0\uC11C `markRNodeAsSkippedByHydration`\uC744 \uD638\uCD9C\uD558\uB294 \uAC83\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC73C\uBA70 \uC2E4\uC218\uC77C \uAC00\uB2A5\uC131\uC774 \uB192\uC2B5\uB2C8\uB2E4."); } patchHydrationInfo(node, { status: HydrationStatus.Skipped }); ngDevMode.componentsSkippedHydration++; } function countBlocksSkippedByHydration(injector) { const transferState = injector.get(TransferState); const nghDeferData = transferState.get(NGH_DEFER_BLOCKS_KEY, {}); if (ngDevMode) { ngDevMode.deferBlocksWithIncrementalHydration = Object.keys(nghDeferData).length; } } function markRNodeAsHavingHydrationMismatch(node, expectedNodeDetails = null, actualNodeDetails = null) { if (!ngDevMode) { throw new Error("prod \uBAA8\uB4DC\uC5D0\uC11C `markRNodeAsMismatchedByHydration`\uC744 \uD638\uCD9C\uD558\uB294 \uAC83\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC73C\uBA70 \uC2E4\uC218\uC77C \uAC00\uB2A5\uC131\uC774 \uB192\uC2B5\uB2C8\uB2E4."); } while (node && !getComponent(node)) { node = node?.parentNode; } if (node) { patchHydrationInfo(node, { status: HydrationStatus.Mismatched, expectedNodeDetails, actualNodeDetails }); } } function isRNodeClaimedForHydration(node) { return readHydrationInfo(node)?.status === HydrationStatus.Hydrated; } function setSegmentHead(hydrationInfo, index, node) { hydrationInfo.segmentHeads ??= {}; hydrationInfo.segmentHeads[index] = node; } function getSegmentHead(hydrationInfo, index) { return hydrationInfo.segmentHeads?.[index] ?? null; } function isIncrementalHydrationEnabled(injector) { return injector.get(IS_INCREMENTAL_HYDRATION_ENABLED, false, { optional: true }); } function assertIncrementalHydrationIsConfigured(injector) { if (!isIncrementalHydrationEnabled(injector)) { throw new RuntimeError(508, "Angular\uB294 \uC77C\uBD80 `@defer` \uBE14\uB85D\uC774 `hydrate` \uD2B8\uB9AC\uAC70\uB97C \uC0AC\uC6A9\uD558\uACE0 \uC788\uC9C0\uB9CC, \uC99D\uAC00 \uC218\uBD84\uC774 \uD65C\uC131\uD654\uB418\uC9C0 \uC54A\uC558\uC74C\uC744 \uAC10\uC9C0\uD588\uC2B5\uB2C8\uB2E4. `provideClientHydration()` \uD568\uC218 \uD638\uCD9C\uC5D0 \uB300\uD55C \uC778\uC218\uB85C `withIncrementalHydration()` \uD638\uCD9C\uC774 \uCD94\uAC00\uB418\uC5C8\uB294\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624."); } } function assertSsrIdDefined(ssrUniqueId) { assertDefined(ssrUniqueId, "\uB0B4\uBD80 \uC624\uB958: \uC218\uBD84 \uCC98\uB9AC\uD574\uC57C \uD558\uB294 \uC9C0\uC5F0 \uBE14\uB85D\uC5D0 \uB300\uD55C SSR id\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC, id\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."); } function getNgContainerSize(hydrationInfo, index) { const data = hydrationInfo.data; let size = data[ELEMENT_CONTAINERS]?.[index] ?? null; if (size === null && data[CONTAINERS]?.[index]) { size = calcSerializedContainerSize(hydrationInfo, index); } return size; } function getSerializedContainerViews(hydrationInfo, index) { return hydrationInfo.data[CONTAINERS]?.[index] ?? null; } function calcSerializedContainerSize(hydrationInfo, index) { const views = getSerializedContainerViews(hydrationInfo, index) ?? []; let numNodes = 0; for (let view of views) { numNodes += view[NUM_ROOT_NODES] * (view[MULTIPLIER] ?? 1); } return numNodes; } function initDisconnectedNodes(hydrationInfo) { if (typeof hydrationInfo.disconnectedNodes === "undefined") { const nodeIds = hydrationInfo.data[DISCONNECTED_NODES]; hydrationInfo.disconnectedNodes = nodeIds ? new Set(nodeIds) : null; } return hydrationInfo.disconnectedNodes; } function isDisconnectedNode$1(hydrationInfo, index) { if (typeof hydrationInfo.disconnectedNodes === "undefined") { const nodeIds = hydrationInfo.data[DISCONNECTED_NODES]; hydrationInfo.disconnectedNodes = nodeIds ? new Set(nodeIds) : null; } return !!initDisconnectedNodes(hydrationInfo)?.has(index); } function getParentBlockHydrationQueue(deferBlockId, injector) { const dehydratedBlockRegistry = injector.get(DEHYDRATED_BLOCK_REGISTRY); const transferState = injector.get(TransferState); const deferBlockParents = transferState.get(NGH_DEFER_BLOCKS_KEY, {}); let isTopMostDeferBlock = false; let currentBlockId = deferBlockId; let parentBlockPromise = null; const hydrationQueue = []; while (!isTopMostDeferBlock && currentBlockId) { ngDevMode && assertEqual(hydrationQueue.indexOf(currentBlockId), -1, "\uB0B4\uBD80 \uC624\uB958: \uC9C0\uC5F0 \uBE14\uB85D \uACC4\uCE35\uC5D0 \uC0AC\uC774\uD074\uC774 \uC788\uC2B5\uB2C8\uB2E4."); isTopMostDeferBlock = dehydratedBlockRegistry.has(currentBlockId); const hydratingParentBlock = dehydratedBlockRegistry.hydrating.get(currentBlockId); if (parentBlockPromise === null && hydratingParentBlock != null) { parentBlockPromise = hydratingParentBlock.promise; break; } hydrationQueue.unshift(currentBlockId); currentBlockId = deferBlockParents[currentBlockId][DEFER_PARENT_BLOCK_ID]; } return { parentBlockPromise, hydrationQueue }; } function isSsrContentsIntegrity(node) { return !!node && node.nodeType === Node.COMMENT_NODE && node.textContent?.trim() === SSR_CONTENT_INTEGRITY_MARKER; } function skipTextNodes(node) { while (node && node.nodeType === Node.TEXT_NODE) { node = node.previousSibling; } return node; } function verifySsrContentsIntegrity(doc) { for (const node of doc.body.childNodes) { if (isSsrContentsIntegrity(node)) { return; } } const beforeBody = skipTextNodes(doc.body.previousSibling); if (isSsrContentsIntegrity(beforeBody)) { return; } let endOfHead = skipTextNodes(doc.head.lastChild); if (isSsrContentsIntegrity(endOfHead)) { return; } throw new RuntimeError(-507, typeof ngDevMode !== "undefined" && ngDevMode && "Angular \uC218\uBD84 \uCC98\uB9AC \uB85C\uC9C1\uC774 \uC774 \uD398\uC774\uC9C0\uC758 HTML \uCF58\uD150\uCE20\uAC00 \uC11C\uBC84 \uCE21 \uB80C\uB354\uB9C1 \uC911\uC5D0 \uC0DD\uC131\uB41C \uD6C4 \uC218\uC815\uB418\uC5C8\uC74C\uC744 \uAC10\uC9C0\uD588\uC2B5\uB2C8\uB2E4. \uD655\uC778\uD558\uC2ED\uC2DC\uC624 HTML\uC5D0\uC11C \uC8FC\uC11D \uB178\uB4DC\uAC00 \uC81C\uAC70\uB418\uC9C0 \uC54A\uB3C4\uB85D \uD558\uB294 \uCD5C\uC801\uD654\uAC00 \uD65C\uC131\uD654\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC740\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. Angular \uC218\uBD84 \uCC98\uB9AC \uC11C\uBC84\uC5D0\uC11C \uC0DD\uC131\uB41C HTML, \uACF5\uBC31 \uBC0F \uC8FC\uC11D \uB178\uB4DC\uB97C \uD3EC\uD568\uD569\uB2C8\uB2E4."); } function refreshContentQueries(tView, lView) { const contentQueries = tView.contentQueries; if (contentQueries !== null) { const prevConsumer = setActiveConsumer(null); try { for (let i = 0; i < contentQueries.length; i += 2) { const queryStartIdx = contentQueries[i]; const directiveDefIdx = contentQueries[i + 1]; if (directiveDefIdx !== -1) { const directiveDef = tView.data[directiveDefIdx]; ngDevMode && assertDefined(directiveDef, "DirectiveDef not found."); ngDevMode && assertDefined(directiveDef.contentQueries, "contentQueries function should be defined"); setCurrentQueryIndex(queryStartIdx); directiveDef.contentQueries(2, lView[directiveDefIdx], directiveDefIdx); } } } finally { setActiveConsumer(prevConsumer); } } } function executeViewQueryFn(flags, viewQueryFn, component) { ngDevMode && assertDefined(viewQueryFn, "View queries function to execute must be defined."); setCurrentQueryIndex(0); const prevConsumer = setActiveConsumer(null); try { viewQueryFn(flags, component); } finally { setActiveConsumer(prevConsumer); } } function executeContentQueries(tView, tNode, lView) { if (isContentQueryHost(tNode)) { const prevConsumer = setActiveConsumer(null); try { const start = tNode.directiveStart; const end = tNode.directiveEnd; for (let directiveIndex = start; directiveIndex < end; directiveIndex++) { const def = tView.data[directiveIndex]; if (def.contentQueries) { const directiveInstance = lView[directiveIndex]; ngDevMode && assertDefined(directiveIndex, "Incorrect reference to a directive defining a content query"); def.contentQueries(1, directiveInstance, directiveIndex); } } } finally { setActiveConsumer(prevConsumer); } } } var ViewEncapsulation; (function(ViewEncapsulation2) { ViewEncapsulation2[ViewEncapsulation2["Emulated"] = 0] = "Emulated"; ViewEncapsulation2[ViewEncapsulation2["None"] = 2] = "None"; ViewEncapsulation2[ViewEncapsulation2["ShadowDom"] = 3] = "ShadowDom"; })(ViewEncapsulation || (ViewEncapsulation = {})); var policy$1; function getPolicy$1() { if (policy$1 === void 0) { policy$1 = null; if (_global.trustedTypes) { try { policy$1 = _global.trustedTypes.createPolicy("angular", { createHTML: (s) => s, createScript: (s) => s, createScriptURL: (s) => s }); } catch { } } } return policy$1; } function trustedHTMLFromString(html) { return getPolicy$1()?.createHTML(html) || html; } function trustedScriptURLFromString(url) { return getPolicy$1()?.createScriptURL(url) || url; } var policy; function getPolicy() { if (policy === void 0) { policy = null; if (_global.trustedTypes) { try { policy = _global.trustedTypes.createPolicy("angular#unsafe-bypass", { createHTML: (s) => s, createScript: (s) => s, createScriptURL: (s) => s }); } catch { } } } return policy; } function trustedHTMLFromStringBypass(html) { return getPolicy()?.createHTML(html) || html; } function trustedScriptFromStringBypass(script) { return getPolicy()?.createScript(script) || script; } function trustedScriptURLFromStringBypass(url) { return getPolicy()?.createScriptURL(url) || url; } var SafeValueImpl = class { changingThisBreaksApplicationSecurity; constructor(changingThisBreaksApplicationSecurity) { this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity; } toString() { return `SafeValue\uB294 [property]=binding\uC744 \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4: ${this.changingThisBreaksApplicationSecurity} (\uC790\uC138\uD55C \uB0B4\uC6A9\uC740 ${XSS_SECURITY_URL}\uC744 \uCC38\uC870\uD558\uC138\uC694)`; } }; var SafeHtmlImpl = class extends SafeValueImpl { getTypeName() { return "HTML"; } }; var SafeStyleImpl = class extends SafeValueImpl { getTypeName() { return "Style"; } }; var SafeScriptImpl = class extends SafeValueImpl { getTypeName() { return "Script"; } }; var SafeUrlImpl = class extends SafeValueImpl { getTypeName() { return "URL"; } }; var SafeResourceUrlImpl = class extends SafeValueImpl { getTypeName() { return "ResourceURL"; } }; function unwrapSafeValue(value) { return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity : value; } function allowSanitizationBypassAndThrow(value, type) { const actualType = getSanitizationBypassType(value); if (actualType != null && actualType !== type) { if (actualType === "ResourceURL" && type === "URL") return true; throw new Error(`\uC548\uC804\uD55C ${type}\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. ${actualType}\uAC00 \uC81C\uACF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4 (\uC790\uC138\uD55C \uB0B4\uC6A9\uC740 ${XSS_SECURITY_URL}\uC744 \uCC38\uC870\uD558\uC138\uC694)`); } return actualType === type; } function getSanitizationBypassType(value) { return value instanceof SafeValueImpl && value.getTypeName() || null; } function bypassSanitizationTrustHtml(trustedHtml) { return new SafeHtmlImpl(trustedHtml); } function bypassSanitizationTrustStyle(trustedStyle) { return new SafeStyleImpl(trustedStyle); } function bypassSanitizationTrustScript(trustedScript) { return new SafeScriptImpl(trustedScript); } function bypassSanitizationTrustUrl(trustedUrl) { return new SafeUrlImpl(trustedUrl); } function bypassSanitizationTrustResourceUrl(trustedResourceUrl) { return new SafeResourceUrlImpl(trustedResourceUrl); } function getInertBodyHelper(defaultDoc) { const inertDocumentHelper = new InertDocumentHelper(defaultDoc); return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper; } var DOMParserHelper = class { inertDocumentHelper; constructor(inertDocumentHelper) { this.inertDocumentHelper = inertDocumentHelper; } getInertBodyElement(html) { html = "" + html; try { const body = new window.DOMParser().parseFromString(trustedHTMLFromString(html), "text/html").body; if (body === null) { return this.inertDocumentHelper.getInertBodyElement(html); } body.firstChild?.remove(); return body; } catch { return null; } } }; var InertDocumentHelper = class { defaultDoc; inertDocument; constructor(defaultDoc) { this.defaultDoc = defaultDoc; this.inertDocument = this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"); } getInertBodyElement(html) { const templateEl = this.inertDocument.createElement("template"); templateEl.innerHTML = trustedHTMLFromString(html); return templateEl; } }; function isDOMParserAvailable() { try { return !!new window.DOMParser().parseFromString(trustedHTMLFromString(""), "text/html"); } catch { return false; } } var SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i; function _sanitizeUrl(url) { url = String(url); if (url.match(SAFE_URL_PATTERN)) return url; if (typeof ngDevMode === "undefined" || ngDevMode) { console.warn(`\uACBD\uACE0: \uC548\uC804\uD558\uC9C0 \uC54A\uC740 URL \uAC12 ${url}\uC744 \uC138\uC815\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4 (\uC790\uC138\uD55C \uB0B4\uC6A9\uC740 ${XSS_SECURITY_URL}\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624)`); } return "unsafe:" + url; } function tagSet(tags) { const res = {}; for (const t of tags.split(",")) res[t] = true; return res; } function merge2(...sets) { const res = {}; for (const s of sets) { for (const v in s) { if (s.hasOwnProperty(v)) res[v] = true; } } return res; } var VOID_ELEMENTS = tagSet("area,br,col,hr,img,wbr"); var OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"); var OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet("rp,rt"); var OPTIONAL_END_TAG_ELEMENTS = merge2(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS); var 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")); var 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")); var VALID_ELEMENTS = merge2(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS); var URI_ATTRS = tagSet("background,cite,href,itemtype,longdesc,poster,src,xlink:href"); var 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"); var 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"); var VALID_ATTRS = merge2(URI_ATTRS, HTML_ATTRS, ARIA_ATTRS); var SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet("script,style,template"); var SanitizingHtmlSerializer = class { // 무언가가 제거된 것을 명시적으로 추적하여, 단지 문자가 다시 인코딩되었기 때문에 정리에 대한 경고를 // 실수로 하지 않도록 합니다. sanitizedSomething = false; buf = []; sanitizeChildren(el) { let current = el.firstChild; let traverseContent = true; let parentNodes = []; while (current) { if (current.nodeType === Node.ELEMENT_NODE) { traverseContent = this.startElement(current); } else if (current.nodeType === Node.TEXT_NODE) { this.chars(current.nodeValue); } else { this.sanitizedSomething = true; } if (traverseContent && current.firstChild) { parentNodes.push(current); current = getFirstChild(current); continue; } while (current) { if (current.nodeType === Node.ELEMENT_NODE) { this.endElement(current); } let next = getNextSibling(current); if (next) { current = next; break; } current = parentNodes.pop(); } } return this.buf.join(""); } /** * 열기 요소 태그를 정리하고(유효한 경우) 요소의 콘텐츠를 순회해야 하는지 반환합니다. * 요소 콘텐츠는 항상 순회해야 합니다(요소 자체가 유효/안전하지 않더라도), * `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS` 중 하나가 아닌 경우에만 예외입니다. * * @param element 정리할 요소. * @return 요소의 콘텐츠를 순회해야 하는지 여부. */ startElement(element) { const tagName = getNodeName(element).toLowerCase(); if (!VALID_ELEMENTS.hasOwnProperty(tagName)) { this.sanitizedSomething = true; return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName); } this.buf.push("<"); this.buf.push(tagName); const elAttrs = element.attributes; for (let i = 0; i < elAttrs.length; i++) { const elAttr = elAttrs.item(i); const attrName = elAttr.name; const lower = attrName.toLowerCase(); if (!VALID_ATTRS.hasOwnProperty(lower)) { this.sanitizedSomething = true; continue; } let value = elAttr.value; if (URI_ATTRS[lower]) value = _sanitizeUrl(value); this.buf.push(" ", attrName, '="', encodeEntities(value), '"'); } this.buf.push(">"); return true; } endElement(current) { const tagName = getNodeName(current).toLowerCase(); if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) { this.buf.push(""); } } chars(chars) { this.buf.push(encodeEntities(chars)); } }; function isClobberedElement(parentNode, childNode) { return (parentNode.compareDocumentPosition(childNode) & Node.DOCUMENT_POSITION_CONTAINED_BY) !== Node.DOCUMENT_POSITION_CONTAINED_BY; } function getNextSibling(node) { const nextSibling = node.nextSibling; if (nextSibling && node !== nextSibling.previousSibling) { throw clobberedElementError(nextSibling); } return nextSibling; } function getFirstChild(node) { const firstChild = node.firstChild; if (firstChild && isClobberedElement(node, firstChild)) { throw clobberedElementError(firstChild); } return firstChild; } function getNodeName(node) { const nodeName = node.nodeName; return typeof nodeName === "string" ? nodeName : "FORM"; } function clobberedElementError(node) { return new Error(`HTML \uC815\uB9AC\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC694\uC18C\uAC00 \uD074\uB85C\uBC84\uB9C1\uB428: ${node.outerHTML}`); } var SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; var NON_ALPHANUMERIC_REGEXP = /([^\#-~ |!])/g; function encodeEntities(value) { return value.replace(/&/g, "&").replace(SURROGATE_PAIR_REGEXP, function(match) { const hi = match.charCodeAt(0); const low = match.charCodeAt(1); return "&#" + ((hi - 55296) * 1024 + (low - 56320) + 65536) + ";"; }).replace(NON_ALPHANUMERIC_REGEXP, function(match) { return "&#" + match.charCodeAt(0) + ";"; }).replace(//g, ">"); } var inertBodyHelper; function _sanitizeHtml(defaultDoc, unsafeHtmlInput) { let inertBodyElement = null; try { inertBodyHelper = inertBodyHelper || getInertBodyHelper(defaultDoc); let unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : ""; inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml); let mXSSAttempts = 5; let parsedHtml = unsafeHtml; do { if (mXSSAttempts === 0) { throw new Error("\uC785\uB825\uC744 \uC548\uC815\uC801\uC73C\uB85C \uD558\uAE30 \uC704\uD574 HTML \uC815\uB9AC\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."); } mXSSAttempts--; unsafeHtml = parsedHtml; parsedHtml = inertBodyElement.innerHTML; inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml); } while (unsafeHtml !== parsedHtml); const sanitizer = new SanitizingHtmlSerializer(); const safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement); if ((typeof ngDevMode === "undefined" || ngDevMode) && sanitizer.sanitizedSomething) { console.warn(`\uACBD\uACE0: HTML \uC815\uB9AC\uB85C \uC77C\uBD80 \uCF58\uD150\uCE20\uAC00 \uC81C\uAC70\uB418\uC5C8\uC2B5\uB2C8\uB2E4. ${XSS_SECURITY_URL}\uC744 \uD655\uC778\uD558\uC138\uC694.`); } return trustedHTMLFromString(safeHtml); } finally { if (inertBodyElement) { const parent = getTemplateContent(inertBodyElement) || inertBodyElement; while (parent.firstChild) { parent.firstChild.remove(); } } } } function getTemplateContent(el) { return "content" in el && isTemplateElement(el) ? el.content : null; } function isTemplateElement(el) { return el.nodeType === Node.ELEMENT_NODE && el.nodeName === "TEMPLATE"; } var SecurityContext; (function(SecurityContext2) { SecurityContext2[SecurityContext2["NONE"] = 0] = "NONE"; SecurityContext2[SecurityContext2["HTML"] = 1] = "HTML"; SecurityContext2[SecurityContext2["STYLE"] = 2] = "STYLE"; SecurityContext2[SecurityContext2["SCRIPT"] = 3] = "SCRIPT"; SecurityContext2[SecurityContext2["URL"] = 4] = "URL"; SecurityContext2[SecurityContext2["RESOURCE_URL"] = 5] = "RESOURCE_URL"; })(SecurityContext || (SecurityContext = {})); function \u0275\u0275sanitizeHtml(unsafeHtml) { const sanitizer = getSanitizer(); if (sanitizer) { return trustedHTMLFromStringBypass(sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || ""); } if (allowSanitizationBypassAndThrow( unsafeHtml, "HTML" /* BypassType.Html */ )) { return trustedHTMLFromStringBypass(unwrapSafeValue(unsafeHtml)); } return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml)); } function \u0275\u0275sanitizeStyle(unsafeStyle) { const sanitizer = getSanitizer(); if (sanitizer) { return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || ""; } if (allowSanitizationBypassAndThrow( unsafeStyle, "Style" /* BypassType.Style */ )) { return unwrapSafeValue(unsafeStyle); } return renderStringify(unsafeStyle); } function \u0275\u0275sanitizeUrl(unsafeUrl) { const sanitizer = getSanitizer(); if (sanitizer) { return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || ""; } if (allowSanitizationBypassAndThrow( unsafeUrl, "URL" /* BypassType.Url */ )) { return unwrapSafeValue(unsafeUrl); } return _sanitizeUrl(renderStringify(unsafeUrl)); } function \u0275\u0275sanitizeResourceUrl(unsafeResourceUrl) { const sanitizer = getSanitizer(); if (sanitizer) { return trustedScriptURLFromStringBypass(sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || ""); } if (allowSanitizationBypassAndThrow( unsafeResourceUrl, "ResourceURL" /* BypassType.ResourceUrl */ )) { return trustedScriptURLFromStringBypass(unwrapSafeValue(unsafeResourceUrl)); } throw new RuntimeError(904, ngDevMode && `\uB9AC\uC18C\uC2A4 URL \uCEE8\uD14D\uC2A4\uD2B8\uC5D0\uC11C \uC0AC\uC6A9\uB41C \uC548\uC804\uD558\uC9C0 \uC54A\uC740 \uAC12 (see ${XSS_SECURITY_URL})`); } function \u0275\u0275sanitizeScript(unsafeScript) { const sanitizer = getSanitizer(); if (sanitizer) { return trustedScriptFromStringBypass(sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || ""); } if (allowSanitizationBypassAndThrow( unsafeScript, "Script" /* BypassType.Script */ )) { return trustedScriptFromStringBypass(unwrapSafeValue(unsafeScript)); } throw new RuntimeError(905, ngDevMode && "\uC2A4\uD06C\uB9BD\uD2B8 \uCEE8\uD14D\uC2A4\uD2B8\uC5D0\uC11C \uC0AC\uC6A9\uB41C \uC548\uC804\uD558\uC9C0 \uC54A\uC740 \uAC12"); } function \u0275\u0275trustConstantHtml(html) { if (ngDevMode && (!Array.isArray(html) || !Array.isArray(html.raw) || html.length !== 1)) { throw new Error(`\uC2E0\uB8B0\uD560 \uC218 \uC788\uB294 HTML \uC0C1\uC218\uC5D0\uC11C \uC608\uC0C1\uCE58 \uC54A\uC740 \uBCF4\uAC04: ${html.join("?")}`); } return trustedHTMLFromString(html[0]); } function \u0275\u0275trustConstantResourceUrl(url) { if (ngDevMode && (!Array.isArray(url) || !Array.isArray(url.raw) || url.length !== 1)) { throw new Error(`\uC2E0\uB8B0\uD560 \uC218 \uC788\uB294 URL \uC0C1\uC218\uC5D0\uC11C \uC608\uC0C1\uCE58 \uC54A\uC740 \uBCF4\uAC04: ${url.join("?")}`); } return trustedScriptURLFromString(url[0]); } function getUrlSanitizer(tag, prop) { if (prop === "src" && (tag === "embed" || tag === "frame" || tag === "iframe" || tag === "media" || tag === "script") || prop === "href" && (tag === "base" || tag === "link")) { return \u0275\u0275sanitizeResourceUrl; } return \u0275\u0275sanitizeUrl; } function \u0275\u0275sanitizeUrlOrResourceUrl(unsafeUrl, tag, prop) { return getUrlSanitizer(tag, prop)(unsafeUrl); } function validateAgainstEventProperties(name) { if (name.toLowerCase().startsWith("on")) { const errorMessage = `\uC774\uBCA4\uD2B8 \uC18D\uC131 '${name}'\uC5D0 \uBC14\uC778\uB529\uD558\uB294 \uAC83\uC740 \uBCF4\uC548\uC0C1\uC758 \uC774\uC720\uB85C \uBD80\uC5EC\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. (${name.slice(2)})=...\uB97C \uC0AC\uC6A9\uD558\uC138\uC694. '${name}'\uAC00 \uC9C0\uC2DC\uC790 \uC785\uB825\uC774\uB77C\uBA74, \uD574\uB2F9 \uC9C0\uC2DC\uC790\uAC00 \uD604\uC7AC \uBAA8\uB4C8\uC5D0 \uC784\uD3EC\uD2B8\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694.`; throw new RuntimeError(306, errorMessage); } } function validateAgainstEventAttributes(name) { if (name.toLowerCase().startsWith("on")) { const errorMessage = `\uC774\uBCA4\uD2B8 \uC18D\uC131 '${name}'\uC5D0 \uBC14\uC778\uB529\uD558\uB294 \uAC83\uC740 \uBCF4\uC548\uC0C1\uC758 \uC774\uC720\uB85C \uBD80\uC5EC\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. (${name.slice(2)})=...\uB97C \uC0AC\uC6A9\uD558\uC138\uC694.`; throw new RuntimeError(306, errorMessage); } } function getSanitizer() { const lView = getLView(); return lView && lView[ENVIRONMENT].sanitizer; } var COMMENT_DISALLOWED = /^>|^->||--!>|)/g; var COMMENT_DELIMITER_ESCAPED = "\u200B$1\u200B"; function escapeCommentText(value) { return value.replace(COMMENT_DISALLOWED, (text) => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED)); } function normalizeDebugBindingName(name) { name = camelCaseToDashCase(name.replace(/[$@]/g, "_")); return `ng-reflect-${name}`; } var CAMEL_CASE_REGEXP = /([A-Z])/g; function camelCaseToDashCase(input2) { return input2.replace(CAMEL_CASE_REGEXP, (...m) => "-" + m[1].toLowerCase()); } function normalizeDebugBindingValue(value) { try { return value != null ? value.toString().slice(0, 30) : value; } catch (e) { return "[ERROR] Exception while trying to serialize the value"; } } var CUSTOM_ELEMENTS_SCHEMA = { name: "custom-elements" }; var NO_ERRORS_SCHEMA = { name: "no-errors-schema" }; var shouldThrowErrorOnUnknownElement = false; var shouldThrowErrorOnUnknownProperty = false; function validateElementIsKnown(element, lView, tagName, schemas, hasDirectives) { if (schemas === null) return; if (!hasDirectives && tagName !== null) { const isUnknown = ( // `typeof HTMLUnknownElement === 'function'`을 체크할 수 없는 이유는 // Domino가 HTMLUnknownElement를 전역적으로 노출하지 않기 때문입니다. typeof HTMLUnknownElement !== "undefined" && HTMLUnknownElement && element instanceof HTMLUnknownElement || typeof customElements !== "undefined" && tagName.indexOf("-") > -1 && !customElements.get(tagName) ); if (isUnknown && !matchingSchemas(schemas, tagName)) { const isHostStandalone = isHostComponentStandalone(lView); const templateLocation = getTemplateLocationDetails(lView); const schemas2 = `'${isHostStandalone ? "@Component" : "@NgModule"}.schemas'`; let message = `'${tagName}'\uB294 \uC54C\uB824\uC9C4 \uC694\uC18C\uAC00 \uC544\uB2D9\uB2C8\uB2E4${templateLocation}: `; message += `1. '${tagName}'\uAC00 Angular \uCEF4\uD3EC\uB10C\uD2B8\uB77C\uBA74, \uADF8\uAC83\uC774 ${isHostStandalone ? "'@Component.imports'\uC5D0 \uD3EC\uD568\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694." : "@NgModule\uC758 \uC77C\uBD80\uB85C \uC120\uC5B8\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694."}. `; if (tagName && tagName.indexOf("-") > -1) { message += `2. '${tagName}'\uAC00 \uC6F9 \uCEF4\uD3EC\uB10C\uD2B8\uB77C\uBA74, \uC774 \uBA54\uC2DC\uC9C0\uB97C \uC5B5\uC81C\uD558\uAE30 \uC704\uD574 \uC774 \uCEF4\uD3EC\uB10C\uD2B8\uC758 ${schemas2}\uC5D0 'CUSTOM_ELEMENTS_SCHEMA'\uB97C \uCD94\uAC00\uD558\uC138\uC694.`; } else { message += `2. \uBAA8\uB4E0 \uC694\uC18C\uB97C \uD5C8\uC6A9\uD558\uB824\uBA74 \uC774 \uCEF4\uD3EC\uB10C\uD2B8\uC758 ${schemas2}\uC5D0 'NO_ERRORS_SCHEMA'\uB97C \uCD94\uAC00\uD558\uC138\uC694.`; } if (shouldThrowErrorOnUnknownElement) { throw new RuntimeError(304, message); } else { console.error(formatRuntimeError(304, message)); } } } } function isPropertyValid(element, propName, tagName, schemas) { if (schemas === null) return true; if (matchingSchemas(schemas, tagName) || propName in element || isAnimationProp(propName)) { return true; } return typeof Node === "undefined" || Node === null || !(element instanceof Node); } function handleUnknownPropertyError(propName, tagName, nodeType, lView) { if (!tagName && nodeType === 4) { tagName = "ng-template"; } const isHostStandalone = isHostComponentStandalone(lView); const templateLocation = getTemplateLocationDetails(lView); let message = `'${tagName}'\uC758 \uC54C\uB824\uC9C4 \uC18D\uC131\uC774 \uC544\uB2CC '${propName}'\uC5D0 \uBC14\uC778\uB529\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.${templateLocation}.`; const schemas = `'${isHostStandalone ? "@Component" : "@NgModule"}.schemas'`; const importLocation = isHostStandalone ? "'@Component.imports'\uC5D0 \uD3EC\uD568\uB41C" : "@NgModule\uC758 \uC77C\uBD80\uB85C \uC120\uC5B8\uB41C"; if (KNOWN_CONTROL_FLOW_DIRECTIVES.has(propName)) { const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(propName); message += ` '${propName}'\uAC00 Angular \uC81C\uC5B4 \uD750\uB984 \uC9C0\uC2DC\uC5B4\uB77C\uBA74, '${correspondingImport}' \uC9C0\uC2DC\uC5B4 \uB610\uB294 'CommonModule'\uC774 ${importLocation}\uC778\uC9C0 \uD655\uC778\uD558\uC138\uC694.`; } else { message += ` 1. '${tagName}'\uAC00 Angular \uCEF4\uD3EC\uB10C\uD2B8\uC774\uACE0 '${propName}' \uC785\uB825\uC774 \uC788\uB2E4\uBA74, \uADF8\uAC83\uC774 ${importLocation}\uC778\uC9C0 \uD655\uC778\uD558\uC138\uC694.`; if (tagName && tagName.indexOf("-") > -1) { message += ` 2. '${tagName}'\uAC00 \uC6F9 \uCEF4\uD3EC\uB10C\uD2B8\uB77C\uBA74, \uC774 \uBA54\uC2DC\uC9C0\uB97C \uC5B5\uC81C\uD558\uAE30 \uC704\uD574 \uC774 \uCEF4\uD3EC\uB10C\uD2B8\uC758 ${schemas}\uC5D0 'CUSTOM_ELEMENTS_SCHEMA'\uB97C \uCD94\uAC00\uD558\uC138\uC694.`; message += ` 3. \uBAA8\uB4E0 \uC18D\uC131\uC744 \uD5C8\uC6A9\uD558\uB824\uBA74 \uC774 \uCEF4\uD3EC\uB10C\uD2B8\uC758 ${schemas}\uC5D0 'NO_ERRORS_SCHEMA'\uB97C \uCD94\uAC00\uD558\uC138\uC694.`; } else { message += ` 2. \uBAA8\uB4E0 \uC18D\uC131\uC744 \uD5C8\uC6A9\uD558\uB824\uBA74 \uC774 \uCEF4\uD3EC\uB10C\uD2B8\uC758 ${schemas}\uC5D0 'NO_ERRORS_SCHEMA'\uB97C \uCD94\uAC00\uD558\uC138\uC694.`; } } reportUnknownPropertyError(message); } function reportUnknownPropertyError(message) { if (shouldThrowErrorOnUnknownProperty) { throw new RuntimeError(303, message); } else { console.error(formatRuntimeError(303, message)); } } function getDeclarationComponentDef(lView) { !ngDevMode && throwError2("\uC0DD\uC0B0 \uBAA8\uB4DC\uC5D0\uC11C\uB294 \uD638\uCD9C\uB418\uC5B4\uC11C\uB294 \uC548 \uB429\uB2C8\uB2E4."); const declarationLView = lView[DECLARATION_COMPONENT_VIEW]; const context2 = declarationLView[CONTEXT]; if (!context2) return null; return context2.constructor ? getComponentDef(context2.constructor) : null; } function isHostComponentStandalone(lView) { !ngDevMode && throwError2("\uC0DD\uC0B0 \uBAA8\uB4DC\uC5D0\uC11C\uB294 \uD638\uCD9C\uB418\uC5B4\uC11C\uB294 \uC548 \uB429\uB2C8\uB2E4."); const componentDef = getDeclarationComponentDef(lView); return !!componentDef?.standalone; } function getTemplateLocationDetails(lView) { !ngDevMode && throwError2("\uC0DD\uC0B0 \uBAA8\uB4DC\uC5D0\uC11C\uB294 \uD638\uCD9C\uB418\uC5B4\uC11C\uB294 \uC548 \uB429\uB2C8\uB2E4."); const hostComponentDef = getDeclarationComponentDef(lView); const componentClassName = hostComponentDef?.type?.name; return componentClassName ? ` ( '${componentClassName}' \uCEF4\uD3EC\uB10C\uD2B8 \uD15C\uD50C\uB9BF\uC5D0\uC11C \uC0AC\uC6A9\uB428 )` : ""; } var KNOWN_CONTROL_FLOW_DIRECTIVES = /* @__PURE__ */ new Map([["ngIf", "NgIf"], ["ngFor", "NgFor"], ["ngSwitchCase", "NgSwitchCase"], ["ngSwitchDefault", "NgSwitchDefault"]]); function matchingSchemas(schemas, tagName) { if (schemas !== null) { for (let i = 0; i < schemas.length; i++) { const schema = schemas[i]; if (schema === NO_ERRORS_SCHEMA || schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf("-") > -1) { return true; } } } return false; } function \u0275\u0275resolveWindow(element) { return element.ownerDocument.defaultView; } function \u0275\u0275resolveDocument(element) { return element.ownerDocument; } function \u0275\u0275resolveBody(element) { return element.ownerDocument.body; } var INTERPOLATION_DELIMITER = `\uFFFD`; function maybeUnwrapFn(value) { if (value instanceof Function) { return value(); } else { return value; } } var VALUE_STRING_LENGTH_LIMIT = 200; function assertStandaloneComponentType(type) { assertComponentDef(type); const componentDef = getComponentDef(type); if (!componentDef.standalone) { throw new RuntimeError(907, `The ${stringifyForError(type)} \uCEF4\uD3EC\uB10C\uD2B8\uB294 \uB3C5\uB9BD\uD615\uC73C\uB85C \uD45C\uC2DC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4, \uADF8\uB7EC\uB098 Angular\uB294 \uC5EC\uAE30\uC5D0\uC11C \uB3C5\uB9BD\uD615 \uCEF4\uD3EC\uB10C\uD2B8\uB97C \uAE30\uB300\uD569\uB2C8\uB2E4. \uD655\uC778\uD558\uACE0 ${stringifyForError(type)} \uCEF4\uD3EC\uB10C\uD2B8\uC5D0 \uC7A5\uC2DD\uC790\uC5D0\uC11C \`standalone: true\` \uD50C\uB798\uADF8\uAC00 \uC788\uB294\uC9C0 \uD655\uC778\uD574 \uC8FC\uC138\uC694.`); } } function assertComponentDef(type) { if (!getComponentDef(type)) { throw new RuntimeError(906, `The ${stringifyForError(type)}\uB294 Angular \uCEF4\uD3EC\uB10C\uD2B8\uAC00 \uC544\uB2D9\uB2C8\uB2E4, \`@Component\` \uC7A5\uC2DD\uC790\uAC00 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694.`); } } function throwMultipleComponentError(tNode, first2, second) { throw new RuntimeError(-300, `\uC5EC\uB7EC \uCEF4\uD3EC\uB10C\uD2B8\uAC00 \uD0DC\uADF8 \uC774\uB984 ${tNode.value}\uC758 \uB178\uB4DC\uC640 \uC77C\uCE58\uD569\uB2C8\uB2E4: ${stringifyForError(first2)} \uBC0F ${stringifyForError(second)}`); } function throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName, lView) { const hostComponentDef = getDeclarationComponentDef(lView); const componentClassName = hostComponentDef?.type?.name; const field = propName ? ` '${propName}'\uC5D0 \uB300\uD574` : ""; let msg = `ExpressionChangedAfterItHasBeenCheckedError: \uD45C\uD604\uC2DD\uC774 \uCCB4\uD06C\uB41C \uD6C4 \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC774\uC804 \uAC12${field}: '${formatValue(oldValue)}'. \uD604\uC7AC \uAC12: '${formatValue(currValue)}'.${componentClassName ? ` \uD45C\uD604\uC2DD \uC704\uCE58: ${componentClassName} \uCEF4\uD3EC\uB10C\uD2B8` : ""}`; if (creationMode) { msg += ` \uBDF0\uAC00 \uBD80\uBAA8\uC640 \uC790\uC2DD\uC774 \uB354\uD2F0 \uCCB4\uD06C\uB41C \uD6C4 \uC0DD\uC131\uB41C \uAC83 \uAC19\uC2B5\uB2C8\uB2E4. \uBCC0\uACBD \uAC10\uC9C0 \uD6C5\uC5D0\uC11C \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uAE4C?`; } throw new RuntimeError(-100, msg); } function formatValue(value) { let strValue = String(value); try { if (Array.isArray(value) || strValue === "[object Object]") { strValue = JSON.stringify(value); } } catch (error) { } return strValue.length > VALUE_STRING_LENGTH_LIMIT ? strValue.substring(0, VALUE_STRING_LENGTH_LIMIT) + "\u2026" : strValue; } function constructDetailsForInterpolation(lView, rootIndex, expressionIndex, meta, changedValue) { const [propName, prefix, ...chunks] = meta.split(INTERPOLATION_DELIMITER); let oldValue = prefix, newValue = prefix; for (let i = 0; i < chunks.length; i++) { const slotIdx = rootIndex + i; oldValue += `${lView[slotIdx]}${chunks[i]}`; newValue += `${slotIdx === expressionIndex ? changedValue : lView[slotIdx]}${chunks[i]}`; } return { propName, oldValue, newValue }; } function getExpressionChangedErrorDetails(lView, bindingIndex, oldValue, newValue) { const tData = lView[TVIEW].data; const metadata = tData[bindingIndex]; if (typeof metadata === "string") { if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) { return constructDetailsForInterpolation(lView, bindingIndex, bindingIndex, metadata, newValue); } return { propName: metadata, oldValue, newValue }; } if (metadata === null) { let idx = bindingIndex - 1; while (typeof tData[idx] !== "string" && tData[idx + 1] === null) { idx--; } const meta = tData[idx]; if (typeof meta === "string") { const matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, "g")); if (matches && matches.length - 1 > bindingIndex - idx) { return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue); } } } return { propName: void 0, oldValue, newValue }; } function classIndexOf(className, classToSearch, startingIndex) { ngDevMode && assertNotEqual(classToSearch, "", '"" \uBB38\uC790\uC5F4\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.'); let end = className.length; while (true) { const foundIndex = className.indexOf(classToSearch, startingIndex); if (foundIndex === -1) return foundIndex; if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= 32) { const length = classToSearch.length; if (foundIndex + length === end || className.charCodeAt(foundIndex + length) <= 32) { return foundIndex; } } startingIndex = foundIndex + 1; } } var NG_TEMPLATE_SELECTOR = "ng-template"; function isCssClassMatching(tNode, attrs, cssClassToMatch, isProjectionMode) { ngDevMode && assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), "\uD074\uB798\uC2A4 \uC774\uB984\uC740 \uC18C\uBB38\uC790\uC5EC\uC57C \uD569\uB2C8\uB2E4."); let i = 0; if (isProjectionMode) { for (; i < attrs.length && typeof attrs[i] === "string"; i += 2) { if (attrs[i] === "class" && classIndexOf(attrs[i + 1].toLowerCase(), cssClassToMatch, 0) !== -1) { return true; } } } else if (isInlineTemplate(tNode)) { return false; } i = attrs.indexOf(1, i); if (i > -1) { let item; while (++i < attrs.length && typeof (item = attrs[i]) === "string") { if (item.toLowerCase() === cssClassToMatch) { return true; } } } return false; } function isInlineTemplate(tNode) { return tNode.type === 4 && tNode.value !== NG_TEMPLATE_SELECTOR; } function hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) { const tagNameToCompare = tNode.type === 4 && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value; return currentSelector === tagNameToCompare; } function isNodeMatchingSelector(tNode, selector, isProjectionMode) { ngDevMode && assertDefined(selector[0], "\uC120\uD0DD\uC790\uB294 \uD0DC\uADF8 \uC774\uB984\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4."); let mode = 4; const nodeAttrs = tNode.attrs; const nameOnlyMarkerIdx = nodeAttrs !== null ? getNameOnlyMarkerIndex(nodeAttrs) : 0; let skipToNextSelector = false; for (let i = 0; i < selector.length; i++) { const current = selector[i]; if (typeof current === "number") { if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) { return false; } if (skipToNextSelector && isPositive(current)) continue; skipToNextSelector = false; mode = current | mode & 1; continue; } if (skipToNextSelector) continue; if (mode & 4) { mode = 2 | mode & 1; if (current !== "" && !hasTagAndTypeMatch(tNode, current, isProjectionMode) || current === "" && selector.length === 1) { if (isPositive(mode)) return false; skipToNextSelector = true; } } else if (mode & 8) { if (nodeAttrs === null || !isCssClassMatching(tNode, nodeAttrs, current, isProjectionMode)) { if (isPositive(mode)) return false; skipToNextSelector = true; } } else { const selectorAttrValue = selector[++i]; const attrIndexInNode = findAttrIndexInNode(current, nodeAttrs, isInlineTemplate(tNode), isProjectionMode); if (attrIndexInNode === -1) { if (isPositive(mode)) return false; skipToNextSelector = true; continue; } if (selectorAttrValue !== "") { let nodeAttrValue; if (attrIndexInNode > nameOnlyMarkerIdx) { nodeAttrValue = ""; } else { ngDevMode && assertNotEqual(nodeAttrs[attrIndexInNode], 0, "\uC6B0\uB9AC\uB294 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC18D\uC131\uC5D0\uC11C \uC9C0\uC2DC\uBB38\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."); nodeAttrValue = nodeAttrs[attrIndexInNode + 1].toLowerCase(); } if (mode & 2 && selectorAttrValue !== nodeAttrValue) { if (isPositive(mode)) return false; skipToNextSelector = true; } } } } return isPositive(mode) || skipToNextSelector; } function isPositive(mode) { return (mode & 1) === 0; } function findAttrIndexInNode(name, attrs, isInlineTemplate2, isProjectionMode) { if (attrs === null) return -1; let i = 0; if (isProjectionMode || !isInlineTemplate2) { let bindingsMode = false; while (i < attrs.length) { const maybeAttrName = attrs[i]; if (maybeAttrName === name) { return i; } else if (maybeAttrName === 3 || maybeAttrName === 6) { bindingsMode = true; } else if (maybeAttrName === 1 || maybeAttrName === 2) { let value = attrs[++i]; while (typeof value === "string") { value = attrs[++i]; } continue; } else if (maybeAttrName === 4) { break; } else if (maybeAttrName === 0) { i += 4; continue; } i += bindingsMode ? 1 : 2; } return -1; } else { return matchTemplateAttribute(attrs, name); } } function isNodeMatchingSelectorList(tNode, selector, isProjectionMode = false) { for (let i = 0; i < selector.length; i++) { if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) { return true; } } return false; } function getProjectAsAttrValue(tNode) { const nodeAttrs = tNode.attrs; if (nodeAttrs != null) { const ngProjectAsAttrIdx = nodeAttrs.indexOf( 5 /* AttributeMarker.ProjectAs */ ); if ((ngProjectAsAttrIdx & 1) === 0) { return nodeAttrs[ngProjectAsAttrIdx + 1]; } } return null; } function getNameOnlyMarkerIndex(nodeAttrs) { for (let i = 0; i < nodeAttrs.length; i++) { const nodeAttr = nodeAttrs[i]; if (isNameOnlyAttributeMarker(nodeAttr)) { return i; } } return nodeAttrs.length; } function matchTemplateAttribute(attrs, name) { let i = attrs.indexOf( 4 /* AttributeMarker.Template */ ); if (i > -1) { i++; while (i < attrs.length) { const attr = attrs[i]; if (typeof attr === "number") return -1; if (attr === name) return i; i++; } } return -1; } function isSelectorInSelectorList(selector, list) { selectorListLoop: for (let i = 0; i < list.length; i++) { const currentSelectorInList = list[i]; if (selector.length !== currentSelectorInList.length) { continue; } for (let j = 0; j < selector.length; j++) { if (selector[j] !== currentSelectorInList[j]) { continue selectorListLoop; } } return true; } return false; } function maybeWrapInNotSelector(isNegativeMode, chunk) { return isNegativeMode ? ":not(" + chunk.trim() + ")" : chunk; } function stringifyCSSSelector(selector) { let result = selector[0]; let i = 1; let mode = 2; let currentChunk = ""; let isNegativeMode = false; while (i < selector.length) { let valueOrMarker = selector[i]; if (typeof valueOrMarker === "string") { if (mode & 2) { const attrValue = selector[++i]; currentChunk += "[" + valueOrMarker + (attrValue.length > 0 ? '="' + attrValue + '"' : "") + "]"; } else if (mode & 8) { currentChunk += "." + valueOrMarker; } else if (mode & 4) { currentChunk += " " + valueOrMarker; } } else { if (currentChunk !== "" && !isPositive(valueOrMarker)) { result += maybeWrapInNotSelector(isNegativeMode, currentChunk); currentChunk = ""; } mode = valueOrMarker; isNegativeMode = isNegativeMode || !isPositive(mode); } i++; } if (currentChunk !== "") { result += maybeWrapInNotSelector(isNegativeMode, currentChunk); } return result; } function stringifyCSSSelectorList(selectorList) { return selectorList.map(stringifyCSSSelector).join(","); } function extractAttrsAndClassesFromSelector(selector) { const attrs = []; const classes = []; let i = 1; let mode = 2; while (i < selector.length) { let valueOrMarker = selector[i]; if (typeof valueOrMarker === "string") { if (mode === 2) { if (valueOrMarker !== "") { attrs.push(valueOrMarker, selector[++i]); } } else if (mode === 8) { classes.push(valueOrMarker); } } else { if (!isPositive(mode)) break; mode = valueOrMarker; } i++; } if (classes.length) { attrs.push(1, ...classes); } return attrs; } var NO_CHANGE = typeof ngDevMode === "undefined" || ngDevMode ? { __brand__: "NO_CHANGE" } : {}; function createTextNode(renderer, value) { return renderer.createText(value); } function updateTextNode(renderer, rNode, value) { renderer.setValue(rNode, value); } function createCommentNode(renderer, value) { return renderer.createComment(escapeCommentText(value)); } function createElementNode(renderer, name, namespace) { return renderer.createElement(name, namespace); } function nativeInsertBefore(renderer, parent, child, beforeNode, isMove) { renderer.insertBefore(parent, child, beforeNode, isMove); } function nativeAppendChild(renderer, parent, child) { ngDevMode && assertDefined(parent, "\uBD80\uBAA8 \uB178\uB4DC\uB294 \uC815\uC758\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4"); renderer.appendChild(parent, child); } function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) { if (beforeNode !== null) { nativeInsertBefore(renderer, parent, child, beforeNode, isMove); } else { nativeAppendChild(renderer, parent, child); } } function nativeRemoveNode(renderer, rNode, isHostElement) { renderer.removeChild(null, rNode, isHostElement); } function clearElementContents(rElement) { rElement.textContent = ""; } function writeDirectStyle(renderer, element, newValue) { ngDevMode && assertString(newValue, "'newValue'\uB294 \uBB38\uC790\uC5F4\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4"); renderer.setAttribute(element, "style", newValue); } function writeDirectClass(renderer, element, newValue) { ngDevMode && assertString(newValue, "'newValue'\uB294 \uBB38\uC790\uC5F4\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4"); if (newValue === "") { renderer.removeAttribute(element, "class"); } else { renderer.setAttribute(element, "class", newValue); } } function setupStaticAttributes(renderer, element, tNode) { const { mergedAttrs, classes, styles } = tNode; if (mergedAttrs !== null) { setUpAttributes(renderer, element, mergedAttrs); } if (classes !== null) { writeDirectClass(renderer, element, classes); } if (styles !== null) { writeDirectStyle(renderer, element, styles); } } function createTView(type, declTNode, templateFn, decls, vars, directives, pipes, viewQuery, schemas, constsOrFactory, ssrId) { ngDevMode && ngDevMode.tView++; const bindingStartIndex = HEADER_OFFSET + decls; const initialViewLength = bindingStartIndex + vars; const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength); const consts = typeof constsOrFactory === "function" ? constsOrFactory() : constsOrFactory; const tView = blueprint[TVIEW] = { type, blueprint, template: templateFn, queries: null, viewQuery, declTNode, data: blueprint.slice().fill(null, bindingStartIndex), bindingStartIndex, expandoStartIndex: initialViewLength, hostBindingOpCodes: null, firstCreatePass: true, firstUpdatePass: true, staticViewQueries: false, staticContentQueries: false, preOrderHooks: null, preOrderCheckHooks: null, contentHooks: null, contentCheckHooks: null, viewHooks: null, viewCheckHooks: null, destroyHooks: null, cleanup: null, contentQueries: null, components: null, directiveRegistry: typeof directives === "function" ? directives() : directives, pipeRegistry: typeof pipes === "function" ? pipes() : pipes, firstChild: null, schemas, consts, incompleteFirstPass: false, ssrId }; if (ngDevMode) { Object.seal(tView); } return tView; } function createViewBlueprint(bindingStartIndex, initialViewLength) { const blueprint = []; for (let i = 0; i < initialViewLength; i++) { blueprint.push(i < bindingStartIndex ? null : NO_CHANGE); } return blueprint; } function getOrCreateComponentTView(def) { const tView = def.tView; if (tView === null || tView.incompleteFirstPass) { const declTNode = null; return def.tView = createTView(1, declTNode, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas, def.consts, def.id); } return tView; } function createLView(parentLView, tView, context2, flags, host, tHostNode, environment, renderer, injector, embeddedViewInjector, hydrationInfo) { const lView = tView.blueprint.slice(); lView[HOST] = host; lView[FLAGS] = flags | 4 | 128 | 8 | 64 | 1024; if (embeddedViewInjector !== null || parentLView && parentLView[FLAGS] & 2048) { lView[FLAGS] |= 2048; } resetPreOrderHookFlags(lView); ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView); lView[PARENT] = lView[DECLARATION_VIEW] = parentLView; lView[CONTEXT] = context2; lView[ENVIRONMENT] = environment || parentLView && parentLView[ENVIRONMENT]; ngDevMode && assertDefined(lView[ENVIRONMENT], "LViewEnvironment is required"); lView[RENDERER] = renderer || parentLView && parentLView[RENDERER]; ngDevMode && assertDefined(lView[RENDERER], "Renderer is required"); lView[INJECTOR] = injector || parentLView && parentLView[INJECTOR] || null; lView[T_HOST] = tHostNode; lView[ID] = getUniqueLViewId(); lView[HYDRATION] = hydrationInfo; lView[EMBEDDED_VIEW_INJECTOR] = embeddedViewInjector; ngDevMode && assertEqual(tView.type == 2 ? parentLView !== null : true, true, "Embedded views must have parentLView"); lView[DECLARATION_COMPONENT_VIEW] = tView.type == 2 ? parentLView[DECLARATION_COMPONENT_VIEW] : lView; return lView; } function createComponentLView(lView, hostTNode, def) { const native = getNativeByTNode(hostTNode, lView); const tView = getOrCreateComponentTView(def); const rendererFactory = lView[ENVIRONMENT].rendererFactory; const componentView = addToEndOfViewTree(lView, createLView(lView, tView, null, getInitialLViewFlagsFromDef(def), native, hostTNode, null, rendererFactory.createRenderer(native, def), null, null, null)); return lView[hostTNode.index] = componentView; } function getInitialLViewFlagsFromDef(def) { let flags = 16; if (def.signals) { flags = 4096; } else if (def.onPush) { flags = 64; } return flags; } function allocExpando(tView, lView, numSlotsToAlloc, initialValue) { if (numSlotsToAlloc === 0) return -1; if (ngDevMode) { assertFirstCreatePass(tView); assertSame(tView, lView[TVIEW], "`LView` must be associated with `TView`!"); assertEqual(tView.data.length, lView.length, "Expecting LView to be same size as TView"); assertEqual(tView.data.length, tView.blueprint.length, "Expecting Blueprint to be same size as TView"); assertFirstUpdatePass(tView); } const allocIdx = lView.length; for (let i = 0; i < numSlotsToAlloc; i++) { lView.push(initialValue); tView.blueprint.push(initialValue); tView.data.push(null); } return allocIdx; } function addToEndOfViewTree(lView, lViewOrLContainer) { if (lView[CHILD_HEAD]) { lView[CHILD_TAIL][NEXT] = lViewOrLContainer; } else { lView[CHILD_HEAD] = lViewOrLContainer; } lView[CHILD_TAIL] = lViewOrLContainer; return lViewOrLContainer; } function \u0275\u0275advance(delta = 1) { ngDevMode && assertGreaterThan(delta, 0, "\uC55E\uC73C\uB85C\uB9CC \uC774\uB3D9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."); selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, !!ngDevMode && isInCheckNoChangesMode()); } function selectIndexInternal(tView, lView, index, checkNoChangesMode) { ngDevMode && assertIndexInDeclRange(lView[TVIEW], index); if (!checkNoChangesMode) { const hooksInitPhaseCompleted = (lView[FLAGS] & 3) === 3; if (hooksInitPhaseCompleted) { const preOrderCheckHooks = tView.preOrderCheckHooks; if (preOrderCheckHooks !== null) { executeCheckHooks(lView, preOrderCheckHooks, index); } } else { const preOrderHooks = tView.preOrderHooks; if (preOrderHooks !== null) { executeInitAndCheckHooks(lView, preOrderHooks, 0, index); } } } setSelectedIndex(index); } var InputFlags; (function(InputFlags2) { InputFlags2[InputFlags2["None"] = 0] = "None"; InputFlags2[InputFlags2["SignalBased"] = 1] = "SignalBased"; InputFlags2[InputFlags2["HasDecoratorInputTransform"] = 2] = "HasDecoratorInputTransform"; })(InputFlags || (InputFlags = {})); function writeToDirectiveInput(def, instance, publicName, value) { const prevConsumer = setActiveConsumer(null); try { if (ngDevMode) { if (!def.inputs.hasOwnProperty(publicName)) { throw new Error(`ASSERTION ERROR: \uC9C0\uC2DC\uC5B4 ${def.type.name}\uB294 "${publicName}"\uC758 \uACF5\uAC1C \uC774\uB984\uC744 \uAC00\uC9C4 \uC785\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.`); } if (instance instanceof NodeInjectorFactory) { throw new Error(`ASSERTION ERROR: \uC720\uD615 ${def.type.name}\uC758 \uD329\uD1A0\uB9AC\uC5D0 \uC785\uB825\uC744 \uC4F8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC9C0\uC2DC\uC5B4\uAC00 \uC544\uC9C1 \uC0DD\uC131\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.`); } } const [privateName, flags, transform] = def.inputs[publicName]; let inputSignalNode = null; if ((flags & InputFlags.SignalBased) !== 0) { const field = instance[privateName]; inputSignalNode = field[SIGNAL]; } if (inputSignalNode !== null && inputSignalNode.transformFn !== void 0) { value = inputSignalNode.transformFn(value); } else if (transform !== null) { value = transform.call(instance, value); } if (def.setInput !== null) { def.setInput(instance, inputSignalNode, value, publicName, privateName); } else { applyValueToInputField(instance, inputSignalNode, privateName, value); } } finally { setActiveConsumer(prevConsumer); } } function executeTemplate(tView, lView, templateFn, rf, context2) { const prevSelectedIndex = getSelectedIndex(); const isUpdatePhase = rf & 2; try { setSelectedIndex(-1); if (isUpdatePhase && lView.length > HEADER_OFFSET) { selectIndexInternal(tView, lView, HEADER_OFFSET, !!ngDevMode && isInCheckNoChangesMode()); } const preHookType = isUpdatePhase ? 2 : 0; profiler(preHookType, context2, templateFn); templateFn(rf, context2); } finally { setSelectedIndex(prevSelectedIndex); const postHookType = isUpdatePhase ? 3 : 1; profiler(postHookType, context2, templateFn); } } function createDirectivesInstances(tView, lView, tNode) { instantiateAllDirectives(tView, lView, tNode); if ((tNode.flags & 64) === 64) { invokeDirectivesHostBindings(tView, lView, tNode); } } function saveResolvedLocalsInData(viewData, tNode, localRefExtractor = getNativeByTNode) { const localNames = tNode.localNames; if (localNames !== null) { let localIndex = tNode.index + 1; for (let i = 0; i < localNames.length; i += 2) { const index = localNames[i + 1]; const value = index === -1 ? localRefExtractor(tNode, viewData) : viewData[index]; viewData[localIndex++] = value; } } } function locateHostElement(renderer, elementOrSelector, encapsulation, injector) { const preserveHostContent = injector.get(PRESERVE_HOST_CONTENT, PRESERVE_HOST_CONTENT_DEFAULT); const preserveContent = preserveHostContent || encapsulation === ViewEncapsulation.ShadowDom; const rootElement = renderer.selectRootElement(elementOrSelector, preserveContent); applyRootElementTransform(rootElement); return rootElement; } function applyRootElementTransform(rootElement) { _applyRootElementTransformImpl(rootElement); } var _applyRootElementTransformImpl = () => null; function applyRootElementTransformImpl(rootElement) { if (hasSkipHydrationAttrOnRElement(rootElement)) { clearElementContents(rootElement); } else { processTextNodeMarkersBeforeHydration(rootElement); } } function enableApplyRootElementTransformImpl() { _applyRootElementTransformImpl = applyRootElementTransformImpl; } function mapPropName(name) { if (name === "class") return "className"; if (name === "for") return "htmlFor"; if (name === "formaction") return "formAction"; if (name === "innerHtml") return "innerHTML"; if (name === "readonly") return "readOnly"; if (name === "tabindex") return "tabIndex"; return name; } function elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, nativeOnly) { ngDevMode && assertNotSame(value, NO_CHANGE, "Incoming value should never be NO_CHANGE."); if (!nativeOnly) { const hasSetInput = setAllInputsForProperty(tNode, tView, lView, propName, value); if (hasSetInput) { isComponentHost(tNode) && markDirtyIfOnPush(lView, tNode.index); ngDevMode && setNgReflectProperties(lView, tView, tNode, propName, value); return; } } if (tNode.type & 3) { const element = getNativeByTNode(tNode, lView); propName = mapPropName(propName); if (ngDevMode) { validateAgainstEventProperties(propName); if (!isPropertyValid(element, propName, tNode.value, tView.schemas)) { handleUnknownPropertyError(propName, tNode.value, tNode.type, lView); } } value = sanitizer != null ? sanitizer(value, tNode.value || "", propName) : value; renderer.setProperty(element, propName, value); } else if (tNode.type & 12) { if (ngDevMode && !matchingSchemas(tView.schemas, tNode.value)) { handleUnknownPropertyError(propName, tNode.value, tNode.type, lView); } } } function markDirtyIfOnPush(lView, viewIndex) { ngDevMode && assertLView(lView); const childComponentLView = getComponentLViewByIndex(viewIndex, lView); if (!(childComponentLView[FLAGS] & 16)) { childComponentLView[FLAGS] |= 64; } } function setNgReflectProperty(lView, tNode, attrName, value) { const element = getNativeByTNode(tNode, lView); const renderer = lView[RENDERER]; attrName = normalizeDebugBindingName(attrName); const debugValue = normalizeDebugBindingValue(value); if (tNode.type & 3) { if (value == null) { renderer.removeAttribute(element, attrName); } else { renderer.setAttribute(element, attrName, debugValue); } } else { const textContent = escapeCommentText(`bindings=${JSON.stringify({ [attrName]: debugValue }, null, 2)}`); renderer.setValue(element, textContent); } } function setNgReflectProperties(lView, tView, tNode, publicName, value) { if (!(tNode.type & (3 | 4))) { return; } const inputConfig = tNode.inputs?.[publicName]; const hostInputConfig = tNode.hostDirectiveInputs?.[publicName]; if (hostInputConfig) { for (let i = 0; i < hostInputConfig.length; i += 2) { const index = hostInputConfig[i]; const publicName2 = hostInputConfig[i + 1]; const def = tView.data[index]; setNgReflectProperty(lView, tNode, def.inputs[publicName2][0], value); } } if (inputConfig) { for (const index of inputConfig) { const def = tView.data[index]; setNgReflectProperty(lView, tNode, def.inputs[publicName][0], value); } } } function instantiateAllDirectives(tView, lView, tNode) { const start = tNode.directiveStart; const end = tNode.directiveEnd; if (isComponentHost(tNode)) { ngDevMode && assertTNodeType( tNode, 3 /* TNodeType.AnyRNode */ ); createComponentLView(lView, tNode, tView.data[start + tNode.componentOffset]); } if (!tView.firstCreatePass) { getOrCreateNodeInjectorForNode(tNode, lView); } const initialInputs = tNode.initialInputs; for (let i = start; i < end; i++) { const def = tView.data[i]; const directive = getNodeInjectable(lView, tView, i, tNode); attachPatchData(directive, lView); if (initialInputs !== null) { setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs); } if (isComponentDef(def)) { const componentView = getComponentLViewByIndex(tNode.index, lView); componentView[CONTEXT] = getNodeInjectable(lView, tView, i, tNode); } } } function invokeDirectivesHostBindings(tView, lView, tNode) { const start = tNode.directiveStart; const end = tNode.directiveEnd; const elementIndex = tNode.index; const currentDirectiveIndex = getCurrentDirectiveIndex(); try { setSelectedIndex(elementIndex); for (let dirIndex = start; dirIndex < end; dirIndex++) { const def = tView.data[dirIndex]; const directive = lView[dirIndex]; setCurrentDirectiveIndex(dirIndex); if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) { invokeHostBindingsInCreationMode(def, directive); } } } finally { setSelectedIndex(-1); setCurrentDirectiveIndex(currentDirectiveIndex); } } function invokeHostBindingsInCreationMode(def, directive) { if (def.hostBindings !== null) { def.hostBindings(1, directive); } } function findDirectiveDefMatches(tView, tNode) { ngDevMode && assertFirstCreatePass(tView); ngDevMode && assertTNodeType( tNode, 3 | 12 /* TNodeType.AnyContainer */ ); const registry = tView.directiveRegistry; let matches = null; if (registry) { for (let i = 0; i < registry.length; i++) { const def = registry[i]; if (isNodeMatchingSelectorList( tNode, def.selectors, /* isProjectionMode */ false )) { matches ??= []; if (isComponentDef(def)) { if (ngDevMode) { assertTNodeType(tNode, 2, `"${tNode.value}" \uD0DC\uADF8\uB294 \uAD6C\uC131 \uC694\uC18C \uD638\uC2A4\uD2B8\uB85C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E4\uB978 \uD0DC\uADF8\uB97C \uC0AC\uC6A9\uD558\uC5EC ${stringify(def.type)} \uAD6C\uC131 \uC694\uC18C\uB97C \uD65C\uC131\uD654\uD558\uC2ED\uC2DC\uC624.`); if (matches.length && isComponentDef(matches[0])) { throwMultipleComponentError(tNode, matches.find(isComponentDef).type, def.type); } } matches.unshift(def); } else { matches.push(def); } } } } return matches; } function elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace) { if (ngDevMode) { assertNotSame(value, NO_CHANGE, "Incoming value should never be NO_CHANGE."); validateAgainstEventAttributes(name); assertTNodeType(tNode, 2, `\uCEE8\uD14C\uC774\uB108 \uB178\uB4DC\uC5D0 \uB300\uD574 \`${name}\` \uC18D\uC131\uC744 \uC124\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD588\uC2B5\uB2C8\uB2E4. \uD638\uC2A4\uD2B8 \uBC14\uC778\uB529\uC740 ng-container \uB610\uB294 ng-template\uC5D0\uC11C \uC720\uD6A8\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.`); } const element = getNativeByTNode(tNode, lView); setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer); } function setElementAttribute(renderer, element, namespace, tagName, name, value, sanitizer) { if (value == null) { renderer.removeAttribute(element, name, namespace); } else { const strValue = sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || "", name); renderer.setAttribute(element, name, strValue, namespace); } } function setInputsFromAttrs(lView, directiveIndex, instance, def, tNode, initialInputData) { const initialInputs = initialInputData[directiveIndex]; if (initialInputs !== null) { for (let i = 0; i < initialInputs.length; i += 2) { const lookupName = initialInputs[i]; const value = initialInputs[i + 1]; writeToDirectiveInput(def, instance, lookupName, value); if (ngDevMode) { setNgReflectProperty(lView, tNode, def.inputs[lookupName][0], value); } } } } function storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex, ...interpolationParts) { if (tData[bindingIndex] === null) { if (!tNode.inputs?.[propertyName] && !tNode.hostDirectiveInputs?.[propertyName]) { const propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []); propBindingIdxs.push(bindingIndex); let bindingMetadata = propertyName; if (interpolationParts.length > 0) { bindingMetadata += INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER); } tData[bindingIndex] = bindingMetadata; } } } function loadComponentRenderer(currentDef, tNode, lView) { if (currentDef === null || isComponentDef(currentDef)) { lView = unwrapLView(lView[tNode.index]); } return lView[RENDERER]; } function handleUncaughtError(lView, error) { const injector = lView[INJECTOR]; if (!injector) { return; } const errorHandler = injector.get(INTERNAL_APPLICATION_ERROR_HANDLER, null); errorHandler?.(error); } function setAllInputsForProperty(tNode, tView, lView, publicName, value) { const inputs = tNode.inputs?.[publicName]; const hostDirectiveInputs = tNode.hostDirectiveInputs?.[publicName]; let hasMatch = false; if (hostDirectiveInputs) { for (let i = 0; i < hostDirectiveInputs.length; i += 2) { const index = hostDirectiveInputs[i]; ngDevMode && assertIndexInRange(lView, index); const publicName2 = hostDirectiveInputs[i + 1]; const def = tView.data[index]; writeToDirectiveInput(def, lView[index], publicName2, value); hasMatch = true; } } if (inputs) { for (const index of inputs) { ngDevMode && assertIndexInRange(lView, index); const instance = lView[index]; const def = tView.data[index]; writeToDirectiveInput(def, instance, publicName, value); hasMatch = true; } } return hasMatch; } function renderComponent(hostLView, componentHostIdx) { ngDevMode && assertEqual(isCreationMode(hostLView), true, "\uC0DD\uC131 \uBAA8\uB4DC\uC5D0\uC11C \uC2E4\uD589\uB418\uC5B4\uC57C \uD568"); const componentView = getComponentLViewByIndex(componentHostIdx, hostLView); const componentTView = componentView[TVIEW]; syncViewWithBlueprint(componentTView, componentView); const hostRNode = componentView[HOST]; if (hostRNode !== null && componentView[HYDRATION] === null) { componentView[HYDRATION] = retrieveHydrationInfo(hostRNode, componentView[INJECTOR]); } profiler( 18 /* ProfilerEvent.ComponentStart */ ); renderView(componentTView, componentView, componentView[CONTEXT]); profiler(19, componentView[CONTEXT]); } function syncViewWithBlueprint(tView, lView) { for (let i = lView.length; i < tView.blueprint.length; i++) { lView.push(tView.blueprint[i]); } } function renderView(tView, lView, context2) { ngDevMode && assertEqual(isCreationMode(lView), true, "\uC0DD\uC131 \uBAA8\uB4DC\uC5D0\uC11C \uC2E4\uD589\uB418\uC5B4\uC57C \uD568"); ngDevMode && assertNotReactive(renderView.name); enterView(lView); try { const viewQuery = tView.viewQuery; if (viewQuery !== null) { executeViewQueryFn(1, viewQuery, context2); } const templateFn = tView.template; if (templateFn !== null) { executeTemplate(tView, lView, templateFn, 1, context2); } if (tView.firstCreatePass) { tView.firstCreatePass = false; } lView[QUERIES]?.finishViewCreation(tView); if (tView.staticContentQueries) { refreshContentQueries(tView, lView); } if (tView.staticViewQueries) { executeViewQueryFn(2, tView.viewQuery, context2); } const components = tView.components; if (components !== null) { renderChildComponents(lView, components); } } catch (error) { if (tView.firstCreatePass) { tView.incompleteFirstPass = true; tView.firstCreatePass = false; } throw error; } finally { lView[FLAGS] &= -5; leaveView(); } } function renderChildComponents(hostLView, components) { for (let i = 0; i < components.length; i++) { renderComponent(hostLView, components[i]); } } function createAndRenderEmbeddedLView(declarationLView, templateTNode, context2, options) { const prevConsumer = setActiveConsumer(null); try { const embeddedTView = templateTNode.tView; ngDevMode && assertDefined(embeddedTView, "TView\uB294 \uD15C\uD50C\uB9BF \uB178\uB4DC\uC5D0 \uB300\uD574 \uC815\uC758\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4."); ngDevMode && assertTNodeForLView(templateTNode, declarationLView); const isSignalView = declarationLView[FLAGS] & 4096; const viewFlags = isSignalView ? 4096 : 16; const embeddedLView = createLView(declarationLView, embeddedTView, context2, viewFlags, null, templateTNode, null, null, options?.injector ?? null, options?.embeddedViewInjector ?? null, options?.dehydratedView ?? null); const declarationLContainer = declarationLView[templateTNode.index]; ngDevMode && assertLContainer(declarationLContainer); embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer; const declarationViewLQueries = declarationLView[QUERIES]; if (declarationViewLQueries !== null) { embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView); } renderView(embeddedTView, embeddedLView, context2); return embeddedLView; } finally { setActiveConsumer(prevConsumer); } } function shouldAddViewToDom(tNode, dehydratedView) { return !dehydratedView || dehydratedView.firstChild === null || hasInSkipHydrationBlockFlag(tNode); } var _icuContainerIterate; function icuContainerIterate(tIcuContainerNode, lView) { return _icuContainerIterate(tIcuContainerNode, lView); } function ensureIcuContainerVisitorLoaded(loader) { if (_icuContainerIterate === void 0) { _icuContainerIterate = loader(); } } var RendererStyleFlags2; (function(RendererStyleFlags22) { RendererStyleFlags22[RendererStyleFlags22["Important"] = 1] = "Important"; RendererStyleFlags22[RendererStyleFlags22["DashCase"] = 2] = "DashCase"; })(RendererStyleFlags2 || (RendererStyleFlags2 = {})); function isDetachedByI18n(tNode) { return (tNode.flags & 32) === 32; } function applyToElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) { if (lNodeToHandle != null) { let lContainer; let isComponent2 = false; if (isLContainer(lNodeToHandle)) { lContainer = lNodeToHandle; } else if (isLView(lNodeToHandle)) { isComponent2 = true; ngDevMode && assertDefined(lNodeToHandle[HOST], "HOST must be defined for a component LView"); lNodeToHandle = lNodeToHandle[HOST]; } const rNode = unwrapRNode(lNodeToHandle); if (action === 0 && parent !== null) { if (beforeNode == null) { nativeAppendChild(renderer, parent, rNode); } else { nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true); } } else if (action === 1 && parent !== null) { nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true); } else if (action === 2) { nativeRemoveNode(renderer, rNode, isComponent2); } else if (action === 3) { renderer.destroyNode(rNode); } if (lContainer != null) { applyContainer(renderer, action, lContainer, parent, beforeNode); } } } function removeViewFromDOM(tView, lView) { detachViewFromDOM(tView, lView); lView[HOST] = null; lView[T_HOST] = null; } function addViewToDOM(tView, parentTNode, renderer, lView, parentNativeNode, beforeNode) { lView[HOST] = parentNativeNode; lView[T_HOST] = parentTNode; applyView(tView, lView, renderer, 1, parentNativeNode, beforeNode); } function detachViewFromDOM(tView, lView) { lView[ENVIRONMENT].changeDetectionScheduler?.notify( 9 /* NotificationSource.ViewDetachedFromDOM */ ); applyView(tView, lView, lView[RENDERER], 2, null, null); } function destroyViewTree(rootView) { let lViewOrLContainer = rootView[CHILD_HEAD]; if (!lViewOrLContainer) { return cleanUpView(rootView[TVIEW], rootView); } while (lViewOrLContainer) { let next = null; if (isLView(lViewOrLContainer)) { next = lViewOrLContainer[CHILD_HEAD]; } else { ngDevMode && assertLContainer(lViewOrLContainer); const firstView = lViewOrLContainer[CONTAINER_HEADER_OFFSET]; if (firstView) next = firstView; } if (!next) { while (lViewOrLContainer && !lViewOrLContainer[NEXT] && lViewOrLContainer !== rootView) { if (isLView(lViewOrLContainer)) { cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer); } lViewOrLContainer = lViewOrLContainer[PARENT]; } if (lViewOrLContainer === null) lViewOrLContainer = rootView; if (isLView(lViewOrLContainer)) { cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer); } next = lViewOrLContainer && lViewOrLContainer[NEXT]; } lViewOrLContainer = next; } } function detachMovedView(declarationContainer, lView) { ngDevMode && assertLContainer(declarationContainer); ngDevMode && assertDefined(declarationContainer[MOVED_VIEWS], "A projected view should belong to a non-empty projected views collection"); const movedViews = declarationContainer[MOVED_VIEWS]; const declarationViewIndex = movedViews.indexOf(lView); movedViews.splice(declarationViewIndex, 1); } function destroyLView(tView, lView) { if (isDestroyed(lView)) { return; } const renderer = lView[RENDERER]; if (renderer.destroyNode) { applyView(tView, lView, renderer, 3, null, null); } destroyViewTree(lView); } function cleanUpView(tView, lView) { if (isDestroyed(lView)) { return; } const prevConsumer = setActiveConsumer(null); try { lView[FLAGS] &= ~128; lView[FLAGS] |= 256; lView[REACTIVE_TEMPLATE_CONSUMER] && consumerDestroy(lView[REACTIVE_TEMPLATE_CONSUMER]); executeOnDestroys(tView, lView); processCleanups(tView, lView); if (lView[TVIEW].type === 1) { lView[RENDERER].destroy(); } const declarationContainer = lView[DECLARATION_LCONTAINER]; if (declarationContainer !== null && isLContainer(lView[PARENT])) { if (declarationContainer !== lView[PARENT]) { detachMovedView(declarationContainer, lView); } const lQueries = lView[QUERIES]; if (lQueries !== null) { lQueries.detachView(tView); } } unregisterLView(lView); } finally { setActiveConsumer(prevConsumer); } } function processCleanups(tView, lView) { ngDevMode && assertNotReactive(processCleanups.name); const tCleanup = tView.cleanup; const lCleanup = lView[CLEANUP]; if (tCleanup !== null) { for (let i = 0; i < tCleanup.length - 1; i += 2) { if (typeof tCleanup[i] === "string") { const targetIdx = tCleanup[i + 3]; ngDevMode && assertNumber(targetIdx, "cleanup target must be a number"); if (targetIdx >= 0) { lCleanup[targetIdx](); } else { lCleanup[-targetIdx].unsubscribe(); } i += 2; } else { const context2 = lCleanup[tCleanup[i + 1]]; tCleanup[i].call(context2); } } } if (lCleanup !== null) { lView[CLEANUP] = null; } const destroyHooks = lView[ON_DESTROY_HOOKS]; if (destroyHooks !== null) { lView[ON_DESTROY_HOOKS] = null; for (let i = 0; i < destroyHooks.length; i++) { const destroyHooksFn = destroyHooks[i]; ngDevMode && assertFunction(destroyHooksFn, "Expecting destroy hook to be a function."); destroyHooksFn(); } } const effects = lView[EFFECTS]; if (effects !== null) { lView[EFFECTS] = null; for (const effect2 of effects) { effect2.destroy(); } } } function executeOnDestroys(tView, lView) { ngDevMode && assertNotReactive(executeOnDestroys.name); let destroyHooks; if (tView != null && (destroyHooks = tView.destroyHooks) != null) { for (let i = 0; i < destroyHooks.length; i += 2) { const context2 = lView[destroyHooks[i]]; if (!(context2 instanceof NodeInjectorFactory)) { const toCall = destroyHooks[i + 1]; if (Array.isArray(toCall)) { for (let j = 0; j < toCall.length; j += 2) { const callContext = context2[toCall[j]]; const hook = toCall[j + 1]; profiler(4, callContext, hook); try { hook.call(callContext); } finally { profiler(5, callContext, hook); } } } else { profiler(4, context2, toCall); try { toCall.call(context2); } finally { profiler(5, context2, toCall); } } } } } } function getParentRElement(tView, tNode, lView) { return getClosestRElement(tView, tNode.parent, lView); } function getClosestRElement(tView, tNode, lView) { let parentTNode = tNode; while (parentTNode !== null && parentTNode.type & (8 | 32 | 128)) { tNode = parentTNode; parentTNode = tNode.parent; } if (parentTNode === null) { return lView[HOST]; } else { ngDevMode && assertTNodeType( parentTNode, 3 | 4 /* TNodeType.Container */ ); if (isComponentHost(parentTNode)) { ngDevMode && assertTNodeForLView(parentTNode, lView); const { encapsulation } = tView.data[parentTNode.directiveStart + parentTNode.componentOffset]; if (encapsulation === ViewEncapsulation.None || encapsulation === ViewEncapsulation.Emulated) { return null; } } return getNativeByTNode(parentTNode, lView); } } function getInsertInFrontOfRNode(parentTNode, currentTNode, lView) { return _getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView); } function getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView) { if (parentTNode.type & (8 | 32)) { return getNativeByTNode(parentTNode, lView); } return null; } var _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithNoI18n; var _processI18nInsertBefore; function setI18nHandling(getInsertInFrontOfRNodeWithI18n2, processI18nInsertBefore2) { _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithI18n2; _processI18nInsertBefore = processI18nInsertBefore2; } function appendChild(tView, lView, childRNode, childTNode) { const parentRNode = getParentRElement(tView, childTNode, lView); const renderer = lView[RENDERER]; const parentTNode = childTNode.parent || lView[T_HOST]; const anchorNode = getInsertInFrontOfRNode(parentTNode, childTNode, lView); if (parentRNode != null) { if (Array.isArray(childRNode)) { for (let i = 0; i < childRNode.length; i++) { nativeAppendOrInsertBefore(renderer, parentRNode, childRNode[i], anchorNode, false); } } else { nativeAppendOrInsertBefore(renderer, parentRNode, childRNode, anchorNode, false); } } _processI18nInsertBefore !== void 0 && _processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRNode); } function getFirstNativeNode(lView, tNode) { if (tNode !== null) { ngDevMode && assertTNodeType( tNode, 3 | 12 | 32 | 16 | 128 /* TNodeType.LetDeclaration */ ); const tNodeType = tNode.type; if (tNodeType & 3) { return getNativeByTNode(tNode, lView); } else if (tNodeType & 4) { return getBeforeNodeForView(-1, lView[tNode.index]); } else if (tNodeType & 8) { const elIcuContainerChild = tNode.child; if (elIcuContainerChild !== null) { return getFirstNativeNode(lView, elIcuContainerChild); } else { const rNodeOrLContainer = lView[tNode.index]; if (isLContainer(rNodeOrLContainer)) { return getBeforeNodeForView(-1, rNodeOrLContainer); } else { return unwrapRNode(rNodeOrLContainer); } } } else if (tNodeType & 128) { return getFirstNativeNode(lView, tNode.next); } else if (tNodeType & 32) { let nextRNode = icuContainerIterate(tNode, lView); let rNode = nextRNode(); return rNode || unwrapRNode(lView[tNode.index]); } else { const projectionNodes = getProjectionNodes(lView, tNode); if (projectionNodes !== null) { if (Array.isArray(projectionNodes)) { return projectionNodes[0]; } const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]); ngDevMode && assertParentView(parentView); return getFirstNativeNode(parentView, projectionNodes); } else { return getFirstNativeNode(lView, tNode.next); } } } return null; } function getProjectionNodes(lView, tNode) { if (tNode !== null) { const componentView = lView[DECLARATION_COMPONENT_VIEW]; const componentHost = componentView[T_HOST]; const slotIdx = tNode.projection; ngDevMode && assertProjectionSlots(lView); return componentHost.projection[slotIdx]; } return null; } function getBeforeNodeForView(viewIndexInContainer, lContainer) { const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1; if (nextViewIndex < lContainer.length) { const lView = lContainer[nextViewIndex]; const firstTNodeOfView = lView[TVIEW].firstChild; if (firstTNodeOfView !== null) { return getFirstNativeNode(lView, firstTNodeOfView); } } return lContainer[NATIVE]; } function applyNodes(renderer, action, tNode, lView, parentRElement, beforeNode, isProjection) { while (tNode != null) { ngDevMode && assertTNodeForLView(tNode, lView); if (tNode.type === 128) { tNode = tNode.next; continue; } ngDevMode && assertTNodeType( tNode, 3 | 12 | 16 | 32 /* TNodeType.Icu */ ); const rawSlotValue = lView[tNode.index]; const tNodeType = tNode.type; if (isProjection) { if (action === 0) { rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView); tNode.flags |= 2; } } if (!isDetachedByI18n(tNode)) { if (tNodeType & 8) { applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false); applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode); } else if (tNodeType & 32) { const nextRNode = icuContainerIterate(tNode, lView); let rNode; while (rNode = nextRNode()) { applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode); } applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode); } else if (tNodeType & 16) { applyProjectionRecursive(renderer, action, lView, tNode, parentRElement, beforeNode); } else { ngDevMode && assertTNodeType( tNode, 3 | 4 /* TNodeType.Container */ ); applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode); } } tNode = isProjection ? tNode.projectionNext : tNode.next; } } function applyView(tView, lView, renderer, action, parentRElement, beforeNode) { applyNodes(renderer, action, tView.firstChild, lView, parentRElement, beforeNode, false); } function applyProjection(tView, lView, tProjectionNode) { const renderer = lView[RENDERER]; const parentRNode = getParentRElement(tView, tProjectionNode, lView); const parentTNode = tProjectionNode.parent || lView[T_HOST]; let beforeNode = getInsertInFrontOfRNode(parentTNode, tProjectionNode, lView); applyProjectionRecursive(renderer, 0, lView, tProjectionNode, parentRNode, beforeNode); } function applyProjectionRecursive(renderer, action, lView, tProjectionNode, parentRElement, beforeNode) { const componentLView = lView[DECLARATION_COMPONENT_VIEW]; const componentNode = componentLView[T_HOST]; ngDevMode && assertEqual(typeof tProjectionNode.projection, "number", "expecting projection index"); const nodeToProjectOrRNodes = componentNode.projection[tProjectionNode.projection]; if (Array.isArray(nodeToProjectOrRNodes)) { for (let i = 0; i < nodeToProjectOrRNodes.length; i++) { const rNode = nodeToProjectOrRNodes[i]; applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode); } } else { let nodeToProject = nodeToProjectOrRNodes; const projectedComponentLView = componentLView[PARENT]; if (hasInSkipHydrationBlockFlag(tProjectionNode)) { nodeToProject.flags |= 128; } applyNodes(renderer, action, nodeToProject, projectedComponentLView, parentRElement, beforeNode, true); } } function applyContainer(renderer, action, lContainer, parentRElement, beforeNode) { ngDevMode && assertLContainer(lContainer); const anchor = lContainer[NATIVE]; const native = unwrapRNode(lContainer); if (anchor !== native) { applyToElementOrContainer(action, renderer, parentRElement, anchor, beforeNode); } for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) { const lView = lContainer[i]; applyView(lView[TVIEW], lView, renderer, action, parentRElement, anchor); } } function applyStyling(renderer, isClassBased, rNode, prop, value) { if (isClassBased) { if (!value) { renderer.removeClass(rNode, prop); } else { renderer.addClass(rNode, prop); } } else { let flags = prop.indexOf("-") === -1 ? void 0 : RendererStyleFlags2.DashCase; if (value == null) { renderer.removeStyle(rNode, prop, flags); } else { const isImportant = typeof value === "string" ? value.endsWith("!important") : false; if (isImportant) { value = value.slice(0, -10); flags |= RendererStyleFlags2.Important; } renderer.setStyle(rNode, prop, value, flags); } } } function collectNativeNodes(tView, lView, tNode, result, isProjection = false) { while (tNode !== null) { if (tNode.type === 128) { tNode = isProjection ? tNode.projectionNext : tNode.next; continue; } ngDevMode && assertTNodeType( tNode, 3 | 12 | 16 | 32 /* TNodeType.Icu */ ); const lNode = lView[tNode.index]; if (lNode !== null) { result.push(unwrapRNode(lNode)); } if (isLContainer(lNode)) { collectNativeNodesInLContainer(lNode, result); } const tNodeType = tNode.type; if (tNodeType & 8) { collectNativeNodes(tView, lView, tNode.child, result); } else if (tNodeType & 32) { const nextRNode = icuContainerIterate(tNode, lView); let rNode; while (rNode = nextRNode()) { result.push(rNode); } } else if (tNodeType & 16) { const nodesInSlot = getProjectionNodes(lView, tNode); if (Array.isArray(nodesInSlot)) { result.push(...nodesInSlot); } else { const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]); ngDevMode && assertParentView(parentView); collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true); } } tNode = isProjection ? tNode.projectionNext : tNode.next; } return result; } function collectNativeNodesInLContainer(lContainer, result) { for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) { const lViewInAContainer = lContainer[i]; const lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild; if (lViewFirstChildTNode !== null) { collectNativeNodes(lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result); } } if (lContainer[NATIVE] !== lContainer[HOST]) { result.push(lContainer[NATIVE]); } } function addAfterRenderSequencesForView(lView) { if (lView[AFTER_RENDER_SEQUENCES_TO_ADD] !== null) { for (const sequence of lView[AFTER_RENDER_SEQUENCES_TO_ADD]) { sequence.impl.addSequence(sequence); } lView[AFTER_RENDER_SEQUENCES_TO_ADD].length = 0; } } var freeConsumers = []; function getOrBorrowReactiveLViewConsumer(lView) { return lView[REACTIVE_TEMPLATE_CONSUMER] ?? borrowReactiveLViewConsumer(lView); } function borrowReactiveLViewConsumer(lView) { const consumer = freeConsumers.pop() ?? Object.create(REACTIVE_LVIEW_CONSUMER_NODE); consumer.lView = lView; return consumer; } function maybeReturnReactiveLViewConsumer(consumer) { if (consumer.lView[REACTIVE_TEMPLATE_CONSUMER] === consumer) { return; } consumer.lView = null; freeConsumers.push(consumer); } var REACTIVE_LVIEW_CONSUMER_NODE = __spreadProps(__spreadValues({}, REACTIVE_NODE), { consumerIsAlwaysLive: true, kind: "template", consumerMarkedDirty: (node) => { markAncestorsForTraversal(node.lView); }, consumerOnSignalRead() { this.lView[REACTIVE_TEMPLATE_CONSUMER] = this; } }); function getOrCreateTemporaryConsumer(lView) { const consumer = lView[REACTIVE_TEMPLATE_CONSUMER] ?? Object.create(TEMPORARY_CONSUMER_NODE); consumer.lView = lView; return consumer; } var TEMPORARY_CONSUMER_NODE = __spreadProps(__spreadValues({}, REACTIVE_NODE), { consumerIsAlwaysLive: true, kind: "template", consumerMarkedDirty: (node) => { let parent = getLViewParent(node.lView); while (parent && !viewShouldHaveReactiveConsumer(parent[TVIEW])) { parent = getLViewParent(parent); } if (!parent) { return; } markViewForRefresh(parent); }, consumerOnSignalRead() { this.lView[REACTIVE_TEMPLATE_CONSUMER] = this; } }); function viewShouldHaveReactiveConsumer(tView) { return tView.type !== 2; } function runEffectsInView(view) { if (view[EFFECTS] === null) { return; } let tryFlushEffects = true; while (tryFlushEffects) { let foundDirtyEffect = false; for (const effect2 of view[EFFECTS]) { if (!effect2.dirty) { continue; } foundDirtyEffect = true; if (effect2.zone === null || Zone.current === effect2.zone) { effect2.run(); } else { effect2.zone.run(() => effect2.run()); } } tryFlushEffects = foundDirtyEffect && !!(view[FLAGS] & 8192); } } var MAXIMUM_REFRESH_RERUNS$1 = 100; function detectChangesInternal(lView, mode = 0) { const environment = lView[ENVIRONMENT]; const rendererFactory = environment.rendererFactory; const checkNoChangesMode = !!ngDevMode && isInCheckNoChangesMode(); if (!checkNoChangesMode) { rendererFactory.begin?.(); } try { detectChangesInViewWhileDirty(lView, mode); } finally { if (!checkNoChangesMode) { rendererFactory.end?.(); } } } function detectChangesInViewWhileDirty(lView, mode) { const lastIsRefreshingViewsValue = isRefreshingViews(); try { setIsRefreshingViews(true); detectChangesInView(lView, mode); if (ngDevMode && isExhaustiveCheckNoChanges()) { return; } let retries = 0; while (requiresRefreshOrTraversal(lView)) { if (retries === MAXIMUM_REFRESH_RERUNS$1) { throw new RuntimeError(103, ngDevMode && "\uBDF0 \uC0C8\uB85C \uACE0\uCE68 \uC911 \uBB34\uD55C \uBCC0\uACBD \uAC10\uC9C0. \uC11C\uB85C \uC0C8\uB85C \uACE0\uCE68\uC744 \uC694\uAD6C\uD558\uB294 \uCEF4\uD3EC\uB10C\uD2B8\uAC00 \uC788\uC744 \uC218 \uC788\uC73C\uBA70, \uBB34\uD55C \uB8E8\uD504\uB97C \uBC1C\uC0DD\uC2DC\uD0B5\uB2C8\uB2E4."); } retries++; detectChangesInView( lView, 1 /* ChangeDetectionMode.Targeted */ ); } } finally { setIsRefreshingViews(lastIsRefreshingViewsValue); } } function checkNoChangesInternal(lView, mode) { setIsInCheckNoChangesMode(mode); try { detectChangesInternal(lView); } finally { setIsInCheckNoChangesMode(CheckNoChangesMode.Off); } } function refreshView(tView, lView, templateFn, context2) { ngDevMode && assertEqual(isCreationMode(lView), false, "\uC5C5\uB370\uC774\uD2B8 \uBAA8\uB4DC\uC5D0\uC11C \uC2E4\uD589\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4."); if (isDestroyed(lView)) return; const flags = lView[FLAGS]; const isInCheckNoChangesPass = ngDevMode && isInCheckNoChangesMode(); const isInExhaustiveCheckNoChangesPass = ngDevMode && isExhaustiveCheckNoChanges(); enterView(lView); let returnConsumerToPool = true; let prevConsumer = null; let currentConsumer = null; if (!isInCheckNoChangesPass) { if (viewShouldHaveReactiveConsumer(tView)) { currentConsumer = getOrBorrowReactiveLViewConsumer(lView); prevConsumer = consumerBeforeComputation(currentConsumer); } else if (getActiveConsumer() === null) { returnConsumerToPool = false; currentConsumer = getOrCreateTemporaryConsumer(lView); prevConsumer = consumerBeforeComputation(currentConsumer); } else if (lView[REACTIVE_TEMPLATE_CONSUMER]) { consumerDestroy(lView[REACTIVE_TEMPLATE_CONSUMER]); lView[REACTIVE_TEMPLATE_CONSUMER] = null; } } try { resetPreOrderHookFlags(lView); setBindingIndex(tView.bindingStartIndex); if (templateFn !== null) { executeTemplate(tView, lView, templateFn, 2, context2); } const hooksInitPhaseCompleted = (flags & 3) === 3; if (!isInCheckNoChangesPass) { if (hooksInitPhaseCompleted) { const preOrderCheckHooks = tView.preOrderCheckHooks; if (preOrderCheckHooks !== null) { executeCheckHooks(lView, preOrderCheckHooks, null); } } else { const preOrderHooks = tView.preOrderHooks; if (preOrderHooks !== null) { executeInitAndCheckHooks(lView, preOrderHooks, 0, null); } incrementInitPhaseFlags( lView, 0 /* InitPhaseState.OnInitHooksToBeRun */ ); } } if (!isInExhaustiveCheckNoChangesPass) { markTransplantedViewsForRefresh(lView); } runEffectsInView(lView); detectChangesInEmbeddedViews( lView, 0 /* ChangeDetectionMode.Global */ ); if (tView.contentQueries !== null) { refreshContentQueries(tView, lView); } if (!isInCheckNoChangesPass) { if (hooksInitPhaseCompleted) { const contentCheckHooks = tView.contentCheckHooks; if (contentCheckHooks !== null) { executeCheckHooks(lView, contentCheckHooks); } } else { const contentHooks = tView.contentHooks; if (contentHooks !== null) { executeInitAndCheckHooks( lView, contentHooks, 1 /* InitPhaseState.AfterContentInitHooksToBeRun */ ); } incrementInitPhaseFlags( lView, 1 /* InitPhaseState.AfterContentInitHooksToBeRun */ ); } } processHostBindingOpCodes(tView, lView); const components = tView.components; if (components !== null) { detectChangesInChildComponents( lView, components, 0 /* ChangeDetectionMode.Global */ ); } const viewQuery = tView.viewQuery; if (viewQuery !== null) { executeViewQueryFn(2, viewQuery, context2); } if (!isInCheckNoChangesPass) { if (hooksInitPhaseCompleted) { const viewCheckHooks = tView.viewCheckHooks; if (viewCheckHooks !== null) { executeCheckHooks(lView, viewCheckHooks); } } else { const viewHooks = tView.viewHooks; if (viewHooks !== null) { executeInitAndCheckHooks( lView, viewHooks, 2 /* InitPhaseState.AfterViewInitHooksToBeRun */ ); } incrementInitPhaseFlags( lView, 2 /* InitPhaseState.AfterViewInitHooksToBeRun */ ); } } if (tView.firstUpdatePass === true) { tView.firstUpdatePass = false; } if (lView[EFFECTS_TO_SCHEDULE]) { for (const notifyEffect of lView[EFFECTS_TO_SCHEDULE]) { notifyEffect(); } lView[EFFECTS_TO_SCHEDULE] = null; } if (!isInCheckNoChangesPass) { addAfterRenderSequencesForView(lView); lView[FLAGS] &= ~(64 | 8); } } catch (e) { if (!isInCheckNoChangesPass) { markAncestorsForTraversal(lView); } throw e; } finally { if (currentConsumer !== null) { consumerAfterComputation(currentConsumer, prevConsumer); if (returnConsumerToPool) { maybeReturnReactiveLViewConsumer(currentConsumer); } } leaveView(); } } function detectChangesInEmbeddedViews(lView, mode) { for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) { for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) { const embeddedLView = lContainer[i]; detectChangesInViewIfAttached(embeddedLView, mode); } } } function markTransplantedViewsForRefresh(lView) { for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) { if (!(lContainer[FLAGS] & 2)) continue; const movedViews = lContainer[MOVED_VIEWS]; ngDevMode && assertDefined(movedViews, "\uC774\uC2DD\uB41C \uBDF0 \uD50C\uB798\uADF8 \uC124\uC815\uB418\uC5C8\uC9C0\uB9CC MOVED_VIEWS\uAC00 \uC5C6\uC74C"); for (let i = 0; i < movedViews.length; i++) { const movedLView = movedViews[i]; markViewForRefresh(movedLView); } } } function detectChangesInComponent(hostLView, componentHostIdx, mode) { ngDevMode && assertEqual(isCreationMode(hostLView), false, "\uC5C5\uB370\uC774\uD2B8 \uBAA8\uB4DC\uC5D0\uC11C \uC2E4\uD589\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4."); profiler( 18 /* ProfilerEvent.ComponentStart */ ); const componentView = getComponentLViewByIndex(componentHostIdx, hostLView); detectChangesInViewIfAttached(componentView, mode); profiler(19, componentView[CONTEXT]); } function detectChangesInViewIfAttached(lView, mode) { if (!viewAttachedToChangeDetector(lView)) { return; } detectChangesInView(lView, mode); } function detectChangesInView(lView, mode) { const isInCheckNoChangesPass = ngDevMode && isInCheckNoChangesMode(); const tView = lView[TVIEW]; const flags = lView[FLAGS]; const consumer = lView[REACTIVE_TEMPLATE_CONSUMER]; let shouldRefreshView = !!(mode === 0 && flags & 16); shouldRefreshView ||= !!(flags & 64 && mode === 0 && !isInCheckNoChangesPass); shouldRefreshView ||= !!(flags & 1024); shouldRefreshView ||= !!(consumer?.dirty && consumerPollProducersForChange(consumer)); shouldRefreshView ||= !!(ngDevMode && isExhaustiveCheckNoChanges()); if (consumer) { consumer.dirty = false; } lView[FLAGS] &= -9217; if (shouldRefreshView) { refreshView(tView, lView, tView.template, lView[CONTEXT]); } else if (flags & 8192) { if (!isInCheckNoChangesPass) { runEffectsInView(lView); } detectChangesInEmbeddedViews( lView, 1 /* ChangeDetectionMode.Targeted */ ); const components = tView.components; if (components !== null) { detectChangesInChildComponents( lView, components, 1 /* ChangeDetectionMode.Targeted */ ); } if (!isInCheckNoChangesPass) { addAfterRenderSequencesForView(lView); } } } function detectChangesInChildComponents(hostLView, components, mode) { for (let i = 0; i < components.length; i++) { detectChangesInComponent(hostLView, components[i], mode); } } function processHostBindingOpCodes(tView, lView) { const hostBindingOpCodes = tView.hostBindingOpCodes; if (hostBindingOpCodes === null) return; try { for (let i = 0; i < hostBindingOpCodes.length; i++) { const opCode = hostBindingOpCodes[i]; if (opCode < 0) { setSelectedIndex(~opCode); } else { const directiveIdx = opCode; const bindingRootIndx = hostBindingOpCodes[++i]; const hostBindingFn = hostBindingOpCodes[++i]; setBindingRootForHostBindings(bindingRootIndx, directiveIdx); const context2 = lView[directiveIdx]; profiler(24, context2); hostBindingFn(2, context2); profiler(25, context2); } } } finally { setSelectedIndex(-1); } } function markViewDirty(lView, source) { const dirtyBitsToUse = isRefreshingViews() ? ( // 뷰를 적극적으로 새로 고치는 중일 때, 우리는 뷰를 체크하기 위해 오직 `Dirty` 비트만 사용할 뿐입니다. 64 ) : ( // 뷰 트리를 적극적으로 새로 고치지 않을 때, 상태를 업데이트하고 뷰를 더럽히는 것은 절대적으로 // 타당합니다. 이 경우, 우리는 동기적으로 변경 감지를 다시 실행할 수 있도록 `RefreshView` 플래그를 사용합니다. // 이는 현재 렌더링 후 훅과 렌더링 팩토리가 플러시될 때 뷰 내에 변경 사항을 감지한 후 실행되는 애니메이션 리스너에 적용됩니다. 1024 | 64 ); lView[ENVIRONMENT].changeDetectionScheduler?.notify(source); while (lView) { lView[FLAGS] |= dirtyBitsToUse; const parent = getLViewParent(lView); if (isRootView(lView) && !parent) { return lView; } lView = parent; } return null; } function createLContainer(hostNative, currentView, native, tNode) { ngDevMode && assertLView(currentView); const lContainer = [ hostNative, // 호스트 네이티브 true, // 이 위치에 있는 Boolean `true`는 이것이 `LContainer`임을 의미합니다 0, // 플래그 currentView, // 부모 null, // 다음 tNode, // t_host null, // 탈수된 뷰 native, // 네이티브, null, // 뷰 참조 null // 이동된 뷰 ]; ngDevMode && assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, "LContainer \uD5E4\uB354\uC5D0 \uB300\uD55C \uC62C\uBC14\uB978 \uC2AC\uB86F \uC218\uB97C \uD560\uB2F9\uD574\uC57C \uD569\uB2C8\uB2E4."); return lContainer; } function getLViewFromLContainer(lContainer, index) { const adjustedIndex = CONTAINER_HEADER_OFFSET + index; if (adjustedIndex < lContainer.length) { const lView = lContainer[adjustedIndex]; ngDevMode && assertLView(lView); return lView; } return void 0; } function addLViewToLContainer(lContainer, lView, index, addToDOM = true) { const tView = lView[TVIEW]; insertView(tView, lView, lContainer, index); if (addToDOM) { const beforeNode = getBeforeNodeForView(index, lContainer); const renderer = lView[RENDERER]; const parentRNode = renderer.parentNode(lContainer[NATIVE]); if (parentRNode !== null) { addViewToDOM(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode); } } const hydrationInfo = lView[HYDRATION]; if (hydrationInfo !== null && hydrationInfo.firstChild !== null) { hydrationInfo.firstChild = null; } } function removeLViewFromLContainer(lContainer, index) { const lView = detachView(lContainer, index); if (lView !== void 0) { destroyLView(lView[TVIEW], lView); } return lView; } function detachView(lContainer, removeIndex) { if (lContainer.length <= CONTAINER_HEADER_OFFSET) return; const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex; const viewToDetach = lContainer[indexInContainer]; if (viewToDetach) { const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER]; if (declarationLContainer !== null && declarationLContainer !== lContainer) { detachMovedView(declarationLContainer, viewToDetach); } if (removeIndex > 0) { lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT]; } const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex); removeViewFromDOM(viewToDetach[TVIEW], viewToDetach); const lQueries = removedLView[QUERIES]; if (lQueries !== null) { lQueries.detachView(removedLView[TVIEW]); } viewToDetach[PARENT] = null; viewToDetach[NEXT] = null; viewToDetach[FLAGS] &= -129; } return viewToDetach; } function insertView(tView, lView, lContainer, index) { ngDevMode && assertLView(lView); ngDevMode && assertLContainer(lContainer); const indexInContainer = CONTAINER_HEADER_OFFSET + index; const containerLength = lContainer.length; if (index > 0) { lContainer[indexInContainer - 1][NEXT] = lView; } if (index < containerLength - CONTAINER_HEADER_OFFSET) { lView[NEXT] = lContainer[indexInContainer]; addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView); } else { lContainer.push(lView); lView[NEXT] = null; } lView[PARENT] = lContainer; const declarationLContainer = lView[DECLARATION_LCONTAINER]; if (declarationLContainer !== null && lContainer !== declarationLContainer) { trackMovedView(declarationLContainer, lView); } const lQueries = lView[QUERIES]; if (lQueries !== null) { lQueries.insertView(tView); } updateAncestorTraversalFlagsOnAttach(lView); lView[FLAGS] |= 128; } function trackMovedView(declarationContainer, lView) { ngDevMode && assertDefined(lView, "LView\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."); ngDevMode && assertLContainer(declarationContainer); const movedViews = declarationContainer[MOVED_VIEWS]; const parent = lView[PARENT]; ngDevMode && assertDefined(parent, "\uBD80\uBAA8\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4."); if (isLView(parent)) { declarationContainer[FLAGS] |= 2; } else { const insertedComponentLView = parent[PARENT][DECLARATION_COMPONENT_VIEW]; ngDevMode && assertDefined(insertedComponentLView, "\uC0BD\uC785\uB41C \uCEF4\uD3EC\uB10C\uD2B8 LView\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4."); const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW]; ngDevMode && assertDefined(declaredComponentLView, "\uC120\uC5B8\uB41C \uCEF4\uD3EC\uB10C\uD2B8 LView\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4."); if (declaredComponentLView !== insertedComponentLView) { declarationContainer[FLAGS] |= 2; } } if (movedViews === null) { declarationContainer[MOVED_VIEWS] = [lView]; } else { movedViews.push(lView); } } var ViewRef$1 = class ViewRef { _lView; _cdRefInjectingView; _appRef = null; _attachedToViewContainer = false; get rootNodes() { const lView = this._lView; const tView = lView[TVIEW]; return collectNativeNodes(tView, lView, tView.firstChild, []); } constructor(_lView, _cdRefInjectingView) { this._lView = _lView; this._cdRefInjectingView = _cdRefInjectingView; } get context() { return this._lView[CONTEXT]; } /** * @deprecated 전체 컨텍스트 객체를 교체하는 것은 지원되지 않습니다. 컨텍스트를 * 직접 수정하거나 전체 객체를 교체해야 하는 경우 `Proxy`를 사용하는 것을 고려하세요. * // TODO(devversion): 이걸 제거하세요. */ set context(value) { if (ngDevMode) { console.warn("Angular: `EmbeddedViewRef`\uC758 `context` \uAC1D\uCCB4\uB97C \uAD50\uCCB4\uD558\uB294 \uAC83\uC740 \uB354 \uC774\uC0C1 \uAD8C\uC7A5\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."); } this._lView[CONTEXT] = value; } get destroyed() { return isDestroyed(this._lView); } destroy() { if (this._appRef) { this._appRef.detachView(this); } else if (this._attachedToViewContainer) { const parent = this._lView[PARENT]; if (isLContainer(parent)) { const viewRefs = parent[VIEW_REFS]; const index = viewRefs ? viewRefs.indexOf(this) : -1; if (index > -1) { ngDevMode && assertEqual(index, parent.indexOf(this._lView) - CONTAINER_HEADER_OFFSET, "\uBD80\uCC29\uB41C \uBDF0\uB294 VIEW_REFS \uBC30\uC5F4\uC758 ViewRef\uC640 \uB3D9\uC77C\uD55C \uC704\uCE58\uC5D0 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4."); detachView(parent, index); removeFromArray(viewRefs, index); } } this._attachedToViewContainer = false; } destroyLView(this._lView[TVIEW], this._lView); } onDestroy(callback) { storeLViewOnDestroy(this._lView, callback); } /** * 뷰와 그 조상들을 더럽혀진 것으로 표시합니다. * * 이는 {@link ChangeDetectionStrategy#OnPush} 컴포넌트가 재렌더링이 필요할 때 * 체크되도록 보장하는 데 사용할 수 있지만, 두 가지 일반 트리거가 더럽혀지지 않은 경우 * (즉, 입력이 변경되지 않았고 뷰에서 이벤트가 발생하지 않은 경우). * * * * @usageNotes * ### 예제 * * ```ts * @Component({ * selector: 'app-root', * template: `틱 수: {{numberOfTicks}}` * changeDetection: ChangeDetectionStrategy.OnPush, * }) * class AppComponent { * numberOfTicks = 0; * * constructor(private ref: ChangeDetectorRef) { * setInterval(() => { * this.numberOfTicks++; * // 아래는 필수이며, 그렇지 않으면 뷰가 업데이트되지 않음 * this.ref.markForCheck(); * }, 1000); * } * } * ``` */ markForCheck() { markViewDirty( this._cdRefInjectingView || this._lView, 4 /* NotificationSource.MarkForCheck */ ); } /** * 뷰를 변경 감지 트리에서 분리합니다. * * 분리된 뷰는 깨끗하지 않더라도 변경 감지 실행 중에 체크되지 않습니다. * `detach`는 {@link ChangeDetectorRef#detectChanges}와 함께 사용하여 * 지역 변경 감지 체크를 구현하는 데 사용할 수 있습니다. * * * * * @usageNotes * ### 예제 * * 다음 예제는 읽기 전용 데이터의 대량 목록을 가진 컴포넌트를 정의합니다. * 데이터가 매초 여러 번 변화한다고 상상해 보세요. 성능상의 이유로, * 우리는 5초마다 목록을 체크하고 업데이트하고자 합니다. 우리는 컴포넌트의 * 변경 감지기를 분리한 다음 5초마다 지역 체크를 수행하는 방법으로 할 수 있습니다. * * ```ts * class DataProvider { * // 실제 애플리케이션에서는 반환된 데이터가 매번 다를 것입니다 * get data() { * return [1,2,3,4,5]; * } * } * * @Component({ * selector: 'giant-list', * template: ` *
  • 데이터 {{d}}
  • * `, * }) * class GiantList { * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) { * ref.detach(); * setInterval(() => { * this.ref.detectChanges(); * }, 5000); * } * } * * @Component({ * selector: 'app', * providers: [DataProvider], * template: ` * * `, * }) * class App { * } * ``` */ detach() { this._lView[FLAGS] &= -129; } /** * 변경 감지 트리에 뷰를 다시 붙입니다. * * 이는 {@link ChangeDetectorRef#detach}를 사용하여 트리에서 이전에 분리된 뷰를 * 다시 붙일 때 사용할 수 있습니다. 뷰는 기본적으로 트리에 부착됩니다. * * * * @usageNotes * ### 예제 * * 다음 예제는 `live` 데이터를 표시하는 컴포넌트를 생성합니다. 컴포넌트는 * `live` 속성이 false로 설정될 때 주요 변경 감지 트리에서 변경 감지기를 분리합니다. * * ```ts * class DataProvider { * data = 1; * * constructor() { * setInterval(() => { * this.data = this.data * 2; * }, 500); * } * } * * @Component({ * selector: 'live-data', * inputs: ['live'], * template: '데이터: {{dataProvider.data}}' * }) * class LiveData { * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {} * * set live(value) { * if (value) { * this.ref.reattach(); * } else { * this.ref.detach(); * } * } * } * * @Component({ * selector: 'app-root', * providers: [DataProvider], * template: ` * 라이브 업데이트: * * `, * }) * class AppComponent { * live = true; * } * ``` */ reattach() { updateAncestorTraversalFlagsOnAttach(this._lView); this._lView[FLAGS] |= 128; } /** * 뷰와 그 자식들을 체크합니다. * * 이는 또한 {@link ChangeDetectorRef#detach}와 함께 사용하여 지역 변경 감지 체크를 * 구현하는 데 사용할 수 있습니다. * * * * * @usageNotes * ### 예제 * * 다음 예제는 읽기 전용 데이터의 대량 목록을 가진 컴포넌트를 정의합니다. * 데이터가 매초 여러 번 변화한다고 상상해 보세요. 성능상의 이유로, * 우리는 5초마다 목록을 체크하고 업데이트하고자 합니다. * * 컴포넌트의 변경 감지기를 분리하고 5초마다 지역 변경 감지 체크를 수행함으로써 * 우리는 이를 수행할 수 있습니다. * * {@link ChangeDetectorRef#detach}에 대한 추가 정보를 참조하십시오. */ detectChanges() { this._lView[FLAGS] |= 1024; detectChangesInternal(this._lView); } /** * 변경 감지기와 그 자식들을 체크하며, 변화가 감지되면 예외를 발생시킵니다. * * 이는 개발 모드에서 변경 감지를 실행해도 다른 변화가 발생하지 않도록 검증하는 데 사용됩니다. */ checkNoChanges() { if (ngDevMode) { checkNoChangesInternal(this._lView, CheckNoChangesMode.OnlyDirtyViews); } } attachToViewContainerRef() { if (this._appRef) { throw new RuntimeError(902, ngDevMode && "\uC774 \uBDF0\uB294 \uC774\uBBF8 ApplicationRef\uC5D0 \uC9C1\uC811 \uC5F0\uACB0\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4!"); } this._attachedToViewContainer = true; } detachFromAppRef() { this._appRef = null; const isRoot = isRootView(this._lView); const declarationContainer = this._lView[DECLARATION_LCONTAINER]; if (declarationContainer !== null && !isRoot) { detachMovedView(declarationContainer, this._lView); } detachViewFromDOM(this._lView[TVIEW], this._lView); } attachToAppRef(appRef) { if (this._attachedToViewContainer) { throw new RuntimeError(902, ngDevMode && "\uC774 \uBDF0\uB294 \uC774\uBBF8 ViewContainer\uC5D0 \uC5F0\uACB0\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4!"); } this._appRef = appRef; const isRoot = isRootView(this._lView); const declarationContainer = this._lView[DECLARATION_LCONTAINER]; if (declarationContainer !== null && !isRoot) { trackMovedView(declarationContainer, this._lView); } updateAncestorTraversalFlagsOnAttach(this._lView); } }; var TemplateRef = class { /** * @internal * @nocollapse */ static __NG_ELEMENT_ID__ = injectTemplateRef; }; var ViewEngineTemplateRef = TemplateRef; var R3TemplateRef = class TemplateRef2 extends ViewEngineTemplateRef { _declarationLView; _declarationTContainer; elementRef; constructor(_declarationLView, _declarationTContainer, elementRef) { super(); this._declarationLView = _declarationLView; this._declarationTContainer = _declarationTContainer; this.elementRef = elementRef; } /** * 이 `TemplateRef` 인스턴스를 생성하는 데 사용된 TView와 관련된 `ssrId`를 반환합니다. * * @internal */ get ssrId() { return this._declarationTContainer.tView?.ssrId || null; } createEmbeddedView(context2, injector) { return this.createEmbeddedViewImpl(context2, injector); } /** * @internal */ createEmbeddedViewImpl(context2, injector, dehydratedView) { const embeddedLView = createAndRenderEmbeddedLView(this._declarationLView, this._declarationTContainer, context2, { embeddedViewInjector: injector, dehydratedView }); return new ViewRef$1(embeddedLView); } }; function injectTemplateRef() { return createTemplateRef(getCurrentTNode(), getLView()); } function createTemplateRef(hostTNode, hostLView) { if (hostTNode.type & 4) { ngDevMode && assertDefined(hostTNode.tView, "TView\uB294 \uD560\uB2F9\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4."); return new R3TemplateRef(hostLView, hostTNode, createElementRef(hostTNode, hostLView)); } return null; } var AT_THIS_LOCATION = "<-- AT THIS LOCATION"; function getFriendlyStringFromTNodeType(tNodeType) { switch (tNodeType) { case 4: return "view container"; case 2: return "element"; case 8: return "ng-container"; case 32: return "icu"; case 64: return "i18n"; case 16: return "projection"; case 1: return "text"; case 128: return "@let"; default: return ""; } } function validateMatchingNode(node, nodeType, tagName, lView, tNode, isViewContainerAnchor = false) { if (!node || node.nodeType !== nodeType || node.nodeType === Node.ELEMENT_NODE && node.tagName.toLowerCase() !== tagName?.toLowerCase()) { const expectedNode = shortRNodeDescription(nodeType, tagName, null); let header = `\uC218\uBD84 \uACFC\uC815 \uC911 Angular\uB294 ${expectedNode}\uB97C \uAE30\uB300\uD588\uC9C0\uB9CC `; const hostComponentDef = getDeclarationComponentDef(lView); const componentClassName = hostComponentDef?.type?.name; const expectedDom = describeExpectedDom(lView, tNode, isViewContainerAnchor); const expected = `Angular\uB294 \uC774 DOM\uC744 \uAE30\uB300\uD588\uC2B5\uB2C8\uB2E4: ${expectedDom} `; let actual = ""; const componentHostElement = unwrapRNode(lView[HOST]); if (!node) { header += `\uB178\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC5C8\uC2B5\uB2C8\uB2E4. `; markRNodeAsHavingHydrationMismatch(componentHostElement, expectedDom); } else { const actualNode = shortRNodeDescription(node.nodeType, node.tagName ?? null, node.textContent ?? null); header += `\uCC3E\uC740 ${actualNode}\uC785\uB2C8\uB2E4. `; const actualDom = describeDomFromNode(node); actual = `\uC2E4\uC81C DOM\uC740: ${actualDom} `; markRNodeAsHavingHydrationMismatch(componentHostElement, expectedDom, actualDom); } const footer = getHydrationErrorFooter(componentClassName); const message = header + expected + actual + getHydrationAttributeNote() + footer; throw new RuntimeError(-500, message); } } function validateSiblingNodeExists(node) { validateNodeExists(node); if (!node.nextSibling) { const header = "\uC218\uBD84 \uACFC\uC815 \uC911 Angular\uB294 \uB354 \uB9CE\uC740 \uD615\uC81C \uB178\uB4DC\uAC00 \uC874\uC7AC\uD560 \uAC83\uC73C\uB85C \uC608\uC0C1\uD588\uC2B5\uB2C8\uB2E4.\n\n"; const actual = `\uC2E4\uC81C DOM\uC740: ${describeDomFromNode(node)} `; const footer = getHydrationErrorFooter(); const message = header + actual + footer; markRNodeAsHavingHydrationMismatch(node, "", actual); throw new RuntimeError(-501, message); } } function validateNodeExists(node, lView = null, tNode = null) { if (!node) { const header = "\uC218\uBD84 \uC911 Angular\uB294 \uC774 \uC704\uCE58\uC5D0 \uC694\uC18C\uAC00 \uC874\uC7AC\uD560 \uAC83\uC73C\uB85C \uC608\uC0C1\uD588\uC2B5\uB2C8\uB2E4.\n\n"; let expected = ""; let footer = ""; if (lView !== null && tNode !== null) { expected = describeExpectedDom(lView, tNode, false); footer = getHydrationErrorFooter(); markRNodeAsHavingHydrationMismatch(unwrapRNode(lView[HOST]), expected, ""); } throw new RuntimeError(-502, `${header}${expected} ${footer}`); } } function nodeNotFoundAtPathError(host, path) { const header = `\uC218\uBD84 \uC911 Angular\uB294 "${path}" \uACBD\uB85C\uB97C \uC0AC\uC6A9\uD558\uC5EC \uB178\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. ${describeRNode(host)} \uB178\uB4DC\uC5D0\uC11C \uC2DC\uC791\uD569\uB2C8\uB2E4. `; const footer = getHydrationErrorFooter(); markRNodeAsHavingHydrationMismatch(host); throw new RuntimeError(-502, header + footer); } function invalidSkipHydrationHost(rNode) { const header = "`ngSkipHydration` \uD50C\uB798\uADF8\uAC00 \uCEF4\uD3EC\uB10C\uD2B8 \uD638\uC2A4\uD2B8\uB85C \uC791\uC6A9\uD558\uC9C0 \uC54A\uB294 \uB178\uB4DC\uC5D0 \uC801\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC218\uBD84\uC740 \uCEF4\uD3EC\uB10C\uD2B8\uBCC4\uB85C\uB9CC \uAC74\uB108\uB6F8 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n\n"; const actual = `${describeDomFromNode(rNode)} `; const footer = "\uBD80\uB514 `ngSkipHydration` \uC18D\uC131\uC744 \uCEF4\uD3EC\uB10C\uD2B8 \uD638\uC2A4\uD2B8 \uC694\uC18C\uB85C \uC774\uB3D9\uD574\uC8FC\uC138\uC694.\n\n"; const message = header + actual + footer; return new RuntimeError(-504, message); } function stringifyTNodeAttrs(tNode) { const results = []; if (tNode.attrs) { for (let i = 0; i < tNode.attrs.length; ) { const attrName = tNode.attrs[i++]; if (typeof attrName == "number") { break; } const attrValue = tNode.attrs[i++]; results.push(`${attrName}="${shorten(attrValue)}"`); } } return results.join(" "); } var internalAttrs = /* @__PURE__ */ new Set(["ngh", "ng-version", "ng-server-context"]); function stringifyRNodeAttrs(rNode) { const results = []; for (let i = 0; i < rNode.attributes.length; i++) { const attr = rNode.attributes[i]; if (internalAttrs.has(attr.name)) continue; results.push(`${attr.name}="${shorten(attr.value)}"`); } return results.join(" "); } function describeTNode(tNode, innerContent = "\u2026") { switch (tNode.type) { case 1: const content = tNode.value ? `(${tNode.value})` : ""; return `#text${content}`; case 2: const attrs = stringifyTNodeAttrs(tNode); const tag = tNode.value.toLowerCase(); return `<${tag}${attrs ? " " + attrs : ""}>${innerContent}`; case 8: return ""; case 4: return ""; default: const typeAsString = getFriendlyStringFromTNodeType(tNode.type); return `#node(${typeAsString})`; } } function describeRNode(rNode, innerContent = "\u2026") { const node = rNode; switch (node.nodeType) { case Node.ELEMENT_NODE: const tag = node.tagName.toLowerCase(); const attrs = stringifyRNodeAttrs(node); return `<${tag}${attrs ? " " + attrs : ""}>${innerContent}`; case Node.TEXT_NODE: const content = node.textContent ? shorten(node.textContent) : ""; return `#text${content ? `(${content})` : ""}`; case Node.COMMENT_NODE: return ``; default: return `#node(${node.nodeType})`; } } function describeExpectedDom(lView, tNode, isViewContainerAnchor) { const spacer = " "; let content = ""; if (tNode.prev) { content += spacer + "\u2026\n"; content += spacer + describeTNode(tNode.prev) + "\n"; } else if (tNode.type && tNode.type & 12) { content += spacer + "\u2026\n"; } if (isViewContainerAnchor) { content += spacer + describeTNode(tNode) + "\n"; content += spacer + ` ${AT_THIS_LOCATION} `; } else { content += spacer + describeTNode(tNode) + ` ${AT_THIS_LOCATION} `; } content += spacer + "\u2026\n"; const parentRNode = tNode.type ? getParentRElement(lView[TVIEW], tNode, lView) : null; if (parentRNode) { content = describeRNode(parentRNode, "\n" + content); } return content; } function describeDomFromNode(node) { const spacer = " "; let content = ""; const currentNode = node; if (currentNode.previousSibling) { content += spacer + "\u2026\n"; content += spacer + describeRNode(currentNode.previousSibling) + "\n"; } content += spacer + describeRNode(currentNode) + ` ${AT_THIS_LOCATION} `; if (node.nextSibling) { content += spacer + "\u2026\n"; } if (node.parentNode) { content = describeRNode(currentNode.parentNode, "\n" + content); } return content; } function shortRNodeDescription(nodeType, tagName, textContent) { switch (nodeType) { case Node.ELEMENT_NODE: return `<${tagName.toLowerCase()}>`; case Node.TEXT_NODE: const content = textContent ? ` (with the "${shorten(textContent)}" content)` : ""; return `a text node${content}`; case Node.COMMENT_NODE: return "a comment node"; default: return `#node(nodeType=${nodeType})`; } } function getHydrationErrorFooter(componentClassName) { const componentInfo = componentClassName ? `the "${componentClassName}"` : "corresponding"; return `\uC774 \uBB38\uC81C\uB97C \uD574\uACB0\uD558\uB824\uBA74: * ${componentInfo} \uCEF4\uD3EC\uB10C\uD2B8\uC5D0\uC11C \uC218\uBD84 \uAD00\uB828 \uBB38\uC81C\uB97C \uD655\uC778\uD558\uC138\uC694 * \uD15C\uD50C\uB9BF\uC5D0 \uC720\uD6A8\uD55C HTML \uAD6C\uC870\uAC00 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694 * \uB610\uB294 \uD15C\uD50C\uB9BF\uC758 \uD638\uC2A4\uD2B8 \uB178\uB4DC\uC5D0 \`ngSkipHydration\` \uC18D\uC131\uC744 \uCD94\uAC00\uD558\uC5EC \uC218\uBD84\uC744 \uAC74\uB108\uB6F8 \uC218 \uC788\uC2B5\uB2C8\uB2E4 `; } function getHydrationAttributeNote() { return "\uCC38\uACE0: \uC18D\uC131\uC740 DOM\uC744 \uB354 \uC798 \uD45C\uD604\uD558\uAE30 \uC704\uD574 \uD45C\uC2DC\uB418\uC9C0\uB9CC \uC218\uBD84 \uBD88\uC77C\uCE58\uC5D0\uB294 \uC601\uD5A5\uC744 \uBBF8\uCE58\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n\n"; } function stripNewlines(input2) { return input2.replace(/\s+/gm, ""); } function shorten(input2, maxLength = 50) { if (!input2) { return ""; } input2 = stripNewlines(input2); return input2.length > maxLength ? `${input2.substring(0, maxLength - 1)}\u2026` : input2; } function getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView) { const tNodeInsertBeforeIndex = currentTNode.insertBeforeIndex; const insertBeforeIndex = Array.isArray(tNodeInsertBeforeIndex) ? tNodeInsertBeforeIndex[0] : tNodeInsertBeforeIndex; if (insertBeforeIndex === null) { return getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView); } else { ngDevMode && assertIndexInRange(lView, insertBeforeIndex); return unwrapRNode(lView[insertBeforeIndex]); } } function processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRElement) { const tNodeInsertBeforeIndex = childTNode.insertBeforeIndex; if (Array.isArray(tNodeInsertBeforeIndex)) { ngDevMode && assertDomNode(childRNode); let i18nParent = childRNode; let anchorRNode = null; if (!(childTNode.type & 3)) { anchorRNode = i18nParent; i18nParent = parentRElement; } if (i18nParent !== null && childTNode.componentOffset === -1) { for (let i = 1; i < tNodeInsertBeforeIndex.length; i++) { const i18nChild = lView[tNodeInsertBeforeIndex[i]]; nativeInsertBefore(renderer, i18nParent, i18nChild, anchorRNode, false); } } } } function getOrCreateTNode(tView, index, type, name, attrs) { ngDevMode && index !== 0 && // 0은 허위 노드이며 괜찮습니다. 추가 컨텍스트는 `view_engine_compatibility`의 // `createContainerRef`를 참조하세요. assertGreaterThanOrEqual(index, HEADER_OFFSET, "TNodes\uB294 LView \uD5E4\uB354\uC5D0 \uC788\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."); ngDevMode && assertPureTNodeType(type); let tNode = tView.data[index]; if (tNode === null) { tNode = createTNodeAtIndex(tView, index, type, name, attrs); if (isInI18nBlock()) { tNode.flags |= 32; } } else if (tNode.type & 64) { tNode.type = type; tNode.value = name; tNode.attrs = attrs; const parent = getCurrentParentTNode(); tNode.injectorIndex = parent === null ? -1 : parent.injectorIndex; ngDevMode && assertTNodeForTView(tNode, tView); ngDevMode && assertEqual(index, tNode.index, "\uAC19\uC740 \uC778\uB371\uC2A4\uB97C \uAE30\uB300\uD569\uB2C8\uB2E4."); } setCurrentTNode(tNode, true); return tNode; } function createTNodeAtIndex(tView, index, type, name, attrs) { const currentTNode = getCurrentTNodePlaceholderOk(); const isParent = isCurrentTNodeParent(); const parent = isParent ? currentTNode : currentTNode && currentTNode.parent; const tNode = tView.data[index] = createTNode(tView, parent, type, index, name, attrs); linkTNodeInTView(tView, tNode, currentTNode, isParent); return tNode; } function linkTNodeInTView(tView, tNode, currentTNode, isParent) { if (tView.firstChild === null) { tView.firstChild = tNode; } if (currentTNode !== null) { if (isParent) { if (currentTNode.child == null && tNode.parent !== null) { currentTNode.child = tNode; } } else { if (currentTNode.next === null) { currentTNode.next = tNode; tNode.prev = currentTNode; } } } } function createTNode(tView, tParent, type, index, value, attrs) { ngDevMode && index !== 0 && // 0은 허위 노드이며 괜찮습니다. 추가 컨텍스트는 `view_engine_compatibility`의 // `createContainerRef`를 참조하세요. assertGreaterThanOrEqual(index, HEADER_OFFSET, "TNodes\uB294 LView \uD5E4\uB354\uC5D0 \uC788\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."); ngDevMode && assertNotSame(attrs, void 0, "'undefined'\uB294 'attrs'\uC758 \uC720\uD6A8\uD55C \uAC12\uC774 \uC544\uB2D9\uB2C8\uB2E4."); ngDevMode && ngDevMode.tNode++; ngDevMode && tParent && assertTNodeForTView(tParent, tView); let injectorIndex = tParent ? tParent.injectorIndex : -1; let flags = 0; if (isInSkipHydrationBlock$1()) { flags |= 128; } const tNode = { type, index, insertBeforeIndex: null, injectorIndex, directiveStart: -1, directiveEnd: -1, directiveStylingLast: -1, componentOffset: -1, propertyBindings: null, flags, providerIndexes: 0, value, attrs, mergedAttrs: null, localNames: null, initialInputs: null, inputs: null, hostDirectiveInputs: null, outputs: null, hostDirectiveOutputs: null, directiveToIndex: null, tView: null, next: null, prev: null, projectionNext: null, child: null, parent: tParent, projection: null, styles: null, stylesWithoutHost: null, residualStyles: void 0, classes: null, classesWithoutHost: null, residualClasses: void 0, classBindings: 0, styleBindings: 0 }; if (ngDevMode) { Object.seal(tNode); } return tNode; } function addTNodeAndUpdateInsertBeforeIndex(previousTNodes, newTNode) { ngDevMode && assertEqual(newTNode.insertBeforeIndex, null, "insertBeforeIndex\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4."); previousTNodes.push(newTNode); if (previousTNodes.length > 1) { for (let i = previousTNodes.length - 2; i >= 0; i--) { const existingTNode = previousTNodes[i]; if (!isI18nText(existingTNode)) { if (isNewTNodeCreatedBefore(existingTNode, newTNode) && getInsertBeforeIndex(existingTNode) === null) { setInsertBeforeIndex(existingTNode, newTNode.index); } } } } } function isI18nText(tNode) { return !(tNode.type & 64); } function isNewTNodeCreatedBefore(existingTNode, newTNode) { return isI18nText(newTNode) || existingTNode.index > newTNode.index; } function getInsertBeforeIndex(tNode) { const index = tNode.insertBeforeIndex; return Array.isArray(index) ? index[0] : index; } function setInsertBeforeIndex(tNode, value) { const index = tNode.insertBeforeIndex; if (Array.isArray(index)) { index[0] = value; } else { setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore); tNode.insertBeforeIndex = value; } } function getTIcu(tView, index) { const value = tView.data[index]; if (value === null || typeof value === "string") return null; if (ngDevMode && !(value.hasOwnProperty("tView") || value.hasOwnProperty("currentCaseLViewIndex"))) { throwError2("\uC6B0\uB9AC\uB294 'null'|'TIcu'|'TIcuContainer'\uB97C \uC608\uC0C1\uD588\uC9C0\uB9CC, \uB2E4\uC74C\uC744 \uC5BB\uC5C8\uC2B5\uB2C8\uB2E4: " + value); } const tIcu = value.hasOwnProperty("currentCaseLViewIndex") ? value : value.value; ngDevMode && assertTIcu(tIcu); return tIcu; } function setTIcu(tView, index, tIcu) { const tNode = tView.data[index]; ngDevMode && assertEqual(tNode === null || tNode.hasOwnProperty("tView"), true, "\uC6B0\uB9AC\uB294 'null'|'TIcuContainer'\uB97C \uC608\uC0C1\uD588\uC2B5\uB2C8\uB2E4."); if (tNode === null) { tView.data[index] = tIcu; } else { ngDevMode && assertTNodeType( tNode, 32 /* TNodeType.Icu */ ); tNode.value = tIcu; } } function setTNodeInsertBeforeIndex(tNode, index) { ngDevMode && assertTNode(tNode); let insertBeforeIndex = tNode.insertBeforeIndex; if (insertBeforeIndex === null) { setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore); insertBeforeIndex = tNode.insertBeforeIndex = [null, index]; } else { assertEqual(Array.isArray(insertBeforeIndex), true, "\uC5EC\uAE30\uC5D0\uB294 \uBC30\uC5F4\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4."); insertBeforeIndex.push(index); } } function createTNodePlaceholder(tView, previousTNodes, index) { const tNode = createTNodeAtIndex(tView, index, 64, null, null); addTNodeAndUpdateInsertBeforeIndex(previousTNodes, tNode); return tNode; } function getCurrentICUCaseIndex(tIcu, lView) { const currentCase = lView[tIcu.currentCaseLViewIndex]; return currentCase === null ? currentCase : currentCase < 0 ? ~currentCase : currentCase; } function getParentFromIcuCreateOpCode(mergedCode) { return mergedCode >>> 17; } function getRefFromIcuCreateOpCode(mergedCode) { return (mergedCode & 131070) >>> 1; } function getInstructionFromIcuCreateOpCode(mergedCode) { return mergedCode & 1; } function icuCreateOpCode(opCode, parentIdx, refIdx) { ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, "\uBD80\uBAA8 \uC778\uB371\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."); ngDevMode && assertGreaterThan(refIdx, 0, "\uCC38\uC870 \uC778\uB371\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."); return opCode | parentIdx << 17 | refIdx << 1; } function isRootTemplateMessage(subTemplateIndex) { return subTemplateIndex === -1; } function enterIcu(state, tIcu, lView) { state.index = 0; const currentCase = getCurrentICUCaseIndex(tIcu, lView); if (currentCase !== null) { ngDevMode && assertNumberInRange(currentCase, 0, tIcu.cases.length - 1); state.removes = tIcu.remove[currentCase]; } else { state.removes = EMPTY_ARRAY; } } function icuContainerIteratorNext(state) { if (state.index < state.removes.length) { const removeOpCode = state.removes[state.index++]; ngDevMode && assertNumber(removeOpCode, "Expecting OpCode number"); if (removeOpCode > 0) { const rNode = state.lView[removeOpCode]; ngDevMode && assertDomNode(rNode); return rNode; } else { state.stack.push(state.index, state.removes); const tIcuIndex = ~removeOpCode; const tIcu = state.lView[TVIEW].data[tIcuIndex]; ngDevMode && assertTIcu(tIcu); enterIcu(state, tIcu, state.lView); return icuContainerIteratorNext(state); } } else { if (state.stack.length === 0) { return null; } else { state.removes = state.stack.pop(); state.index = state.stack.pop(); return icuContainerIteratorNext(state); } } } function loadIcuContainerVisitor() { const _state = { stack: [], index: -1 }; function icuContainerIteratorStart(tIcuContainerNode, lView) { _state.lView = lView; while (_state.stack.length) _state.stack.pop(); ngDevMode && assertTNodeForLView(tIcuContainerNode, lView); enterIcu(_state, tIcuContainerNode.value, lView); return icuContainerIteratorNext.bind(null, _state); } return icuContainerIteratorStart; } var REF_EXTRACTOR_REGEXP = /* @__PURE__ */ new RegExp(`^(\\d+)*(${REFERENCE_NODE_BODY}|${REFERENCE_NODE_HOST})*(.*)`); function decompressNodeLocation(path) { const matches = path.match(REF_EXTRACTOR_REGEXP); const [_, refNodeId, refNodeName, rest] = matches; const ref = refNodeId ? parseInt(refNodeId, 10) : refNodeName; const steps = []; for (const [_2, step, count] of rest.matchAll(/(f|n)(\d*)/g)) { const repeat2 = parseInt(count, 10) || 1; steps.push(step, repeat2); } return [ref, ...steps]; } function isFirstElementInNgContainer(tNode) { return !tNode.prev && tNode.parent?.type === 8; } function getNoOffsetIndex(tNode) { return tNode.index - HEADER_OFFSET; } function locateI18nRNodeByIndex(hydrationInfo, noOffsetIndex) { const i18nNodes = hydrationInfo.i18nNodes; if (i18nNodes) { return i18nNodes.get(noOffsetIndex); } return void 0; } function locateNextRNode(hydrationInfo, tView, lView, tNode) { const noOffsetIndex = getNoOffsetIndex(tNode); let native = locateI18nRNodeByIndex(hydrationInfo, noOffsetIndex); if (native === void 0) { const nodes = hydrationInfo.data[NODES]; if (nodes?.[noOffsetIndex]) { native = locateRNodeByPath(nodes[noOffsetIndex], lView); } else if (tView.firstChild === tNode) { native = hydrationInfo.firstChild; } else { const previousTNodeParent = tNode.prev === null; const previousTNode = tNode.prev ?? tNode.parent; ngDevMode && assertDefined(previousTNode, "\uC608\uC0C1\uCE58 \uBABB\uD55C \uC0C1\uD0DC: \uD604\uC7AC TNode\uAC00 \uC774\uC804 \uB178\uB4DC \uB610\uB294 \uBD80\uBAA8 \uB178\uB4DC\uC640 \uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."); if (isFirstElementInNgContainer(tNode)) { const noOffsetParentIndex = getNoOffsetIndex(tNode.parent); native = getSegmentHead(hydrationInfo, noOffsetParentIndex); } else { let previousRElement = getNativeByTNode(previousTNode, lView); if (previousTNodeParent) { native = previousRElement.firstChild; } else { const noOffsetPrevSiblingIndex = getNoOffsetIndex(previousTNode); const segmentHead = getSegmentHead(hydrationInfo, noOffsetPrevSiblingIndex); if (previousTNode.type === 2 && segmentHead) { const numRootNodesToSkip = calcSerializedContainerSize(hydrationInfo, noOffsetPrevSiblingIndex); const nodesToSkip = numRootNodesToSkip + 1; native = siblingAfter(nodesToSkip, segmentHead); } else { native = previousRElement.nextSibling; } } } } } return native; } function siblingAfter(skip2, from2) { let currentNode = from2; for (let i = 0; i < skip2; i++) { ngDevMode && validateSiblingNodeExists(currentNode); currentNode = currentNode.nextSibling; } return currentNode; } function stringifyNavigationInstructions(instructions) { const container = []; for (let i = 0; i < instructions.length; i += 2) { const step = instructions[i]; const repeat2 = instructions[i + 1]; for (let r = 0; r < repeat2; r++) { container.push(step === NODE_NAVIGATION_STEP_FIRST_CHILD ? "firstChild" : "nextSibling"); } } return container.join("."); } function navigateToNode(from2, instructions) { let node = from2; for (let i = 0; i < instructions.length; i += 2) { const step = instructions[i]; const repeat2 = instructions[i + 1]; for (let r = 0; r < repeat2; r++) { if (ngDevMode && !node) { throw nodeNotFoundAtPathError(from2, stringifyNavigationInstructions(instructions)); } switch (step) { case NODE_NAVIGATION_STEP_FIRST_CHILD: node = node.firstChild; break; case NODE_NAVIGATION_STEP_NEXT_SIBLING: node = node.nextSibling; break; } } } if (ngDevMode && !node) { throw nodeNotFoundAtPathError(from2, stringifyNavigationInstructions(instructions)); } return node; } function locateRNodeByPath(path, lView) { const [referenceNode, ...navigationInstructions] = decompressNodeLocation(path); let ref; if (referenceNode === REFERENCE_NODE_HOST) { ref = lView[DECLARATION_COMPONENT_VIEW][HOST]; } else if (referenceNode === REFERENCE_NODE_BODY) { ref = \u0275\u0275resolveBody(lView[DECLARATION_COMPONENT_VIEW][HOST]); } else { const parentElementId = Number(referenceNode); ref = unwrapRNode(lView[parentElementId + HEADER_OFFSET]); } return navigateToNode(ref, navigationInstructions); } var _isI18nHydrationSupportEnabled = false; var _prepareI18nBlockForHydrationImpl = () => { }; function setIsI18nHydrationSupportEnabled(enabled) { _isI18nHydrationSupportEnabled = enabled; } function prepareI18nBlockForHydration(lView, index, parentTNode, subTemplateIndex) { _prepareI18nBlockForHydrationImpl(lView, index, parentTNode, subTemplateIndex); } var _claimDehydratedIcuCaseImpl = () => { }; function claimDehydratedIcuCase(lView, icuIndex, caseIndex) { _claimDehydratedIcuCaseImpl(lView, icuIndex, caseIndex); } function cleanupI18nHydrationData(lView) { const hydrationInfo = lView[HYDRATION]; if (hydrationInfo) { const { i18nNodes, dehydratedIcuData: dehydratedIcuDataMap } = hydrationInfo; if (i18nNodes && dehydratedIcuDataMap) { const renderer = lView[RENDERER]; for (const dehydratedIcuData of dehydratedIcuDataMap.values()) { cleanupDehydratedIcuData(renderer, i18nNodes, dehydratedIcuData); } } hydrationInfo.i18nNodes = void 0; hydrationInfo.dehydratedIcuData = void 0; } } function cleanupDehydratedIcuData(renderer, i18nNodes, dehydratedIcuData) { for (const node of dehydratedIcuData.node.cases[dehydratedIcuData.case]) { const rNode = i18nNodes.get(node.index - HEADER_OFFSET); if (rNode) { nativeRemoveNode(renderer, rNode, false); } } } function removeDehydratedViews(lContainer) { const views = lContainer[DEHYDRATED_VIEWS] ?? []; const parentLView = lContainer[PARENT]; const renderer = parentLView[RENDERER]; const retainedViews = []; for (const view of views) { if (view.data[DEFER_BLOCK_ID] !== void 0) { retainedViews.push(view); } else { removeDehydratedView(view, renderer); ngDevMode && ngDevMode.dehydratedViewsRemoved++; } } lContainer[DEHYDRATED_VIEWS] = retainedViews; } function removeDehydratedViewList(deferBlock) { const { lContainer } = deferBlock; const dehydratedViews = lContainer[DEHYDRATED_VIEWS]; if (dehydratedViews === null) return; const parentLView = lContainer[PARENT]; const renderer = parentLView[RENDERER]; for (const view of dehydratedViews) { removeDehydratedView(view, renderer); ngDevMode && ngDevMode.dehydratedViewsRemoved++; } } function removeDehydratedView(dehydratedView, renderer) { let nodesRemoved = 0; let currentRNode = dehydratedView.firstChild; if (currentRNode) { const numNodes = dehydratedView.data[NUM_ROOT_NODES]; while (nodesRemoved < numNodes) { ngDevMode && validateSiblingNodeExists(currentRNode); const nextSibling = currentRNode.nextSibling; nativeRemoveNode(renderer, currentRNode, false); currentRNode = nextSibling; nodesRemoved++; } } } function cleanupLContainer(lContainer) { removeDehydratedViews(lContainer); const hostLView = lContainer[HOST]; if (isLView(hostLView)) { cleanupLView(hostLView); } for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) { cleanupLView(lContainer[i]); } } function cleanupLView(lView) { cleanupI18nHydrationData(lView); const tView = lView[TVIEW]; for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) { if (isLContainer(lView[i])) { const lContainer = lView[i]; cleanupLContainer(lContainer); } else if (isLView(lView[i])) { cleanupLView(lView[i]); } } } function cleanupDehydratedViews(appRef) { const viewRefs = appRef._views; for (const viewRef of viewRefs) { const lNode = getLNodeForHydration(viewRef); if (lNode !== null && lNode[HOST] !== null) { if (isLView(lNode)) { cleanupLView(lNode); } else { cleanupLContainer(lNode); } ngDevMode && ngDevMode.dehydratedViewsCleanupRuns++; } } } function cleanupHydratedDeferBlocks(deferBlock, hydratedBlocks, registry, appRef) { if (deferBlock !== null) { registry.cleanup(hydratedBlocks); cleanupLContainer(deferBlock.lContainer); cleanupDehydratedViews(appRef); } } function locateDehydratedViewsInContainer(currentRNode, serializedViews) { const dehydratedViews = []; for (const serializedView of serializedViews) { for (let i = 0; i < (serializedView[MULTIPLIER] ?? 1); i++) { const view = { data: serializedView, firstChild: null }; if (serializedView[NUM_ROOT_NODES] > 0) { view.firstChild = currentRNode; currentRNode = siblingAfter(serializedView[NUM_ROOT_NODES], currentRNode); } dehydratedViews.push(view); } } return [currentRNode, dehydratedViews]; } var _findMatchingDehydratedViewImpl = () => null; function findMatchingDehydratedViewImpl(lContainer, template) { const views = lContainer[DEHYDRATED_VIEWS]; if (!template || views === null || views.length === 0) { return null; } const view = views[0]; if (view.data[TEMPLATE_ID] === template) { return views.shift(); } else { removeDehydratedViews(lContainer); return null; } } function enableFindMatchingDehydratedViewImpl() { _findMatchingDehydratedViewImpl = findMatchingDehydratedViewImpl; } function findMatchingDehydratedView(lContainer, template) { return _findMatchingDehydratedViewImpl(lContainer, template); } var ComponentRef$1 = class ComponentRef { }; var ComponentFactory$1 = class ComponentFactory { }; var _NullComponentFactoryResolver = class { resolveComponentFactory(component) { throw Error(`No component factory found for ${stringify(component)}.`); } }; var ComponentFactoryResolver$1 = class ComponentFactoryResolver { static NULL = new _NullComponentFactoryResolver(); }; var RendererFactory2 = class { }; var Renderer2 = class { /** * null 또는 undefined인 경우, 뷰 엔진은 이를 호출하지 않습니다. * 이는 생산 모드의 성능 최적화로 사용됩니다. */ destroyNode = null; /** * @internal * @nocollapse */ static __NG_ELEMENT_ID__ = () => injectRenderer2(); }; function injectRenderer2() { const lView = getLView(); const tNode = getCurrentTNode(); const nodeAtIndex = getComponentLViewByIndex(tNode.index, lView); return (isLView(nodeAtIndex) ? nodeAtIndex : lView)[RENDERER]; } var Sanitizer = class _Sanitizer { /** @nocollapse */ static \u0275prov = ( /** @pureOrBreakMyCode */ /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _Sanitizer, providedIn: "root", factory: () => null }) ); }; function isModuleWithProviders(value) { return value.ngModule !== void 0; } function isNgModule(value) { return !!getNgModuleDef(value); } function isPipe(value) { return !!getPipeDef$1(value); } function isDirective(value) { return !!getDirectiveDef(value); } function isComponent(value) { return !!getComponentDef(value); } function getDependencyTypeForError(type) { if (getComponentDef(type)) return "component"; if (getDirectiveDef(type)) return "directive"; if (getPipeDef$1(type)) return "pipe"; return "type"; } function verifyStandaloneImport(depType, importingType) { if (isForwardRef(depType)) { depType = resolveForwardRef(depType); if (!depType) { throw new Error(`Expected forwardRef function, imported from "${stringifyForError(importingType)}", to return a standalone entity or NgModule but got "${stringifyForError(depType) || depType}".`); } } if (getNgModuleDef(depType) == null) { const def = getComponentDef(depType) || getDirectiveDef(depType) || getPipeDef$1(depType); if (def != null) { if (!def.standalone) { throw new Error(`The "${stringifyForError(depType)}" ${getDependencyTypeForError(depType)}, imported from "${stringifyForError(importingType)}", is not standalone. Did you forget to add the standalone: true flag?`); } } else { if (isModuleWithProviders(depType)) { throw new Error(`A module with providers was imported from "${stringifyForError(importingType)}". Modules with providers are not supported in standalone components imports.`); } else { 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?`); } } } } var DepsTracker = class { ownerNgModule = /* @__PURE__ */ new Map(); ngModulesWithSomeUnresolvedDecls = /* @__PURE__ */ new Set(); ngModulesScopeCache = /* @__PURE__ */ new Map(); standaloneComponentsScopeCache = /* @__PURE__ */ new Map(); /** * 가능한 한 많이 ng 모듈의 포워드 참조 선언을 해결하고 * `ownerNgModule` 맵에 추가하려고 시도합니다. 이 메서드는 일반적으로 * 초기 구문 분석 후에 호출되어야 하며, 이때 모든 포워드 참조가 해결됩니다 * (예: 컴포넌트를 렌더링하려고 할 때). */ resolveNgModulesDecls() { if (this.ngModulesWithSomeUnresolvedDecls.size === 0) { return; } for (const moduleType of this.ngModulesWithSomeUnresolvedDecls) { const def = getNgModuleDef(moduleType); if (def?.declarations) { for (const decl of maybeUnwrapFn(def.declarations)) { if (isComponent(decl)) { this.ownerNgModule.set(decl, moduleType); } } } } this.ngModulesWithSomeUnresolvedDecls.clear(); } /** @override */ getComponentDependencies(type, rawImports) { this.resolveNgModulesDecls(); const def = getComponentDef(type); if (def === null) { throw new Error(`\uCEF4\uD3EC\uB10C\uD2B8\uAC00 \uC544\uB2CC \uC720\uD615\uC758 \uCEF4\uD3EC\uB10C\uD2B8 \uC758\uC874\uC131\uC744 \uAC00\uC838\uC624\uB824\uACE0 \uC2DC\uB3C4\uD588\uC2B5\uB2C8\uB2E4: ${type}`); } if (def.standalone) { const scope = this.getStandaloneComponentScope(type, rawImports); if (scope.compilation.isPoisoned) { return { dependencies: [] }; } return { dependencies: [...scope.compilation.directives, ...scope.compilation.pipes, ...scope.compilation.ngModules] }; } else { if (!this.ownerNgModule.has(type)) { return { dependencies: [] }; } const scope = this.getNgModuleScope(this.ownerNgModule.get(type)); if (scope.compilation.isPoisoned) { return { dependencies: [] }; } return { dependencies: [...scope.compilation.directives, ...scope.compilation.pipes] }; } } /** * @override * 이 구현은 scopeInfo를 사용하지 않습니다. * 이는 scope 정보가 {@link ɵɵsetNgModuleScope}와 같은 방법을 통해 * 유형 자체에 이미 추가되었다고 가정하기 때문입니다. */ registerNgModule(type, scopeInfo) { if (!isNgModule(type)) { throw new Error(`NgModule\uC774 \uC544\uB2CC \uC720\uD615\uC744 NgModule\uB85C \uB4F1\uB85D\uD558\uB824\uACE0 \uC2DC\uB3C4\uD588\uC2B5\uB2C8\uB2E4: ${type}`); } this.ngModulesWithSomeUnresolvedDecls.add(type); } /** @override */ clearScopeCacheFor(type) { this.ngModulesScopeCache.delete(type); this.standaloneComponentsScopeCache.delete(type); } /** @override */ getNgModuleScope(type) { if (this.ngModulesScopeCache.has(type)) { return this.ngModulesScopeCache.get(type); } const scope = this.computeNgModuleScope(type); this.ngModulesScopeCache.set(type, scope); return scope; } /** NgModule 스코프를 새롭게 계산합니다. */ computeNgModuleScope(type) { const def = getNgModuleDef(type, true); const scope = { exported: { directives: /* @__PURE__ */ new Set(), pipes: /* @__PURE__ */ new Set() }, compilation: { directives: /* @__PURE__ */ new Set(), pipes: /* @__PURE__ */ new Set() } }; for (const imported of maybeUnwrapFn(def.imports)) { if (isNgModule(imported)) { const importedScope = this.getNgModuleScope(imported); addSet(importedScope.exported.directives, scope.compilation.directives); addSet(importedScope.exported.pipes, scope.compilation.pipes); } else if (isStandalone(imported)) { if (isDirective(imported) || isComponent(imported)) { scope.compilation.directives.add(imported); } else if (isPipe(imported)) { scope.compilation.pipes.add(imported); } else { throw new RuntimeError(980, "\uB3C5\uB9BD \uC2E4\uD589\uD615\uC73C\uB85C \uAC00\uC838\uC628 \uC720\uD615\uC740 \uCEF4\uD3EC\uB10C\uD2B8, \uC9C0\uC2DC\uC790, \uD30C\uC774\uD504\uAC00 \uC544\uB2D9\uB2C8\uB2E4"); } } else { scope.compilation.isPoisoned = true; break; } } if (!scope.compilation.isPoisoned) { for (const decl of maybeUnwrapFn(def.declarations)) { if (isNgModule(decl) || isStandalone(decl)) { scope.compilation.isPoisoned = true; break; } if (isPipe(decl)) { scope.compilation.pipes.add(decl); } else { scope.compilation.directives.add(decl); } } } for (const exported of maybeUnwrapFn(def.exports)) { if (isNgModule(exported)) { const exportedScope = this.getNgModuleScope(exported); addSet(exportedScope.exported.directives, scope.exported.directives); addSet(exportedScope.exported.pipes, scope.exported.pipes); addSet(exportedScope.exported.directives, scope.compilation.directives); addSet(exportedScope.exported.pipes, scope.compilation.pipes); } else if (isPipe(exported)) { scope.exported.pipes.add(exported); } else { scope.exported.directives.add(exported); } } return scope; } /** @override */ getStandaloneComponentScope(type, rawImports) { if (this.standaloneComponentsScopeCache.has(type)) { return this.standaloneComponentsScopeCache.get(type); } const ans = this.computeStandaloneComponentScope(type, rawImports); this.standaloneComponentsScopeCache.set(type, ans); return ans; } computeStandaloneComponentScope(type, rawImports) { const ans = { compilation: { // 독립 실행형 컴포넌트는 항상 자기 참조가 가능합니다. directives: /* @__PURE__ */ new Set([type]), pipes: /* @__PURE__ */ new Set(), ngModules: /* @__PURE__ */ new Set() } }; for (const rawImport of flatten(rawImports ?? [])) { const imported = resolveForwardRef(rawImport); try { verifyStandaloneImport(imported, type); } catch (e) { ans.compilation.isPoisoned = true; return ans; } if (isNgModule(imported)) { ans.compilation.ngModules.add(imported); const importedScope = this.getNgModuleScope(imported); if (importedScope.exported.isPoisoned) { ans.compilation.isPoisoned = true; return ans; } addSet(importedScope.exported.directives, ans.compilation.directives); addSet(importedScope.exported.pipes, ans.compilation.pipes); } else if (isPipe(imported)) { ans.compilation.pipes.add(imported); } else if (isDirective(imported) || isComponent(imported)) { ans.compilation.directives.add(imported); } else { ans.compilation.isPoisoned = true; return ans; } } return ans; } /** @override */ isOrphanComponent(cmp) { const def = getComponentDef(cmp); if (!def || def.standalone) { return false; } this.resolveNgModulesDecls(); return !this.ownerNgModule.has(cmp); } }; function addSet(sourceSet, targetSet) { for (const m of sourceSet) { targetSet.add(m); } } var depsTracker = new DepsTracker(); function computeStaticStyling(tNode, attrs, writeToHost) { ngDevMode && assertFirstCreatePass(getTView(), "\uCCAB \uBC88\uC9F8 \uD15C\uD50C\uB9BF \uD328\uC2A4\uC5D0\uC11C\uB9CC \uD638\uCD9C\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4."); let styles = writeToHost ? tNode.styles : null; let classes = writeToHost ? tNode.classes : null; let mode = 0; if (attrs !== null) { for (let i = 0; i < attrs.length; i++) { const value = attrs[i]; if (typeof value === "number") { mode = value; } else if (mode == 1) { classes = concatStringsWithSpace(classes, value); } else if (mode == 2) { const style = value; const styleValue = attrs[++i]; styles = concatStringsWithSpace(styles, style + ": " + styleValue + ";"); } } } writeToHost ? tNode.styles = styles : tNode.stylesWithoutHost = styles; writeToHost ? tNode.classes = classes : tNode.classesWithoutHost = classes; } function \u0275\u0275directiveInject(token, flags = 0) { const lView = getLView(); if (lView === null) { ngDevMode && assertInjectImplementationNotEqual(\u0275\u0275directiveInject); return \u0275\u0275inject(token, flags); } const tNode = getCurrentTNode(); const value = getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags); ngDevMode && emitInjectEvent(token, value, flags); return value; } function \u0275\u0275invalidFactory() { const msg = ngDevMode ? `\uC774 \uC0DD\uC131\uC790\uB294 \uC885\uC18D\uC131 \uC8FC\uC785\uACFC \uD638\uD658\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.` : "\uBB34\uD6A8"; throw new Error(msg); } function resolveDirectives(tView, lView, tNode, localRefs, directiveMatcher) { ngDevMode && assertFirstCreatePass(tView); const exportsMap = localRefs === null ? null : { "": -1 }; const matchedDirectiveDefs = directiveMatcher(tView, tNode); if (matchedDirectiveDefs !== null) { let directiveDefs = matchedDirectiveDefs; let hostDirectiveDefs = null; let hostDirectiveRanges = null; for (const def of matchedDirectiveDefs) { if (def.resolveHostDirectives !== null) { [directiveDefs, hostDirectiveDefs, hostDirectiveRanges] = def.resolveHostDirectives(matchedDirectiveDefs); break; } } ngDevMode && assertNoDuplicateDirectives(directiveDefs); initializeDirectives(tView, lView, tNode, directiveDefs, exportsMap, hostDirectiveDefs, hostDirectiveRanges); } if (exportsMap !== null && localRefs !== null) { cacheMatchingLocalNames(tNode, localRefs, exportsMap); } } function cacheMatchingLocalNames(tNode, localRefs, exportsMap) { const localNames = tNode.localNames = []; for (let i = 0; i < localRefs.length; i += 2) { const index = exportsMap[localRefs[i + 1]]; if (index == null) throw new RuntimeError(-301, ngDevMode && `\uC774\uB984 '${localRefs[i + 1]}'\uC758 \uB0B4\uBCF4\uB0B4\uAE30\uAC00 \uBC1C\uACAC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4!`); localNames.push(localRefs[i], index); } } function markAsComponentHost(tView, hostTNode, componentOffset) { ngDevMode && assertFirstCreatePass(tView); ngDevMode && assertGreaterThan(componentOffset, -1, "componentOffset\uB294 -1\uBCF4\uB2E4 \uCEE4\uC57C \uD569\uB2C8\uB2E4"); hostTNode.componentOffset = componentOffset; (tView.components ??= []).push(hostTNode.index); } function initializeDirectives(tView, lView, tNode, directives, exportsMap, hostDirectiveDefs, hostDirectiveRanges) { ngDevMode && assertFirstCreatePass(tView); const directivesLength = directives.length; let hasSeenComponent = false; for (let i = 0; i < directivesLength; i++) { const def = directives[i]; if (!hasSeenComponent && isComponentDef(def)) { hasSeenComponent = true; markAsComponentHost(tView, tNode, i); } diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, def.type); } initTNodeFlags(tNode, tView.data.length, directivesLength); for (let i = 0; i < directivesLength; i++) { const def = directives[i]; if (def.providersResolver) def.providersResolver(def); } let preOrderHooksFound = false; let preOrderCheckHooksFound = false; let directiveIdx = allocExpando(tView, lView, directivesLength, null); ngDevMode && assertSame(directiveIdx, tNode.directiveStart, "TNode.directiveStart\uB294 \uBC29\uAE08 \uD560\uB2F9\uB41C \uACF5\uAC04\uC744 \uAC00\uB9AC\uCF1C\uC57C \uD569\uB2C8\uB2E4"); if (directivesLength > 0) { tNode.directiveToIndex = /* @__PURE__ */ new Map(); } for (let i = 0; i < directivesLength; i++) { const def = directives[i]; tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs); configureViewWithDirective(tView, tNode, lView, directiveIdx, def); saveNameToExportMap(directiveIdx, def, exportsMap); if (hostDirectiveRanges !== null && hostDirectiveRanges.has(def)) { const [start, end] = hostDirectiveRanges.get(def); tNode.directiveToIndex.set(def.type, [directiveIdx, start + tNode.directiveStart, end + tNode.directiveStart]); } else if (hostDirectiveDefs === null || !hostDirectiveDefs.has(def)) { tNode.directiveToIndex.set(def.type, directiveIdx); } if (def.contentQueries !== null) tNode.flags |= 4; if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0) tNode.flags |= 64; const lifeCycleHooks = def.type.prototype; if (!preOrderHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)) { (tView.preOrderHooks ??= []).push(tNode.index); preOrderHooksFound = true; } if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) { (tView.preOrderCheckHooks ??= []).push(tNode.index); preOrderCheckHooksFound = true; } directiveIdx++; } initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefs); } function initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefs) { ngDevMode && assertFirstCreatePass(tView); for (let index = tNode.directiveStart; index < tNode.directiveEnd; index++) { const directiveDef = tView.data[index]; if (hostDirectiveDefs === null || !hostDirectiveDefs.has(directiveDef)) { setupSelectorMatchedInputsOrOutputs(0, tNode, directiveDef, index); setupSelectorMatchedInputsOrOutputs(1, tNode, directiveDef, index); setupInitialInputs(tNode, index, false); } else { const hostDirectiveDef = hostDirectiveDefs.get(directiveDef); setupHostDirectiveInputsOrOutputs(0, tNode, hostDirectiveDef, index); setupHostDirectiveInputsOrOutputs(1, tNode, hostDirectiveDef, index); setupInitialInputs(tNode, index, true); } } } function setupSelectorMatchedInputsOrOutputs(mode, tNode, def, directiveIndex) { const aliasMap = mode === 0 ? def.inputs : def.outputs; for (const publicName in aliasMap) { if (aliasMap.hasOwnProperty(publicName)) { let bindings; if (mode === 0) { bindings = tNode.inputs ??= {}; } else { bindings = tNode.outputs ??= {}; } bindings[publicName] ??= []; bindings[publicName].push(directiveIndex); setShadowStylingInputFlags(tNode, publicName); } } } function setupHostDirectiveInputsOrOutputs(mode, tNode, config2, directiveIndex) { const aliasMap = mode === 0 ? config2.inputs : config2.outputs; for (const initialName in aliasMap) { if (aliasMap.hasOwnProperty(initialName)) { const publicName = aliasMap[initialName]; let bindings; if (mode === 0) { bindings = tNode.hostDirectiveInputs ??= {}; } else { bindings = tNode.hostDirectiveOutputs ??= {}; } bindings[publicName] ??= []; bindings[publicName].push(directiveIndex, initialName); setShadowStylingInputFlags(tNode, publicName); } } } function setShadowStylingInputFlags(tNode, publicName) { if (publicName === "class") { tNode.flags |= 8; } else if (publicName === "style") { tNode.flags |= 16; } } function setupInitialInputs(tNode, directiveIndex, isHostDirective) { const { attrs, inputs, hostDirectiveInputs } = tNode; if (attrs === null || !isHostDirective && inputs === null || isHostDirective && hostDirectiveInputs === null || // 구조적 디렉티브에 대해 바인딩되지 않은 속성을 입력으로 사용하지 않도록 합니다. isInlineTemplate(tNode)) { tNode.initialInputs ??= []; tNode.initialInputs.push(null); return; } let inputsToStore = null; let i = 0; while (i < attrs.length) { const attrName = attrs[i]; if (attrName === 0) { i += 4; continue; } else if (attrName === 5) { i += 2; continue; } else if (typeof attrName === "number") { break; } if (!isHostDirective && inputs.hasOwnProperty(attrName)) { const inputConfig = inputs[attrName]; for (const index of inputConfig) { if (index === directiveIndex) { inputsToStore ??= []; inputsToStore.push(attrName, attrs[i + 1]); break; } } } else if (isHostDirective && hostDirectiveInputs.hasOwnProperty(attrName)) { const config2 = hostDirectiveInputs[attrName]; for (let j = 0; j < config2.length; j += 2) { if (config2[j] === directiveIndex) { inputsToStore ??= []; inputsToStore.push(config2[j + 1], attrs[i + 1]); break; } } } i += 2; } tNode.initialInputs ??= []; tNode.initialInputs.push(inputsToStore); } function configureViewWithDirective(tView, tNode, lView, directiveIndex, def) { ngDevMode && assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, "Expando \uC139\uC158\uC5D0 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4"); tView.data[directiveIndex] = def; const directiveFactory = def.factory || (def.factory = getFactoryDef(def.type, true)); const nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), \u0275\u0275directiveInject); tView.blueprint[directiveIndex] = nodeInjectorFactory; lView[directiveIndex] = nodeInjectorFactory; registerHostBindingOpCodes(tView, tNode, directiveIndex, allocExpando(tView, lView, def.hostVars, NO_CHANGE), def); } function registerHostBindingOpCodes(tView, tNode, directiveIdx, directiveVarsIdx, def) { ngDevMode && assertFirstCreatePass(tView); const hostBindings = def.hostBindings; if (hostBindings) { let hostBindingOpCodes = tView.hostBindingOpCodes; if (hostBindingOpCodes === null) { hostBindingOpCodes = tView.hostBindingOpCodes = []; } const elementIndx = ~tNode.index; if (lastSelectedElementIdx(hostBindingOpCodes) != elementIndx) { hostBindingOpCodes.push(elementIndx); } hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings); } } function lastSelectedElementIdx(hostBindingOpCodes) { let i = hostBindingOpCodes.length; while (i > 0) { const value = hostBindingOpCodes[--i]; if (typeof value === "number" && value < 0) { return value; } } return 0; } function saveNameToExportMap(directiveIdx, def, exportsMap) { if (exportsMap) { if (def.exportAs) { for (let i = 0; i < def.exportAs.length; i++) { exportsMap[def.exportAs[i]] = directiveIdx; } } if (isComponentDef(def)) exportsMap[""] = directiveIdx; } } function initTNodeFlags(tNode, index, numberOfDirectives) { ngDevMode && assertNotEqual(numberOfDirectives, tNode.directiveEnd - tNode.directiveStart, "\uCD5C\uB300 \uB514\uB809\uD2F0\uBE0C \uC218\uC5D0 \uB3C4\uB2EC\uD588\uC2B5\uB2C8\uB2E4"); tNode.flags |= 1; tNode.directiveStart = index; tNode.directiveEnd = index + numberOfDirectives; tNode.providerIndexes = index; } function assertNoDuplicateDirectives(directives) { if (directives.length < 2) { return; } const seenDirectives = /* @__PURE__ */ new Set(); for (const current of directives) { if (seenDirectives.has(current)) { throw new RuntimeError(309, `\uB514\uB809\uD2F0\uBE0C ${current.type.name}\uAC00 \uB3D9\uC77C\uD55C \uC694\uC18C\uC5D0\uC11C \uC5EC\uB7EC \uBC88 \uC77C\uCE58\uD569\uB2C8\uB2E4. \uB514\uB809\uD2F0\uBE0C\uB294 \uC694\uC18C\uC5D0\uC11C \uD55C \uBC88\uB9CC \uC77C\uCE58\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`); } seenDirectives.add(current); } } function elementStartFirstCreatePass(index, tView, lView, name, directiveMatcher, bindingsEnabled, attrsIndex, localRefsIndex) { ngDevMode && assertFirstCreatePass(tView); ngDevMode && ngDevMode.firstCreatePass++; const tViewConsts = tView.consts; const attrs = getConstant(tViewConsts, attrsIndex); const tNode = getOrCreateTNode(tView, index, 2, name, attrs); if (bindingsEnabled) { resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex), directiveMatcher); } tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs); if (tNode.attrs !== null) { computeStaticStyling(tNode, tNode.attrs, false); } if (tNode.mergedAttrs !== null) { computeStaticStyling(tNode, tNode.mergedAttrs, true); } if (tView.queries !== null) { tView.queries.elementStart(tView, tNode); } return tNode; } function elementEndFirstCreatePass(tView, tNode) { ngDevMode && assertFirstCreatePass(tView); registerPostOrderHooks(tView, tNode); if (isContentQueryHost(tNode)) { tView.queries.elementEnd(tNode); } } function isListLikeIterable(obj) { if (!isJsObject(obj)) return false; return Array.isArray(obj) || !(obj instanceof Map) && // JS Map are iterables but return entries as [k, v] Symbol.iterator in obj; } function areIterablesEqual(a, b, comparator) { const iterator1 = a[Symbol.iterator](); const iterator2 = b[Symbol.iterator](); while (true) { const item1 = iterator1.next(); const item2 = iterator2.next(); if (item1.done && item2.done) return true; if (item1.done || item2.done) return false; if (!comparator(item1.value, item2.value)) return false; } } function iterateListLike(obj, fn) { if (Array.isArray(obj)) { for (let i = 0; i < obj.length; i++) { fn(obj[i]); } } else { const iterator2 = obj[Symbol.iterator](); let item; while (!(item = iterator2.next()).done) { fn(item.value); } } } function isJsObject(o) { return o !== null && (typeof o === "function" || typeof o === "object"); } function devModeEqual(a, b) { const isListLikeIterableA = isListLikeIterable(a); const isListLikeIterableB = isListLikeIterable(b); if (isListLikeIterableA && isListLikeIterableB) { return areIterablesEqual(a, b, devModeEqual); } else { const isAObject = a && (typeof a === "object" || typeof a === "function"); const isBObject = b && (typeof b === "object" || typeof b === "function"); if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) { return true; } else { return Object.is(a, b); } } } function updateBinding(lView, bindingIndex, value) { return lView[bindingIndex] = value; } function getBinding(lView, bindingIndex) { ngDevMode && assertIndexInRange(lView, bindingIndex); ngDevMode && assertNotSame(lView[bindingIndex], NO_CHANGE, "\uC800\uC7A5\uB41C \uAC12\uC740 \uACB0\uCF54 NO_CHANGE\uC5EC\uC11C\uB294 \uC548 \uB429\uB2C8\uB2E4."); return lView[bindingIndex]; } function bindingUpdated(lView, bindingIndex, value) { ngDevMode && assertNotSame(value, NO_CHANGE, "\uC218\uC2E0 \uAC12\uC740 \uACB0\uCF54 NO_CHANGE\uC5EC\uC11C\uB294 \uC548 \uB429\uB2C8\uB2E4."); ngDevMode && assertLessThan(bindingIndex, lView.length, `\uC2AC\uB86F\uC740 NO_CHANGE\uB85C \uCD08\uAE30\uD654\uB418\uC5B4\uC57C \uD588\uC2B5\uB2C8\uB2E4.`); const oldValue = lView[bindingIndex]; if (Object.is(oldValue, value)) { return false; } else { if (ngDevMode && isInCheckNoChangesMode()) { const oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : void 0; if (!devModeEqual(oldValueToCompare, value)) { const details = getExpressionChangedErrorDetails(lView, bindingIndex, oldValueToCompare, value); throwErrorIfNoChangesMode(oldValue === NO_CHANGE, details.oldValue, details.newValue, details.propName, lView); } return false; } lView[bindingIndex] = value; return true; } } function bindingUpdated2(lView, bindingIndex, exp1, exp2) { const different = bindingUpdated(lView, bindingIndex, exp1); return bindingUpdated(lView, bindingIndex + 1, exp2) || different; } function bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) { const different = bindingUpdated2(lView, bindingIndex, exp1, exp2); return bindingUpdated(lView, bindingIndex + 2, exp3) || different; } function bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) { const different = bindingUpdated2(lView, bindingIndex, exp1, exp2); return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different; } function wrapListener(tNode, lView, context2, listenerFn) { return function wrapListenerIn_markDirtyAndPreventDefault(e) { if (e === Function) { return listenerFn; } const startView = isComponentHost(tNode) ? getComponentLViewByIndex(tNode.index, lView) : lView; markViewDirty( startView, 5 /* NotificationSource.Listener */ ); let result = executeListenerWithErrorHandling(lView, context2, listenerFn, e); let nextListenerFn = wrapListenerIn_markDirtyAndPreventDefault.__ngNextListenerFn__; while (nextListenerFn) { result = executeListenerWithErrorHandling(lView, context2, nextListenerFn, e) && result; nextListenerFn = nextListenerFn.__ngNextListenerFn__; } return result; }; } function executeListenerWithErrorHandling(lView, context2, listenerFn, e) { const prevConsumer = setActiveConsumer(null); try { profiler(6, context2, listenerFn); return listenerFn(e) !== false; } catch (error) { handleError(lView, error); return false; } finally { profiler(7, context2, listenerFn); setActiveConsumer(prevConsumer); } } function handleError(lView, error) { const injector = lView[INJECTOR]; if (!injector) { return; } injector.get(ErrorHandler, null)?.handleError(error); } function listenToOutput(tNode, tView, lView, index, lookupName, eventName, listenerFn, lCleanup, tCleanup) { ngDevMode && assertIndexInRange(lView, index); const instance = lView[index]; const def = tView.data[index]; const propertyName = def.outputs[lookupName]; const output2 = instance[propertyName]; if (ngDevMode && !isOutputSubscribable(output2)) { throw new Error(`@Output ${propertyName}\uAC00 '${instance.constructor.name}'\uC5D0\uC11C \uCD08\uAE30\uD654\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.`); } const subscription = output2.subscribe(listenerFn); const idx = lCleanup.length; lCleanup.push(listenerFn, subscription); tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1)); } function isOutputSubscribable(value) { return value != null && typeof value.subscribe === "function"; } var BINDING = /* @__PURE__ */ Symbol("BINDING"); var ComponentFactoryResolver2 = class extends ComponentFactoryResolver$1 { ngModule; /** * @param ngModule 모든 해결된 팩토리가 바인딩되는 NgModuleRef입니다. */ constructor(ngModule) { super(); this.ngModule = ngModule; } resolveComponentFactory(component) { ngDevMode && assertComponentType(component); const componentDef = getComponentDef(component); return new ComponentFactory2(componentDef, this.ngModule); } }; function toInputRefArray(map2) { return Object.keys(map2).map((name) => { const [propName, flags, transform] = map2[name]; const inputData = { propName, templateName: name, isSignal: (flags & InputFlags.SignalBased) !== 0 }; if (transform) { inputData.transform = transform; } return inputData; }); } function toOutputRefArray(map2) { return Object.keys(map2).map((name) => ({ propName: map2[name], templateName: name })); } function verifyNotAnOrphanComponent(componentDef) { if (false) { if (depsTracker.isOrphanComponent(componentDef.type)) { throw new RuntimeError(981, `\uACE0\uC544 \uCEF4\uD3EC\uB10C\uD2B8 \uBC1C\uACAC! ${debugStringifyTypeForError(componentDef.type)}\uB97C \uB80C\uB354\uB9C1\uD558\uAE30 \uC804\uC5D0 \uC120\uC5B8\uD55C NgModule\uC744 \uBA3C\uC800 \uB85C\uB4DC\uD574\uC57C \uD569\uB2C8\uB2E4. \uC774 \uCEF4\uD3EC\uB10C\uD2B8\uB97C \uB3C5\uB9BD\uC801\uC73C\uB85C \uB9CC\uB4E4\uC5B4 \uC774 \uC624\uB958\uB97C \uD53C\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4. \uD604\uC7AC \uBD88\uAC00\uB2A5\uD55C \uACBD\uC6B0, \uC801\uC808\uD55C NgModule\uC5D0 \uCEF4\uD3EC\uB10C\uD2B8\uC758 NgModule\uB97C \uAC00\uC838\uC624\uAC70\uB098 \uC774 \uCEF4\uD3EC\uB10C\uD2B8\uB97C \uB80C\uB354\uB9C1\uD558\uB824\uB294 \uB3C5\uB9BD\uD615 \uCEF4\uD3EC\uB10C\uD2B8\uB97C \uAC00\uC838\uC624\uC138\uC694. \uC774\uAC83\uC774 \uC9C0\uC5F0\uB41C \uAC00\uC838\uC624\uAE30\uC778 \uACBD\uC6B0, NgModule\uC744 \uC9C0\uC5F0 \uB85C\uB4DC\uD558\uACE0 \uD574\uB2F9 \uBAA8\uB4C8 \uC8FC\uC785\uAE30\uB97C \uC0AC\uC6A9\uD558\uC138\uC694.`); } } } function createRootViewInjector(componentDef, environmentInjector, injector) { let realEnvironmentInjector = environmentInjector instanceof EnvironmentInjector ? environmentInjector : environmentInjector?.injector; if (realEnvironmentInjector && componentDef.getStandaloneInjector !== null) { realEnvironmentInjector = componentDef.getStandaloneInjector(realEnvironmentInjector) || realEnvironmentInjector; } const rootViewInjector = realEnvironmentInjector ? new ChainedInjector(injector, realEnvironmentInjector) : injector; return rootViewInjector; } function createRootLViewEnvironment(rootLViewInjector) { const rendererFactory = rootLViewInjector.get(RendererFactory2, null); if (rendererFactory === null) { throw new RuntimeError(407, ngDevMode && "Angular\uB294 \uB80C\uB354\uB7EC (RendererFactory2)\uB97C \uC8FC\uC785\uD560 \uC218 \uC5C6\uC5C8\uC2B5\uB2C8\uB2E4. \uC774\uB294 DI \uACC4\uCE35\uC774 \uC190\uC0C1\uB418\uC5C8\uAE30 \uB54C\uBB38\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC774 \uCEF4\uD3EC\uB10C\uD2B8\uB97C \uC0DD\uC131\uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uB294 \uBAA8\uB4E0 \uC8FC\uC785\uAE30\uAC00 \uC62C\uBC14\uB978 \uBD80\uBAA8\uB97C \uAC00\uC9C0\uACE0 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694."); } const sanitizer = rootLViewInjector.get(Sanitizer, null); const changeDetectionScheduler = rootLViewInjector.get(ChangeDetectionScheduler, null); return { rendererFactory, sanitizer, changeDetectionScheduler }; } function createHostElement(componentDef, render) { const tagName = (componentDef.selectors[0][0] || "div").toLowerCase(); const namespace = tagName === "svg" ? SVG_NAMESPACE : tagName === "math" ? MATH_ML_NAMESPACE : null; return createElementNode(render, tagName, namespace); } var ComponentFactory2 = class extends ComponentFactory$1 { componentDef; ngModule; selector; componentType; ngContentSelectors; isBoundToModule; cachedInputs = null; cachedOutputs = null; get inputs() { this.cachedInputs ??= toInputRefArray(this.componentDef.inputs); return this.cachedInputs; } get outputs() { this.cachedOutputs ??= toOutputRefArray(this.componentDef.outputs); return this.cachedOutputs; } /** * @param componentDef 컴포넌트 정의. * @param ngModule 팩토리가 바인딩되는 NgModuleRef. */ constructor(componentDef, ngModule) { super(); this.componentDef = componentDef; this.ngModule = ngModule; this.componentType = componentDef.type; this.selector = stringifyCSSSelectorList(componentDef.selectors); this.ngContentSelectors = componentDef.ngContentSelectors ?? []; this.isBoundToModule = !!ngModule; } create(injector, projectableNodes, rootSelectorOrNode, environmentInjector, directives, componentBindings) { profiler( 22 /* ProfilerEvent.DynamicComponentStart */ ); const prevConsumer = setActiveConsumer(null); try { const cmpDef = this.componentDef; ngDevMode && verifyNotAnOrphanComponent(cmpDef); const rootTView = createRootTView(rootSelectorOrNode, cmpDef, componentBindings, directives); const rootViewInjector = createRootViewInjector(cmpDef, environmentInjector || this.ngModule, injector); const environment = createRootLViewEnvironment(rootViewInjector); const hostRenderer = environment.rendererFactory.createRenderer(null, cmpDef); const hostElement = rootSelectorOrNode ? locateHostElement(hostRenderer, rootSelectorOrNode, cmpDef.encapsulation, rootViewInjector) : createHostElement(cmpDef, hostRenderer); const hasInputBindings = componentBindings?.some(isInputBinding) || directives?.some((d) => typeof d !== "function" && d.bindings.some(isInputBinding)); const rootLView = createLView(null, rootTView, null, 512 | getInitialLViewFlagsFromDef(cmpDef), null, null, environment, hostRenderer, rootViewInjector, null, retrieveHydrationInfo( hostElement, rootViewInjector, true /* isRootView */ )); const directivesToApply = [this.componentDef]; if (directives) { for (const directive of directives) { const directiveType = typeof directive === "function" ? directive : directive.type; const directiveDef = getDirectiveDef(directiveType, true); if (ngDevMode && !directiveDef.standalone) { throw new RuntimeError(907, `The ${stringifyForError(directiveType)} directive must be standalone in order to be applied to a dynamically-created component.`); } directivesToApply.push(directiveDef); } } rootLView[HEADER_OFFSET] = hostElement; enterView(rootLView); let componentView = null; try { const hostTNode = elementStartFirstCreatePass(HEADER_OFFSET, rootTView, rootLView, "#host", () => directivesToApply, true, 0); if (hostElement) { setupStaticAttributes(hostRenderer, hostElement, hostTNode); attachPatchData(hostElement, rootLView); } createDirectivesInstances(rootTView, rootLView, hostTNode); executeContentQueries(rootTView, hostTNode, rootLView); elementEndFirstCreatePass(rootTView, hostTNode); if (projectableNodes !== void 0) { projectNodes(hostTNode, this.ngContentSelectors, projectableNodes); } componentView = getComponentLViewByIndex(hostTNode.index, rootLView); rootLView[CONTEXT] = componentView[CONTEXT]; renderView(rootTView, rootLView, null); } catch (e) { if (componentView !== null) { unregisterLView(componentView); } unregisterLView(rootLView); throw e; } finally { profiler( 23 /* ProfilerEvent.DynamicComponentEnd */ ); leaveView(); } return new ComponentRef2(this.componentType, rootLView, !!hasInputBindings); } finally { setActiveConsumer(prevConsumer); } } }; function createRootTView(rootSelectorOrNode, componentDef, componentBindings, directives) { const tAttributes = rootSelectorOrNode ? ["ng-version", "0.0.0"] : ( // 첫 번째 선택기에서 속성과 클래스를 추출하여 VE 동작에 맞춥니다. extractAttrsAndClassesFromSelector(componentDef.selectors[0]) ); let creationBindings = null; let updateBindings = null; let varsToAllocate = 0; if (componentBindings) { for (const binding of componentBindings) { varsToAllocate += binding[BINDING].requiredVars; if (binding.create) { binding.target = componentDef; (creationBindings ??= []).push(binding); } if (binding.update) { binding.target = componentDef; (updateBindings ??= []).push(binding); } } } if (directives) { for (const directive of directives) { if (typeof directive !== "function") { const def = getDirectiveDef(directive.type, true); for (const binding of directive.bindings) { varsToAllocate += binding[BINDING].requiredVars; if (binding.create) { binding.target = def; (creationBindings ??= []).push(binding); } if (binding.update) { binding.target = def; (updateBindings ??= []).push(binding); } } } } } const rootTView = createTView(0, null, getRootTViewTemplate(creationBindings, updateBindings), 1, varsToAllocate, null, null, null, null, [tAttributes], null); return rootTView; } function getRootTViewTemplate(creationBindings, updateBindings) { if (!creationBindings && !updateBindings) { return null; } return (flags) => { if (flags & 1 && creationBindings) { for (const binding of creationBindings) { binding.create(); } } if (flags & 2 && updateBindings) { for (const binding of updateBindings) { binding.update(); } } }; } function isInputBinding(binding) { const kind = binding[BINDING].kind; return kind === "input" || kind === "twoWay"; } var ComponentRef2 = class extends ComponentRef$1 { _rootLView; _hasInputBindings; instance; hostView; changeDetectorRef; componentType; location; previousInputValues = null; _tNode; constructor(componentType, _rootLView, _hasInputBindings) { super(); this._rootLView = _rootLView; this._hasInputBindings = _hasInputBindings; this._tNode = getTNode(_rootLView[TVIEW], HEADER_OFFSET); this.location = createElementRef(this._tNode, _rootLView); this.instance = getComponentLViewByIndex(this._tNode.index, _rootLView)[CONTEXT]; this.hostView = this.changeDetectorRef = new ViewRef$1( _rootLView, void 0 /* _cdRefInjectingView */ ); this.componentType = componentType; } setInput(name, value) { if (this._hasInputBindings && ngDevMode) { throw new RuntimeError(317, "\uC785\uB825 \uBC14\uC778\uB529 \uB610\uB294 \uC591\uBC29\uD5A5 \uBC14\uC778\uB529 \uD568\uC218\uB97C \uC0AC\uC6A9 \uC911\uC778 \uCEF4\uD3EC\uB10C\uD2B8\uC5D0\uC11C `setInput`\uC744 \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."); } const tNode = this._tNode; this.previousInputValues ??= /* @__PURE__ */ new Map(); if (this.previousInputValues.has(name) && Object.is(this.previousInputValues.get(name), value)) { return; } const lView = this._rootLView; const hasSetInput = setAllInputsForProperty(tNode, lView[TVIEW], lView, name, value); this.previousInputValues.set(name, value); const childComponentLView = getComponentLViewByIndex(tNode.index, lView); markViewDirty( childComponentLView, 1 /* NotificationSource.SetInput */ ); if (ngDevMode && !hasSetInput) { const cmpNameForError = stringifyForError(this.componentType); let message = ` '${cmpNameForError}' \uCEF4\uD3EC\uB10C\uD2B8\uC758 '${name}' \uC785\uB825 \uAC12 \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. `; message += ` '${name}' \uC18D\uC131\uC774 @Input()\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC5C8\uB294\uC9C0 \uB610\uB294 \uB9E4\uD551\uB41C @Input('${name}')\uAC00 \uC874\uC7AC\uD558\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694.`; reportUnknownPropertyError(message); } } get injector() { return new NodeInjector(this._tNode, this._rootLView); } destroy() { this.hostView.destroy(); } onDestroy(callback) { this.hostView.onDestroy(callback); } }; function projectNodes(tNode, ngContentSelectors, projectableNodes) { const projection = tNode.projection = []; for (let i = 0; i < ngContentSelectors.length; i++) { const nodesforSlot = projectableNodes[i]; projection.push(nodesforSlot != null && nodesforSlot.length ? Array.from(nodesforSlot) : null); } } var ViewContainerRef = class { /** * @internal * @nocollapse */ static __NG_ELEMENT_ID__ = injectViewContainerRef; }; function injectViewContainerRef() { const previousTNode = getCurrentTNode(); return createContainerRef(previousTNode, getLView()); } var VE_ViewContainerRef = ViewContainerRef; var R3ViewContainerRef = class ViewContainerRef2 extends VE_ViewContainerRef { _lContainer; _hostTNode; _hostLView; constructor(_lContainer, _hostTNode, _hostLView) { super(); this._lContainer = _lContainer; this._hostTNode = _hostTNode; this._hostLView = _hostLView; } get element() { return createElementRef(this._hostTNode, this._hostLView); } get injector() { return new NodeInjector(this._hostTNode, this._hostLView); } /** @deprecated 대체 항목 없음 */ get parentInjector() { const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostLView); if (hasParentInjector(parentLocation)) { const parentView = getParentInjectorView(parentLocation, this._hostLView); const injectorIndex = getParentInjectorIndex(parentLocation); ngDevMode && assertNodeInjector(parentView, injectorIndex); const parentTNode = parentView[TVIEW].data[ injectorIndex + 8 /* NodeInjectorOffset.TNODE */ ]; return new NodeInjector(parentTNode, parentView); } else { return new NodeInjector(null, this._hostLView); } } clear() { while (this.length > 0) { this.remove(this.length - 1); } } get(index) { const viewRefs = getViewRefs(this._lContainer); return viewRefs !== null && viewRefs[index] || null; } get length() { return this._lContainer.length - CONTAINER_HEADER_OFFSET; } createEmbeddedView(templateRef, context2, indexOrOptions) { let index; let injector; if (typeof indexOrOptions === "number") { index = indexOrOptions; } else if (indexOrOptions != null) { index = indexOrOptions.index; injector = indexOrOptions.injector; } const dehydratedView = findMatchingDehydratedView(this._lContainer, templateRef.ssrId); const viewRef = templateRef.createEmbeddedViewImpl(context2 || {}, injector, dehydratedView); this.insertImpl(viewRef, index, shouldAddViewToDom(this._hostTNode, dehydratedView)); return viewRef; } createComponent(componentFactoryOrType, indexOrOptions, injector, projectableNodes, environmentInjector, directives, bindings) { const isComponentFactory = componentFactoryOrType && !isType(componentFactoryOrType); let index; if (isComponentFactory) { if (ngDevMode) { assertEqual(typeof indexOrOptions !== "object", true, "\uCCAB \uBC88\uC9F8 \uC778\uC790\uB85C \uCEF4\uD3EC\uB10C\uD2B8 \uD329\uD1A0\uB9AC\uAC00 \uC81C\uACF5\uB418\uACE0 \uB450 \uBC88\uC9F8 \uC778\uC790\uB85C \uC635\uC158 \uAC1D\uCCB4\uAC00 \uC81C\uACF5\uB41C \uAC83 \uAC19\uC2B5\uB2C8\uB2E4. \uC774 \uC778\uC218 \uC870\uD569\uC740 \uD638\uD658\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uCCAB \uBC88\uC9F8 \uC778\uC218\uB97C \uCEF4\uD3EC\uB10C\uD2B8 \uC720\uD615\uC73C\uB85C \uBCC0\uACBD\uD558\uAC70\uB098 \uB450 \uBC88\uC9F8 \uC778\uC218\uB97C \uC0C8 \uCEF4\uD3EC\uB10C\uD2B8\uC758 \uD638\uC2A4\uD2B8 \uBDF0\uB97C \uC0BD\uC785\uD560 \uC778\uB371\uC2A4\uB97C \uB098\uD0C0\uB0B4\uB294 \uC22B\uC790\uB85C \uBCC0\uACBD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."); } index = indexOrOptions; } else { if (ngDevMode) { assertDefined(getComponentDef(componentFactoryOrType), "\uC81C\uACF5\uB41C \uCEF4\uD3EC\uB10C\uD2B8 \uD074\uB798\uC2A4\uC5D0\uB294 \uCEF4\uD3EC\uB10C\uD2B8 \uC815\uC758\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC81C\uACF5\uB41C \uD074\uB798\uC2A4\uC5D0 @Component \uC7A5\uC2DD\uC790\uAC00 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624."); assertEqual(typeof indexOrOptions !== "number", true, "\uCCAB \uBC88\uC9F8 \uC778\uC790\uB85C \uCEF4\uD3EC\uB10C\uD2B8 \uC720\uD615\uC774 \uC81C\uACF5\uB418\uACE0 \uB450 \uBC88\uC9F8 \uC778\uC790\uB85C \uC0C8 \uCEF4\uD3EC\uB10C\uD2B8\uC758 \uD638\uC2A4\uD2B8 \uBDF0\uB97C \uC0BD\uC785\uD560 \uC778\uB371\uC2A4\uB97C \uB098\uD0C0\uB0B4\uB294 \uC22B\uC790\uAC00 \uC81C\uACF5\uB41C \uAC83 \uAC19\uC2B5\uB2C8\uB2E4. \uC774 \uC778\uC218 \uC870\uD569\uC740 \uD638\uD658\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB450 \uBC88\uC9F8 \uC778\uC218\uB85C \uB300\uC2E0 \uAC1D\uCCB4\uB97C \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624."); } const options = indexOrOptions || {}; if (ngDevMode && options.environmentInjector && options.ngModuleRef) { throwError2("createComponent()\uC5D0 environmentInjector\uC640 ngModuleRef \uC635\uC158\uC744 \uBAA8\uB450 \uC804\uB2EC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."); } index = options.index; injector = options.injector; projectableNodes = options.projectableNodes; environmentInjector = options.environmentInjector || options.ngModuleRef; directives = options.directives; bindings = options.bindings; } const componentFactory = isComponentFactory ? componentFactoryOrType : new ComponentFactory2(getComponentDef(componentFactoryOrType)); const contextInjector = injector || this.parentInjector; if (!environmentInjector && componentFactory.ngModule == null) { const _injector = isComponentFactory ? contextInjector : this.parentInjector; const result = _injector.get(EnvironmentInjector, null); if (result) { environmentInjector = result; } } const componentDef = getComponentDef(componentFactory.componentType ?? {}); const dehydratedView = findMatchingDehydratedView(this._lContainer, componentDef?.id ?? null); const rNode = dehydratedView?.firstChild ?? null; const componentRef = componentFactory.create(contextInjector, projectableNodes, rNode, environmentInjector, directives, bindings); this.insertImpl(componentRef.hostView, index, shouldAddViewToDom(this._hostTNode, dehydratedView)); return componentRef; } insert(viewRef, index) { return this.insertImpl(viewRef, index, true); } insertImpl(viewRef, index, addToDOM) { const lView = viewRef._lView; if (ngDevMode && viewRef.destroyed) { throw new Error("\uD30C\uAD34\uB41C \uBDF0\uB97C ViewContainer\uC5D0 \uC0BD\uC785\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"); } if (viewAttachedToContainer(lView)) { const prevIdx = this.indexOf(viewRef); if (prevIdx !== -1) { this.detach(prevIdx); } else { const prevLContainer = lView[PARENT]; ngDevMode && assertEqual(isLContainer(prevLContainer), true, "\uCCA8\uBD80\uB41C \uBDF0\uB294 PARENT\uAC00 \uCEE8\uD14C\uC774\uB108\uB97C \uAC00\uB9AC\uCF1C\uC57C \uD569\uB2C8\uB2E4."); const prevVCRef = new R3ViewContainerRef(prevLContainer, prevLContainer[T_HOST], prevLContainer[PARENT]); prevVCRef.detach(prevVCRef.indexOf(viewRef)); } } const adjustedIdx = this._adjustIndex(index); const lContainer = this._lContainer; addLViewToLContainer(lContainer, lView, adjustedIdx, addToDOM); viewRef.attachToViewContainerRef(); addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef); return viewRef; } move(viewRef, newIndex) { if (ngDevMode && viewRef.destroyed) { throw new Error("\uD30C\uAD34\uB41C \uBDF0\uB97C ViewContainer\uC5D0\uC11C \uC774\uB3D9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"); } return this.insert(viewRef, newIndex); } indexOf(viewRef) { const viewRefsArr = getViewRefs(this._lContainer); return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1; } remove(index) { const adjustedIdx = this._adjustIndex(index, -1); const detachedView = detachView(this._lContainer, adjustedIdx); if (detachedView) { removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx); destroyLView(detachedView[TVIEW], detachedView); } } detach(index) { const adjustedIdx = this._adjustIndex(index, -1); const view = detachView(this._lContainer, adjustedIdx); const wasDetached = view && removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx) != null; return wasDetached ? new ViewRef$1(view) : null; } _adjustIndex(index, shift = 0) { if (index == null) { return this.length + shift; } if (ngDevMode) { assertGreaterThan(index, -1, `ViewRef \uC778\uB371\uC2A4\uB294 \uC591\uC218\uC5EC\uC57C \uD558\uBA70, ${index}\uB97C \uC5BB\uC5C8\uC2B5\uB2C8\uB2E4.`); assertLessThan(index, this.length + 1 + shift, "\uC778\uB371\uC2A4"); } return index; } }; function getViewRefs(lContainer) { return lContainer[VIEW_REFS]; } function getOrCreateViewRefs(lContainer) { return lContainer[VIEW_REFS] || (lContainer[VIEW_REFS] = []); } function createContainerRef(hostTNode, hostLView) { ngDevMode && assertTNodeType( hostTNode, 12 | 3 /* TNodeType.AnyRNode */ ); let lContainer; const slotValue = hostLView[hostTNode.index]; if (isLContainer(slotValue)) { lContainer = slotValue; } else { lContainer = createLContainer(slotValue, hostLView, null, hostTNode); hostLView[hostTNode.index] = lContainer; addToEndOfViewTree(hostLView, lContainer); } _locateOrCreateAnchorNode(lContainer, hostLView, hostTNode, slotValue); return new R3ViewContainerRef(lContainer, hostTNode, hostLView); } function insertAnchorNode(hostLView, hostTNode) { const renderer = hostLView[RENDERER]; const commentNode = renderer.createComment(ngDevMode ? "container" : ""); const hostNative = getNativeByTNode(hostTNode, hostLView); const parentOfHostNative = renderer.parentNode(hostNative); nativeInsertBefore(renderer, parentOfHostNative, commentNode, renderer.nextSibling(hostNative), false); return commentNode; } var _locateOrCreateAnchorNode = createAnchorNode; var _populateDehydratedViewsInLContainer = () => false; function populateDehydratedViewsInLContainer(lContainer, tNode, hostLView) { return _populateDehydratedViewsInLContainer(lContainer, tNode, hostLView); } function createAnchorNode(lContainer, hostLView, hostTNode, slotValue) { if (lContainer[NATIVE]) return; let commentNode; if (hostTNode.type & 8) { commentNode = unwrapRNode(slotValue); } else { commentNode = insertAnchorNode(hostLView, hostTNode); } lContainer[NATIVE] = commentNode; } function populateDehydratedViewsInLContainerImpl(lContainer, tNode, hostLView) { if (lContainer[NATIVE] && lContainer[DEHYDRATED_VIEWS]) { return true; } const hydrationInfo = hostLView[HYDRATION]; const noOffsetIndex = tNode.index - HEADER_OFFSET; const isNodeCreationMode = !hydrationInfo || isInSkipHydrationBlock(tNode) || isDisconnectedNode$1(hydrationInfo, noOffsetIndex); if (isNodeCreationMode) { return false; } const currentRNode = getSegmentHead(hydrationInfo, noOffsetIndex); const serializedViews = hydrationInfo.data[CONTAINERS]?.[noOffsetIndex]; ngDevMode && assertDefined(serializedViews, "\uC608\uC0C1\uCE58 \uBABB\uD55C \uC0C1\uD0DC: \uC8FC\uC5B4\uC9C4 TNode\uC5D0 \uB300\uD55C \uC218\uD654 \uC815\uBCF4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. view \uCEE8\uD14C\uC774\uB108\uB97C \uB098\uD0C0\uB0B4\uACE0 \uC788\uC2B5\uB2C8\uB2E4."); const [commentNode, dehydratedViews] = locateDehydratedViewsInContainer(currentRNode, serializedViews); if (ngDevMode) { validateMatchingNode(commentNode, Node.COMMENT_NODE, null, hostLView, tNode, true); markRNodeAsClaimedByHydration(commentNode, false); } lContainer[NATIVE] = commentNode; lContainer[DEHYDRATED_VIEWS] = dehydratedViews; return true; } function locateOrCreateAnchorNode(lContainer, hostLView, hostTNode, slotValue) { if (!_populateDehydratedViewsInLContainer(lContainer, hostTNode, hostLView)) { createAnchorNode(lContainer, hostLView, hostTNode, slotValue); } } function enableLocateOrCreateContainerRefImpl() { _locateOrCreateAnchorNode = locateOrCreateAnchorNode; _populateDehydratedViewsInLContainer = populateDehydratedViewsInLContainerImpl; } var LQuery_ = class _LQuery_ { queryList; matches = null; constructor(queryList) { this.queryList = queryList; } clone() { return new _LQuery_(this.queryList); } setDirty() { this.queryList.setDirty(); } }; var LQueries_ = class _LQueries_ { queries; constructor(queries = []) { this.queries = queries; } createEmbeddedView(tView) { const tQueries = tView.queries; if (tQueries !== null) { const noOfInheritedQueries = tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length; const viewLQueries = []; for (let i = 0; i < noOfInheritedQueries; i++) { const tQuery = tQueries.getByIndex(i); const parentLQuery = this.queries[tQuery.indexInDeclarationView]; viewLQueries.push(parentLQuery.clone()); } return new _LQueries_(viewLQueries); } return null; } insertView(tView) { this.dirtyQueriesWithMatches(tView); } detachView(tView) { this.dirtyQueriesWithMatches(tView); } finishViewCreation(tView) { this.dirtyQueriesWithMatches(tView); } dirtyQueriesWithMatches(tView) { for (let i = 0; i < this.queries.length; i++) { if (getTQuery(tView, i).matches !== null) { this.queries[i].setDirty(); } } } }; var TQueryMetadata_ = class { flags; read; predicate; constructor(predicate, flags, read = null) { this.flags = flags; this.read = read; if (typeof predicate === "string") { this.predicate = splitQueryMultiSelectors(predicate); } else { this.predicate = predicate; } } }; var TQueries_ = class _TQueries_ { queries; constructor(queries = []) { this.queries = queries; } elementStart(tView, tNode) { ngDevMode && assertFirstCreatePass(tView, "\uCFFC\uB9AC\uB294 \uCCAB \uBC88\uC9F8 \uD15C\uD50C\uB9BF \uD328\uC2A4\uC5D0\uC11C\uB9CC \uACB0\uACFC\uB97C \uC218\uC9D1\uD574\uC57C \uD569\uB2C8\uB2E4."); for (let i = 0; i < this.queries.length; i++) { this.queries[i].elementStart(tView, tNode); } } elementEnd(tNode) { for (let i = 0; i < this.queries.length; i++) { this.queries[i].elementEnd(tNode); } } embeddedTView(tNode) { let queriesForTemplateRef = null; for (let i = 0; i < this.length; i++) { const childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0; const tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex); if (tqueryClone) { tqueryClone.indexInDeclarationView = i; if (queriesForTemplateRef !== null) { queriesForTemplateRef.push(tqueryClone); } else { queriesForTemplateRef = [tqueryClone]; } } } return queriesForTemplateRef !== null ? new _TQueries_(queriesForTemplateRef) : null; } template(tView, tNode) { ngDevMode && assertFirstCreatePass(tView, "\uCFFC\uB9AC\uB294 \uCCAB \uBC88\uC9F8 \uD15C\uD50C\uB9BF \uD328\uC2A4\uC5D0\uC11C\uB9CC \uACB0\uACFC\uB97C \uC218\uC9D1\uD574\uC57C \uD569\uB2C8\uB2E4."); for (let i = 0; i < this.queries.length; i++) { this.queries[i].template(tView, tNode); } } getByIndex(index) { ngDevMode && assertIndexInRange(this.queries, index); return this.queries[index]; } get length() { return this.queries.length; } track(tquery) { this.queries.push(tquery); } }; var TQuery_ = class _TQuery_ { metadata; matches = null; indexInDeclarationView = -1; crossesNgTemplate = false; /** * 쿼리가 선언된 노드 인덱스 (-1은 뷰 쿼리 및 선언 템플릿에서 상속된 것을 나타냅니다). * 우리는 이 인덱스 (_appliesToNextNode 플래그와 함께)를 사용하여 * 템플릿의 요소에 콘텐츠 쿼리를 적용할 시기를 알 수 있습니다. */ _declarationNodeIndex; /** * 주어진 쿼리가 여전히 교차하는 노드에 적용되는지를 나타내는 플래그입니다. * 우리는 이 플래그 (_declarationNodeIndex와 함께)를 사용하여 * 템플릿의 요소에 콘텐츠 쿼리를 적용할 때 중단할 시기를 알 수 있습니다. */ _appliesToNextNode = true; constructor(metadata, nodeIndex = -1) { this.metadata = metadata; this._declarationNodeIndex = nodeIndex; } elementStart(tView, tNode) { if (this.isApplyingToNode(tNode)) { this.matchTNode(tView, tNode); } } elementEnd(tNode) { if (this._declarationNodeIndex === tNode.index) { this._appliesToNextNode = false; } } template(tView, tNode) { this.elementStart(tView, tNode); } embeddedTView(tNode, childQueryIndex) { if (this.isApplyingToNode(tNode)) { this.crossesNgTemplate = true; this.addMatch(-tNode.index, childQueryIndex); return new _TQuery_(this.metadata); } return null; } isApplyingToNode(tNode) { if (this._appliesToNextNode && (this.metadata.flags & 1) !== 1) { const declarationNodeIdx = this._declarationNodeIndex; let parent = tNode.parent; while (parent !== null && parent.type & 8 && parent.index !== declarationNodeIdx) { parent = parent.parent; } return declarationNodeIdx === (parent !== null ? parent.index : -1); } return this._appliesToNextNode; } matchTNode(tView, tNode) { const predicate = this.metadata.predicate; if (Array.isArray(predicate)) { for (let i = 0; i < predicate.length; i++) { const name = predicate[i]; this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, name)); this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, name, false, false)); } } else { if (predicate === TemplateRef) { if (tNode.type & 4) { this.matchTNodeWithReadOption(tView, tNode, -1); } } else { this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, predicate, false, false)); } } } matchTNodeWithReadOption(tView, tNode, nodeMatchIdx) { if (nodeMatchIdx !== null) { const read = this.metadata.read; if (read !== null) { if (read === ElementRef || read === ViewContainerRef || read === TemplateRef && tNode.type & 4) { this.addMatch(tNode.index, -2); } else { const directiveOrProviderIdx = locateDirectiveOrProvider(tNode, tView, read, false, false); if (directiveOrProviderIdx !== null) { this.addMatch(tNode.index, directiveOrProviderIdx); } } } else { this.addMatch(tNode.index, nodeMatchIdx); } } } addMatch(tNodeIdx, matchIdx) { if (this.matches === null) { this.matches = [tNodeIdx, matchIdx]; } else { this.matches.push(tNodeIdx, matchIdx); } } }; function getIdxOfMatchingSelector(tNode, selector) { const localNames = tNode.localNames; if (localNames !== null) { for (let i = 0; i < localNames.length; i += 2) { if (localNames[i] === selector) { return localNames[i + 1]; } } } return null; } function createResultByTNodeType(tNode, currentView) { if (tNode.type & (3 | 8)) { return createElementRef(tNode, currentView); } else if (tNode.type & 4) { return createTemplateRef(tNode, currentView); } return null; } function createResultForNode(lView, tNode, matchingIdx, read) { if (matchingIdx === -1) { return createResultByTNodeType(tNode, lView); } else if (matchingIdx === -2) { return createSpecialToken(lView, tNode, read); } else { return getNodeInjectable(lView, lView[TVIEW], matchingIdx, tNode); } } function createSpecialToken(lView, tNode, read) { if (read === ElementRef) { return createElementRef(tNode, lView); } else if (read === TemplateRef) { return createTemplateRef(tNode, lView); } else if (read === ViewContainerRef) { ngDevMode && assertTNodeType( tNode, 3 | 12 /* TNodeType.AnyContainer */ ); return createContainerRef(tNode, lView); } else { ngDevMode && throwError2(`\uC77D\uC5B4\uC57C \uD558\uB294 \uD2B9\uBCC4\uD55C \uD1A0\uD070\uC740 ElementRef, TemplateRef \uB610\uB294 ViewContainerRef \uC911 \uD558\uB098\uC5EC\uC57C \uD558\uC9C0\uB9CC ${stringify(read)}\uB97C \uBC1B\uC558\uC2B5\uB2C8\uB2E4.`); } } function materializeViewResults(tView, lView, tQuery, queryIndex) { const lQuery = lView[QUERIES].queries[queryIndex]; if (lQuery.matches === null) { const tViewData = tView.data; const tQueryMatches = tQuery.matches; const result = []; for (let i = 0; tQueryMatches !== null && i < tQueryMatches.length; i += 2) { const matchedNodeIdx = tQueryMatches[i]; if (matchedNodeIdx < 0) { result.push(null); } else { ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx); const tNode = tViewData[matchedNodeIdx]; result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read)); } } lQuery.matches = result; } return lQuery.matches; } function collectQueryResults(tView, lView, queryIndex, result) { const tQuery = tView.queries.getByIndex(queryIndex); const tQueryMatches = tQuery.matches; if (tQueryMatches !== null) { const lViewResults = materializeViewResults(tView, lView, tQuery, queryIndex); for (let i = 0; i < tQueryMatches.length; i += 2) { const tNodeIdx = tQueryMatches[i]; if (tNodeIdx > 0) { result.push(lViewResults[i / 2]); } else { const childQueryIndex = tQueryMatches[i + 1]; const declarationLContainer = lView[-tNodeIdx]; ngDevMode && assertLContainer(declarationLContainer); for (let i2 = CONTAINER_HEADER_OFFSET; i2 < declarationLContainer.length; i2++) { const embeddedLView = declarationLContainer[i2]; if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) { collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result); } } if (declarationLContainer[MOVED_VIEWS] !== null) { const embeddedLViews = declarationLContainer[MOVED_VIEWS]; for (let i2 = 0; i2 < embeddedLViews.length; i2++) { const embeddedLView = embeddedLViews[i2]; collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result); } } } } } return result; } function loadQueryInternal(lView, queryIndex) { ngDevMode && assertDefined(lView[QUERIES], "LQueries\uB294 \uCFFC\uB9AC\uB97C \uB85C\uB4DC\uD558\uB824\uACE0 \uD560 \uB54C \uC815\uC758\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4."); ngDevMode && assertIndexInRange(lView[QUERIES].queries, queryIndex); return lView[QUERIES].queries[queryIndex].queryList; } function createLQuery(tView, lView, flags) { const queryList = new QueryList( (flags & 4) === 4 /* QueryFlags.emitDistinctChangesOnly */ ); storeCleanupWithContext(tView, lView, queryList, queryList.destroy); const lQueries = (lView[QUERIES] ??= new LQueries_()).queries; return lQueries.push(new LQuery_(queryList)) - 1; } function createViewQuery(predicate, flags, read) { ngDevMode && assertNumber(flags, "\uD50C\uB798\uADF8\uB97C \uAE30\uB300\uD569\uB2C8\uB2E4."); const tView = getTView(); if (tView.firstCreatePass) { createTQuery(tView, new TQueryMetadata_(predicate, flags, read), -1); if ((flags & 2) === 2) { tView.staticViewQueries = true; } } return createLQuery(tView, getLView(), flags); } function createContentQuery(directiveIndex, predicate, flags, read) { ngDevMode && assertNumber(flags, "\uD50C\uB798\uADF8\uB97C \uAE30\uB300\uD569\uB2C8\uB2E4."); const tView = getTView(); if (tView.firstCreatePass) { const tNode = getCurrentTNode(); createTQuery(tView, new TQueryMetadata_(predicate, flags, read), tNode.index); saveContentQueryAndDirectiveIndex(tView, directiveIndex); if ((flags & 2) === 2) { tView.staticContentQueries = true; } } return createLQuery(tView, getLView(), flags); } function splitQueryMultiSelectors(locator) { return locator.split(",").map((s) => s.trim()); } function createTQuery(tView, metadata, nodeIndex) { if (tView.queries === null) tView.queries = new TQueries_(); tView.queries.track(new TQuery_(metadata, nodeIndex)); } function saveContentQueryAndDirectiveIndex(tView, directiveIndex) { const tViewContentQueries = tView.contentQueries || (tView.contentQueries = []); const lastSavedDirectiveIndex = tViewContentQueries.length ? tViewContentQueries[tViewContentQueries.length - 1] : -1; if (directiveIndex !== lastSavedDirectiveIndex) { tViewContentQueries.push(tView.queries.length - 1, directiveIndex); } } function getTQuery(tView, index) { ngDevMode && assertDefined(tView.queries, "TQueries\uB294 TQuery\uB97C \uAC80\uC0C9\uD558\uAE30 \uC704\uD574 \uC815\uC758\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4."); return tView.queries.getByIndex(index); } function getQueryResults(lView, queryIndex) { const tView = lView[TVIEW]; const tQuery = getTQuery(tView, queryIndex); return tQuery.crossesNgTemplate ? collectQueryResults(tView, lView, queryIndex, []) : materializeViewResults(tView, lView, tQuery, queryIndex); } function createQuerySignalFn(firstOnly, required, opts) { let node; const signalFn = createComputed(() => { node._dirtyCounter(); const value = refreshSignalQuery(node, firstOnly); if (required && value === void 0) { throw new RuntimeError(-951, ngDevMode && "\uC790\uC2DD \uCFFC\uB9AC \uACB0\uACFC\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC \uC0AC\uC6A9\uD560 \uC218 \uC788\uB294 \uAC12\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."); } return value; }); node = signalFn[SIGNAL]; node._dirtyCounter = signal(0); node._flatValue = void 0; if (ngDevMode) { signalFn.toString = () => `[Query Signal]`; node.debugName = opts?.debugName; } return signalFn; } function createSingleResultOptionalQuerySignalFn(opts) { return createQuerySignalFn( /* firstOnly */ true, /* required */ false, opts ); } function createSingleResultRequiredQuerySignalFn(opts) { return createQuerySignalFn( /* firstOnly */ true, /* required */ true, opts ); } function createMultiResultQuerySignalFn(opts) { return createQuerySignalFn( /* firstOnly */ false, /* required */ false, opts ); } function bindQueryToSignal(target, queryIndex) { const node = target[SIGNAL]; node._lView = getLView(); node._queryIndex = queryIndex; node._queryList = loadQueryInternal(node._lView, queryIndex); node._queryList.onDirty(() => node._dirtyCounter.update((v) => v + 1)); } function refreshSignalQuery(node, firstOnly) { const lView = node._lView; const queryIndex = node._queryIndex; if (lView === void 0 || queryIndex === void 0 || lView[FLAGS] & 4) { return firstOnly ? void 0 : EMPTY_ARRAY; } const queryList = loadQueryInternal(lView, queryIndex); const results = getQueryResults(lView, queryIndex); queryList.reset(results, unwrapElementRef); if (firstOnly) { return queryList.first; } else { const resultChanged = queryList._changesDetected; if (resultChanged || node._flatValue === void 0) { return node._flatValue = queryList.toArray(); } return node._flatValue; } } function viewChildFn(locator, opts) { ngDevMode && assertInInjectionContext(viewChild); return createSingleResultOptionalQuerySignalFn(opts); } function viewChildRequiredFn(locator, opts) { ngDevMode && assertInInjectionContext(viewChild); return createSingleResultRequiredQuerySignalFn(opts); } var viewChild = (() => { viewChildFn.required = viewChildRequiredFn; return viewChildFn; })(); function viewChildren(locator, opts) { ngDevMode && assertInInjectionContext(viewChildren); return createMultiResultQuerySignalFn(opts); } function contentChildFn(locator, opts) { ngDevMode && assertInInjectionContext(contentChild); return createSingleResultOptionalQuerySignalFn(opts); } function contentChildRequiredFn(locator, opts) { ngDevMode && assertInInjectionContext(contentChildren); return createSingleResultRequiredQuerySignalFn(opts); } var contentChild = (() => { contentChildFn.required = contentChildRequiredFn; return contentChildFn; })(); function contentChildren(locator, opts) { return createMultiResultQuerySignalFn(opts); } function createModelSignal(initialValue, opts) { const node = Object.create(INPUT_SIGNAL_NODE); const emitterRef = new OutputEmitterRef(); node.value = initialValue; function getter() { producerAccessed(node); assertModelSet(node.value); return node.value; } getter[SIGNAL] = node; getter.asReadonly = signalAsReadonlyFn.bind(getter); getter.set = (newValue) => { if (!node.equal(node.value, newValue)) { signalSetFn(node, newValue); emitterRef.emit(newValue); } }; getter.update = (updateFn) => { assertModelSet(node.value); getter.set(updateFn(node.value)); }; getter.subscribe = emitterRef.subscribe.bind(emitterRef); getter.destroyRef = emitterRef.destroyRef; if (ngDevMode) { getter.toString = () => `[Model Signal: ${getter()}]`; node.debugName = opts?.debugName; } return getter; } function assertModelSet(value) { if (value === REQUIRED_UNSET_VALUE) { throw new RuntimeError(952, ngDevMode && "\uBAA8\uB378\uC774 \uD544\uC218\uC774\uB098 \uAC12\uC774 \uC544\uC9C1 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."); } } function modelFunction(initialValue, opts) { ngDevMode && assertInInjectionContext(model); return createModelSignal(initialValue, opts); } function modelRequiredFunction(opts) { ngDevMode && assertInInjectionContext(model); return createModelSignal(REQUIRED_UNSET_VALUE, opts); } var model = (() => { modelFunction.required = modelRequiredFunction; return modelFunction; })(); var emitDistinctChangesOnlyDefaultValue = true; var Query = class { }; var ContentChildren = makePropDecorator("ContentChildren", (selector, opts = {}) => __spreadValues({ selector, first: false, isViewQuery: false, descendants: false, emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue }, opts), Query); var ContentChild = makePropDecorator("ContentChild", (selector, opts = {}) => __spreadValues({ selector, first: true, isViewQuery: false, descendants: true }, opts), Query); var ViewChildren = makePropDecorator("ViewChildren", (selector, opts = {}) => __spreadValues({ selector, first: false, isViewQuery: true, descendants: true, emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue }, opts), Query); var ViewChild = makePropDecorator("ViewChild", (selector, opts) => __spreadValues({ selector, first: true, isViewQuery: true, descendants: true }, opts), Query); function resolveComponentResources(resourceResolver) { const componentResolved = []; const urlMap = /* @__PURE__ */ new Map(); function cachedResourceResolve(url) { let promise = urlMap.get(url); if (!promise) { const resp = resourceResolver(url); urlMap.set(url, promise = resp.then(unwrapResponse)); } return promise; } componentResourceResolutionQueue.forEach((component, type) => { const promises = []; if (component.templateUrl) { promises.push(cachedResourceResolve(component.templateUrl).then((template) => { component.template = template; })); } const styles = typeof component.styles === "string" ? [component.styles] : component.styles || []; component.styles = styles; if (component.styleUrl && component.styleUrls?.length) { throw new Error("@Component\uB294 `styleUrl`\uACFC `styleUrls`\uB97C \uB3D9\uC2DC\uC5D0 \uC815\uC758\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD558\uB098\uC758 \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uAC00 \uC788\uC744 \uACBD\uC6B0 `styleUrl`\uC744 \uC0AC\uC6A9\uD558\uACE0, \uC5EC\uB7EC \uAC1C\uC758 \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uAC00 \uC788\uC744 \uACBD\uC6B0 `styleUrls`\uB97C \uC0AC\uC6A9\uD558\uC138\uC694."); } else if (component.styleUrls?.length) { const styleOffset = component.styles.length; const styleUrls = component.styleUrls; component.styleUrls.forEach((styleUrl, index) => { styles.push(""); promises.push(cachedResourceResolve(styleUrl).then((style) => { styles[styleOffset + index] = style; styleUrls.splice(styleUrls.indexOf(styleUrl), 1); if (styleUrls.length == 0) { component.styleUrls = void 0; } })); }); } else if (component.styleUrl) { promises.push(cachedResourceResolve(component.styleUrl).then((style) => { styles.push(style); component.styleUrl = void 0; })); } const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type)); componentResolved.push(fullyResolved); }); clearResolutionOfComponentResourcesQueue(); return Promise.all(componentResolved).then(() => void 0); } var componentResourceResolutionQueue = /* @__PURE__ */ new Map(); var componentDefPendingResolution = /* @__PURE__ */ new Set(); function maybeQueueResolutionOfComponentResources(type, metadata) { if (componentNeedsResolution(metadata)) { componentResourceResolutionQueue.set(type, metadata); componentDefPendingResolution.add(type); } } function componentNeedsResolution(component) { return !!(component.templateUrl && !component.hasOwnProperty("template") || component.styleUrls && component.styleUrls.length || component.styleUrl); } function clearResolutionOfComponentResourcesQueue() { const old = componentResourceResolutionQueue; componentResourceResolutionQueue = /* @__PURE__ */ new Map(); return old; } function isComponentResourceResolutionQueueEmpty() { return componentResourceResolutionQueue.size === 0; } function unwrapResponse(response) { return typeof response == "string" ? response : response.text(); } function componentDefResolved(type) { componentDefPendingResolution.delete(type); } var modules = /* @__PURE__ */ new Map(); var checkForDuplicateNgModules = true; function assertSameOrNotExisting(id, type, incoming) { if (type && type !== incoming && checkForDuplicateNgModules) { throw new Error(`${id}\uC5D0 \uB300\uD574 \uC911\uBCF5 \uBAA8\uB4C8\uC774 \uB4F1\uB85D\uB418\uC5C8\uC2B5\uB2C8\uB2E4 - ${stringify(type)} vs ${stringify(type.name)}`); } } function registerNgModuleType(ngModuleType, id) { const existing = modules.get(id) || null; assertSameOrNotExisting(id, existing, ngModuleType); modules.set(id, ngModuleType); } function \u0275\u0275validateIframeAttribute(attrValue, tagName, attrName) { const lView = getLView(); const tNode = getSelectedTNode(); const element = getNativeByTNode(tNode, lView); if (tNode.type === 2 && tagName.toLowerCase() === "iframe") { const iframe = element; iframe.src = ""; iframe.srcdoc = trustedHTMLFromString(""); nativeRemoveNode(lView[RENDERER], iframe); const errorMessage = ngDevMode && `Angular\uB294 \`${attrName}\`\uC774