` tag we check the equality
* of the VNodes corresponding to the `
` tags and, since they are the
* same tag in the same position, we'd be able to avoid completely
* re-rendering the subtree under them with a new DOM element and would just
* call out to `patch` to handle reconciling their children and so on.
*
* 3. Check, for both windows, to see if the element at the beginning of the
* window corresponds to the element at the end of the other window. This is
* a heuristic which will let us identify _some_ situations in which
* elements have changed position, for instance it _should_ detect that the
* children nodes themselves have not changed but merely moved in the
* following example:
*
* oldVNode: `
`
* newVNode: `
`
*
* If we find cases like this then we also need to move the concrete DOM
* elements corresponding to the moved children to write the re-order to the
* DOM.
*
* 4. Finally, if VNodes have the `key` attribute set on them we check for any
* nodes in the old children which have the same key as the first element in
* our window on the new children. If we find such a node we handle calling
* out to `patch`, moving relevant DOM nodes, and so on, in accordance with
* what we find.
*
* Finally, once we've narrowed our 'windows' to the point that either of them
* collapse (i.e. they have length 0) we then handle any remaining VNode
* insertion or deletion that needs to happen to get a DOM state that correctly
* reflects the new child VNodes. If, for instance, after our window on the old
* children has collapsed we still have more nodes on the new children that
* we haven't dealt with yet then we need to add them, or if the new children
* collapse but we still have unhandled _old_ children then we need to make
* sure the corresponding DOM nodes are removed.
*
* @param parentElm the node into which the parent VNode is rendered
* @param oldCh the old children of the parent node
* @param newVNode the new VNode which will replace the parent
* @param newCh the new children of the parent node
*/
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
let oldStartIdx = 0;
let newStartIdx = 0;
let idxInOld = 0;
let i = 0;
let oldEndIdx = oldCh.length - 1;
let oldStartVnode = oldCh[0];
let oldEndVnode = oldCh[oldEndIdx];
let newEndIdx = newCh.length - 1;
let newStartVnode = newCh[0];
let newEndVnode = newCh[newEndIdx];
let node;
let elmToMove;
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
if (oldStartVnode == null) {
// VNode might have been moved left
oldStartVnode = oldCh[++oldStartIdx];
} else if (oldEndVnode == null) {
oldEndVnode = oldCh[--oldEndIdx];
} else if (newStartVnode == null) {
newStartVnode = newCh[++newStartIdx];
} else if (newEndVnode == null) {
newEndVnode = newCh[--newEndIdx];
} else if (isSameVnode(oldStartVnode, newStartVnode)) {
// if the start nodes are the same then we should patch the new VNode
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
// indices to reflect that. We don't need to move any DOM Nodes around
// since things are matched up in order.
patch(oldStartVnode, newStartVnode);
oldStartVnode = oldCh[++oldStartIdx];
newStartVnode = newCh[++newStartIdx];
} else if (isSameVnode(oldEndVnode, newEndVnode)) {
// likewise, if the end nodes are the same we patch new onto old and
// decrement our end indices, and also likewise in this case we don't
// need to move any DOM Nodes.
patch(oldEndVnode, newEndVnode);
oldEndVnode = oldCh[--oldEndIdx];
newEndVnode = newCh[--newEndIdx];
} else if (isSameVnode(oldStartVnode, newEndVnode)) {
// case: "Vnode moved right"
//
// We've found that the last node in our window on the new children is
// the same VNode as the _first_ node in our window on the old children
// we're dealing with now. Visually, this is the layout of these two
// nodes:
//
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
// ^^^^^^^^^^^
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
// ^^^^^^^^^^^^^
//
// In this situation we need to patch `newEndVnode` onto `oldStartVnode`
// and move the DOM element for `oldStartVnode`.
if (oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot') {
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
}
patch(oldStartVnode, newEndVnode); // We need to move the element for `oldStartVnode` into a position which
// will be appropriate for `newEndVnode`. For this we can use
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
// sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
// `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
//
//
//
//
//
//
//
// ```
// In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
// will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
// to the value that was set inline i.e. "some-value" from above example. When
// the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
//
// The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
// by connectedCallback as this attributeChangedCallback will not fire.
//
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
//
// TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
// properties here given that this goes against best practices outlined here
// https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
if (this.hasOwnProperty(propName)) {
newValue = this[propName];
delete this[propName];
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === 'number' && this[propName] == newValue) {
// if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
// APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
// `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
return;
}
this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
});
}; // create an array of attributes to observe
// and also create a map of html attribute name to js property name
Cstr.observedAttributes = members.filter(([_, m]) => m[0] & 15
/* MEMBER_FLAGS.HasAttribute */
) // filter to only keep props that should match attributes
.map(([propName, m]) => {
const attrName = m[1] || propName;
attrNameToPropName.set(attrName, propName);
if (m[0] & 512
/* MEMBER_FLAGS.ReflectAttr */
) {
cmpMeta.$attrsToReflect$.push([propName, attrName]);
}
return attrName;
});
}
}
return Cstr;
};
const initializeComponent = /*#__PURE__*/function () {
var _ref2 = (0,_Volumes_App_fm99_app_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (elm, hostRef, cmpMeta, hmrVersionId, Cstr) {
// initializeComponent
if ((hostRef.$flags$ & 32
/* HOST_FLAGS.hasInitializedComponent */
) === 0) {
{
// we haven't initialized this element yet
hostRef.$flags$ |= 32
/* HOST_FLAGS.hasInitializedComponent */
; // lazy loaded components
// request the component's implementation to be
// wired up with the host element
Cstr = loadModule(cmpMeta);
if (Cstr.then) {
// Await creates a micro-task avoid if possible
const endLoad = uniqueTime();
Cstr = yield Cstr;
endLoad();
}
if (!Cstr.isProxied) {
// we've never proxied this Constructor before
// let's add the getters/setters to its prototype before
// the first time we create an instance of the implementation
{
cmpMeta.$watchers$ = Cstr.watchers;
}
proxyComponent(Cstr, cmpMeta, 2
/* PROXY_FLAGS.proxyState */
);
Cstr.isProxied = true;
}
const endNewInstance = createTime('createInstance', cmpMeta.$tagName$); // ok, time to construct the instance
// but let's keep track of when we start and stop
// so that the getters/setters don't incorrectly step on data
{
hostRef.$flags$ |= 8
/* HOST_FLAGS.isConstructingInstance */
;
} // construct the lazy-loaded component implementation
// passing the hostRef is very important during
// construction in order to directly wire together the
// host element and the lazy-loaded instance
try {
new Cstr(hostRef);
} catch (e) {
consoleError(e);
}
{
hostRef.$flags$ &= ~8
/* HOST_FLAGS.isConstructingInstance */
;
}
{
hostRef.$flags$ |= 128
/* HOST_FLAGS.isWatchReady */
;
}
endNewInstance();
fireConnectedCallback(hostRef.$lazyInstance$);
}
if (Cstr.style) {
// this component has styles but we haven't registered them yet
let style = Cstr.style;
if (typeof style !== 'string') {
style = style[hostRef.$modeName$ = computeMode(elm)];
}
const scopeId = getScopeId(cmpMeta, hostRef.$modeName$);
if (!styles.has(scopeId)) {
const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1
/* CMP_FLAGS.shadowDomEncapsulation */
));
endRegisterStyles();
}
}
} // we've successfully created a lazy instance
const ancestorComponent = hostRef.$ancestorComponent$;
const schedule = () => scheduleUpdate(hostRef, true);
if (ancestorComponent && ancestorComponent['s-rc']) {
// this is the initial load and this component it has an ancestor component
// but the ancestor component has NOT fired its will update lifecycle yet
// so let's just cool our jets and wait for the ancestor to continue first
// this will get fired off when the ancestor component
// finally gets around to rendering its lazy self
// fire off the initial update
ancestorComponent['s-rc'].push(schedule);
} else {
schedule();
}
});
return function initializeComponent(_x4, _x5, _x6, _x7, _x8) {
return _ref2.apply(this, arguments);
};
}();
const fireConnectedCallback = instance => {
{
safeCall(instance, 'connectedCallback');
}
};
const connectedCallback = elm => {
if ((plt.$flags$ & 1
/* PLATFORM_FLAGS.isTmpDisconnected */
) === 0) {
const hostRef = getHostRef(elm);
const cmpMeta = hostRef.$cmpMeta$;
const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
if (!(hostRef.$flags$ & 1
/* HOST_FLAGS.hasConnected */
)) {
// first time this component has connected
hostRef.$flags$ |= 1
/* HOST_FLAGS.hasConnected */
;
let hostId;
{
hostId = elm.getAttribute(HYDRATE_ID);
if (hostId) {
if (cmpMeta.$flags$ & 1
/* CMP_FLAGS.shadowDomEncapsulation */
) {
const scopeId = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute('s-mode'));
elm.classList.remove(scopeId + '-h', scopeId + '-s');
}
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
}
}
if (!hostId) {
// initUpdate
// if the slot polyfill is required we'll need to put some nodes
// in here to act as original content anchors as we move nodes around
// host element has been connected to the DOM
if (cmpMeta.$flags$ & (4
/* CMP_FLAGS.hasSlotRelocation */
| 8
/* CMP_FLAGS.needsShadowDomShim */
)) {
setContentReference(elm);
}
}
{
// find the first ancestor component (if there is one) and register
// this component as one of the actively loading child components for its ancestor
let ancestorComponent = elm;
while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
// climb up the ancestors looking for the first
// component that hasn't finished its lifecycle update yet
if (ancestorComponent.nodeType === 1
/* NODE_TYPE.ElementNode */
&& ancestorComponent.hasAttribute('s-id') && ancestorComponent['s-p'] || ancestorComponent['s-p']) {
// we found this components first ancestor component
// keep a reference to this component's ancestor component
attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
break;
}
}
} // Lazy properties
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
if (cmpMeta.$members$) {
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
if (memberFlags & 31
/* MEMBER_FLAGS.Prop */
&& elm.hasOwnProperty(memberName)) {
const value = elm[memberName];
delete elm[memberName];
elm[memberName] = value;
}
});
}
{
// connectedCallback, taskQueue, initialLoad
// angular sets attribute AFTER connectCallback
// https://github.com/angular/angular/issues/18909
// https://github.com/angular/angular/issues/19940
nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
}
} else {
// not the first time this has connected
// reattach any event listeners to the host
// since they would have been removed when disconnected
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$); // fire off connectedCallback() on component instance
fireConnectedCallback(hostRef.$lazyInstance$);
}
endConnected();
}
};
const setContentReference = elm => {
// only required when we're NOT using native shadow dom (slot)
// or this browser doesn't support native shadow dom
// and this host element was NOT created with SSR
// let's pick out the inner content for slot projection
// create a node to represent where the original
// content was first placed, which is useful later on
const contentRefElm = elm['s-cr'] = doc.createComment('');
contentRefElm['s-cn'] = true;
elm.insertBefore(contentRefElm, elm.firstChild);
};
const disconnectedCallback = elm => {
if ((plt.$flags$ & 1
/* PLATFORM_FLAGS.isTmpDisconnected */
) === 0) {
const hostRef = getHostRef(elm);
const instance = hostRef.$lazyInstance$;
{
if (hostRef.$rmListeners$) {
hostRef.$rmListeners$.map(rmListener => rmListener());
hostRef.$rmListeners$ = undefined;
}
}
{
safeCall(instance, 'disconnectedCallback');
}
}
};
const bootstrapLazy = (lazyBundles, options = {}) => {
const endBootstrap = createTime();
const cmpTags = [];
const exclude = options.exclude || [];
const customElements = win.customElements;
const head = doc.head;
const metaCharset = /*@__PURE__*/head.querySelector('meta[charset]');
const visibilityStyle = /*@__PURE__*/doc.createElement('style');
const deferredConnectedCallbacks = [];
const styles = /*@__PURE__*/doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
let appLoadFallback;
let isBootstrapping = true;
let i = 0;
Object.assign(plt, options);
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
{
// If the app is already hydrated there is not point to disable the
// async queue. This will improve the first input delay
plt.$flags$ |= 2
/* PLATFORM_FLAGS.appLoaded */
;
}
{
for (; i < styles.length; i++) {
registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
}
}
lazyBundles.map(lazyBundle => {
lazyBundle[1].map(compactMeta => {
const cmpMeta = {
$flags$: compactMeta[0],
$tagName$: compactMeta[1],
$members$: compactMeta[2],
$listeners$: compactMeta[3]
};
{
cmpMeta.$members$ = compactMeta[2];
}
{
cmpMeta.$listeners$ = compactMeta[3];
}
{
cmpMeta.$attrsToReflect$ = [];
}
{
cmpMeta.$watchers$ = {};
}
const tagName = cmpMeta.$tagName$;
const HostElement = class extends HTMLElement {
// StencilLazyHost
constructor(self) {
// @ts-ignore
super(self);
self = this;
registerHost(self, cmpMeta);
if (cmpMeta.$flags$ & 1
/* CMP_FLAGS.shadowDomEncapsulation */
) {
// this component is using shadow dom
// and this browser supports shadow dom
// add the read-only property "shadowRoot" to the host element
// adding the shadow root build conditionals to minimize runtime
{
{
self.attachShadow({
mode: 'open',
delegatesFocus: !!(cmpMeta.$flags$ & 16
/* CMP_FLAGS.shadowDelegatesFocus */
)
});
}
}
}
}
connectedCallback() {
if (appLoadFallback) {
clearTimeout(appLoadFallback);
appLoadFallback = null;
}
if (isBootstrapping) {
// connectedCallback will be processed once all components have been registered
deferredConnectedCallbacks.push(this);
} else {
plt.jmp(() => connectedCallback(this));
}
}
disconnectedCallback() {
plt.jmp(() => disconnectedCallback(this));
}
componentOnReady() {
return getHostRef(this).$onReadyPromise$;
}
};
cmpMeta.$lazyBundleId$ = lazyBundle[0];
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
cmpTags.push(tagName);
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1
/* PROXY_FLAGS.isElementConstructor */
));
}
});
});
{
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
visibilityStyle.setAttribute('data-styles', '');
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
} // Process deferred connectedCallbacks now all components have been registered
isBootstrapping = false;
if (deferredConnectedCallbacks.length) {
deferredConnectedCallbacks.map(host => host.connectedCallback());
} else {
{
plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
}
} // Fallback appLoad event
endBootstrap();
};
const getAssetPath = path => {
const assetUrl = new URL(path, plt.$resourcesUrl$);
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
};
const hostRefs = /*@__PURE__*/new WeakMap();
const getHostRef = ref => hostRefs.get(ref);
const registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
const registerHost = (elm, cmpMeta) => {
const hostRef = {
$flags$: 0,
$hostElement$: elm,
$cmpMeta$: cmpMeta,
$instanceValues$: new Map()
};
{
hostRef.$onInstancePromise$ = new Promise(r => hostRef.$onInstanceResolve$ = r);
}
{
hostRef.$onReadyPromise$ = new Promise(r => hostRef.$onReadyResolve$ = r);
elm['s-p'] = [];
elm['s-rc'] = [];
}
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
return hostRefs.set(elm, hostRef);
};
const isMemberInElement = (elm, memberName) => memberName in elm;
const consoleError = (e, el) => (0, console.error)(e, el);
const cmpModules = /*@__PURE__*/new Map();
const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
// loadModuleImport
const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
const bundleId = cmpMeta.$lazyBundleId$;
const module = cmpModules.get(bundleId);
if (module) {
return module[exportName];
}
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
return __webpack_require__(863)(`./${bundleId}.entry.js`).then(importedModule => {
{
cmpModules.set(bundleId, importedModule);
}
return importedModule[exportName];
}, consoleError);
};
const styles = /*@__PURE__*/new Map();
const modeResolutionChain = [];
const queueDomReads = [];
const queueDomWrites = [];
const queueTask = (queue, write) => cb => {
queue.push(cb);
if (!queuePending) {
queuePending = true;
if (write && plt.$flags$ & 4
/* PLATFORM_FLAGS.queueSync */
) {
nextTick(flush);
} else {
plt.raf(flush);
}
}
};
const consume = queue => {
for (let i = 0; i < queue.length; i++) {
try {
queue[i](performance.now());
} catch (e) {
consoleError(e);
}
}
queue.length = 0;
};
const flush = () => {
// always force a bunch of medium callbacks to run, but still have
// a throttle on how many can run in a certain time
// DOM READS!!!
consume(queueDomReads); // DOM WRITES!!!
{
consume(queueDomWrites);
if (queuePending = queueDomReads.length > 0) {
// still more to do yet, but we've run out of time
// let's let this thing cool off and try again in the next tick
plt.raf(flush);
}
}
};
const nextTick = /*@__PURE__*/cb => promiseResolve().then(cb);
const readTask = /*@__PURE__*/queueTask(queueDomReads, false);
const writeTask = /*@__PURE__*/queueTask(queueDomWrites, true);
const Build = {
isDev: false,
isBrowser: true,
isServer: false,
isTesting: false
};
/***/ }),
/***/ 1652:
/*!*************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/index-dff497fb.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "I": () => (/* binding */ IonicSafeString),
/* harmony export */ "s": () => (/* binding */ sanitizeDOMString)
/* harmony export */ });
/*!
* (C) Ionic http://ionicframework.com - MIT License
*/
/**
* Does a simple sanitization of all elements
* in an untrusted string
*/
const sanitizeDOMString = untrustedString => {
try {
if (untrustedString instanceof IonicSafeString) {
return untrustedString.value;
}
if (!isSanitizerEnabled() || typeof untrustedString !== 'string' || untrustedString === '') {
return untrustedString;
}
/**
* Create a document fragment
* separate from the main DOM,
* create a div to do our work in
*/
const documentFragment = document.createDocumentFragment();
const workingDiv = document.createElement('div');
documentFragment.appendChild(workingDiv);
workingDiv.innerHTML = untrustedString;
/**
* Remove any elements
* that are blocked
*/
blockedTags.forEach(blockedTag => {
const getElementsToRemove = documentFragment.querySelectorAll(blockedTag);
for (let elementIndex = getElementsToRemove.length - 1; elementIndex >= 0; elementIndex--) {
const element = getElementsToRemove[elementIndex];
if (element.parentNode) {
element.parentNode.removeChild(element);
} else {
documentFragment.removeChild(element);
}
/**
* We still need to sanitize
* the children of this element
* as they are left behind
*/
const childElements = getElementChildren(element);
/* eslint-disable-next-line */
for (let childIndex = 0; childIndex < childElements.length; childIndex++) {
sanitizeElement(childElements[childIndex]);
}
}
});
/**
* Go through remaining elements and remove
* non-allowed attribs
*/
// IE does not support .children on document fragments, only .childNodes
const dfChildren = getElementChildren(documentFragment);
/* eslint-disable-next-line */
for (let childIndex = 0; childIndex < dfChildren.length; childIndex++) {
sanitizeElement(dfChildren[childIndex]);
} // Append document fragment to div
const fragmentDiv = document.createElement('div');
fragmentDiv.appendChild(documentFragment); // First child is always the div we did our work in
const getInnerDiv = fragmentDiv.querySelector('div');
return getInnerDiv !== null ? getInnerDiv.innerHTML : fragmentDiv.innerHTML;
} catch (err) {
console.error(err);
return '';
}
};
/**
* Clean up current element based on allowed attributes
* and then recursively dig down into any child elements to
* clean those up as well
*/
const sanitizeElement = element => {
// IE uses childNodes, so ignore nodes that are not elements
if (element.nodeType && element.nodeType !== 1) {
return;
}
for (let i = element.attributes.length - 1; i >= 0; i--) {
const attribute = element.attributes.item(i);
const attributeName = attribute.name; // remove non-allowed attribs
if (!allowedAttributes.includes(attributeName.toLowerCase())) {
element.removeAttribute(attributeName);
continue;
} // clean up any allowed attribs
// that attempt to do any JS funny-business
const attributeValue = attribute.value;
/* eslint-disable-next-line */
if (attributeValue != null && attributeValue.toLowerCase().includes('javascript:')) {
element.removeAttribute(attributeName);
}
}
/**
* Sanitize any nested children
*/
const childElements = getElementChildren(element);
/* eslint-disable-next-line */
for (let i = 0; i < childElements.length; i++) {
sanitizeElement(childElements[i]);
}
};
/**
* IE doesn't always support .children
* so we revert to .childNodes instead
*/
const getElementChildren = el => {
return el.children != null ? el.children : el.childNodes;
};
const isSanitizerEnabled = () => {
var _a;
const win = window;
const config = (_a = win === null || win === void 0 ? void 0 : win.Ionic) === null || _a === void 0 ? void 0 : _a.config;
if (config) {
if (config.get) {
return config.get('sanitizerEnabled', true);
} else {
return config.sanitizerEnabled === true || config.sanitizerEnabled === undefined;
}
}
return true;
};
const allowedAttributes = ['class', 'id', 'href', 'src', 'name', 'slot'];
const blockedTags = ['script', 'style', 'iframe', 'meta', 'link', 'object', 'embed'];
class IonicSafeString {
constructor(value) {
this.value = value;
}
}
/***/ }),
/***/ 9287:
/*!*************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/index-e6cecce9.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "L": () => (/* binding */ LIFECYCLE_WILL_ENTER),
/* harmony export */ "a": () => (/* binding */ LIFECYCLE_DID_ENTER),
/* harmony export */ "b": () => (/* binding */ LIFECYCLE_WILL_LEAVE),
/* harmony export */ "c": () => (/* binding */ LIFECYCLE_DID_LEAVE),
/* harmony export */ "d": () => (/* binding */ LIFECYCLE_WILL_UNLOAD),
/* harmony export */ "e": () => (/* binding */ deepReady),
/* harmony export */ "g": () => (/* binding */ getIonPageElement),
/* harmony export */ "l": () => (/* binding */ lifecycle),
/* harmony export */ "s": () => (/* binding */ setPageHidden),
/* harmony export */ "t": () => (/* binding */ transition)
/* harmony export */ });
/* harmony import */ var _Volumes_App_fm99_app_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 1670);
/* harmony import */ var _index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index-8e692445.js */ 1559);
/* harmony import */ var _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-3b390e48.js */ 9234);
/*!
* (C) Ionic http://ionicframework.com - MIT License
*/
const LIFECYCLE_WILL_ENTER = 'ionViewWillEnter';
const LIFECYCLE_DID_ENTER = 'ionViewDidEnter';
const LIFECYCLE_WILL_LEAVE = 'ionViewWillLeave';
const LIFECYCLE_DID_LEAVE = 'ionViewDidLeave';
const LIFECYCLE_WILL_UNLOAD = 'ionViewWillUnload';
const iosTransitionAnimation = () => Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ./ios.transition-a4006a5a.js */ 7938));
const mdTransitionAnimation = () => Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ./md.transition-3924e170.js */ 4844));
const transition = opts => {
return new Promise((resolve, reject) => {
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.c)(() => {
beforeTransition(opts);
runTransition(opts).then(result => {
if (result.animation) {
result.animation.destroy();
}
afterTransition(opts);
resolve(result);
}, error => {
afterTransition(opts);
reject(error);
});
});
});
};
const beforeTransition = opts => {
const enteringEl = opts.enteringEl;
const leavingEl = opts.leavingEl;
setZIndex(enteringEl, leavingEl, opts.direction);
if (opts.showGoBack) {
enteringEl.classList.add('can-go-back');
} else {
enteringEl.classList.remove('can-go-back');
}
setPageHidden(enteringEl, false);
/**
* When transitioning, the page should not
* respond to click events. This resolves small
* issues like users double tapping the ion-back-button.
* These pointer events are removed in `afterTransition`.
*/
enteringEl.style.setProperty('pointer-events', 'none');
if (leavingEl) {
setPageHidden(leavingEl, false);
leavingEl.style.setProperty('pointer-events', 'none');
}
};
const runTransition = /*#__PURE__*/function () {
var _ref = (0,_Volumes_App_fm99_app_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (opts) {
const animationBuilder = yield getAnimationBuilder(opts);
const ani = animationBuilder && _index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.B.isBrowser ? animation(animationBuilder, opts) : noAnimation(opts); // fast path for no animation
return ani;
});
return function runTransition(_x) {
return _ref.apply(this, arguments);
};
}();
const afterTransition = opts => {
const enteringEl = opts.enteringEl;
const leavingEl = opts.leavingEl;
enteringEl.classList.remove('ion-page-invisible');
enteringEl.style.removeProperty('pointer-events');
if (leavingEl !== undefined) {
leavingEl.classList.remove('ion-page-invisible');
leavingEl.style.removeProperty('pointer-events');
}
};
const getAnimationBuilder = /*#__PURE__*/function () {
var _ref2 = (0,_Volumes_App_fm99_app_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (opts) {
if (!opts.leavingEl || !opts.animated || opts.duration === 0) {
return undefined;
}
if (opts.animationBuilder) {
return opts.animationBuilder;
}
const getAnimation = opts.mode === 'ios' ? (yield iosTransitionAnimation()).iosTransitionAnimation : (yield mdTransitionAnimation()).mdTransitionAnimation;
return getAnimation;
});
return function getAnimationBuilder(_x2) {
return _ref2.apply(this, arguments);
};
}();
const animation = /*#__PURE__*/function () {
var _ref3 = (0,_Volumes_App_fm99_app_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (animationBuilder, opts) {
yield waitForReady(opts, true);
const trans = animationBuilder(opts.baseEl, opts);
fireWillEvents(opts.enteringEl, opts.leavingEl);
const didComplete = yield playTransition(trans, opts);
if (opts.progressCallback) {
opts.progressCallback(undefined);
}
if (didComplete) {
fireDidEvents(opts.enteringEl, opts.leavingEl);
}
return {
hasCompleted: didComplete,
animation: trans
};
});
return function animation(_x3, _x4) {
return _ref3.apply(this, arguments);
};
}();
const noAnimation = /*#__PURE__*/function () {
var _ref4 = (0,_Volumes_App_fm99_app_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (opts) {
const enteringEl = opts.enteringEl;
const leavingEl = opts.leavingEl;
yield waitForReady(opts, false);
fireWillEvents(enteringEl, leavingEl);
fireDidEvents(enteringEl, leavingEl);
return {
hasCompleted: true
};
});
return function noAnimation(_x5) {
return _ref4.apply(this, arguments);
};
}();
const waitForReady = /*#__PURE__*/function () {
var _ref5 = (0,_Volumes_App_fm99_app_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (opts, defaultDeep) {
const deep = opts.deepWait !== undefined ? opts.deepWait : defaultDeep;
const promises = deep ? [deepReady(opts.enteringEl), deepReady(opts.leavingEl)] : [shallowReady(opts.enteringEl), shallowReady(opts.leavingEl)];
yield Promise.all(promises);
yield notifyViewReady(opts.viewIsReady, opts.enteringEl);
});
return function waitForReady(_x6, _x7) {
return _ref5.apply(this, arguments);
};
}();
const notifyViewReady = /*#__PURE__*/function () {
var _ref6 = (0,_Volumes_App_fm99_app_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (viewIsReady, enteringEl) {
if (viewIsReady) {
yield viewIsReady(enteringEl);
}
});
return function notifyViewReady(_x8, _x9) {
return _ref6.apply(this, arguments);
};
}();
const playTransition = (trans, opts) => {
const progressCallback = opts.progressCallback;
const promise = new Promise(resolve => {
trans.onFinish(currentStep => resolve(currentStep === 1));
}); // cool, let's do this, start the transition
if (progressCallback) {
// this is a swipe to go back, just get the transition progress ready
// kick off the swipe animation start
trans.progressStart(true);
progressCallback(trans);
} else {
// only the top level transition should actually start "play"
// kick it off and let it play through
// ******** DOM WRITE ****************
trans.play();
} // create a callback for when the animation is done
return promise;
};
const fireWillEvents = (enteringEl, leavingEl) => {
lifecycle(leavingEl, LIFECYCLE_WILL_LEAVE);
lifecycle(enteringEl, LIFECYCLE_WILL_ENTER);
};
const fireDidEvents = (enteringEl, leavingEl) => {
lifecycle(enteringEl, LIFECYCLE_DID_ENTER);
lifecycle(leavingEl, LIFECYCLE_DID_LEAVE);
};
const lifecycle = (el, eventName) => {
if (el) {
const ev = new CustomEvent(eventName, {
bubbles: false,
cancelable: false
});
el.dispatchEvent(ev);
}
};
const shallowReady = el => {
if (el) {
return new Promise(resolve => (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.c)(el, resolve));
}
return Promise.resolve();
};
const deepReady = /*#__PURE__*/function () {
var _ref7 = (0,_Volumes_App_fm99_app_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (el) {
const element = el;
if (element) {
if (element.componentOnReady != null) {
// eslint-disable-next-line custom-rules/no-component-on-ready-method
const stencilEl = yield element.componentOnReady();
if (stencilEl != null) {
return;
}
/**
* Custom elements in Stencil will have __registerHost.
*/
} else if (element.__registerHost != null) {
/**
* Non-lazy loaded custom elements need to wait
* one frame for component to be loaded.
*/
const waitForCustomElement = new Promise(resolve => (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.r)(resolve));
yield waitForCustomElement;
return;
}
yield Promise.all(Array.from(element.children).map(deepReady));
}
});
return function deepReady(_x10) {
return _ref7.apply(this, arguments);
};
}();
const setPageHidden = (el, hidden) => {
if (hidden) {
el.setAttribute('aria-hidden', 'true');
el.classList.add('ion-page-hidden');
} else {
el.hidden = false;
el.removeAttribute('aria-hidden');
el.classList.remove('ion-page-hidden');
}
};
const setZIndex = (enteringEl, leavingEl, direction) => {
if (enteringEl !== undefined) {
enteringEl.style.zIndex = direction === 'back' ? '99' : '101';
}
if (leavingEl !== undefined) {
leavingEl.style.zIndex = '100';
}
};
const getIonPageElement = element => {
if (element.classList.contains('ion-page')) {
return element;
}
const ionPage = element.querySelector(':scope > .ion-page, :scope > ion-nav, :scope > ion-tabs');
if (ionPage) {
return ionPage;
} // idk, return the original element so at least something animates and we don't have a null pointer
return element;
};
/***/ }),
/***/ 9286:
/*!*************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/index-f8d8aa5a.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "GESTURE_CONTROLLER": () => (/* reexport safe */ _gesture_controller_17060b7c_js__WEBPACK_IMPORTED_MODULE_0__.G),
/* harmony export */ "createGesture": () => (/* binding */ createGesture)
/* harmony export */ });
/* harmony import */ var _gesture_controller_17060b7c_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./gesture-controller-17060b7c.js */ 6379);
/*!
* (C) Ionic http://ionicframework.com - MIT License
*/
const addEventListener = (el, eventName, callback, opts) => {
// use event listener options when supported
// otherwise it's just a boolean for the "capture" arg
const listenerOpts = supportsPassive(el) ? {
capture: !!opts.capture,
passive: !!opts.passive
} : !!opts.capture;
let add;
let remove;
if (el['__zone_symbol__addEventListener']) {
add = '__zone_symbol__addEventListener';
remove = '__zone_symbol__removeEventListener';
} else {
add = 'addEventListener';
remove = 'removeEventListener';
}
el[add](eventName, callback, listenerOpts);
return () => {
el[remove](eventName, callback, listenerOpts);
};
};
const supportsPassive = node => {
if (_sPassive === undefined) {
try {
const opts = Object.defineProperty({}, 'passive', {
get: () => {
_sPassive = true;
}
});
node.addEventListener('optsTest', () => {
return;
}, opts);
} catch (e) {
_sPassive = false;
}
}
return !!_sPassive;
};
let _sPassive;
const MOUSE_WAIT = 2000;
const createPointerEvents = (el, pointerDown, pointerMove, pointerUp, options) => {
let rmTouchStart;
let rmTouchMove;
let rmTouchEnd;
let rmTouchCancel;
let rmMouseStart;
let rmMouseMove;
let rmMouseUp;
let lastTouchEvent = 0;
const handleTouchStart = ev => {
lastTouchEvent = Date.now() + MOUSE_WAIT;
if (!pointerDown(ev)) {
return;
}
if (!rmTouchMove && pointerMove) {
rmTouchMove = addEventListener(el, 'touchmove', pointerMove, options);
}
/**
* Events are dispatched on the element that is tapped and bubble up to
* the reference element in the gesture. In the event that the element this
* event was first dispatched on is removed from the DOM, the event will no
* longer bubble up to our reference element. This leaves the gesture in an
* unusable state. To account for this, the touchend and touchcancel listeners
* should be added to the event target so that they still fire even if the target
* is removed from the DOM.
*/
if (!rmTouchEnd) {
rmTouchEnd = addEventListener(ev.target, 'touchend', handleTouchEnd, options);
}
if (!rmTouchCancel) {
rmTouchCancel = addEventListener(ev.target, 'touchcancel', handleTouchEnd, options);
}
};
const handleMouseDown = ev => {
if (lastTouchEvent > Date.now()) {
return;
}
if (!pointerDown(ev)) {
return;
}
if (!rmMouseMove && pointerMove) {
rmMouseMove = addEventListener(getDocument(el), 'mousemove', pointerMove, options);
}
if (!rmMouseUp) {
rmMouseUp = addEventListener(getDocument(el), 'mouseup', handleMouseUp, options);
}
};
const handleTouchEnd = ev => {
stopTouch();
if (pointerUp) {
pointerUp(ev);
}
};
const handleMouseUp = ev => {
stopMouse();
if (pointerUp) {
pointerUp(ev);
}
};
const stopTouch = () => {
if (rmTouchMove) {
rmTouchMove();
}
if (rmTouchEnd) {
rmTouchEnd();
}
if (rmTouchCancel) {
rmTouchCancel();
}
rmTouchMove = rmTouchEnd = rmTouchCancel = undefined;
};
const stopMouse = () => {
if (rmMouseMove) {
rmMouseMove();
}
if (rmMouseUp) {
rmMouseUp();
}
rmMouseMove = rmMouseUp = undefined;
};
const stop = () => {
stopTouch();
stopMouse();
};
const enable = (isEnabled = true) => {
if (!isEnabled) {
if (rmTouchStart) {
rmTouchStart();
}
if (rmMouseStart) {
rmMouseStart();
}
rmTouchStart = rmMouseStart = undefined;
stop();
} else {
if (!rmTouchStart) {
rmTouchStart = addEventListener(el, 'touchstart', handleTouchStart, options);
}
if (!rmMouseStart) {
rmMouseStart = addEventListener(el, 'mousedown', handleMouseDown, options);
}
}
};
const destroy = () => {
enable(false);
pointerUp = pointerMove = pointerDown = undefined;
};
return {
enable,
stop,
destroy
};
};
const getDocument = node => {
return node instanceof Document ? node : node.ownerDocument;
};
const createPanRecognizer = (direction, thresh, maxAngle) => {
const radians = maxAngle * (Math.PI / 180);
const isDirX = direction === 'x';
const maxCosine = Math.cos(radians);
const threshold = thresh * thresh;
let startX = 0;
let startY = 0;
let dirty = false;
let isPan = 0;
return {
start(x, y) {
startX = x;
startY = y;
isPan = 0;
dirty = true;
},
detect(x, y) {
if (!dirty) {
return false;
}
const deltaX = x - startX;
const deltaY = y - startY;
const distance = deltaX * deltaX + deltaY * deltaY;
if (distance < threshold) {
return false;
}
const hypotenuse = Math.sqrt(distance);
const cosine = (isDirX ? deltaX : deltaY) / hypotenuse;
if (cosine > maxCosine) {
isPan = 1;
} else if (cosine < -maxCosine) {
isPan = -1;
} else {
isPan = 0;
}
dirty = false;
return true;
},
isGesture() {
return isPan !== 0;
},
getDirection() {
return isPan;
}
};
};
const createGesture = config => {
let hasCapturedPan = false;
let hasStartedPan = false;
let hasFiredStart = true;
let isMoveQueued = false;
const finalConfig = Object.assign({
disableScroll: false,
direction: 'x',
gesturePriority: 0,
passive: true,
maxAngle: 40,
threshold: 10
}, config);
const canStart = finalConfig.canStart;
const onWillStart = finalConfig.onWillStart;
const onStart = finalConfig.onStart;
const onEnd = finalConfig.onEnd;
const notCaptured = finalConfig.notCaptured;
const onMove = finalConfig.onMove;
const threshold = finalConfig.threshold;
const passive = finalConfig.passive;
const blurOnStart = finalConfig.blurOnStart;
const detail = {
type: 'pan',
startX: 0,
startY: 0,
startTime: 0,
currentX: 0,
currentY: 0,
velocityX: 0,
velocityY: 0,
deltaX: 0,
deltaY: 0,
currentTime: 0,
event: undefined,
data: undefined
};
const pan = createPanRecognizer(finalConfig.direction, finalConfig.threshold, finalConfig.maxAngle);
const gesture = _gesture_controller_17060b7c_js__WEBPACK_IMPORTED_MODULE_0__.G.createGesture({
name: config.gestureName,
priority: config.gesturePriority,
disableScroll: config.disableScroll
});
const pointerDown = ev => {
const timeStamp = now(ev);
if (hasStartedPan || !hasFiredStart) {
return false;
}
updateDetail(ev, detail);
detail.startX = detail.currentX;
detail.startY = detail.currentY;
detail.startTime = detail.currentTime = timeStamp;
detail.velocityX = detail.velocityY = detail.deltaX = detail.deltaY = 0;
detail.event = ev; // Check if gesture can start
if (canStart && canStart(detail) === false) {
return false;
} // Release fallback
gesture.release(); // Start gesture
if (!gesture.start()) {
return false;
}
hasStartedPan = true;
if (threshold === 0) {
return tryToCapturePan();
}
pan.start(detail.startX, detail.startY);
return true;
};
const pointerMove = ev => {
// fast path, if gesture is currently captured
// do minimum job to get user-land even dispatched
if (hasCapturedPan) {
if (!isMoveQueued && hasFiredStart) {
isMoveQueued = true;
calcGestureData(detail, ev);
requestAnimationFrame(fireOnMove);
}
return;
} // gesture is currently being detected
calcGestureData(detail, ev);
if (pan.detect(detail.currentX, detail.currentY)) {
if (!pan.isGesture() || !tryToCapturePan()) {
abortGesture();
}
}
};
const fireOnMove = () => {
// Since fireOnMove is called inside a RAF, onEnd() might be called,
// we must double check hasCapturedPan
if (!hasCapturedPan) {
return;
}
isMoveQueued = false;
if (onMove) {
onMove(detail);
}
};
const tryToCapturePan = () => {
if (!gesture.capture()) {
return false;
}
hasCapturedPan = true;
hasFiredStart = false; // reset start position since the real user-land event starts here
// If the pan detector threshold is big, not resetting the start position
// will cause a jump in the animation equal to the detector threshold.
// the array of positions used to calculate the gesture velocity does not
// need to be cleaned, more points in the positions array always results in a
// more accurate value of the velocity.
detail.startX = detail.currentX;
detail.startY = detail.currentY;
detail.startTime = detail.currentTime;
if (onWillStart) {
onWillStart(detail).then(fireOnStart);
} else {
fireOnStart();
}
return true;
};
const blurActiveElement = () => {
if (typeof document !== 'undefined') {
const activeElement = document.activeElement;
if (activeElement === null || activeElement === void 0 ? void 0 : activeElement.blur) {
activeElement.blur();
}
}
};
const fireOnStart = () => {
if (blurOnStart) {
blurActiveElement();
}
if (onStart) {
onStart(detail);
}
hasFiredStart = true;
};
const reset = () => {
hasCapturedPan = false;
hasStartedPan = false;
isMoveQueued = false;
hasFiredStart = true;
gesture.release();
}; // END *************************
const pointerUp = ev => {
const tmpHasCaptured = hasCapturedPan;
const tmpHasFiredStart = hasFiredStart;
reset();
if (!tmpHasFiredStart) {
return;
}
calcGestureData(detail, ev); // Try to capture press
if (tmpHasCaptured) {
if (onEnd) {
onEnd(detail);
}
return;
} // Not captured any event
if (notCaptured) {
notCaptured(detail);
}
};
const pointerEvents = createPointerEvents(finalConfig.el, pointerDown, pointerMove, pointerUp, {
capture: false,
passive
});
const abortGesture = () => {
reset();
pointerEvents.stop();
if (notCaptured) {
notCaptured(detail);
}
};
return {
enable(enable = true) {
if (!enable) {
if (hasCapturedPan) {
pointerUp(undefined);
}
reset();
}
pointerEvents.enable(enable);
},
destroy() {
gesture.destroy();
pointerEvents.destroy();
}
};
};
const calcGestureData = (detail, ev) => {
if (!ev) {
return;
}
const prevX = detail.currentX;
const prevY = detail.currentY;
const prevT = detail.currentTime;
updateDetail(ev, detail);
const currentX = detail.currentX;
const currentY = detail.currentY;
const timestamp = detail.currentTime = now(ev);
const timeDelta = timestamp - prevT;
if (timeDelta > 0 && timeDelta < 100) {
const velocityX = (currentX - prevX) / timeDelta;
const velocityY = (currentY - prevY) / timeDelta;
detail.velocityX = velocityX * 0.7 + detail.velocityX * 0.3;
detail.velocityY = velocityY * 0.7 + detail.velocityY * 0.3;
}
detail.deltaX = currentX - detail.startX;
detail.deltaY = currentY - detail.startY;
detail.event = ev;
};
const updateDetail = (ev, detail) => {
// get X coordinates for either a mouse click
// or a touch depending on the given event
let x = 0;
let y = 0;
if (ev) {
const changedTouches = ev.changedTouches;
if (changedTouches && changedTouches.length > 0) {
const touch = changedTouches[0];
x = touch.clientX;
y = touch.clientY;
} else if (ev.pageX !== undefined) {
x = ev.pageX;
y = ev.pageY;
}
}
detail.currentX = x;
detail.currentY = y;
};
const now = ev => {
return ev.timeStamp || Date.now();
};
/***/ }),
/***/ 6710:
/*!****************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/index.js ***!
\****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "IonicSafeString": () => (/* reexport safe */ _index_dff497fb_js__WEBPACK_IMPORTED_MODULE_7__.I),
/* harmony export */ "IonicSlides": () => (/* binding */ IonicSlides),
/* harmony export */ "IonicSwiper": () => (/* binding */ IonicSwiper),
/* harmony export */ "LIFECYCLE_DID_ENTER": () => (/* reexport safe */ _index_e6cecce9_js__WEBPACK_IMPORTED_MODULE_8__.a),
/* harmony export */ "LIFECYCLE_DID_LEAVE": () => (/* reexport safe */ _index_e6cecce9_js__WEBPACK_IMPORTED_MODULE_8__.c),
/* harmony export */ "LIFECYCLE_WILL_ENTER": () => (/* reexport safe */ _index_e6cecce9_js__WEBPACK_IMPORTED_MODULE_8__.L),
/* harmony export */ "LIFECYCLE_WILL_LEAVE": () => (/* reexport safe */ _index_e6cecce9_js__WEBPACK_IMPORTED_MODULE_8__.b),
/* harmony export */ "LIFECYCLE_WILL_UNLOAD": () => (/* reexport safe */ _index_e6cecce9_js__WEBPACK_IMPORTED_MODULE_8__.d),
/* harmony export */ "actionSheetController": () => (/* reexport safe */ _overlays_87c7c7cb_js__WEBPACK_IMPORTED_MODULE_10__.b),
/* harmony export */ "alertController": () => (/* reexport safe */ _overlays_87c7c7cb_js__WEBPACK_IMPORTED_MODULE_10__.a),
/* harmony export */ "componentOnReady": () => (/* reexport safe */ _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_6__.c),
/* harmony export */ "createAnimation": () => (/* reexport safe */ _animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c),
/* harmony export */ "createGesture": () => (/* reexport safe */ _index_f8d8aa5a_js__WEBPACK_IMPORTED_MODULE_4__.createGesture),
/* harmony export */ "getMode": () => (/* binding */ getMode),
/* harmony export */ "getPlatforms": () => (/* reexport safe */ _ionic_global_c95cf239_js__WEBPACK_IMPORTED_MODULE_5__.g),
/* harmony export */ "getTimeGivenProgression": () => (/* reexport safe */ _cubic_bezier_c313947a_js__WEBPACK_IMPORTED_MODULE_3__.g),
/* harmony export */ "initialize": () => (/* reexport safe */ _ionic_global_c95cf239_js__WEBPACK_IMPORTED_MODULE_5__.i),
/* harmony export */ "iosTransitionAnimation": () => (/* reexport safe */ _ios_transition_a4006a5a_js__WEBPACK_IMPORTED_MODULE_1__.iosTransitionAnimation),
/* harmony export */ "isPlatform": () => (/* reexport safe */ _ionic_global_c95cf239_js__WEBPACK_IMPORTED_MODULE_5__.a),
/* harmony export */ "loadingController": () => (/* reexport safe */ _overlays_87c7c7cb_js__WEBPACK_IMPORTED_MODULE_10__.l),
/* harmony export */ "mdTransitionAnimation": () => (/* reexport safe */ _md_transition_3924e170_js__WEBPACK_IMPORTED_MODULE_2__.mdTransitionAnimation),
/* harmony export */ "menuController": () => (/* reexport safe */ _index_41145c2b_js__WEBPACK_IMPORTED_MODULE_9__.m),
/* harmony export */ "modalController": () => (/* reexport safe */ _overlays_87c7c7cb_js__WEBPACK_IMPORTED_MODULE_10__.m),
/* harmony export */ "pickerController": () => (/* reexport safe */ _overlays_87c7c7cb_js__WEBPACK_IMPORTED_MODULE_10__.p),
/* harmony export */ "popoverController": () => (/* reexport safe */ _overlays_87c7c7cb_js__WEBPACK_IMPORTED_MODULE_10__.c),
/* harmony export */ "setupConfig": () => (/* binding */ setupConfig),
/* harmony export */ "toastController": () => (/* reexport safe */ _overlays_87c7c7cb_js__WEBPACK_IMPORTED_MODULE_10__.t)
/* harmony export */ });
/* harmony import */ var _animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./animation-2c50d24d.js */ 631);
/* harmony import */ var _ios_transition_a4006a5a_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ios.transition-a4006a5a.js */ 7938);
/* harmony import */ var _md_transition_3924e170_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./md.transition-3924e170.js */ 4844);
/* harmony import */ var _cubic_bezier_c313947a_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cubic-bezier-c313947a.js */ 1077);
/* harmony import */ var _index_f8d8aa5a_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index-f8d8aa5a.js */ 9286);
/* harmony import */ var _ionic_global_c95cf239_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ionic-global-c95cf239.js */ 8607);
/* harmony import */ var _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers-3b390e48.js */ 9234);
/* harmony import */ var _index_dff497fb_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./index-dff497fb.js */ 1652);
/* harmony import */ var _index_e6cecce9_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./index-e6cecce9.js */ 9287);
/* harmony import */ var _index_41145c2b_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./index-41145c2b.js */ 8923);
/* harmony import */ var _overlays_87c7c7cb_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./overlays-87c7c7cb.js */ 2752);
/* harmony import */ var _index_33ffec25_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./index-33ffec25.js */ 2286);
/* harmony import */ var _gesture_controller_17060b7c_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./gesture-controller-17060b7c.js */ 6379);
/* harmony import */ var _index_8e692445_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./index-8e692445.js */ 1559);
/* harmony import */ var _hardware_back_button_490df115_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./hardware-back-button-490df115.js */ 159);
/*!
* (C) Ionic http://ionicframework.com - MIT License
*/
const setupConfig = config => {
const win = window;
const Ionic = win.Ionic; // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
if (Ionic && Ionic.config && Ionic.config.constructor.name !== 'Object') {
return;
}
win.Ionic = win.Ionic || {};
win.Ionic.config = Object.assign(Object.assign({}, win.Ionic.config), config);
return win.Ionic.config;
};
const getMode = () => {
var _a;
const win = window;
const config = (_a = win === null || win === void 0 ? void 0 : win.Ionic) === null || _a === void 0 ? void 0 : _a.config;
if (config) {
if (config.mode) {
return config.mode;
} else {
return config.get('mode');
}
}
return 'md';
};
/**
* This is a plugin for Swiper that allows it to work
* with Ionic Framework and the routing integrations.
* Without this plugin, Swiper would be incapable of correctly
* determining the dimensions of the slides component as
* each view is initially hidden before transitioning in.
*/
const setupSwiperInIonic = (swiper, watchForIonPageChanges = true) => {
if (typeof window === 'undefined') {
return;
}
const swiperEl = swiper.el;
const ionPage = swiperEl.closest('.ion-page');
if (!ionPage) {
if (watchForIonPageChanges) {
/**
* If no ion page found, it is possible
* that we are in the overlay setup step
* where the inner component has been
* created but not attached to the DOM yet.
* If so, wait for the .ion-page class to
* appear on the root div and re-run setup.
*/
const rootNode = swiperEl.getRootNode();
if (rootNode.tagName === 'DIV') {
const mo = new MutationObserver(m => {
const mutation = m[0];
const wasEmpty = mutation.oldValue === null;
const hasIonPage = rootNode.classList.contains('ion-page');
/**
* Now that we have an .ion-page class
* we can safely attempt setup again.
*/
if (wasEmpty && hasIonPage) {
mo.disconnect();
/**
* Set false here so we do not
* get infinite loops
*/
setupSwiperInIonic(swiper, false);
}
});
mo.observe(rootNode, {
attributeFilter: ['class'],
attributeOldValue: true
});
}
}
return;
}
/**
* If using slides in a modal or
* popover we need to wait for the
* overlay to be shown as these components
* are hidden when they are initially created.
*/
const modalOrPopover = swiperEl.closest('ion-modal, ion-popover');
if (modalOrPopover) {
const eventName = modalOrPopover.tagName === 'ION-MODAL' ? 'ionModalWillPresent' : 'ionPopoverWillPresent';
const overlayCallback = () => {
/**
* We need an raf here so the update
* is fired one tick after the overlay is shown.
*/
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_6__.r)(() => {
swiperEl.swiper.update();
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_6__.b)(modalOrPopover, eventName, overlayCallback);
});
};
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_6__.a)(modalOrPopover, eventName, overlayCallback);
} else {
/**
* If using slides in a page
* we need to wait for the ion-page-invisible
* class to be removed so Swiper can correctly
* compute the dimensions of the slides.
*/
const mo = new MutationObserver(m => {
var _a;
const mutation = m[0];
const wasPageHidden = (_a = mutation.oldValue) === null || _a === void 0 ? void 0 : _a.includes('ion-page-invisible');
const isPageHidden = ionPage.classList.contains('ion-page-invisible');
/**
* Only update Swiper if the page was
* hidden but is no longer hidden.
*/
if (!isPageHidden && isPageHidden !== wasPageHidden) {
swiperEl.swiper.update();
}
});
mo.observe(ionPage, {
attributeFilter: ['class'],
attributeOldValue: true
});
}
/**
* We also need to listen for the appload event
* which is emitted by Stencil in the
* event that Swiper is being used on the
* view that is rendered initially.
*/
const onAppLoad = () => {
swiperEl.swiper.update();
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_6__.b)(window, 'appload', onAppLoad);
};
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_6__.a)(window, 'appload', onAppLoad);
};
const IonicSwiper = {
name: 'ionic',
on: {
afterInit(swiper) {
console.warn('[Deprecation Warning]: The IonicSwiper module has been deprecated in favor of the IonSlides module. This change was made to better support the Swiper 7 release. The IonicSwiper module will be removed in Ionic 7.0. See https://ionicframework.com/docs/api/slides#migration for revised migration steps.');
setupSwiperInIonic(swiper);
}
}
};
const IonicSlides = opts => {
const {
swiper,
extendParams
} = opts;
const slidesParams = {
effect: undefined,
direction: 'horizontal',
initialSlide: 0,
loop: false,
parallax: false,
slidesPerView: 1,
spaceBetween: 0,
speed: 300,
slidesPerColumn: 1,
slidesPerColumnFill: 'column',
slidesPerGroup: 1,
centeredSlides: false,
slidesOffsetBefore: 0,
slidesOffsetAfter: 0,
touchEventsTarget: 'container',
autoplay: false,
freeMode: false,
freeModeMomentum: true,
freeModeMomentumRatio: 1,
freeModeMomentumBounce: true,
freeModeMomentumBounceRatio: 1,
freeModeMomentumVelocityRatio: 1,
freeModeSticky: false,
freeModeMinimumVelocity: 0.02,
autoHeight: false,
setWrapperSize: false,
zoom: {
maxRatio: 3,
minRatio: 1,
toggle: false
},
touchRatio: 1,
touchAngle: 45,
simulateTouch: true,
touchStartPreventDefault: false,
shortSwipes: true,
longSwipes: true,
longSwipesRatio: 0.5,
longSwipesMs: 300,
followFinger: true,
threshold: 0,
touchMoveStopPropagation: true,
touchReleaseOnEdges: false,
iOSEdgeSwipeDetection: false,
iOSEdgeSwipeThreshold: 20,
resistance: true,
resistanceRatio: 0.85,
watchSlidesProgress: false,
watchSlidesVisibility: false,
preventClicks: true,
preventClicksPropagation: true,
slideToClickedSlide: false,
loopAdditionalSlides: 0,
noSwiping: true,
runCallbacksOnInit: true,
coverflowEffect: {
rotate: 50,
stretch: 0,
depth: 100,
modifier: 1,
slideShadows: true
},
flipEffect: {
slideShadows: true,
limitRotation: true
},
cubeEffect: {
slideShadows: true,
shadow: true,
shadowOffset: 20,
shadowScale: 0.94
},
fadeEffect: {
crossFade: false
},
a11y: {
prevSlideMessage: 'Previous slide',
nextSlideMessage: 'Next slide',
firstSlideMessage: 'This is the first slide',
lastSlideMessage: 'This is the last slide'
}
};
if (swiper.pagination) {
slidesParams.pagination = {
type: 'bullets',
clickable: false,
hideOnClick: false
};
}
if (swiper.scrollbar) {
slidesParams.scrollbar = {
hide: true
};
}
extendParams(slidesParams);
};
/***/ }),
/***/ 8607:
/*!********************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/ionic-global-c95cf239.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "a": () => (/* binding */ isPlatform),
/* harmony export */ "b": () => (/* binding */ getIonMode),
/* harmony export */ "c": () => (/* binding */ config),
/* harmony export */ "g": () => (/* binding */ getPlatforms),
/* harmony export */ "i": () => (/* binding */ initialize)
/* harmony export */ });
/* harmony import */ var _index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-8e692445.js */ 1559);
/*!
* (C) Ionic http://ionicframework.com - MIT License
*/
class Config {
constructor() {
this.m = new Map();
}
reset(configObj) {
this.m = new Map(Object.entries(configObj));
}
get(key, fallback) {
const value = this.m.get(key);
return value !== undefined ? value : fallback;
}
getBoolean(key, fallback = false) {
const val = this.m.get(key);
if (val === undefined) {
return fallback;
}
if (typeof val === 'string') {
return val === 'true';
}
return !!val;
}
getNumber(key, fallback) {
const val = parseFloat(this.m.get(key));
return isNaN(val) ? fallback !== undefined ? fallback : NaN : val;
}
set(key, value) {
this.m.set(key, value);
}
}
const config = /*@__PURE__*/new Config();
const configFromSession = win => {
try {
const configStr = win.sessionStorage.getItem(IONIC_SESSION_KEY);
return configStr !== null ? JSON.parse(configStr) : {};
} catch (e) {
return {};
}
};
const saveConfig = (win, c) => {
try {
win.sessionStorage.setItem(IONIC_SESSION_KEY, JSON.stringify(c));
} catch (e) {
return;
}
};
const configFromURL = win => {
const configObj = {};
win.location.search.slice(1).split('&').map(entry => entry.split('=')).map(([key, value]) => [decodeURIComponent(key), decodeURIComponent(value)]).filter(([key]) => startsWith(key, IONIC_PREFIX)).map(([key, value]) => [key.slice(IONIC_PREFIX.length), value]).forEach(([key, value]) => {
configObj[key] = value;
});
return configObj;
};
const startsWith = (input, search) => {
return input.substr(0, search.length) === search;
};
const IONIC_PREFIX = 'ionic:';
const IONIC_SESSION_KEY = 'ionic-persist-config';
const getPlatforms = win => setupPlatforms(win);
const isPlatform = (winOrPlatform, platform) => {
if (typeof winOrPlatform === 'string') {
platform = winOrPlatform;
winOrPlatform = undefined;
}
return getPlatforms(winOrPlatform).includes(platform);
};
const setupPlatforms = (win = window) => {
if (typeof win === 'undefined') {
return [];
}
win.Ionic = win.Ionic || {};
let platforms = win.Ionic.platforms;
if (platforms == null) {
platforms = win.Ionic.platforms = detectPlatforms(win);
platforms.forEach(p => win.document.documentElement.classList.add(`plt-${p}`));
}
return platforms;
};
const detectPlatforms = win => {
const customPlatformMethods = config.get('platform');
return Object.keys(PLATFORMS_MAP).filter(p => {
const customMethod = customPlatformMethods === null || customPlatformMethods === void 0 ? void 0 : customPlatformMethods[p];
return typeof customMethod === 'function' ? customMethod(win) : PLATFORMS_MAP[p](win);
});
};
const isMobileWeb = win => isMobile(win) && !isHybrid(win);
const isIpad = win => {
// iOS 12 and below
if (testUserAgent(win, /iPad/i)) {
return true;
} // iOS 13+
if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
return true;
}
return false;
};
const isIphone = win => testUserAgent(win, /iPhone/i);
const isIOS = win => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);
const isAndroid = win => testUserAgent(win, /android|sink/i);
const isAndroidTablet = win => {
return isAndroid(win) && !testUserAgent(win, /mobile/i);
};
const isPhablet = win => {
const width = win.innerWidth;
const height = win.innerHeight;
const smallest = Math.min(width, height);
const largest = Math.max(width, height);
return smallest > 390 && smallest < 520 && largest > 620 && largest < 800;
};
const isTablet = win => {
const width = win.innerWidth;
const height = win.innerHeight;
const smallest = Math.min(width, height);
const largest = Math.max(width, height);
return isIpad(win) || isAndroidTablet(win) || smallest > 460 && smallest < 820 && largest > 780 && largest < 1400;
};
const isMobile = win => matchMedia(win, '(any-pointer:coarse)');
const isDesktop = win => !isMobile(win);
const isHybrid = win => isCordova(win) || isCapacitorNative(win);
const isCordova = win => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
const isCapacitorNative = win => {
const capacitor = win['Capacitor'];
return !!(capacitor === null || capacitor === void 0 ? void 0 : capacitor.isNative);
};
const isElectron = win => testUserAgent(win, /electron/i);
const isPWA = win => {
var _a;
return !!(((_a = win.matchMedia) === null || _a === void 0 ? void 0 : _a.call(win, '(display-mode: standalone)').matches) || win.navigator.standalone);
};
const testUserAgent = (win, expr) => expr.test(win.navigator.userAgent);
const matchMedia = (win, query) => {
var _a;
return (_a = win.matchMedia) === null || _a === void 0 ? void 0 : _a.call(win, query).matches;
};
const PLATFORMS_MAP = {
ipad: isIpad,
iphone: isIphone,
ios: isIOS,
android: isAndroid,
phablet: isPhablet,
tablet: isTablet,
cordova: isCordova,
capacitor: isCapacitorNative,
electron: isElectron,
pwa: isPWA,
mobile: isMobile,
mobileweb: isMobileWeb,
desktop: isDesktop,
hybrid: isHybrid
};
let defaultMode;
const getIonMode = ref => {
return ref && (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.g)(ref) || defaultMode;
};
const initialize = (userConfig = {}) => {
if (typeof window === 'undefined') {
return;
}
const doc = window.document;
const win = window;
const Ionic = win.Ionic = win.Ionic || {};
const platformHelpers = {};
if (userConfig._ael) {
platformHelpers.ael = userConfig._ael;
}
if (userConfig._rel) {
platformHelpers.rel = userConfig._rel;
}
if (userConfig._ce) {
platformHelpers.ce = userConfig._ce;
}
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.s)(platformHelpers); // create the Ionic.config from raw config object (if it exists)
// and convert Ionic.config into a ConfigApi that has a get() fn
const configObj = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, configFromSession(win)), {
persistConfig: false
}), Ionic.config), configFromURL(win)), userConfig);
config.reset(configObj);
if (config.getBoolean('persistConfig')) {
saveConfig(win, configObj);
} // Setup platforms
setupPlatforms(win); // first see if the mode was set as an attribute on
// which could have been set by the user, or by pre-rendering
// otherwise get the mode via config settings, and fallback to md
Ionic.config = config;
Ionic.mode = defaultMode = config.get('mode', doc.documentElement.getAttribute('mode') || (isPlatform(win, 'ios') ? 'ios' : 'md'));
config.set('mode', defaultMode);
doc.documentElement.setAttribute('mode', defaultMode);
doc.documentElement.classList.add(defaultMode);
if (config.getBoolean('_testing')) {
config.set('animated', false);
}
const isIonicElement = elm => {
var _a;
return (_a = elm.tagName) === null || _a === void 0 ? void 0 : _a.startsWith('ION-');
};
const isAllowedIonicModeValue = elmMode => ['ios', 'md'].includes(elmMode);
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.a)(elm => {
while (elm) {
const elmMode = elm.mode || elm.getAttribute('mode');
if (elmMode) {
if (isAllowedIonicModeValue(elmMode)) {
return elmMode;
} else if (isIonicElement(elm)) {
console.warn('Invalid ionic mode: "' + elmMode + '", expected: "ios" or "md"');
}
}
elm = elm.parentElement;
}
return defaultMode;
});
};
/***/ }),
/***/ 7938:
/*!**********************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/ios.transition-a4006a5a.js ***!
\**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "iosTransitionAnimation": () => (/* binding */ iosTransitionAnimation),
/* harmony export */ "shadow": () => (/* binding */ shadow)
/* harmony export */ });
/* harmony import */ var _animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./animation-2c50d24d.js */ 631);
/* harmony import */ var _index_e6cecce9_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index-e6cecce9.js */ 9287);
/* harmony import */ var _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-3b390e48.js */ 9234);
/* harmony import */ var _index_33ffec25_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index-33ffec25.js */ 2286);
/* harmony import */ var _index_8e692445_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index-8e692445.js */ 1559);
/*!
* (C) Ionic http://ionicframework.com - MIT License
*/
const DURATION = 540;
const getClonedElement = tagName => {
return document.querySelector(`${tagName}.ion-cloned-element`);
};
const shadow = el => {
return el.shadowRoot || el;
};
const getLargeTitle = refEl => {
const tabs = refEl.tagName === 'ION-TABS' ? refEl : refEl.querySelector('ion-tabs');
const query = 'ion-content ion-header:not(.header-collapse-condense-inactive) ion-title.title-large';
if (tabs != null) {
const activeTab = tabs.querySelector('ion-tab:not(.tab-hidden), .ion-page:not(.ion-page-hidden)');
return activeTab != null ? activeTab.querySelector(query) : null;
}
return refEl.querySelector(query);
};
const getBackButton = (refEl, backDirection) => {
const tabs = refEl.tagName === 'ION-TABS' ? refEl : refEl.querySelector('ion-tabs');
let buttonsList = [];
if (tabs != null) {
const activeTab = tabs.querySelector('ion-tab:not(.tab-hidden), .ion-page:not(.ion-page-hidden)');
if (activeTab != null) {
buttonsList = activeTab.querySelectorAll('ion-buttons');
}
} else {
buttonsList = refEl.querySelectorAll('ion-buttons');
}
for (const buttons of buttonsList) {
const parentHeader = buttons.closest('ion-header');
const activeHeader = parentHeader && !parentHeader.classList.contains('header-collapse-condense-inactive');
const backButton = buttons.querySelector('ion-back-button');
const buttonsCollapse = buttons.classList.contains('buttons-collapse');
const startSlot = buttons.slot === 'start' || buttons.slot === '';
if (backButton !== null && startSlot && (buttonsCollapse && activeHeader && backDirection || !buttonsCollapse)) {
return backButton;
}
}
return null;
};
const createLargeTitleTransition = (rootAnimation, rtl, backDirection, enteringEl, leavingEl) => {
const enteringBackButton = getBackButton(enteringEl, backDirection);
const leavingLargeTitle = getLargeTitle(leavingEl);
const enteringLargeTitle = getLargeTitle(enteringEl);
const leavingBackButton = getBackButton(leavingEl, backDirection);
const shouldAnimationForward = enteringBackButton !== null && leavingLargeTitle !== null && !backDirection;
const shouldAnimationBackward = enteringLargeTitle !== null && leavingBackButton !== null && backDirection;
if (shouldAnimationForward) {
const leavingLargeTitleBox = leavingLargeTitle.getBoundingClientRect();
const enteringBackButtonBox = enteringBackButton.getBoundingClientRect();
animateLargeTitle(rootAnimation, rtl, backDirection, leavingLargeTitle, leavingLargeTitleBox, enteringBackButtonBox);
animateBackButton(rootAnimation, rtl, backDirection, enteringBackButton, leavingLargeTitleBox, enteringBackButtonBox);
} else if (shouldAnimationBackward) {
const enteringLargeTitleBox = enteringLargeTitle.getBoundingClientRect();
const leavingBackButtonBox = leavingBackButton.getBoundingClientRect();
animateLargeTitle(rootAnimation, rtl, backDirection, enteringLargeTitle, enteringLargeTitleBox, leavingBackButtonBox);
animateBackButton(rootAnimation, rtl, backDirection, leavingBackButton, enteringLargeTitleBox, leavingBackButtonBox);
}
return {
forward: shouldAnimationForward,
backward: shouldAnimationBackward
};
};
const animateBackButton = (rootAnimation, rtl, backDirection, backButtonEl, largeTitleBox, backButtonBox) => {
const BACK_BUTTON_START_OFFSET = rtl ? `calc(100% - ${backButtonBox.right + 4}px)` : `${backButtonBox.left - 4}px`;
const START_TEXT_TRANSLATE = rtl ? '7px' : '-7px';
const END_TEXT_TRANSLATE = rtl ? '-4px' : '4px';
const ICON_TRANSLATE = rtl ? '-4px' : '4px';
const TEXT_ORIGIN_X = rtl ? 'right' : 'left';
const ICON_ORIGIN_X = rtl ? 'left' : 'right';
const FORWARD_TEXT_KEYFRAMES = [{
offset: 0,
opacity: 0,
transform: `translate3d(${START_TEXT_TRANSLATE}, ${largeTitleBox.top - 40}px, 0) scale(2.1)`
}, {
offset: 1,
opacity: 1,
transform: `translate3d(${END_TEXT_TRANSLATE}, ${backButtonBox.top - 46}px, 0) scale(1)`
}];
const BACKWARD_TEXT_KEYFRAMES = [{
offset: 0,
opacity: 1,
transform: `translate3d(${END_TEXT_TRANSLATE}, ${backButtonBox.top - 46}px, 0) scale(1)`
}, {
offset: 0.6,
opacity: 0
}, {
offset: 1,
opacity: 0,
transform: `translate3d(${START_TEXT_TRANSLATE}, ${largeTitleBox.top - 40}px, 0) scale(2.1)`
}];
const TEXT_KEYFRAMES = backDirection ? BACKWARD_TEXT_KEYFRAMES : FORWARD_TEXT_KEYFRAMES;
const FORWARD_ICON_KEYFRAMES = [{
offset: 0,
opacity: 0,
transform: `translate3d(${ICON_TRANSLATE}, ${backButtonBox.top - 41}px, 0) scale(0.6)`
}, {
offset: 1,
opacity: 1,
transform: `translate3d(${ICON_TRANSLATE}, ${backButtonBox.top - 46}px, 0) scale(1)`
}];
const BACKWARD_ICON_KEYFRAMES = [{
offset: 0,
opacity: 1,
transform: `translate3d(${ICON_TRANSLATE}, ${backButtonBox.top - 46}px, 0) scale(1)`
}, {
offset: 0.2,
opacity: 0,
transform: `translate3d(${ICON_TRANSLATE}, ${backButtonBox.top - 41}px, 0) scale(0.6)`
}, {
offset: 1,
opacity: 0,
transform: `translate3d(${ICON_TRANSLATE}, ${backButtonBox.top - 41}px, 0) scale(0.6)`
}];
const ICON_KEYFRAMES = backDirection ? BACKWARD_ICON_KEYFRAMES : FORWARD_ICON_KEYFRAMES;
const enteringBackButtonTextAnimation = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
const enteringBackButtonIconAnimation = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
const clonedBackButtonEl = getClonedElement('ion-back-button');
const backButtonTextEl = shadow(clonedBackButtonEl).querySelector('.button-text');
const backButtonIconEl = shadow(clonedBackButtonEl).querySelector('ion-icon');
clonedBackButtonEl.text = backButtonEl.text;
clonedBackButtonEl.mode = backButtonEl.mode;
clonedBackButtonEl.icon = backButtonEl.icon;
clonedBackButtonEl.color = backButtonEl.color;
clonedBackButtonEl.disabled = backButtonEl.disabled;
clonedBackButtonEl.style.setProperty('display', 'block');
clonedBackButtonEl.style.setProperty('position', 'fixed');
enteringBackButtonIconAnimation.addElement(backButtonIconEl);
enteringBackButtonTextAnimation.addElement(backButtonTextEl);
enteringBackButtonTextAnimation.beforeStyles({
'transform-origin': `${TEXT_ORIGIN_X} center`
}).beforeAddWrite(() => {
backButtonEl.style.setProperty('display', 'none');
clonedBackButtonEl.style.setProperty(TEXT_ORIGIN_X, BACK_BUTTON_START_OFFSET);
}).afterAddWrite(() => {
backButtonEl.style.setProperty('display', '');
clonedBackButtonEl.style.setProperty('display', 'none');
clonedBackButtonEl.style.removeProperty(TEXT_ORIGIN_X);
}).keyframes(TEXT_KEYFRAMES);
enteringBackButtonIconAnimation.beforeStyles({
'transform-origin': `${ICON_ORIGIN_X} center`
}).keyframes(ICON_KEYFRAMES);
rootAnimation.addAnimation([enteringBackButtonTextAnimation, enteringBackButtonIconAnimation]);
};
const animateLargeTitle = (rootAnimation, rtl, backDirection, largeTitleEl, largeTitleBox, backButtonBox) => {
const TITLE_START_OFFSET = rtl ? `calc(100% - ${largeTitleBox.right}px)` : `${largeTitleBox.left}px`;
const START_TRANSLATE = rtl ? '-18px' : '18px';
const ORIGIN_X = rtl ? 'right' : 'left';
const BACKWARDS_KEYFRAMES = [{
offset: 0,
opacity: 0,
transform: `translate3d(${START_TRANSLATE}, ${backButtonBox.top - 4}px, 0) scale(0.49)`
}, {
offset: 0.1,
opacity: 0
}, {
offset: 1,
opacity: 1,
transform: `translate3d(0, ${largeTitleBox.top - 2}px, 0) scale(1)`
}];
const FORWARDS_KEYFRAMES = [{
offset: 0,
opacity: 0.99,
transform: `translate3d(0, ${largeTitleBox.top - 2}px, 0) scale(1)`
}, {
offset: 0.6,
opacity: 0
}, {
offset: 1,
opacity: 0,
transform: `translate3d(${START_TRANSLATE}, ${backButtonBox.top - 4}px, 0) scale(0.5)`
}];
const KEYFRAMES = backDirection ? BACKWARDS_KEYFRAMES : FORWARDS_KEYFRAMES;
const clonedTitleEl = getClonedElement('ion-title');
const clonedLargeTitleAnimation = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
clonedTitleEl.innerText = largeTitleEl.innerText;
clonedTitleEl.size = largeTitleEl.size;
clonedTitleEl.color = largeTitleEl.color;
clonedLargeTitleAnimation.addElement(clonedTitleEl);
clonedLargeTitleAnimation.beforeStyles({
'transform-origin': `${ORIGIN_X} center`,
height: '46px',
display: '',
position: 'relative',
[ORIGIN_X]: TITLE_START_OFFSET
}).beforeAddWrite(() => {
largeTitleEl.style.setProperty('display', 'none');
}).afterAddWrite(() => {
largeTitleEl.style.setProperty('display', '');
clonedTitleEl.style.setProperty('display', 'none');
}).keyframes(KEYFRAMES);
rootAnimation.addAnimation(clonedLargeTitleAnimation);
};
const iosTransitionAnimation = (navEl, opts) => {
var _a;
try {
const EASING = 'cubic-bezier(0.32,0.72,0,1)';
const OPACITY = 'opacity';
const TRANSFORM = 'transform';
const CENTER = '0%';
const OFF_OPACITY = 0.8;
const isRTL = navEl.ownerDocument.dir === 'rtl';
const OFF_RIGHT = isRTL ? '-99.5%' : '99.5%';
const OFF_LEFT = isRTL ? '33%' : '-33%';
const enteringEl = opts.enteringEl;
const leavingEl = opts.leavingEl;
const backDirection = opts.direction === 'back';
const contentEl = enteringEl.querySelector(':scope > ion-content');
const headerEls = enteringEl.querySelectorAll(':scope > ion-header > *:not(ion-toolbar), :scope > ion-footer > *');
const enteringToolBarEls = enteringEl.querySelectorAll(':scope > ion-header > ion-toolbar');
const rootAnimation = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
const enteringContentAnimation = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
rootAnimation.addElement(enteringEl).duration(((_a = opts.duration) !== null && _a !== void 0 ? _a : 0) || DURATION).easing(opts.easing || EASING).fill('both').beforeRemoveClass('ion-page-invisible');
if (leavingEl && navEl !== null && navEl !== undefined) {
const navDecorAnimation = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
navDecorAnimation.addElement(navEl);
rootAnimation.addAnimation(navDecorAnimation);
}
if (!contentEl && enteringToolBarEls.length === 0 && headerEls.length === 0) {
enteringContentAnimation.addElement(enteringEl.querySelector(':scope > .ion-page, :scope > ion-nav, :scope > ion-tabs')); // REVIEW
} else {
enteringContentAnimation.addElement(contentEl); // REVIEW
enteringContentAnimation.addElement(headerEls);
}
rootAnimation.addAnimation(enteringContentAnimation);
if (backDirection) {
enteringContentAnimation.beforeClearStyles([OPACITY]).fromTo('transform', `translateX(${OFF_LEFT})`, `translateX(${CENTER})`).fromTo(OPACITY, OFF_OPACITY, 1);
} else {
// entering content, forward direction
enteringContentAnimation.beforeClearStyles([OPACITY]).fromTo('transform', `translateX(${OFF_RIGHT})`, `translateX(${CENTER})`);
}
if (contentEl) {
const enteringTransitionEffectEl = shadow(contentEl).querySelector('.transition-effect');
if (enteringTransitionEffectEl) {
const enteringTransitionCoverEl = enteringTransitionEffectEl.querySelector('.transition-cover');
const enteringTransitionShadowEl = enteringTransitionEffectEl.querySelector('.transition-shadow');
const enteringTransitionEffect = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
const enteringTransitionCover = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
const enteringTransitionShadow = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
enteringTransitionEffect.addElement(enteringTransitionEffectEl).beforeStyles({
opacity: '1',
display: 'block'
}).afterStyles({
opacity: '',
display: ''
});
enteringTransitionCover.addElement(enteringTransitionCoverEl) // REVIEW
.beforeClearStyles([OPACITY]).fromTo(OPACITY, 0, 0.1);
enteringTransitionShadow.addElement(enteringTransitionShadowEl) // REVIEW
.beforeClearStyles([OPACITY]).fromTo(OPACITY, 0.03, 0.7);
enteringTransitionEffect.addAnimation([enteringTransitionCover, enteringTransitionShadow]);
enteringContentAnimation.addAnimation([enteringTransitionEffect]);
}
}
const enteringContentHasLargeTitle = enteringEl.querySelector('ion-header.header-collapse-condense');
const {
forward,
backward
} = createLargeTitleTransition(rootAnimation, isRTL, backDirection, enteringEl, leavingEl);
enteringToolBarEls.forEach(enteringToolBarEl => {
const enteringToolBar = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
enteringToolBar.addElement(enteringToolBarEl);
rootAnimation.addAnimation(enteringToolBar);
const enteringTitle = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
enteringTitle.addElement(enteringToolBarEl.querySelector('ion-title')); // REVIEW
const enteringToolBarButtons = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
const buttons = Array.from(enteringToolBarEl.querySelectorAll('ion-buttons,[menuToggle]'));
const parentHeader = enteringToolBarEl.closest('ion-header');
const inactiveHeader = parentHeader === null || parentHeader === void 0 ? void 0 : parentHeader.classList.contains('header-collapse-condense-inactive');
let buttonsToAnimate;
if (backDirection) {
buttonsToAnimate = buttons.filter(button => {
const isCollapseButton = button.classList.contains('buttons-collapse');
return isCollapseButton && !inactiveHeader || !isCollapseButton;
});
} else {
buttonsToAnimate = buttons.filter(button => !button.classList.contains('buttons-collapse'));
}
enteringToolBarButtons.addElement(buttonsToAnimate);
const enteringToolBarItems = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
enteringToolBarItems.addElement(enteringToolBarEl.querySelectorAll(':scope > *:not(ion-title):not(ion-buttons):not([menuToggle])'));
const enteringToolBarBg = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
enteringToolBarBg.addElement(shadow(enteringToolBarEl).querySelector('.toolbar-background')); // REVIEW
const enteringBackButton = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
const backButtonEl = enteringToolBarEl.querySelector('ion-back-button');
if (backButtonEl) {
enteringBackButton.addElement(backButtonEl);
}
enteringToolBar.addAnimation([enteringTitle, enteringToolBarButtons, enteringToolBarItems, enteringToolBarBg, enteringBackButton]);
enteringToolBarButtons.fromTo(OPACITY, 0.01, 1);
enteringToolBarItems.fromTo(OPACITY, 0.01, 1);
if (backDirection) {
if (!inactiveHeader) {
enteringTitle.fromTo('transform', `translateX(${OFF_LEFT})`, `translateX(${CENTER})`).fromTo(OPACITY, 0.01, 1);
}
enteringToolBarItems.fromTo('transform', `translateX(${OFF_LEFT})`, `translateX(${CENTER})`); // back direction, entering page has a back button
enteringBackButton.fromTo(OPACITY, 0.01, 1);
} else {
// entering toolbar, forward direction
if (!enteringContentHasLargeTitle) {
enteringTitle.fromTo('transform', `translateX(${OFF_RIGHT})`, `translateX(${CENTER})`).fromTo(OPACITY, 0.01, 1);
}
enteringToolBarItems.fromTo('transform', `translateX(${OFF_RIGHT})`, `translateX(${CENTER})`);
enteringToolBarBg.beforeClearStyles([OPACITY, 'transform']);
const translucentHeader = parentHeader === null || parentHeader === void 0 ? void 0 : parentHeader.translucent;
if (!translucentHeader) {
enteringToolBarBg.fromTo(OPACITY, 0.01, 'var(--opacity)');
} else {
enteringToolBarBg.fromTo('transform', isRTL ? 'translateX(-100%)' : 'translateX(100%)', 'translateX(0px)');
} // forward direction, entering page has a back button
if (!forward) {
enteringBackButton.fromTo(OPACITY, 0.01, 1);
}
if (backButtonEl && !forward) {
const enteringBackBtnText = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
enteringBackBtnText.addElement(shadow(backButtonEl).querySelector('.button-text')) // REVIEW
.fromTo(`transform`, isRTL ? 'translateX(-100px)' : 'translateX(100px)', 'translateX(0px)');
enteringToolBar.addAnimation(enteringBackBtnText);
}
}
}); // setup leaving view
if (leavingEl) {
const leavingContent = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
const leavingContentEl = leavingEl.querySelector(':scope > ion-content');
const leavingToolBarEls = leavingEl.querySelectorAll(':scope > ion-header > ion-toolbar');
const leavingHeaderEls = leavingEl.querySelectorAll(':scope > ion-header > *:not(ion-toolbar), :scope > ion-footer > *');
if (!leavingContentEl && leavingToolBarEls.length === 0 && leavingHeaderEls.length === 0) {
leavingContent.addElement(leavingEl.querySelector(':scope > .ion-page, :scope > ion-nav, :scope > ion-tabs')); // REVIEW
} else {
leavingContent.addElement(leavingContentEl); // REVIEW
leavingContent.addElement(leavingHeaderEls);
}
rootAnimation.addAnimation(leavingContent);
if (backDirection) {
// leaving content, back direction
leavingContent.beforeClearStyles([OPACITY]).fromTo('transform', `translateX(${CENTER})`, isRTL ? 'translateX(-100%)' : 'translateX(100%)');
const leavingPage = (0,_index_e6cecce9_js__WEBPACK_IMPORTED_MODULE_1__.g)(leavingEl);
rootAnimation.afterAddWrite(() => {
if (rootAnimation.getDirection() === 'normal') {
leavingPage.style.setProperty('display', 'none');
}
});
} else {
// leaving content, forward direction
leavingContent.fromTo('transform', `translateX(${CENTER})`, `translateX(${OFF_LEFT})`).fromTo(OPACITY, 1, OFF_OPACITY);
}
if (leavingContentEl) {
const leavingTransitionEffectEl = shadow(leavingContentEl).querySelector('.transition-effect');
if (leavingTransitionEffectEl) {
const leavingTransitionCoverEl = leavingTransitionEffectEl.querySelector('.transition-cover');
const leavingTransitionShadowEl = leavingTransitionEffectEl.querySelector('.transition-shadow');
const leavingTransitionEffect = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
const leavingTransitionCover = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
const leavingTransitionShadow = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
leavingTransitionEffect.addElement(leavingTransitionEffectEl).beforeStyles({
opacity: '1',
display: 'block'
}).afterStyles({
opacity: '',
display: ''
});
leavingTransitionCover.addElement(leavingTransitionCoverEl) // REVIEW
.beforeClearStyles([OPACITY]).fromTo(OPACITY, 0.1, 0);
leavingTransitionShadow.addElement(leavingTransitionShadowEl) // REVIEW
.beforeClearStyles([OPACITY]).fromTo(OPACITY, 0.7, 0.03);
leavingTransitionEffect.addAnimation([leavingTransitionCover, leavingTransitionShadow]);
leavingContent.addAnimation([leavingTransitionEffect]);
}
}
leavingToolBarEls.forEach(leavingToolBarEl => {
const leavingToolBar = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
leavingToolBar.addElement(leavingToolBarEl);
const leavingTitle = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
leavingTitle.addElement(leavingToolBarEl.querySelector('ion-title')); // REVIEW
const leavingToolBarButtons = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
const buttons = leavingToolBarEl.querySelectorAll('ion-buttons,[menuToggle]');
const parentHeader = leavingToolBarEl.closest('ion-header');
const inactiveHeader = parentHeader === null || parentHeader === void 0 ? void 0 : parentHeader.classList.contains('header-collapse-condense-inactive');
const buttonsToAnimate = Array.from(buttons).filter(button => {
const isCollapseButton = button.classList.contains('buttons-collapse');
return isCollapseButton && !inactiveHeader || !isCollapseButton;
});
leavingToolBarButtons.addElement(buttonsToAnimate);
const leavingToolBarItems = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
const leavingToolBarItemEls = leavingToolBarEl.querySelectorAll(':scope > *:not(ion-title):not(ion-buttons):not([menuToggle])');
if (leavingToolBarItemEls.length > 0) {
leavingToolBarItems.addElement(leavingToolBarItemEls);
}
const leavingToolBarBg = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
leavingToolBarBg.addElement(shadow(leavingToolBarEl).querySelector('.toolbar-background')); // REVIEW
const leavingBackButton = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
const backButtonEl = leavingToolBarEl.querySelector('ion-back-button');
if (backButtonEl) {
leavingBackButton.addElement(backButtonEl);
}
leavingToolBar.addAnimation([leavingTitle, leavingToolBarButtons, leavingToolBarItems, leavingBackButton, leavingToolBarBg]);
rootAnimation.addAnimation(leavingToolBar); // fade out leaving toolbar items
leavingBackButton.fromTo(OPACITY, 0.99, 0);
leavingToolBarButtons.fromTo(OPACITY, 0.99, 0);
leavingToolBarItems.fromTo(OPACITY, 0.99, 0);
if (backDirection) {
if (!inactiveHeader) {
// leaving toolbar, back direction
leavingTitle.fromTo('transform', `translateX(${CENTER})`, isRTL ? 'translateX(-100%)' : 'translateX(100%)').fromTo(OPACITY, 0.99, 0);
}
leavingToolBarItems.fromTo('transform', `translateX(${CENTER})`, isRTL ? 'translateX(-100%)' : 'translateX(100%)');
leavingToolBarBg.beforeClearStyles([OPACITY, 'transform']); // leaving toolbar, back direction, and there's no entering toolbar
// should just slide out, no fading out
const translucentHeader = parentHeader === null || parentHeader === void 0 ? void 0 : parentHeader.translucent;
if (!translucentHeader) {
leavingToolBarBg.fromTo(OPACITY, 'var(--opacity)', 0);
} else {
leavingToolBarBg.fromTo('transform', 'translateX(0px)', isRTL ? 'translateX(-100%)' : 'translateX(100%)');
}
if (backButtonEl && !backward) {
const leavingBackBtnText = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
leavingBackBtnText.addElement(shadow(backButtonEl).querySelector('.button-text')) // REVIEW
.fromTo('transform', `translateX(${CENTER})`, `translateX(${(isRTL ? -124 : 124) + 'px'})`);
leavingToolBar.addAnimation(leavingBackBtnText);
}
} else {
// leaving toolbar, forward direction
if (!inactiveHeader) {
leavingTitle.fromTo('transform', `translateX(${CENTER})`, `translateX(${OFF_LEFT})`).fromTo(OPACITY, 0.99, 0).afterClearStyles([TRANSFORM, OPACITY]);
}
leavingToolBarItems.fromTo('transform', `translateX(${CENTER})`, `translateX(${OFF_LEFT})`).afterClearStyles([TRANSFORM, OPACITY]);
leavingBackButton.afterClearStyles([OPACITY]);
leavingTitle.afterClearStyles([OPACITY]);
leavingToolBarButtons.afterClearStyles([OPACITY]);
}
});
}
return rootAnimation;
} catch (err) {
throw err;
}
};
/***/ }),
/***/ 8652:
/*!*****************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/loader.js ***!
\*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "defineCustomElements": () => (/* binding */ defineCustomElements)
/* harmony export */ });
/* harmony import */ var _index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-8e692445.js */ 1559);
/* harmony import */ var _app_globals_275fb4c9_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./app-globals-275fb4c9.js */ 6958);
/* harmony import */ var _ionic_global_c95cf239_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ionic-global-c95cf239.js */ 8607);
/*!
* (C) Ionic http://ionicframework.com - MIT License
*/
/*
Stencil Client Patch Esm v2.18.0 | MIT Licensed | https://stenciljs.com
*/
const patchEsm = () => {
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.p)();
};
const defineCustomElements = (win, options) => {
if (typeof window === 'undefined') return Promise.resolve();
return patchEsm().then(() => {
(0,_app_globals_275fb4c9_js__WEBPACK_IMPORTED_MODULE_1__.g)();
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.b)(JSON.parse("[[\"ion-menu_3\",[[33,\"ion-menu-button\",{\"color\":[513],\"disabled\":[4],\"menu\":[1],\"autoHide\":[4,\"auto-hide\"],\"type\":[1],\"visible\":[32]},[[16,\"ionMenuChange\",\"visibilityChanged\"],[16,\"ionSplitPaneVisible\",\"visibilityChanged\"]]],[33,\"ion-menu\",{\"contentId\":[513,\"content-id\"],\"menuId\":[513,\"menu-id\"],\"type\":[1025],\"disabled\":[1028],\"side\":[513],\"swipeGesture\":[4,\"swipe-gesture\"],\"maxEdgeStart\":[2,\"max-edge-start\"],\"isPaneVisible\":[32],\"isEndSide\":[32],\"isOpen\":[64],\"isActive\":[64],\"open\":[64],\"close\":[64],\"toggle\":[64],\"setOpen\":[64]},[[16,\"ionSplitPaneVisible\",\"onSplitPaneChanged\"],[2,\"click\",\"onBackdropClick\"],[0,\"keydown\",\"onKeydown\"]]],[1,\"ion-menu-toggle\",{\"menu\":[1],\"autoHide\":[4,\"auto-hide\"],\"visible\":[32]},[[16,\"ionMenuChange\",\"visibilityChanged\"],[16,\"ionSplitPaneVisible\",\"visibilityChanged\"]]]]],[\"ion-fab_3\",[[33,\"ion-fab-button\",{\"color\":[513],\"activated\":[4],\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"routerDirection\":[1,\"router-direction\"],\"routerAnimation\":[16],\"target\":[1],\"show\":[4],\"translucent\":[4],\"type\":[1],\"size\":[1],\"closeIcon\":[1,\"close-icon\"]}],[1,\"ion-fab\",{\"horizontal\":[1],\"vertical\":[1],\"edge\":[4],\"activated\":[1028],\"close\":[64],\"toggle\":[64]}],[1,\"ion-fab-list\",{\"activated\":[4],\"side\":[1]}]]],[\"ion-refresher_2\",[[0,\"ion-refresher-content\",{\"pullingIcon\":[1025,\"pulling-icon\"],\"pullingText\":[1,\"pulling-text\"],\"refreshingSpinner\":[1025,\"refreshing-spinner\"],\"refreshingText\":[1,\"refreshing-text\"]}],[32,\"ion-refresher\",{\"pullMin\":[2,\"pull-min\"],\"pullMax\":[2,\"pull-max\"],\"closeDuration\":[1,\"close-duration\"],\"snapbackDuration\":[1,\"snapback-duration\"],\"pullFactor\":[2,\"pull-factor\"],\"disabled\":[4],\"nativeRefresher\":[32],\"state\":[32],\"complete\":[64],\"cancel\":[64],\"getProgress\":[64]}]]],[\"ion-back-button\",[[33,\"ion-back-button\",{\"color\":[513],\"defaultHref\":[1025,\"default-href\"],\"disabled\":[516],\"icon\":[1],\"text\":[1],\"type\":[1],\"routerAnimation\":[16]}]]],[\"ion-toast\",[[33,\"ion-toast\",{\"overlayIndex\":[2,\"overlay-index\"],\"color\":[513],\"enterAnimation\":[16],\"leaveAnimation\":[16],\"cssClass\":[1,\"css-class\"],\"duration\":[2],\"header\":[1],\"message\":[1],\"keyboardClose\":[4,\"keyboard-close\"],\"position\":[1],\"buttons\":[16],\"translucent\":[4],\"animated\":[4],\"icon\":[1],\"htmlAttributes\":[16],\"present\":[64],\"dismiss\":[64],\"onDidDismiss\":[64],\"onWillDismiss\":[64]}]]],[\"ion-card_5\",[[33,\"ion-card\",{\"color\":[513],\"button\":[4],\"type\":[1],\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"routerDirection\":[1,\"router-direction\"],\"routerAnimation\":[16],\"target\":[1]}],[32,\"ion-card-content\"],[33,\"ion-card-header\",{\"color\":[513],\"translucent\":[4]}],[33,\"ion-card-subtitle\",{\"color\":[513]}],[33,\"ion-card-title\",{\"color\":[513]}]]],[\"ion-item-option_3\",[[33,\"ion-item-option\",{\"color\":[513],\"disabled\":[4],\"download\":[1],\"expandable\":[4],\"href\":[1],\"rel\":[1],\"target\":[1],\"type\":[1]}],[32,\"ion-item-options\",{\"side\":[1],\"fireSwipeEvent\":[64]}],[0,\"ion-item-sliding\",{\"disabled\":[4],\"state\":[32],\"getOpenAmount\":[64],\"getSlidingRatio\":[64],\"open\":[64],\"close\":[64],\"closeOpened\":[64]}]]],[\"ion-accordion_2\",[[49,\"ion-accordion\",{\"value\":[1],\"disabled\":[4],\"readonly\":[4],\"toggleIcon\":[1,\"toggle-icon\"],\"toggleIconSlot\":[1,\"toggle-icon-slot\"],\"state\":[32],\"isNext\":[32],\"isPrevious\":[32]}],[33,\"ion-accordion-group\",{\"animated\":[4],\"multiple\":[4],\"value\":[1025],\"disabled\":[4],\"readonly\":[4],\"expand\":[1],\"requestAccordionToggle\":[64],\"getAccordions\":[64]},[[0,\"keydown\",\"onKeydown\"]]]]],[\"ion-breadcrumb_2\",[[33,\"ion-breadcrumb\",{\"collapsed\":[4],\"last\":[4],\"showCollapsedIndicator\":[4,\"show-collapsed-indicator\"],\"color\":[1],\"active\":[4],\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"separator\":[4],\"target\":[1],\"routerDirection\":[1,\"router-direction\"],\"routerAnimation\":[16]}],[33,\"ion-breadcrumbs\",{\"color\":[1],\"maxItems\":[2,\"max-items\"],\"itemsBeforeCollapse\":[2,\"items-before-collapse\"],\"itemsAfterCollapse\":[2,\"items-after-collapse\"],\"collapsed\":[32],\"activeChanged\":[32]},[[0,\"collapsedClick\",\"onCollapsedClick\"]]]]],[\"ion-infinite-scroll_2\",[[32,\"ion-infinite-scroll-content\",{\"loadingSpinner\":[1025,\"loading-spinner\"],\"loadingText\":[1,\"loading-text\"]}],[0,\"ion-infinite-scroll\",{\"threshold\":[1],\"disabled\":[4],\"position\":[1],\"isLoading\":[32],\"complete\":[64]}]]],[\"ion-reorder_2\",[[33,\"ion-reorder\",null,[[2,\"click\",\"onClick\"]]],[0,\"ion-reorder-group\",{\"disabled\":[4],\"state\":[32],\"complete\":[64]}]]],[\"ion-segment_2\",[[33,\"ion-segment-button\",{\"disabled\":[4],\"layout\":[1],\"type\":[1],\"value\":[1],\"checked\":[32]}],[33,\"ion-segment\",{\"color\":[513],\"disabled\":[4],\"scrollable\":[4],\"swipeGesture\":[4,\"swipe-gesture\"],\"value\":[1025],\"selectOnFocus\":[4,\"select-on-focus\"],\"activated\":[32]},[[0,\"keydown\",\"onKeyDown\"]]]]],[\"ion-tab-bar_2\",[[33,\"ion-tab-button\",{\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"layout\":[1025],\"selected\":[1028],\"tab\":[1],\"target\":[1]},[[8,\"ionTabBarChanged\",\"onTabBarChanged\"]]],[33,\"ion-tab-bar\",{\"color\":[513],\"selectedTab\":[1,\"selected-tab\"],\"translucent\":[4],\"keyboardVisible\":[32]}]]],[\"ion-chip\",[[1,\"ion-chip\",{\"color\":[513],\"outline\":[4],\"disabled\":[4]}]]],[\"ion-datetime-button\",[[33,\"ion-datetime-button\",{\"color\":[513],\"disabled\":[516],\"datetime\":[1],\"datetimePresentation\":[32],\"dateText\":[32],\"timeText\":[32],\"datetimeActive\":[32],\"selectedButton\":[32]}]]],[\"ion-searchbar\",[[34,\"ion-searchbar\",{\"color\":[513],\"animated\":[4],\"autocomplete\":[1],\"autocorrect\":[1],\"cancelButtonIcon\":[1,\"cancel-button-icon\"],\"cancelButtonText\":[1,\"cancel-button-text\"],\"clearIcon\":[1,\"clear-icon\"],\"debounce\":[2],\"disabled\":[4],\"inputmode\":[1],\"enterkeyhint\":[1],\"placeholder\":[1],\"searchIcon\":[1,\"search-icon\"],\"showCancelButton\":[1,\"show-cancel-button\"],\"showClearButton\":[1,\"show-clear-button\"],\"spellcheck\":[4],\"type\":[1],\"value\":[1025],\"focused\":[32],\"noAnimate\":[32],\"setFocus\":[64],\"getInputElement\":[64]}]]],[\"ion-toggle\",[[33,\"ion-toggle\",{\"color\":[513],\"name\":[1],\"checked\":[1028],\"disabled\":[4],\"value\":[1],\"enableOnOffLabels\":[4,\"enable-on-off-labels\"],\"activated\":[32]}]]],[\"ion-nav_2\",[[1,\"ion-nav\",{\"delegate\":[16],\"swipeGesture\":[1028,\"swipe-gesture\"],\"animated\":[4],\"animation\":[16],\"rootParams\":[16],\"root\":[1],\"push\":[64],\"insert\":[64],\"insertPages\":[64],\"pop\":[64],\"popTo\":[64],\"popToRoot\":[64],\"removeIndex\":[64],\"setRoot\":[64],\"setPages\":[64],\"setRouteId\":[64],\"getRouteId\":[64],\"getActive\":[64],\"getByIndex\":[64],\"canGoBack\":[64],\"getPrevious\":[64]}],[0,\"ion-nav-link\",{\"component\":[1],\"componentProps\":[16],\"routerDirection\":[1,\"router-direction\"],\"routerAnimation\":[16]}]]],[\"ion-input\",[[34,\"ion-input\",{\"fireFocusEvents\":[4,\"fire-focus-events\"],\"color\":[513],\"accept\":[1],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autofocus\":[4],\"clearInput\":[4,\"clear-input\"],\"clearOnEdit\":[4,\"clear-on-edit\"],\"debounce\":[2],\"disabled\":[4],\"enterkeyhint\":[1],\"inputmode\":[1],\"max\":[8],\"maxlength\":[2],\"min\":[8],\"minlength\":[2],\"multiple\":[4],\"name\":[1],\"pattern\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"step\":[1],\"size\":[2],\"type\":[1],\"value\":[1032],\"hasFocus\":[32],\"setFocus\":[64],\"setBlur\":[64],\"getInputElement\":[64]}]]],[\"ion-textarea\",[[34,\"ion-textarea\",{\"fireFocusEvents\":[4,\"fire-focus-events\"],\"color\":[513],\"autocapitalize\":[1],\"autofocus\":[4],\"clearOnEdit\":[1028,\"clear-on-edit\"],\"debounce\":[2],\"disabled\":[4],\"inputmode\":[1],\"enterkeyhint\":[1],\"maxlength\":[2],\"minlength\":[2],\"name\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"cols\":[2],\"rows\":[2],\"wrap\":[1],\"autoGrow\":[516,\"auto-grow\"],\"value\":[1025],\"hasFocus\":[32],\"setFocus\":[64],\"setBlur\":[64],\"getInputElement\":[64]}]]],[\"ion-backdrop\",[[33,\"ion-backdrop\",{\"visible\":[4],\"tappable\":[4],\"stopPropagation\":[4,\"stop-propagation\"]},[[2,\"click\",\"onMouseDown\"]]]]],[\"ion-loading\",[[34,\"ion-loading\",{\"overlayIndex\":[2,\"overlay-index\"],\"keyboardClose\":[4,\"keyboard-close\"],\"enterAnimation\":[16],\"leaveAnimation\":[16],\"message\":[1],\"cssClass\":[1,\"css-class\"],\"duration\":[2],\"backdropDismiss\":[4,\"backdrop-dismiss\"],\"showBackdrop\":[4,\"show-backdrop\"],\"spinner\":[1025],\"translucent\":[4],\"animated\":[4],\"htmlAttributes\":[16],\"present\":[64],\"dismiss\":[64],\"onDidDismiss\":[64],\"onWillDismiss\":[64]}]]],[\"ion-modal\",[[33,\"ion-modal\",{\"hasController\":[4,\"has-controller\"],\"overlayIndex\":[2,\"overlay-index\"],\"delegate\":[16],\"keyboardClose\":[4,\"keyboard-close\"],\"enterAnimation\":[16],\"leaveAnimation\":[16],\"breakpoints\":[16],\"initialBreakpoint\":[2,\"initial-breakpoint\"],\"backdropBreakpoint\":[2,\"backdrop-breakpoint\"],\"handle\":[4],\"handleBehavior\":[1,\"handle-behavior\"],\"component\":[1],\"componentProps\":[16],\"cssClass\":[1,\"css-class\"],\"backdropDismiss\":[4,\"backdrop-dismiss\"],\"showBackdrop\":[4,\"show-backdrop\"],\"animated\":[4],\"swipeToClose\":[4,\"swipe-to-close\"],\"presentingElement\":[16],\"htmlAttributes\":[16],\"isOpen\":[4,\"is-open\"],\"trigger\":[1],\"keepContentsMounted\":[4,\"keep-contents-mounted\"],\"canDismiss\":[4,\"can-dismiss\"],\"presented\":[32],\"present\":[64],\"dismiss\":[64],\"onDidDismiss\":[64],\"onWillDismiss\":[64],\"setCurrentBreakpoint\":[64],\"getCurrentBreakpoint\":[64]}]]],[\"ion-route_4\",[[0,\"ion-route\",{\"url\":[1],\"component\":[1],\"componentProps\":[16],\"beforeLeave\":[16],\"beforeEnter\":[16]}],[0,\"ion-route-redirect\",{\"from\":[1],\"to\":[1]}],[0,\"ion-router\",{\"root\":[1],\"useHash\":[4,\"use-hash\"],\"canTransition\":[64],\"push\":[64],\"back\":[64],\"printDebug\":[64],\"navChanged\":[64]},[[8,\"popstate\",\"onPopState\"],[4,\"ionBackButton\",\"onBackButton\"]]],[1,\"ion-router-link\",{\"color\":[513],\"href\":[1],\"rel\":[1],\"routerDirection\":[1,\"router-direction\"],\"routerAnimation\":[16],\"target\":[1]}]]],[\"ion-avatar_3\",[[33,\"ion-avatar\"],[33,\"ion-badge\",{\"color\":[513]}],[1,\"ion-thumbnail\"]]],[\"ion-col_3\",[[1,\"ion-col\",{\"offset\":[1],\"offsetXs\":[1,\"offset-xs\"],\"offsetSm\":[1,\"offset-sm\"],\"offsetMd\":[1,\"offset-md\"],\"offsetLg\":[1,\"offset-lg\"],\"offsetXl\":[1,\"offset-xl\"],\"pull\":[1],\"pullXs\":[1,\"pull-xs\"],\"pullSm\":[1,\"pull-sm\"],\"pullMd\":[1,\"pull-md\"],\"pullLg\":[1,\"pull-lg\"],\"pullXl\":[1,\"pull-xl\"],\"push\":[1],\"pushXs\":[1,\"push-xs\"],\"pushSm\":[1,\"push-sm\"],\"pushMd\":[1,\"push-md\"],\"pushLg\":[1,\"push-lg\"],\"pushXl\":[1,\"push-xl\"],\"size\":[1],\"sizeXs\":[1,\"size-xs\"],\"sizeSm\":[1,\"size-sm\"],\"sizeMd\":[1,\"size-md\"],\"sizeLg\":[1,\"size-lg\"],\"sizeXl\":[1,\"size-xl\"]},[[9,\"resize\",\"onResize\"]]],[1,\"ion-grid\",{\"fixed\":[4]}],[1,\"ion-row\"]]],[\"ion-slide_2\",[[0,\"ion-slide\"],[36,\"ion-slides\",{\"options\":[8],\"pager\":[4],\"scrollbar\":[4],\"update\":[64],\"updateAutoHeight\":[64],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"getActiveIndex\":[64],\"getPreviousIndex\":[64],\"length\":[64],\"isEnd\":[64],\"isBeginning\":[64],\"startAutoplay\":[64],\"stopAutoplay\":[64],\"lockSwipeToNext\":[64],\"lockSwipeToPrev\":[64],\"lockSwipes\":[64],\"getSwiper\":[64]}]]],[\"ion-tab_2\",[[1,\"ion-tab\",{\"active\":[1028],\"delegate\":[16],\"tab\":[1],\"component\":[1],\"setActive\":[64]}],[1,\"ion-tabs\",{\"useRouter\":[1028,\"use-router\"],\"selectedTab\":[32],\"select\":[64],\"getTab\":[64],\"getSelected\":[64],\"setRouteId\":[64],\"getRouteId\":[64]}]]],[\"ion-img\",[[1,\"ion-img\",{\"alt\":[1],\"src\":[1],\"loadSrc\":[32],\"loadError\":[32]}]]],[\"ion-progress-bar\",[[33,\"ion-progress-bar\",{\"type\":[1],\"reversed\":[4],\"value\":[2],\"buffer\":[2],\"color\":[513]}]]],[\"ion-range\",[[33,\"ion-range\",{\"color\":[513],\"debounce\":[2],\"name\":[1],\"dualKnobs\":[4,\"dual-knobs\"],\"min\":[2],\"max\":[2],\"pin\":[4],\"pinFormatter\":[16],\"snaps\":[4],\"step\":[2],\"ticks\":[4],\"activeBarStart\":[1026,\"active-bar-start\"],\"disabled\":[4],\"value\":[1026],\"ratioA\":[32],\"ratioB\":[32],\"pressedKnob\":[32]}]]],[\"ion-split-pane\",[[33,\"ion-split-pane\",{\"contentId\":[513,\"content-id\"],\"disabled\":[4],\"when\":[8],\"visible\":[32]}]]],[\"ion-text\",[[1,\"ion-text\",{\"color\":[513]}]]],[\"ion-virtual-scroll\",[[0,\"ion-virtual-scroll\",{\"approxItemHeight\":[2,\"approx-item-height\"],\"approxHeaderHeight\":[2,\"approx-header-height\"],\"approxFooterHeight\":[2,\"approx-footer-height\"],\"headerFn\":[16],\"footerFn\":[16],\"items\":[16],\"itemHeight\":[16],\"headerHeight\":[16],\"footerHeight\":[16],\"renderItem\":[16],\"renderHeader\":[16],\"renderFooter\":[16],\"nodeRender\":[16],\"domRender\":[16],\"totalHeight\":[32],\"positionForItem\":[64],\"checkRange\":[64],\"checkEnd\":[64]},[[9,\"resize\",\"onResize\"]]]]],[\"ion-picker-column-internal\",[[33,\"ion-picker-column-internal\",{\"items\":[16],\"value\":[1032],\"color\":[513],\"numericInput\":[4,\"numeric-input\"],\"isActive\":[32],\"scrollActiveItemIntoView\":[64],\"setValue\":[64]}]]],[\"ion-picker-internal\",[[33,\"ion-picker-internal\",null,[[1,\"touchstart\",\"preventTouchStartPropagation\"]]]]],[\"ion-radio_2\",[[33,\"ion-radio\",{\"color\":[513],\"name\":[1],\"disabled\":[4],\"value\":[8],\"checked\":[32],\"buttonTabindex\":[32],\"setFocus\":[64],\"setButtonTabindex\":[64]}],[0,\"ion-radio-group\",{\"allowEmptySelection\":[4,\"allow-empty-selection\"],\"name\":[1],\"value\":[1032]},[[4,\"keydown\",\"onKeydown\"]]]]],[\"ion-ripple-effect\",[[1,\"ion-ripple-effect\",{\"type\":[1],\"addRipple\":[64]}]]],[\"ion-button_2\",[[33,\"ion-button\",{\"color\":[513],\"buttonType\":[1025,\"button-type\"],\"disabled\":[516],\"expand\":[513],\"fill\":[1537],\"routerDirection\":[1,\"router-direction\"],\"routerAnimation\":[16],\"download\":[1],\"href\":[1],\"rel\":[1],\"shape\":[513],\"size\":[513],\"strong\":[4],\"target\":[1],\"type\":[1],\"form\":[1]}],[1,\"ion-icon\",{\"mode\":[1025],\"color\":[1],\"ios\":[1],\"md\":[1],\"flipRtl\":[4,\"flip-rtl\"],\"name\":[513],\"src\":[1],\"icon\":[8],\"size\":[1],\"lazy\":[4],\"sanitize\":[4],\"svgContent\":[32],\"isVisible\":[32],\"ariaLabel\":[32]}]]],[\"ion-datetime_3\",[[33,\"ion-datetime\",{\"color\":[1],\"name\":[1],\"disabled\":[4],\"readonly\":[4],\"isDateEnabled\":[16],\"min\":[1025],\"max\":[1025],\"presentation\":[1],\"cancelText\":[1,\"cancel-text\"],\"doneText\":[1,\"done-text\"],\"clearText\":[1,\"clear-text\"],\"yearValues\":[8,\"year-values\"],\"monthValues\":[8,\"month-values\"],\"dayValues\":[8,\"day-values\"],\"hourValues\":[8,\"hour-values\"],\"minuteValues\":[8,\"minute-values\"],\"locale\":[1],\"firstDayOfWeek\":[2,\"first-day-of-week\"],\"titleSelectedDatesFormatter\":[16],\"multiple\":[4],\"value\":[1025],\"showDefaultTitle\":[4,\"show-default-title\"],\"showDefaultButtons\":[4,\"show-default-buttons\"],\"showClearButton\":[4,\"show-clear-button\"],\"showDefaultTimeLabel\":[4,\"show-default-time-label\"],\"hourCycle\":[1,\"hour-cycle\"],\"size\":[1],\"preferWheel\":[4,\"prefer-wheel\"],\"showMonthAndYear\":[32],\"activeParts\":[32],\"workingParts\":[32],\"isPresented\":[32],\"isTimePopoverOpen\":[32],\"confirm\":[64],\"reset\":[64],\"cancel\":[64]}],[34,\"ion-picker\",{\"overlayIndex\":[2,\"overlay-index\"],\"keyboardClose\":[4,\"keyboard-close\"],\"enterAnimation\":[16],\"leaveAnimation\":[16],\"buttons\":[16],\"columns\":[16],\"cssClass\":[1,\"css-class\"],\"duration\":[2],\"showBackdrop\":[4,\"show-backdrop\"],\"backdropDismiss\":[4,\"backdrop-dismiss\"],\"animated\":[4],\"htmlAttributes\":[16],\"presented\":[32],\"present\":[64],\"dismiss\":[64],\"onDidDismiss\":[64],\"onWillDismiss\":[64],\"getColumn\":[64]}],[32,\"ion-picker-column\",{\"col\":[16]}]]],[\"ion-action-sheet\",[[34,\"ion-action-sheet\",{\"overlayIndex\":[2,\"overlay-index\"],\"keyboardClose\":[4,\"keyboard-close\"],\"enterAnimation\":[16],\"leaveAnimation\":[16],\"buttons\":[16],\"cssClass\":[1,\"css-class\"],\"backdropDismiss\":[4,\"backdrop-dismiss\"],\"header\":[1],\"subHeader\":[1,\"sub-header\"],\"translucent\":[4],\"animated\":[4],\"htmlAttributes\":[16],\"present\":[64],\"dismiss\":[64],\"onDidDismiss\":[64],\"onWillDismiss\":[64]}]]],[\"ion-alert\",[[34,\"ion-alert\",{\"overlayIndex\":[2,\"overlay-index\"],\"keyboardClose\":[4,\"keyboard-close\"],\"enterAnimation\":[16],\"leaveAnimation\":[16],\"cssClass\":[1,\"css-class\"],\"header\":[1],\"subHeader\":[1,\"sub-header\"],\"message\":[1],\"buttons\":[16],\"inputs\":[1040],\"backdropDismiss\":[4,\"backdrop-dismiss\"],\"translucent\":[4],\"animated\":[4],\"htmlAttributes\":[16],\"present\":[64],\"dismiss\":[64],\"onDidDismiss\":[64],\"onWillDismiss\":[64]},[[4,\"keydown\",\"onKeydown\"]]]]],[\"ion-popover\",[[33,\"ion-popover\",{\"hasController\":[4,\"has-controller\"],\"delegate\":[16],\"overlayIndex\":[2,\"overlay-index\"],\"enterAnimation\":[16],\"leaveAnimation\":[16],\"component\":[1],\"componentProps\":[16],\"keyboardClose\":[4,\"keyboard-close\"],\"cssClass\":[1,\"css-class\"],\"backdropDismiss\":[4,\"backdrop-dismiss\"],\"event\":[8],\"showBackdrop\":[4,\"show-backdrop\"],\"translucent\":[4],\"animated\":[4],\"htmlAttributes\":[16],\"triggerAction\":[1,\"trigger-action\"],\"trigger\":[1],\"size\":[1],\"dismissOnSelect\":[4,\"dismiss-on-select\"],\"reference\":[1],\"side\":[1],\"alignment\":[1025],\"arrow\":[4],\"isOpen\":[4,\"is-open\"],\"keyboardEvents\":[4,\"keyboard-events\"],\"keepContentsMounted\":[4,\"keep-contents-mounted\"],\"presented\":[32],\"presentFromTrigger\":[64],\"present\":[64],\"dismiss\":[64],\"getParentPopover\":[64],\"onDidDismiss\":[64],\"onWillDismiss\":[64]}]]],[\"ion-checkbox\",[[33,\"ion-checkbox\",{\"color\":[513],\"name\":[1],\"checked\":[1028],\"indeterminate\":[1028],\"disabled\":[4],\"value\":[8]}]]],[\"ion-select_3\",[[33,\"ion-select\",{\"disabled\":[4],\"cancelText\":[1,\"cancel-text\"],\"okText\":[1,\"ok-text\"],\"placeholder\":[1],\"name\":[1],\"selectedText\":[1,\"selected-text\"],\"multiple\":[4],\"interface\":[1],\"interfaceOptions\":[8,\"interface-options\"],\"compareWith\":[1,\"compare-with\"],\"value\":[1032],\"isExpanded\":[32],\"open\":[64]}],[1,\"ion-select-option\",{\"disabled\":[4],\"value\":[8]}],[34,\"ion-select-popover\",{\"header\":[1],\"subHeader\":[1,\"sub-header\"],\"message\":[1],\"multiple\":[4],\"options\":[16]},[[0,\"ionChange\",\"onSelect\"]]]]],[\"ion-app_8\",[[0,\"ion-app\",{\"setFocus\":[64]}],[1,\"ion-content\",{\"color\":[513],\"fullscreen\":[4],\"forceOverscroll\":[1028,\"force-overscroll\"],\"scrollX\":[4,\"scroll-x\"],\"scrollY\":[4,\"scroll-y\"],\"scrollEvents\":[4,\"scroll-events\"],\"getScrollElement\":[64],\"getBackgroundElement\":[64],\"scrollToTop\":[64],\"scrollToBottom\":[64],\"scrollByPoint\":[64],\"scrollToPoint\":[64]},[[8,\"appload\",\"onAppLoad\"]]],[36,\"ion-footer\",{\"collapse\":[1],\"translucent\":[4],\"keyboardVisible\":[32]}],[36,\"ion-header\",{\"collapse\":[1],\"translucent\":[4]}],[1,\"ion-router-outlet\",{\"mode\":[1025],\"delegate\":[16],\"animated\":[4],\"animation\":[16],\"swipeHandler\":[16],\"commit\":[64],\"setRouteId\":[64],\"getRouteId\":[64]}],[33,\"ion-title\",{\"color\":[513],\"size\":[1]}],[33,\"ion-toolbar\",{\"color\":[513]},[[0,\"ionStyle\",\"childrenStyle\"]]],[34,\"ion-buttons\",{\"collapse\":[4]}]]],[\"ion-spinner\",[[1,\"ion-spinner\",{\"color\":[513],\"duration\":[2],\"name\":[1],\"paused\":[4]}]]],[\"ion-item_8\",[[33,\"ion-item-divider\",{\"color\":[513],\"sticky\":[4]}],[32,\"ion-item-group\"],[1,\"ion-skeleton-text\",{\"animated\":[4]}],[32,\"ion-list\",{\"lines\":[1],\"inset\":[4],\"closeSlidingItems\":[64]}],[33,\"ion-list-header\",{\"color\":[513],\"lines\":[1]}],[49,\"ion-item\",{\"color\":[513],\"button\":[4],\"detail\":[4],\"detailIcon\":[1,\"detail-icon\"],\"disabled\":[4],\"download\":[1],\"fill\":[1],\"shape\":[1],\"href\":[1],\"rel\":[1],\"lines\":[1],\"counter\":[4],\"routerAnimation\":[16],\"routerDirection\":[1,\"router-direction\"],\"target\":[1],\"type\":[1],\"counterFormatter\":[16],\"multipleInputs\":[32],\"focusable\":[32],\"counterString\":[32]},[[0,\"ionChange\",\"handleIonChange\"],[0,\"ionColor\",\"labelColorChanged\"],[0,\"ionStyle\",\"itemStyle\"]]],[34,\"ion-label\",{\"color\":[513],\"position\":[1],\"noAnimate\":[32]}],[33,\"ion-note\",{\"color\":[513]}]]]]"), options);
});
};
/***/ }),
/***/ 4844:
/*!*********************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/md.transition-3924e170.js ***!
\*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "mdTransitionAnimation": () => (/* binding */ mdTransitionAnimation)
/* harmony export */ });
/* harmony import */ var _animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./animation-2c50d24d.js */ 631);
/* harmony import */ var _index_e6cecce9_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index-e6cecce9.js */ 9287);
/* harmony import */ var _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-3b390e48.js */ 9234);
/* harmony import */ var _index_33ffec25_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index-33ffec25.js */ 2286);
/* harmony import */ var _index_8e692445_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index-8e692445.js */ 1559);
/*!
* (C) Ionic http://ionicframework.com - MIT License
*/
const mdTransitionAnimation = (_, opts) => {
var _a, _b, _c;
const OFF_BOTTOM = '40px';
const CENTER = '0px';
const backDirection = opts.direction === 'back';
const enteringEl = opts.enteringEl;
const leavingEl = opts.leavingEl;
const ionPageElement = (0,_index_e6cecce9_js__WEBPACK_IMPORTED_MODULE_1__.g)(enteringEl);
const enteringToolbarEle = ionPageElement.querySelector('ion-toolbar');
const rootTransition = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
rootTransition.addElement(ionPageElement).fill('both').beforeRemoveClass('ion-page-invisible'); // animate the component itself
if (backDirection) {
rootTransition.duration(((_a = opts.duration) !== null && _a !== void 0 ? _a : 0) || 200).easing('cubic-bezier(0.47,0,0.745,0.715)');
} else {
rootTransition.duration(((_b = opts.duration) !== null && _b !== void 0 ? _b : 0) || 280).easing('cubic-bezier(0.36,0.66,0.04,1)').fromTo('transform', `translateY(${OFF_BOTTOM})`, `translateY(${CENTER})`).fromTo('opacity', 0.01, 1);
} // Animate toolbar if it's there
if (enteringToolbarEle) {
const enteringToolBar = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
enteringToolBar.addElement(enteringToolbarEle);
rootTransition.addAnimation(enteringToolBar);
} // setup leaving view
if (leavingEl && backDirection) {
// leaving content
rootTransition.duration(((_c = opts.duration) !== null && _c !== void 0 ? _c : 0) || 200).easing('cubic-bezier(0.47,0,0.745,0.715)');
const leavingPage = (0,_animation_2c50d24d_js__WEBPACK_IMPORTED_MODULE_0__.c)();
leavingPage.addElement((0,_index_e6cecce9_js__WEBPACK_IMPORTED_MODULE_1__.g)(leavingEl)).onFinish(currentStep => {
if (currentStep === 1 && leavingPage.elements.length > 0) {
leavingPage.elements[0].style.setProperty('display', 'none');
}
}).fromTo('transform', `translateY(${CENTER})`, `translateY(${OFF_BOTTOM})`).fromTo('opacity', 1, 0);
rootTransition.addAnimation(leavingPage);
}
return rootTransition;
};
/***/ }),
/***/ 2752:
/*!****************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/overlays-87c7c7cb.js ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "B": () => (/* binding */ BACKDROP),
/* harmony export */ "a": () => (/* binding */ alertController),
/* harmony export */ "b": () => (/* binding */ actionSheetController),
/* harmony export */ "c": () => (/* binding */ popoverController),
/* harmony export */ "d": () => (/* binding */ present),
/* harmony export */ "e": () => (/* binding */ prepareOverlay),
/* harmony export */ "f": () => (/* binding */ dismiss),
/* harmony export */ "g": () => (/* binding */ eventMethod),
/* harmony export */ "h": () => (/* binding */ activeAnimations),
/* harmony export */ "i": () => (/* binding */ isCancel),
/* harmony export */ "j": () => (/* binding */ focusFirstDescendant),
/* harmony export */ "k": () => (/* binding */ getOverlay),
/* harmony export */ "l": () => (/* binding */ loadingController),
/* harmony export */ "m": () => (/* binding */ modalController),
/* harmony export */ "p": () => (/* binding */ pickerController),
/* harmony export */ "s": () => (/* binding */ safeCall),
/* harmony export */ "t": () => (/* binding */ toastController)
/* harmony export */ });
/* harmony import */ var _Volumes_App_fm99_app_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 1670);
/* harmony import */ var _ionic_global_c95cf239_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ionic-global-c95cf239.js */ 8607);
/* harmony import */ var _hardware_back_button_490df115_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hardware-back-button-490df115.js */ 159);
/* harmony import */ var _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers-3b390e48.js */ 9234);
/*!
* (C) Ionic http://ionicframework.com - MIT License
*/
let lastId = 0;
const activeAnimations = new WeakMap();
const createController = tagName => {
return {
create(options) {
return createOverlay(tagName, options);
},
dismiss(data, role, id) {
return dismissOverlay(document, data, role, tagName, id);
},
getTop() {
return (0,_Volumes_App_fm99_app_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
return getOverlay(document, tagName);
})();
}
};
};
const alertController = /*@__PURE__*/createController('ion-alert');
const actionSheetController = /*@__PURE__*/createController('ion-action-sheet');
const loadingController = /*@__PURE__*/createController('ion-loading');
const modalController = /*@__PURE__*/createController('ion-modal');
const pickerController = /*@__PURE__*/createController('ion-picker');
const popoverController = /*@__PURE__*/createController('ion-popover');
const toastController = /*@__PURE__*/createController('ion-toast');
const prepareOverlay = el => {
if (typeof document !== 'undefined') {
connectListeners(document);
}
const overlayIndex = lastId++;
el.overlayIndex = overlayIndex;
if (!el.hasAttribute('id')) {
el.id = `ion-overlay-${overlayIndex}`;
}
};
const createOverlay = (tagName, opts) => {
if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined') {
return window.customElements.whenDefined(tagName).then(() => {
const element = document.createElement(tagName);
element.classList.add('overlay-hidden');
/**
* Convert the passed in overlay options into props
* that get passed down into the new overlay.
*/
Object.assign(element, Object.assign(Object.assign({}, opts), {
hasController: true
})); // append the overlay element to the document body
getAppRoot(document).appendChild(element);
return new Promise(resolve => (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_3__.c)(element, resolve));
});
}
return Promise.resolve();
};
/**
* This query string selects elements that
* are eligible to receive focus. We select
* interactive elements that meet the following
* criteria:
* 1. Element does not have a negative tabindex
* 2. Element does not have `hidden`
* 3. Element does not have `disabled` for non-Ionic components.
* 4. Element does not have `disabled` or `disabled="true"` for Ionic components.
* Note: We need this distinction because `disabled="false"` is
* valid usage for the disabled property on ion-button.
*/
const focusableQueryString = '[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])';
const focusFirstDescendant = (ref, overlay) => {
let firstInput = ref.querySelector(focusableQueryString);
const shadowRoot = firstInput === null || firstInput === void 0 ? void 0 : firstInput.shadowRoot;
if (shadowRoot) {
// If there are no inner focusable elements, just focus the host element.
firstInput = shadowRoot.querySelector(focusableQueryString) || firstInput;
}
if (firstInput) {
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_3__.f)(firstInput);
} else {
// Focus overlay instead of letting focus escape
overlay.focus();
}
};
const isOverlayHidden = overlay => overlay.classList.contains('overlay-hidden');
const focusLastDescendant = (ref, overlay) => {
const inputs = Array.from(ref.querySelectorAll(focusableQueryString));
let lastInput = inputs.length > 0 ? inputs[inputs.length - 1] : null;
const shadowRoot = lastInput === null || lastInput === void 0 ? void 0 : lastInput.shadowRoot;
if (shadowRoot) {
// If there are no inner focusable elements, just focus the host element.
lastInput = shadowRoot.querySelector(focusableQueryString) || lastInput;
}
if (lastInput) {
lastInput.focus();
} else {
// Focus overlay instead of letting focus escape
overlay.focus();
}
};
/**
* Traps keyboard focus inside of overlay components.
* Based on https://w3c.github.io/aria-practices/examples/dialog-modal/alertdialog.html
* This includes the following components: Action Sheet, Alert, Loading, Modal,
* Picker, and Popover.
* Should NOT include: Toast
*/
const trapKeyboardFocus = (ev, doc) => {
const lastOverlay = getOverlay(doc, 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover');
const target = ev.target;
/**
* If no active overlay, ignore this event.
*
* If this component uses the shadow dom,
* this global listener is pointless
* since it will not catch the focus
* traps as they are inside the shadow root.
* We need to add a listener to the shadow root
* itself to ensure the focus trap works.
*/
if (!lastOverlay || !target) {
return;
}
/**
* If the ion-disable-focus-trap class
* is present on an overlay, then this component
* instance has opted out of focus trapping.
* An example of this is when the sheet modal
* has a backdrop that is disabled. The content
* behind the sheet should be focusable until
* the backdrop is enabled.
*/
if (lastOverlay.classList.contains('ion-disable-focus-trap')) {
return;
}
const trapScopedFocus = () => {
/**
* If we are focusing the overlay, clear
* the last focused element so that hitting
* tab activates the first focusable element
* in the overlay wrapper.
*/
if (lastOverlay === target) {
lastOverlay.lastFocus = undefined;
/**
* Otherwise, we must be focusing an element
* inside of the overlay. The two possible options
* here are an input/button/etc or the ion-focus-trap
* element. The focus trap element is used to prevent
* the keyboard focus from leaving the overlay when
* using Tab or screen assistants.
*/
} else {
/**
* We do not want to focus the traps, so get the overlay
* wrapper element as the traps live outside of the wrapper.
*/
const overlayRoot = (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_3__.g)(lastOverlay);
if (!overlayRoot.contains(target)) {
return;
}
const overlayWrapper = overlayRoot.querySelector('.ion-overlay-wrapper');
if (!overlayWrapper) {
return;
}
/**
* If the target is inside the wrapper, let the browser
* focus as normal and keep a log of the last focused element.
*/
if (overlayWrapper.contains(target)) {
lastOverlay.lastFocus = target;
} else {
/**
* Otherwise, we must have focused one of the focus traps.
* We need to wrap the focus to either the first element
* or the last element.
*/
/**
* Once we call `focusFirstDescendant` and focus the first
* descendant, another focus event will fire which will
* cause `lastOverlay.lastFocus` to be updated before
* we can run the code after that. We will cache the value
* here to avoid that.
*/
const lastFocus = lastOverlay.lastFocus; // Focus the first element in the overlay wrapper
focusFirstDescendant(overlayWrapper, lastOverlay);
/**
* If the cached last focused element is the
* same as the active element, then we need
* to wrap focus to the last descendant. This happens
* when the first descendant is focused, and the user
* presses Shift + Tab. The previous line will focus
* the same descendant again (the first one), causing
* last focus to equal the active element.
*/
if (lastFocus === doc.activeElement) {
focusLastDescendant(overlayWrapper, lastOverlay);
}
lastOverlay.lastFocus = doc.activeElement;
}
}
};
const trapShadowFocus = () => {
/**
* If the target is inside the wrapper, let the browser
* focus as normal and keep a log of the last focused element.
*/
if (lastOverlay.contains(target)) {
lastOverlay.lastFocus = target;
} else {
/**
* Otherwise, we are about to have focus
* go out of the overlay. We need to wrap
* the focus to either the first element
* or the last element.
*/
/**
* Once we call `focusFirstDescendant` and focus the first
* descendant, another focus event will fire which will
* cause `lastOverlay.lastFocus` to be updated before
* we can run the code after that. We will cache the value
* here to avoid that.
*/
const lastFocus = lastOverlay.lastFocus; // Focus the first element in the overlay wrapper
focusFirstDescendant(lastOverlay, lastOverlay);
/**
* If the cached last focused element is the
* same as the active element, then we need
* to wrap focus to the last descendant. This happens
* when the first descendant is focused, and the user
* presses Shift + Tab. The previous line will focus
* the same descendant again (the first one), causing
* last focus to equal the active element.
*/
if (lastFocus === doc.activeElement) {
focusLastDescendant(lastOverlay, lastOverlay);
}
lastOverlay.lastFocus = doc.activeElement;
}
};
if (lastOverlay.shadowRoot) {
trapShadowFocus();
} else {
trapScopedFocus();
}
};
const connectListeners = doc => {
if (lastId === 0) {
lastId = 1;
doc.addEventListener('focus', ev => {
trapKeyboardFocus(ev, doc);
}, true); // handle back-button click
doc.addEventListener('ionBackButton', ev => {
const lastOverlay = getOverlay(doc);
if (lastOverlay === null || lastOverlay === void 0 ? void 0 : lastOverlay.backdropDismiss) {
ev.detail.register(_hardware_back_button_490df115_js__WEBPACK_IMPORTED_MODULE_2__.OVERLAY_BACK_BUTTON_PRIORITY, () => {
return lastOverlay.dismiss(undefined, BACKDROP);
});
}
}); // handle ESC to close overlay
doc.addEventListener('keyup', ev => {
if (ev.key === 'Escape') {
const lastOverlay = getOverlay(doc);
if (lastOverlay === null || lastOverlay === void 0 ? void 0 : lastOverlay.backdropDismiss) {
lastOverlay.dismiss(undefined, BACKDROP);
}
}
});
}
};
const dismissOverlay = (doc, data, role, overlayTag, id) => {
const overlay = getOverlay(doc, overlayTag, id);
if (!overlay) {
return Promise.reject('overlay does not exist');
}
return overlay.dismiss(data, role);
};
const getOverlays = (doc, selector) => {
if (selector === undefined) {
selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover,ion-toast';
}
return Array.from(doc.querySelectorAll(selector)).filter(c => c.overlayIndex > 0);
};
/**
* Returns an overlay element
* @param doc The document to find the element within.
* @param overlayTag The selector for the overlay, defaults to Ionic overlay components.
* @param id The unique identifier for the overlay instance.
* @returns The overlay element or `undefined` if no overlay element is found.
*/
const getOverlay = (doc, overlayTag, id) => {
const overlays = getOverlays(doc, overlayTag).filter(o => !isOverlayHidden(o));
return id === undefined ? overlays[overlays.length - 1] : overlays.find(o => o.id === id);
};
/**
* When an overlay is presented, the main
* focus is the overlay not the page content.
* We need to remove the page content from the
* accessibility tree otherwise when
* users use "read screen from top" gestures with
* TalkBack and VoiceOver, the screen reader will begin
* to read the content underneath the overlay.
*
* We need a container where all page components
* exist that is separate from where the overlays
* are added in the DOM. For most apps, this element
* is the top most ion-router-outlet. In the event
* that devs are not using a router,
* they will need to add the "ion-view-container-root"
* id to the element that contains all of their views.
*
* TODO: If Framework supports having multiple top
* level router outlets we would need to update this.
* Example: One outlet for side menu and one outlet
* for main content.
*/
const setRootAriaHidden = (hidden = false) => {
const root = getAppRoot(document);
const viewContainer = root.querySelector('ion-router-outlet, ion-nav, #ion-view-container-root');
if (!viewContainer) {
return;
}
if (hidden) {
viewContainer.setAttribute('aria-hidden', 'true');
} else {
viewContainer.removeAttribute('aria-hidden');
}
};
const present = /*#__PURE__*/function () {
var _ref = (0,_Volumes_App_fm99_app_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) {
var _a, _b;
if (overlay.presented) {
return;
}
setRootAriaHidden(true);
overlay.presented = true;
overlay.willPresent.emit();
(_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
const mode = (0,_ionic_global_c95cf239_js__WEBPACK_IMPORTED_MODULE_1__.b)(overlay); // get the user's animation fn if one was provided
const animationBuilder = overlay.enterAnimation ? overlay.enterAnimation : _ionic_global_c95cf239_js__WEBPACK_IMPORTED_MODULE_1__.c.get(name, mode === 'ios' ? iosEnterAnimation : mdEnterAnimation);
const completed = yield overlayAnimation(overlay, animationBuilder, overlay.el, opts);
if (completed) {
overlay.didPresent.emit();
(_b = overlay.didPresentShorthand) === null || _b === void 0 ? void 0 : _b.emit();
}
/**
* When an overlay that steals focus
* is dismissed, focus should be returned
* to the element that was focused
* prior to the overlay opening. Toast
* does not steal focus and is excluded
* from returning focus as a result.
*/
if (overlay.el.tagName !== 'ION-TOAST') {
focusPreviousElementOnDismiss(overlay.el);
}
/**
* If the focused element is already
* inside the overlay component then
* focus should not be moved from that
* to the overlay container.
*/
if (overlay.keyboardClose && (document.activeElement === null || !overlay.el.contains(document.activeElement))) {
overlay.el.focus();
}
});
return function present(_x, _x2, _x3, _x4, _x5) {
return _ref.apply(this, arguments);
};
}();
/**
* When an overlay component is dismissed,
* focus should be returned to the element
* that presented the overlay. Otherwise
* focus will be set on the body which
* means that people using screen readers
* or tabbing will need to re-navigate
* to where they were before they
* opened the overlay.
*/
const focusPreviousElementOnDismiss = /*#__PURE__*/function () {
var _ref2 = (0,_Volumes_App_fm99_app_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (overlayEl) {
let previousElement = document.activeElement;
if (!previousElement) {
return;
}
const shadowRoot = previousElement === null || previousElement === void 0 ? void 0 : previousElement.shadowRoot;
if (shadowRoot) {
// If there are no inner focusable elements, just focus the host element.
previousElement = shadowRoot.querySelector(focusableQueryString) || previousElement;
}
yield overlayEl.onDidDismiss();
previousElement.focus();
});
return function focusPreviousElementOnDismiss(_x6) {
return _ref2.apply(this, arguments);
};
}();
const dismiss = /*#__PURE__*/function () {
var _ref3 = (0,_Volumes_App_fm99_app_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnimation, opts) {
var _a, _b;
if (!overlay.presented) {
return false;
}
setRootAriaHidden(false);
overlay.presented = false;
try {
// Overlay contents should not be clickable during dismiss
overlay.el.style.setProperty('pointer-events', 'none');
overlay.willDismiss.emit({
data,
role
});
(_a = overlay.willDismissShorthand) === null || _a === void 0 ? void 0 : _a.emit({
data,
role
});
const mode = (0,_ionic_global_c95cf239_js__WEBPACK_IMPORTED_MODULE_1__.b)(overlay);
const animationBuilder = overlay.leaveAnimation ? overlay.leaveAnimation : _ionic_global_c95cf239_js__WEBPACK_IMPORTED_MODULE_1__.c.get(name, mode === 'ios' ? iosLeaveAnimation : mdLeaveAnimation); // If dismissed via gesture, no need to play leaving animation again
if (role !== 'gesture') {
yield overlayAnimation(overlay, animationBuilder, overlay.el, opts);
}
overlay.didDismiss.emit({
data,
role
});
(_b = overlay.didDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({
data,
role
});
activeAnimations.delete(overlay);
/**
* Make overlay hidden again in case it is being reused.
* We can safely remove pointer-events: none as
* overlay-hidden will set display: none.
*/
overlay.el.classList.add('overlay-hidden');
overlay.el.style.removeProperty('pointer-events');
} catch (err) {
console.error(err);
}
overlay.el.remove();
return true;
});
return function dismiss(_x7, _x8, _x9, _x10, _x11, _x12, _x13) {
return _ref3.apply(this, arguments);
};
}();
const getAppRoot = doc => {
return doc.querySelector('ion-app') || doc.body;
};
const overlayAnimation = /*#__PURE__*/function () {
var _ref4 = (0,_Volumes_App_fm99_app_rev_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (overlay, animationBuilder, baseEl, opts) {
// Make overlay visible in case it's hidden
baseEl.classList.remove('overlay-hidden');
const aniRoot = overlay.el;
const animation = animationBuilder(aniRoot, opts);
if (!overlay.animated || !_ionic_global_c95cf239_js__WEBPACK_IMPORTED_MODULE_1__.c.getBoolean('animated', true)) {
animation.duration(0);
}
if (overlay.keyboardClose) {
animation.beforeAddWrite(() => {
const activeElement = baseEl.ownerDocument.activeElement;
if (activeElement === null || activeElement === void 0 ? void 0 : activeElement.matches('input,ion-input, ion-textarea')) {
activeElement.blur();
}
});
}
const activeAni = activeAnimations.get(overlay) || [];
activeAnimations.set(overlay, [...activeAni, animation]);
yield animation.play();
return true;
});
return function overlayAnimation(_x14, _x15, _x16, _x17) {
return _ref4.apply(this, arguments);
};
}();
const eventMethod = (element, eventName) => {
let resolve;
const promise = new Promise(r => resolve = r);
onceEvent(element, eventName, event => {
resolve(event.detail);
});
return promise;
};
const onceEvent = (element, eventName, callback) => {
const handler = ev => {
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_3__.b)(element, eventName, handler);
callback(ev);
};
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_3__.a)(element, eventName, handler);
};
const isCancel = role => {
return role === 'cancel' || role === BACKDROP;
};
const defaultGate = h => h();
/**
* Calls a developer provided method while avoiding
* Angular Zones. Since the handler is provided by
* the developer, we should throw any errors
* received so that developer-provided bug
* tracking software can log it.
*/
const safeCall = (handler, arg) => {
if (typeof handler === 'function') {
const jmp = _ionic_global_c95cf239_js__WEBPACK_IMPORTED_MODULE_1__.c.get('_zoneGate', defaultGate);
return jmp(() => {
try {
return handler(arg);
} catch (e) {
throw e;
}
});
}
return undefined;
};
const BACKDROP = 'backdrop';
/***/ }),
/***/ 4449:
/*!**************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/polyfills/index.js ***!
\**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "applyPolyfills": () => (/* binding */ applyPolyfills)
/* harmony export */ });
function applyPolyfills() {
var promises = [];
if (typeof window !== 'undefined') {
var win = window;
if (!win.customElements || win.Element && (!win.Element.prototype.closest || !win.Element.prototype.matches || !win.Element.prototype.remove || !win.Element.prototype.getRootNode)) {
promises.push(__webpack_require__.e(/*! import() | polyfills-dom */ "polyfills-dom").then(__webpack_require__.t.bind(__webpack_require__, /*! ./dom.js */ 3314, 23)));
}
var checkIfURLIsSupported = function () {
try {
var u = new URL('b', 'http://a');
u.pathname = 'c%20d';
return u.href === 'http://a/c%20d' && u.searchParams;
} catch (e) {
return false;
}
};
if ('function' !== typeof Object.assign || !Object.entries || !Array.prototype.find || !Array.prototype.includes || !String.prototype.startsWith || !String.prototype.endsWith || win.NodeList && !win.NodeList.prototype.forEach || !win.fetch || !checkIfURLIsSupported() || typeof WeakMap == 'undefined') {
promises.push(__webpack_require__.e(/*! import() | polyfills-core-js */ "polyfills-core-js").then(__webpack_require__.t.bind(__webpack_require__, /*! ./core-js.js */ 7320, 23)));
}
}
return Promise.all(promises);
}
/***/ }),
/***/ 3714:
/*!*********************************************************!*\
!*** ./node_modules/@ionic/core/loader/index.es2017.js ***!
\*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "applyPolyfills": () => (/* reexport safe */ _dist_esm_polyfills_index_js__WEBPACK_IMPORTED_MODULE_0__.applyPolyfills),
/* harmony export */ "defineCustomElements": () => (/* reexport safe */ _dist_esm_loader_js__WEBPACK_IMPORTED_MODULE_1__.defineCustomElements)
/* harmony export */ });
/* harmony import */ var _dist_esm_polyfills_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dist/esm/polyfills/index.js */ 4449);
/* harmony import */ var _dist_esm_loader_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../dist/esm/loader.js */ 8652);
/*!
* (C) Ionic http://ionicframework.com - MIT License
*/
/***/ }),
/***/ 4505:
/*!****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/BehaviorSubject.js ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "BehaviorSubject": () => (/* binding */ BehaviorSubject)
/* harmony export */ });
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subject */ 2218);
/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ 9086);
class BehaviorSubject extends _Subject__WEBPACK_IMPORTED_MODULE_0__.Subject {
constructor(_value) {
super();
this._value = _value;
}
get value() {
return this.getValue();
}
_subscribe(subscriber) {
const subscription = super._subscribe(subscriber);
if (subscription && !subscription.closed) {
subscriber.next(this._value);
}
return subscription;
}
getValue() {
if (this.hasError) {
throw this.thrownError;
} else if (this.closed) {
throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_1__.ObjectUnsubscribedError();
} else {
return this._value;
}
}
next(value) {
super.next(this._value = value);
}
}
/***/ }),
/***/ 472:
/*!****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/InnerSubscriber.js ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "InnerSubscriber": () => (/* binding */ InnerSubscriber)
/* harmony export */ });
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscriber */ 14);
class InnerSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
constructor(parent, outerValue, outerIndex) {
super();
this.parent = parent;
this.outerValue = outerValue;
this.outerIndex = outerIndex;
this.index = 0;
}
_next(value) {
this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
}
_error(error) {
this.parent.notifyError(error, this);
this.unsubscribe();
}
_complete() {
this.parent.notifyComplete(this);
this.unsubscribe();
}
}
/***/ }),
/***/ 2378:
/*!***********************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/Observable.js ***!
\***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Observable": () => (/* binding */ Observable)
/* harmony export */ });
/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/canReportError */ 5739);
/* harmony import */ var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/toSubscriber */ 8333);
/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./symbol/observable */ 6831);
/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util/pipe */ 6800);
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./config */ 146);
class Observable {
constructor(subscribe) {
this._isScalar = false;
if (subscribe) {
this._subscribe = subscribe;
}
}
lift(operator) {
const observable = new Observable();
observable.source = this;
observable.operator = operator;
return observable;
}
subscribe(observerOrNext, error, complete) {
const {
operator
} = this;
const sink = (0,_util_toSubscriber__WEBPACK_IMPORTED_MODULE_0__.toSubscriber)(observerOrNext, error, complete);
if (operator) {
sink.add(operator.call(sink, this.source));
} else {
sink.add(this.source || _config__WEBPACK_IMPORTED_MODULE_1__.config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable ? this._subscribe(sink) : this._trySubscribe(sink));
}
if (_config__WEBPACK_IMPORTED_MODULE_1__.config.useDeprecatedSynchronousErrorHandling) {
if (sink.syncErrorThrowable) {
sink.syncErrorThrowable = false;
if (sink.syncErrorThrown) {
throw sink.syncErrorValue;
}
}
}
return sink;
}
_trySubscribe(sink) {
try {
return this._subscribe(sink);
} catch (err) {
if (_config__WEBPACK_IMPORTED_MODULE_1__.config.useDeprecatedSynchronousErrorHandling) {
sink.syncErrorThrown = true;
sink.syncErrorValue = err;
}
if ((0,_util_canReportError__WEBPACK_IMPORTED_MODULE_2__.canReportError)(sink)) {
sink.error(err);
} else {
console.warn(err);
}
}
}
forEach(next, promiseCtor) {
promiseCtor = getPromiseCtor(promiseCtor);
return new promiseCtor((resolve, reject) => {
let subscription;
subscription = this.subscribe(value => {
try {
next(value);
} catch (err) {
reject(err);
if (subscription) {
subscription.unsubscribe();
}
}
}, reject, resolve);
});
}
_subscribe(subscriber) {
const {
source
} = this;
return source && source.subscribe(subscriber);
}
[_symbol_observable__WEBPACK_IMPORTED_MODULE_3__.observable]() {
return this;
}
pipe(...operations) {
if (operations.length === 0) {
return this;
}
return (0,_util_pipe__WEBPACK_IMPORTED_MODULE_4__.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) {
if (!promiseCtor) {
promiseCtor = _config__WEBPACK_IMPORTED_MODULE_1__.config.Promise || Promise;
}
if (!promiseCtor) {
throw new Error('no Promise impl found');
}
return promiseCtor;
}
/***/ }),
/***/ 9957:
/*!*********************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/Observer.js ***!
\*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "empty": () => (/* binding */ empty)
/* harmony export */ });
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./config */ 146);
/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/hostReportError */ 8897);
const empty = {
closed: true,
next(value) {},
error(err) {
if (_config__WEBPACK_IMPORTED_MODULE_0__.config.useDeprecatedSynchronousErrorHandling) {
throw err;
} else {
(0,_util_hostReportError__WEBPACK_IMPORTED_MODULE_1__.hostReportError)(err);
}
},
complete() {}
};
/***/ }),
/***/ 5266:
/*!****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "OuterSubscriber": () => (/* binding */ OuterSubscriber)
/* harmony export */ });
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscriber */ 14);
class OuterSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
this.destination.next(innerValue);
}
notifyError(error, innerSub) {
this.destination.error(error);
}
notifyComplete(innerSub) {
this.destination.complete();
}
}
/***/ }),
/***/ 2218:
/*!********************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/Subject.js ***!
\********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "AnonymousSubject": () => (/* binding */ AnonymousSubject),
/* harmony export */ "Subject": () => (/* binding */ Subject),
/* harmony export */ "SubjectSubscriber": () => (/* binding */ SubjectSubscriber)
/* harmony export */ });
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Observable */ 2378);
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscriber */ 14);
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Subscription */ 2425);
/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ 9086);
/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SubjectSubscription */ 1722);
/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../internal/symbol/rxSubscriber */ 1482);
class SubjectSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
constructor(destination) {
super(destination);
this.destination = destination;
}
}
class Subject extends _Observable__WEBPACK_IMPORTED_MODULE_1__.Observable {
constructor() {
super();
this.observers = [];
this.closed = false;
this.isStopped = false;
this.hasError = false;
this.thrownError = null;
}
[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_2__.rxSubscriber]() {
return new SubjectSubscriber(this);
}
lift(operator) {
const subject = new AnonymousSubject(this, this);
subject.operator = operator;
return subject;
}
next(value) {
if (this.closed) {
throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__.ObjectUnsubscribedError();
}
if (!this.isStopped) {
const {
observers
} = this;
const len = observers.length;
const copy = observers.slice();
for (let i = 0; i < len; i++) {
copy[i].next(value);
}
}
}
error(err) {
if (this.closed) {
throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__.ObjectUnsubscribedError();
}
this.hasError = true;
this.thrownError = err;
this.isStopped = true;
const {
observers
} = this;
const len = observers.length;
const copy = observers.slice();
for (let i = 0; i < len; i++) {
copy[i].error(err);
}
this.observers.length = 0;
}
complete() {
if (this.closed) {
throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__.ObjectUnsubscribedError();
}
this.isStopped = true;
const {
observers
} = this;
const len = observers.length;
const copy = observers.slice();
for (let i = 0; i < len; i++) {
copy[i].complete();
}
this.observers.length = 0;
}
unsubscribe() {
this.isStopped = true;
this.closed = true;
this.observers = null;
}
_trySubscribe(subscriber) {
if (this.closed) {
throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__.ObjectUnsubscribedError();
} else {
return super._trySubscribe(subscriber);
}
}
_subscribe(subscriber) {
if (this.closed) {
throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__.ObjectUnsubscribedError();
} else if (this.hasError) {
subscriber.error(this.thrownError);
return _Subscription__WEBPACK_IMPORTED_MODULE_4__.Subscription.EMPTY;
} else if (this.isStopped) {
subscriber.complete();
return _Subscription__WEBPACK_IMPORTED_MODULE_4__.Subscription.EMPTY;
} else {
this.observers.push(subscriber);
return new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__.SubjectSubscription(this, subscriber);
}
}
asObservable() {
const observable = new _Observable__WEBPACK_IMPORTED_MODULE_1__.Observable();
observable.source = this;
return observable;
}
}
Subject.create = (destination, source) => {
return new AnonymousSubject(destination, source);
};
class AnonymousSubject extends Subject {
constructor(destination, source) {
super();
this.destination = destination;
this.source = source;
}
next(value) {
const {
destination
} = this;
if (destination && destination.next) {
destination.next(value);
}
}
error(err) {
const {
destination
} = this;
if (destination && destination.error) {
this.destination.error(err);
}
}
complete() {
const {
destination
} = this;
if (destination && destination.complete) {
this.destination.complete();
}
}
_subscribe(subscriber) {
const {
source
} = this;
if (source) {
return this.source.subscribe(subscriber);
} else {
return _Subscription__WEBPACK_IMPORTED_MODULE_4__.Subscription.EMPTY;
}
}
}
/***/ }),
/***/ 1722:
/*!********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/SubjectSubscription.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "SubjectSubscription": () => (/* binding */ SubjectSubscription)
/* harmony export */ });
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscription */ 2425);
class SubjectSubscription extends _Subscription__WEBPACK_IMPORTED_MODULE_0__.Subscription {
constructor(subject, subscriber) {
super();
this.subject = subject;
this.subscriber = subscriber;
this.closed = false;
}
unsubscribe() {
if (this.closed) {
return;
}
this.closed = true;
const subject = this.subject;
const observers = subject.observers;
this.subject = null;
if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
return;
}
const subscriberIndex = observers.indexOf(this.subscriber);
if (subscriberIndex !== -1) {
observers.splice(subscriberIndex, 1);
}
}
}
/***/ }),
/***/ 14:
/*!***********************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/Subscriber.js ***!
\***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "SafeSubscriber": () => (/* binding */ SafeSubscriber),
/* harmony export */ "Subscriber": () => (/* binding */ Subscriber)
/* harmony export */ });
/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/isFunction */ 1900);
/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Observer */ 9957);
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscription */ 2425);
/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../internal/symbol/rxSubscriber */ 1482);
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./config */ 146);
/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util/hostReportError */ 8897);
class Subscriber extends _Subscription__WEBPACK_IMPORTED_MODULE_0__.Subscription {
constructor(destinationOrNext, error, complete) {
super();
this.syncErrorValue = null;
this.syncErrorThrown = false;
this.syncErrorThrowable = false;
this.isStopped = false;
switch (arguments.length) {
case 0:
this.destination = _Observer__WEBPACK_IMPORTED_MODULE_1__.empty;
break;
case 1:
if (!destinationOrNext) {
this.destination = _Observer__WEBPACK_IMPORTED_MODULE_1__.empty;
break;
}
if (typeof destinationOrNext === 'object') {
if (destinationOrNext instanceof Subscriber) {
this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;
this.destination = destinationOrNext;
destinationOrNext.add(this);
} else {
this.syncErrorThrowable = true;
this.destination = new SafeSubscriber(this, destinationOrNext);
}
break;
}
default:
this.syncErrorThrowable = true;
this.destination = new SafeSubscriber(this, destinationOrNext, error, complete);
break;
}
}
[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_2__.rxSubscriber]() {
return this;
}
static create(next, error, complete) {
const subscriber = new Subscriber(next, error, complete);
subscriber.syncErrorThrowable = false;
return subscriber;
}
next(value) {
if (!this.isStopped) {
this._next(value);
}
}
error(err) {
if (!this.isStopped) {
this.isStopped = true;
this._error(err);
}
}
complete() {
if (!this.isStopped) {
this.isStopped = true;
this._complete();
}
}
unsubscribe() {
if (this.closed) {
return;
}
this.isStopped = true;
super.unsubscribe();
}
_next(value) {
this.destination.next(value);
}
_error(err) {
this.destination.error(err);
this.unsubscribe();
}
_complete() {
this.destination.complete();
this.unsubscribe();
}
_unsubscribeAndRecycle() {
const {
_parentOrParents
} = this;
this._parentOrParents = null;
this.unsubscribe();
this.closed = false;
this.isStopped = false;
this._parentOrParents = _parentOrParents;
return this;
}
}
class SafeSubscriber extends Subscriber {
constructor(_parentSubscriber, observerOrNext, error, complete) {
super();
this._parentSubscriber = _parentSubscriber;
let next;
let context = this;
if ((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_3__.isFunction)(observerOrNext)) {
next = observerOrNext;
} else if (observerOrNext) {
next = observerOrNext.next;
error = observerOrNext.error;
complete = observerOrNext.complete;
if (observerOrNext !== _Observer__WEBPACK_IMPORTED_MODULE_1__.empty) {
context = Object.create(observerOrNext);
if ((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_3__.isFunction)(context.unsubscribe)) {
this.add(context.unsubscribe.bind(context));
}
context.unsubscribe = this.unsubscribe.bind(this);
}
}
this._context = context;
this._next = next;
this._error = error;
this._complete = complete;
}
next(value) {
if (!this.isStopped && this._next) {
const {
_parentSubscriber
} = this;
if (!_config__WEBPACK_IMPORTED_MODULE_4__.config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
this.__tryOrUnsub(this._next, value);
} else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {
this.unsubscribe();
}
}
}
error(err) {
if (!this.isStopped) {
const {
_parentSubscriber
} = this;
const {
useDeprecatedSynchronousErrorHandling
} = _config__WEBPACK_IMPORTED_MODULE_4__.config;
if (this._error) {
if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
this.__tryOrUnsub(this._error, err);
this.unsubscribe();
} else {
this.__tryOrSetError(_parentSubscriber, this._error, err);
this.unsubscribe();
}
} else if (!_parentSubscriber.syncErrorThrowable) {
this.unsubscribe();
if (useDeprecatedSynchronousErrorHandling) {
throw err;
}
(0,_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__.hostReportError)(err);
} else {
if (useDeprecatedSynchronousErrorHandling) {
_parentSubscriber.syncErrorValue = err;
_parentSubscriber.syncErrorThrown = true;
} else {
(0,_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__.hostReportError)(err);
}
this.unsubscribe();
}
}
}
complete() {
if (!this.isStopped) {
const {
_parentSubscriber
} = this;
if (this._complete) {
const wrappedComplete = () => this._complete.call(this._context);
if (!_config__WEBPACK_IMPORTED_MODULE_4__.config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
this.__tryOrUnsub(wrappedComplete);
this.unsubscribe();
} else {
this.__tryOrSetError(_parentSubscriber, wrappedComplete);
this.unsubscribe();
}
} else {
this.unsubscribe();
}
}
}
__tryOrUnsub(fn, value) {
try {
fn.call(this._context, value);
} catch (err) {
this.unsubscribe();
if (_config__WEBPACK_IMPORTED_MODULE_4__.config.useDeprecatedSynchronousErrorHandling) {
throw err;
} else {
(0,_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__.hostReportError)(err);
}
}
}
__tryOrSetError(parent, fn, value) {
if (!_config__WEBPACK_IMPORTED_MODULE_4__.config.useDeprecatedSynchronousErrorHandling) {
throw new Error('bad call');
}
try {
fn.call(this._context, value);
} catch (err) {
if (_config__WEBPACK_IMPORTED_MODULE_4__.config.useDeprecatedSynchronousErrorHandling) {
parent.syncErrorValue = err;
parent.syncErrorThrown = true;
return true;
} else {
(0,_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__.hostReportError)(err);
return true;
}
}
return false;
}
_unsubscribe() {
const {
_parentSubscriber
} = this;
this._context = null;
this._parentSubscriber = null;
_parentSubscriber.unsubscribe();
}
}
/***/ }),
/***/ 2425:
/*!*************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/Subscription.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Subscription": () => (/* binding */ Subscription)
/* harmony export */ });
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/isArray */ 4327);
/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/isObject */ 6549);
/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/isFunction */ 1900);
/* harmony import */ var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/UnsubscriptionError */ 7875);
class Subscription {
constructor(unsubscribe) {
this.closed = false;
this._parentOrParents = null;
this._subscriptions = null;
if (unsubscribe) {
this._ctorUnsubscribe = true;
this._unsubscribe = unsubscribe;
}
}
unsubscribe() {
let errors;
if (this.closed) {
return;
}
let {
_parentOrParents,
_ctorUnsubscribe,
_unsubscribe,
_subscriptions
} = this;
this.closed = true;
this._parentOrParents = null;
this._subscriptions = null;
if (_parentOrParents instanceof Subscription) {
_parentOrParents.remove(this);
} else if (_parentOrParents !== null) {
for (let index = 0; index < _parentOrParents.length; ++index) {
const parent = _parentOrParents[index];
parent.remove(this);
}
}
if ((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(_unsubscribe)) {
if (_ctorUnsubscribe) {
this._unsubscribe = undefined;
}
try {
_unsubscribe.call(this);
} catch (e) {
errors = e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_1__.UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e];
}
}
if ((0,_util_isArray__WEBPACK_IMPORTED_MODULE_2__.isArray)(_subscriptions)) {
let index = -1;
let len = _subscriptions.length;
while (++index < len) {
const sub = _subscriptions[index];
if ((0,_util_isObject__WEBPACK_IMPORTED_MODULE_3__.isObject)(sub)) {
try {
sub.unsubscribe();
} catch (e) {
errors = errors || [];
if (e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_1__.UnsubscriptionError) {
errors = errors.concat(flattenUnsubscriptionErrors(e.errors));
} else {
errors.push(e);
}
}
}
}
}
if (errors) {
throw new _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_1__.UnsubscriptionError(errors);
}
}
add(teardown) {
let subscription = teardown;
if (!teardown) {
return Subscription.EMPTY;
}
switch (typeof teardown) {
case 'function':
subscription = new Subscription(teardown);
case 'object':
if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {
return subscription;
} else if (this.closed) {
subscription.unsubscribe();
return subscription;
} else if (!(subscription instanceof Subscription)) {
const tmp = subscription;
subscription = new Subscription();
subscription._subscriptions = [tmp];
}
break;
default:
{
throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
}
}
let {
_parentOrParents
} = subscription;
if (_parentOrParents === null) {
subscription._parentOrParents = this;
} else if (_parentOrParents instanceof Subscription) {
if (_parentOrParents === this) {
return subscription;
}
subscription._parentOrParents = [_parentOrParents, this];
} else if (_parentOrParents.indexOf(this) === -1) {
_parentOrParents.push(this);
} else {
return subscription;
}
const subscriptions = this._subscriptions;
if (subscriptions === null) {
this._subscriptions = [subscription];
} else {
subscriptions.push(subscription);
}
return subscription;
}
remove(subscription) {
const subscriptions = this._subscriptions;
if (subscriptions) {
const subscriptionIndex = subscriptions.indexOf(subscription);
if (subscriptionIndex !== -1) {
subscriptions.splice(subscriptionIndex, 1);
}
}
}
}
Subscription.EMPTY = function (empty) {
empty.closed = true;
return empty;
}(new Subscription());
function flattenUnsubscriptionErrors(errors) {
return errors.reduce((errs, err) => errs.concat(err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_1__.UnsubscriptionError ? err.errors : err), []);
}
/***/ }),
/***/ 146:
/*!*******************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/config.js ***!
\*******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "config": () => (/* binding */ config)
/* harmony export */ });
let _enable_super_gross_mode_that_will_cause_bad_things = false;
const config = {
Promise: undefined,
set useDeprecatedSynchronousErrorHandling(value) {
if (value) {
const error = new Error();
console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack);
} else if (_enable_super_gross_mode_that_will_cause_bad_things) {
console.log('RxJS: Back to a better error behavior. Thank you. <3');
}
_enable_super_gross_mode_that_will_cause_bad_things = value;
},
get useDeprecatedSynchronousErrorHandling() {
return _enable_super_gross_mode_that_will_cause_bad_things;
}
};
/***/ }),
/***/ 2831:
/*!***************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/innerSubscribe.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ComplexInnerSubscriber": () => (/* binding */ ComplexInnerSubscriber),
/* harmony export */ "ComplexOuterSubscriber": () => (/* binding */ ComplexOuterSubscriber),
/* harmony export */ "SimpleInnerSubscriber": () => (/* binding */ SimpleInnerSubscriber),
/* harmony export */ "SimpleOuterSubscriber": () => (/* binding */ SimpleOuterSubscriber),
/* harmony export */ "innerSubscribe": () => (/* binding */ innerSubscribe)
/* harmony export */ });
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscriber */ 14);
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Observable */ 2378);
/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/subscribeTo */ 6983);
class SimpleInnerSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
constructor(parent) {
super();
this.parent = parent;
}
_next(value) {
this.parent.notifyNext(value);
}
_error(error) {
this.parent.notifyError(error);
this.unsubscribe();
}
_complete() {
this.parent.notifyComplete();
this.unsubscribe();
}
}
class ComplexInnerSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
constructor(parent, outerValue, outerIndex) {
super();
this.parent = parent;
this.outerValue = outerValue;
this.outerIndex = outerIndex;
}
_next(value) {
this.parent.notifyNext(this.outerValue, value, this.outerIndex, this);
}
_error(error) {
this.parent.notifyError(error);
this.unsubscribe();
}
_complete() {
this.parent.notifyComplete(this);
this.unsubscribe();
}
}
class SimpleOuterSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
notifyNext(innerValue) {
this.destination.next(innerValue);
}
notifyError(err) {
this.destination.error(err);
}
notifyComplete() {
this.destination.complete();
}
}
class ComplexOuterSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
notifyNext(_outerValue, innerValue, _outerIndex, _innerSub) {
this.destination.next(innerValue);
}
notifyError(error) {
this.destination.error(error);
}
notifyComplete(_innerSub) {
this.destination.complete();
}
}
function innerSubscribe(result, innerSubscriber) {
if (innerSubscriber.closed) {
return undefined;
}
if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_1__.Observable) {
return result.subscribe(innerSubscriber);
}
let subscription;
try {
subscription = (0,_util_subscribeTo__WEBPACK_IMPORTED_MODULE_2__.subscribeTo)(result)(innerSubscriber);
} catch (error) {
innerSubscriber.error(error);
}
return subscription;
}
/***/ }),
/***/ 4483:
/*!*********************************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/observable/ConnectableObservable.js ***!
\*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ConnectableObservable": () => (/* binding */ ConnectableObservable),
/* harmony export */ "connectableObservableDescriptor": () => (/* binding */ connectableObservableDescriptor)
/* harmony export */ });
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Subject */ 2218);
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 2378);
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Subscriber */ 14);
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ 2425);
/* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/refCount */ 8331);
class ConnectableObservable extends _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable {
constructor(source, subjectFactory) {
super();
this.source = source;
this.subjectFactory = subjectFactory;
this._refCount = 0;
this._isComplete = false;
}
_subscribe(subscriber) {
return this.getSubject().subscribe(subscriber);
}
getSubject() {
const subject = this._subject;
if (!subject || subject.isStopped) {
this._subject = this.subjectFactory();
}
return this._subject;
}
connect() {
let connection = this._connection;
if (!connection) {
this._isComplete = false;
connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription();
connection.add(this.source.subscribe(new ConnectableSubscriber(this.getSubject(), this)));
if (connection.closed) {
this._connection = null;
connection = _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription.EMPTY;
}
}
return connection;
}
refCount() {
return (0,_operators_refCount__WEBPACK_IMPORTED_MODULE_2__.refCount)()(this);
}
}
const connectableObservableDescriptor = (() => {
const connectableProto = ConnectableObservable.prototype;
return {
operator: {
value: null
},
_refCount: {
value: 0,
writable: true
},
_subject: {
value: null,
writable: true
},
_connection: {
value: null,
writable: true
},
_subscribe: {
value: connectableProto._subscribe
},
_isComplete: {
value: connectableProto._isComplete,
writable: true
},
getSubject: {
value: connectableProto.getSubject
},
connect: {
value: connectableProto.connect
},
refCount: {
value: connectableProto.refCount
}
};
})();
class ConnectableSubscriber extends _Subject__WEBPACK_IMPORTED_MODULE_3__.SubjectSubscriber {
constructor(destination, connectable) {
super(destination);
this.connectable = connectable;
}
_error(err) {
this._unsubscribe();
super._error(err);
}
_complete() {
this.connectable._isComplete = true;
this._unsubscribe();
super._complete();
}
_unsubscribe() {
const connectable = this.connectable;
if (connectable) {
this.connectable = null;
const connection = connectable._connection;
connectable._refCount = 0;
connectable._subject = null;
connectable._connection = null;
if (connection) {
connection.unsubscribe();
}
}
}
}
class RefCountOperator {
constructor(connectable) {
this.connectable = connectable;
}
call(subscriber, source) {
const {
connectable
} = this;
connectable._refCount++;
const refCounter = new RefCountSubscriber(subscriber, connectable);
const subscription = source.subscribe(refCounter);
if (!refCounter.closed) {
refCounter.connection = connectable.connect();
}
return subscription;
}
}
class RefCountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_4__.Subscriber {
constructor(destination, connectable) {
super(destination);
this.connectable = connectable;
}
_unsubscribe() {
const {
connectable
} = this;
if (!connectable) {
this.connection = null;
return;
}
this.connectable = null;
const refCount = connectable._refCount;
if (refCount <= 0) {
this.connection = null;
return;
}
connectable._refCount = refCount - 1;
if (refCount > 1) {
this.connection = null;
return;
}
const {
connection
} = this;
const sharedConnection = connectable._connection;
this.connection = null;
if (sharedConnection && (!connection || sharedConnection === connection)) {
sharedConnection.unsubscribe();
}
}
}
/***/ }),
/***/ 9193:
/*!*************************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/observable/combineLatest.js ***!
\*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "CombineLatestOperator": () => (/* binding */ CombineLatestOperator),
/* harmony export */ "CombineLatestSubscriber": () => (/* binding */ CombineLatestSubscriber),
/* harmony export */ "combineLatest": () => (/* binding */ combineLatest)
/* harmony export */ });
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isScheduler */ 7507);
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ 4327);
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../OuterSubscriber */ 5266);
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/subscribeToResult */ 640);
/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fromArray */ 8005);
const NONE = {};
function combineLatest(...observables) {
let resultSelector = undefined;
let scheduler = undefined;
if ((0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__.isScheduler)(observables[observables.length - 1])) {
scheduler = observables.pop();
}
if (typeof observables[observables.length - 1] === 'function') {
resultSelector = observables.pop();
}
if (observables.length === 1 && (0,_util_isArray__WEBPACK_IMPORTED_MODULE_1__.isArray)(observables[0])) {
observables = observables[0];
}
return (0,_fromArray__WEBPACK_IMPORTED_MODULE_2__.fromArray)(observables, scheduler).lift(new CombineLatestOperator(resultSelector));
}
class CombineLatestOperator {
constructor(resultSelector) {
this.resultSelector = resultSelector;
}
call(subscriber, source) {
return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));
}
}
class CombineLatestSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__.OuterSubscriber {
constructor(destination, resultSelector) {
super(destination);
this.resultSelector = resultSelector;
this.active = 0;
this.values = [];
this.observables = [];
}
_next(observable) {
this.values.push(NONE);
this.observables.push(observable);
}
_complete() {
const observables = this.observables;
const len = observables.length;
if (len === 0) {
this.destination.complete();
} else {
this.active = len;
this.toRespond = len;
for (let i = 0; i < len; i++) {
const observable = observables[i];
this.add((0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__.subscribeToResult)(this, observable, undefined, i));
}
}
}
notifyComplete(unused) {
if ((this.active -= 1) === 0) {
this.destination.complete();
}
}
notifyNext(_outerValue, innerValue, outerIndex) {
const values = this.values;
const oldVal = values[outerIndex];
const toRespond = !this.toRespond ? 0 : oldVal === NONE ? --this.toRespond : this.toRespond;
values[outerIndex] = innerValue;
if (toRespond === 0) {
if (this.resultSelector) {
this._tryResultSelector(values);
} else {
this.destination.next(values.slice());
}
}
}
_tryResultSelector(values) {
let result;
try {
result = this.resultSelector.apply(this, values);
} catch (err) {
this.destination.error(err);
return;
}
this.destination.next(result);
}
}
/***/ }),
/***/ 5828:
/*!******************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/observable/concat.js ***!
\******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "concat": () => (/* binding */ concat)
/* harmony export */ });
/* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./of */ 4139);
/* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../operators/concatAll */ 2692);
function concat(...observables) {
return (0,_operators_concatAll__WEBPACK_IMPORTED_MODULE_0__.concatAll)()((0,_of__WEBPACK_IMPORTED_MODULE_1__.of)(...observables));
}
/***/ }),
/***/ 2160:
/*!*****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/observable/defer.js ***!
\*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "defer": () => (/* binding */ defer)
/* harmony export */ });
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 2378);
/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ 4383);
/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./empty */ 6439);
function defer(observableFactory) {
return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => {
let input;
try {
input = observableFactory();
} catch (err) {
subscriber.error(err);
return undefined;
}
const source = input ? (0,_from__WEBPACK_IMPORTED_MODULE_1__.from)(input) : (0,_empty__WEBPACK_IMPORTED_MODULE_2__.empty)();
return source.subscribe(subscriber);
});
}
/***/ }),
/***/ 6439:
/*!*****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/observable/empty.js ***!
\*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "EMPTY": () => (/* binding */ EMPTY),
/* harmony export */ "empty": () => (/* binding */ empty)
/* harmony export */ });
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 2378);
const EMPTY = new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => subscriber.complete());
function empty(scheduler) {
return scheduler ? emptyScheduled(scheduler) : EMPTY;
}
function emptyScheduled(scheduler) {
return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => scheduler.schedule(() => subscriber.complete()));
}
/***/ }),
/***/ 4350:
/*!********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/observable/forkJoin.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "forkJoin": () => (/* binding */ forkJoin)
/* harmony export */ });
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Observable */ 2378);
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isArray */ 4327);
/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/map */ 6942);
/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isObject */ 6549);
/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./from */ 4383);
function forkJoin(...sources) {
if (sources.length === 1) {
const first = sources[0];
if ((0,_util_isArray__WEBPACK_IMPORTED_MODULE_0__.isArray)(first)) {
return forkJoinInternal(first, null);
}
if ((0,_util_isObject__WEBPACK_IMPORTED_MODULE_1__.isObject)(first) && Object.getPrototypeOf(first) === Object.prototype) {
const keys = Object.keys(first);
return forkJoinInternal(keys.map(key => first[key]), keys);
}
}
if (typeof sources[sources.length - 1] === 'function') {
const resultSelector = sources.pop();
sources = sources.length === 1 && (0,_util_isArray__WEBPACK_IMPORTED_MODULE_0__.isArray)(sources[0]) ? sources[0] : sources;
return forkJoinInternal(sources, null).pipe((0,_operators_map__WEBPACK_IMPORTED_MODULE_2__.map)(args => resultSelector(...args)));
}
return forkJoinInternal(sources, null);
}
function forkJoinInternal(sources, keys) {
return new _Observable__WEBPACK_IMPORTED_MODULE_3__.Observable(subscriber => {
const len = sources.length;
if (len === 0) {
subscriber.complete();
return;
}
const values = new Array(len);
let completed = 0;
let emitted = 0;
for (let i = 0; i < len; i++) {
const source = (0,_from__WEBPACK_IMPORTED_MODULE_4__.from)(sources[i]);
let hasValue = false;
subscriber.add(source.subscribe({
next: value => {
if (!hasValue) {
hasValue = true;
emitted++;
}
values[i] = value;
},
error: err => subscriber.error(err),
complete: () => {
completed++;
if (completed === len || !hasValue) {
if (emitted === len) {
subscriber.next(keys ? keys.reduce((result, key, i) => (result[key] = values[i], result), {}) : values);
}
subscriber.complete();
}
}
}));
}
});
}
/***/ }),
/***/ 4383:
/*!****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/observable/from.js ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "from": () => (/* binding */ from)
/* harmony export */ });
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 2378);
/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/subscribeTo */ 6983);
/* harmony import */ var _scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduled/scheduled */ 2476);
function from(input, scheduler) {
if (!scheduler) {
if (input instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable) {
return input;
}
return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable((0,_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__.subscribeTo)(input));
} else {
return (0,_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__.scheduled)(input, scheduler);
}
}
/***/ }),
/***/ 8005:
/*!*********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/observable/fromArray.js ***!
\*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "fromArray": () => (/* binding */ fromArray)
/* harmony export */ });
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 2378);
/* harmony import */ var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/subscribeToArray */ 5414);
/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduled/scheduleArray */ 8403);
function fromArray(input, scheduler) {
if (!scheduler) {
return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable((0,_util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__.subscribeToArray)(input));
} else {
return (0,_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__.scheduleArray)(input, scheduler);
}
}
/***/ }),
/***/ 6312:
/*!*********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/observable/fromEvent.js ***!
\*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "fromEvent": () => (/* binding */ fromEvent)
/* harmony export */ });
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Observable */ 2378);
/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArray */ 4327);
/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isFunction */ 1900);
/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../operators/map */ 6942);
const toString = (() => Object.prototype.toString)();
function fromEvent(target, eventName, options, resultSelector) {
if ((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(options)) {
resultSelector = options;
options = undefined;
}
if (resultSelector) {
return fromEvent(target, eventName, options).pipe((0,_operators_map__WEBPACK_IMPORTED_MODULE_1__.map)(args => (0,_util_isArray__WEBPACK_IMPORTED_MODULE_2__.isArray)(args) ? resultSelector(...args) : resultSelector(args)));
}
return new _Observable__WEBPACK_IMPORTED_MODULE_3__.Observable(subscriber => {
function handler(e) {
if (arguments.length > 1) {
subscriber.next(Array.prototype.slice.call(arguments));
} else {
subscriber.next(e);
}
}
setupSubscription(target, eventName, handler, subscriber, options);
});
}
function setupSubscription(sourceObj, eventName, handler, subscriber, options) {
let unsubscribe;
if (isEventTarget(sourceObj)) {
const source = sourceObj;
sourceObj.addEventListener(eventName, handler, options);
unsubscribe = () => source.removeEventListener(eventName, handler, options);
} else if (isJQueryStyleEventEmitter(sourceObj)) {
const source = sourceObj;
sourceObj.on(eventName, handler);
unsubscribe = () => source.off(eventName, handler);
} else if (isNodeStyleEventEmitter(sourceObj)) {
const source = sourceObj;
sourceObj.addListener(eventName, handler);
unsubscribe = () => source.removeListener(eventName, handler);
} else if (sourceObj && sourceObj.length) {
for (let i = 0, len = sourceObj.length; i < len; i++) {
setupSubscription(sourceObj[i], eventName, handler, subscriber, options);
}
} else {
throw new TypeError('Invalid event target');
}
subscriber.add(unsubscribe);
}
function isNodeStyleEventEmitter(sourceObj) {
return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';
}
function isJQueryStyleEventEmitter(sourceObj) {
return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';
}
function isEventTarget(sourceObj) {
return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';
}
/***/ }),
/***/ 8623:
/*!*****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/observable/merge.js ***!
\*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "merge": () => (/* binding */ merge)
/* harmony export */ });
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Observable */ 2378);
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isScheduler */ 7507);
/* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/mergeAll */ 6675);
/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fromArray */ 8005);
function merge(...observables) {
let concurrent = Number.POSITIVE_INFINITY;
let scheduler = null;
let last = observables[observables.length - 1];
if ((0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__.isScheduler)(last)) {
scheduler = observables.pop();
if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
concurrent = observables.pop();
}
} else if (typeof last === 'number') {
concurrent = observables.pop();
}
if (scheduler === null && observables.length === 1 && observables[0] instanceof _Observable__WEBPACK_IMPORTED_MODULE_1__.Observable) {
return observables[0];
}
return (0,_operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__.mergeAll)(concurrent)((0,_fromArray__WEBPACK_IMPORTED_MODULE_3__.fromArray)(observables, scheduler));
}
/***/ }),
/***/ 4139:
/*!**************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/observable/of.js ***!
\**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "of": () => (/* binding */ of)
/* harmony export */ });
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isScheduler */ 7507);
/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fromArray */ 8005);
/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduled/scheduleArray */ 8403);
function of(...args) {
let scheduler = args[args.length - 1];
if ((0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__.isScheduler)(scheduler)) {
args.pop();
return (0,_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_1__.scheduleArray)(args, scheduler);
} else {
return (0,_fromArray__WEBPACK_IMPORTED_MODULE_2__.fromArray)(args);
}
}
/***/ }),
/***/ 6587:
/*!**********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/observable/throwError.js ***!
\**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "throwError": () => (/* binding */ throwError)
/* harmony export */ });
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 2378);
function throwError(error, scheduler) {
if (!scheduler) {
return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => subscriber.error(error));
} else {
return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => scheduler.schedule(dispatch, 0, {
error,
subscriber
}));
}
}
function dispatch({
error,
subscriber
}) {
subscriber.error(error);
}
/***/ }),
/***/ 7418:
/*!*********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/catchError.js ***!
\*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "catchError": () => (/* binding */ catchError)
/* harmony export */ });
/* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ 2831);
function catchError(selector) {
return function catchErrorOperatorFunction(source) {
const operator = new CatchOperator(selector);
const caught = source.lift(operator);
return operator.caught = caught;
};
}
class CatchOperator {
constructor(selector) {
this.selector = selector;
}
call(subscriber, source) {
return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));
}
}
class CatchSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__.SimpleOuterSubscriber {
constructor(destination, selector, caught) {
super(destination);
this.selector = selector;
this.caught = caught;
}
error(err) {
if (!this.isStopped) {
let result;
try {
result = this.selector(err, this.caught);
} catch (err2) {
super.error(err2);
return;
}
this._unsubscribeAndRecycle();
const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__.SimpleInnerSubscriber(this);
this.add(innerSubscriber);
const innerSubscription = (0,_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__.innerSubscribe)(result, innerSubscriber);
if (innerSubscription !== innerSubscriber) {
this.add(innerSubscription);
}
}
}
}
/***/ }),
/***/ 2692:
/*!********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/concatAll.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "concatAll": () => (/* binding */ concatAll)
/* harmony export */ });
/* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeAll */ 6675);
function concatAll() {
return (0,_mergeAll__WEBPACK_IMPORTED_MODULE_0__.mergeAll)(1);
}
/***/ }),
/***/ 1133:
/*!********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/concatMap.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "concatMap": () => (/* binding */ concatMap)
/* harmony export */ });
/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeMap */ 522);
function concatMap(project, resultSelector) {
return (0,_mergeMap__WEBPACK_IMPORTED_MODULE_0__.mergeMap)(project, resultSelector, 1);
}
/***/ }),
/***/ 9701:
/*!*************************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/defaultIfEmpty.js ***!
\*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "defaultIfEmpty": () => (/* binding */ defaultIfEmpty)
/* harmony export */ });
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ 14);
function defaultIfEmpty(defaultValue = null) {
return source => source.lift(new DefaultIfEmptyOperator(defaultValue));
}
class DefaultIfEmptyOperator {
constructor(defaultValue) {
this.defaultValue = defaultValue;
}
call(subscriber, source) {
return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));
}
}
class DefaultIfEmptySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
constructor(destination, defaultValue) {
super(destination);
this.defaultValue = defaultValue;
this.isEmpty = true;
}
_next(value) {
this.isEmpty = false;
this.destination.next(value);
}
_complete() {
if (this.isEmpty) {
this.destination.next(this.defaultValue);
}
this.destination.complete();
}
}
/***/ }),
/***/ 3298:
/*!*******************************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/distinctUntilChanged.js ***!
\*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "distinctUntilChanged": () => (/* binding */ distinctUntilChanged)
/* harmony export */ });
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ 14);
function distinctUntilChanged(compare, keySelector) {
return source => source.lift(new DistinctUntilChangedOperator(compare, keySelector));
}
class DistinctUntilChangedOperator {
constructor(compare, keySelector) {
this.compare = compare;
this.keySelector = keySelector;
}
call(subscriber, source) {
return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));
}
}
class DistinctUntilChangedSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
constructor(destination, compare, keySelector) {
super(destination);
this.keySelector = keySelector;
this.hasKey = false;
if (typeof compare === 'function') {
this.compare = compare;
}
}
compare(x, y) {
return x === y;
}
_next(value) {
let key;
try {
const {
keySelector
} = this;
key = keySelector ? keySelector(value) : value;
} catch (err) {
return this.destination.error(err);
}
let result = false;
if (this.hasKey) {
try {
const {
compare
} = this;
result = compare(this.key, key);
} catch (err) {
return this.destination.error(err);
}
} else {
this.hasKey = true;
}
if (!result) {
this.key = key;
this.destination.next(value);
}
}
}
/***/ }),
/***/ 9151:
/*!*****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/filter.js ***!
\*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "filter": () => (/* binding */ filter)
/* harmony export */ });
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ 14);
function filter(predicate, thisArg) {
return function filterOperatorFunction(source) {
return source.lift(new FilterOperator(predicate, thisArg));
};
}
class FilterOperator {
constructor(predicate, thisArg) {
this.predicate = predicate;
this.thisArg = thisArg;
}
call(subscriber, source) {
return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));
}
}
class FilterSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
constructor(destination, predicate, thisArg) {
super(destination);
this.predicate = predicate;
this.thisArg = thisArg;
this.count = 0;
}
_next(value) {
let result;
try {
result = this.predicate.call(this.thisArg, value, this.count++);
} catch (err) {
this.destination.error(err);
return;
}
if (result) {
this.destination.next(value);
}
}
}
/***/ }),
/***/ 4661:
/*!*******************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/finalize.js ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "finalize": () => (/* binding */ finalize)
/* harmony export */ });
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ 14);
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ 2425);
function finalize(callback) {
return source => source.lift(new FinallyOperator(callback));
}
class FinallyOperator {
constructor(callback) {
this.callback = callback;
}
call(subscriber, source) {
return source.subscribe(new FinallySubscriber(subscriber, this.callback));
}
}
class FinallySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
constructor(destination, callback) {
super(destination);
this.add(new _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription(callback));
}
}
/***/ }),
/***/ 5670:
/*!****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/first.js ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "first": () => (/* binding */ first)
/* harmony export */ });
/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/EmptyError */ 213);
/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./filter */ 9151);
/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./take */ 3910);
/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaultIfEmpty */ 9701);
/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./throwIfEmpty */ 2013);
/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ 1356);
function first(predicate, defaultValue) {
const hasDefaultValue = arguments.length >= 2;
return source => source.pipe(predicate ? (0,_filter__WEBPACK_IMPORTED_MODULE_0__.filter)((v, i) => predicate(v, i, source)) : _util_identity__WEBPACK_IMPORTED_MODULE_1__.identity, (0,_take__WEBPACK_IMPORTED_MODULE_2__.take)(1), hasDefaultValue ? (0,_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__.defaultIfEmpty)(defaultValue) : (0,_throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__.throwIfEmpty)(() => new _util_EmptyError__WEBPACK_IMPORTED_MODULE_5__.EmptyError()));
}
/***/ }),
/***/ 5690:
/*!***************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/last.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "last": () => (/* binding */ last)
/* harmony export */ });
/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/EmptyError */ 213);
/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./filter */ 9151);
/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./takeLast */ 7760);
/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./throwIfEmpty */ 2013);
/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaultIfEmpty */ 9701);
/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ 1356);
function last(predicate, defaultValue) {
const hasDefaultValue = arguments.length >= 2;
return source => source.pipe(predicate ? (0,_filter__WEBPACK_IMPORTED_MODULE_0__.filter)((v, i) => predicate(v, i, source)) : _util_identity__WEBPACK_IMPORTED_MODULE_1__.identity, (0,_takeLast__WEBPACK_IMPORTED_MODULE_2__.takeLast)(1), hasDefaultValue ? (0,_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__.defaultIfEmpty)(defaultValue) : (0,_throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__.throwIfEmpty)(() => new _util_EmptyError__WEBPACK_IMPORTED_MODULE_5__.EmptyError()));
}
/***/ }),
/***/ 6942:
/*!**************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/map.js ***!
\**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "MapOperator": () => (/* binding */ MapOperator),
/* harmony export */ "map": () => (/* binding */ map)
/* harmony export */ });
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ 14);
function map(project, thisArg) {
return function mapOperation(source) {
if (typeof project !== 'function') {
throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');
}
return source.lift(new MapOperator(project, thisArg));
};
}
class MapOperator {
constructor(project, thisArg) {
this.project = project;
this.thisArg = thisArg;
}
call(subscriber, source) {
return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));
}
}
class MapSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
constructor(destination, project, thisArg) {
super(destination);
this.project = project;
this.count = 0;
this.thisArg = thisArg || this;
}
_next(value) {
let result;
try {
result = this.project.call(this.thisArg, value, this.count++);
} catch (err) {
this.destination.error(err);
return;
}
this.destination.next(result);
}
}
/***/ }),
/***/ 9361:
/*!****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/mapTo.js ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "mapTo": () => (/* binding */ mapTo)
/* harmony export */ });
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ 14);
function mapTo(value) {
return source => source.lift(new MapToOperator(value));
}
class MapToOperator {
constructor(value) {
this.value = value;
}
call(subscriber, source) {
return source.subscribe(new MapToSubscriber(subscriber, this.value));
}
}
class MapToSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
constructor(destination, value) {
super(destination);
this.value = value;
}
_next(x) {
this.destination.next(this.value);
}
}
/***/ }),
/***/ 6675:
/*!*******************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/mergeAll.js ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "mergeAll": () => (/* binding */ mergeAll)
/* harmony export */ });
/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeMap */ 522);
/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ 1356);
function mergeAll(concurrent = Number.POSITIVE_INFINITY) {
return (0,_mergeMap__WEBPACK_IMPORTED_MODULE_0__.mergeMap)(_util_identity__WEBPACK_IMPORTED_MODULE_1__.identity, concurrent);
}
/***/ }),
/***/ 522:
/*!*******************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/mergeMap.js ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "MergeMapOperator": () => (/* binding */ MergeMapOperator),
/* harmony export */ "MergeMapSubscriber": () => (/* binding */ MergeMapSubscriber),
/* harmony export */ "flatMap": () => (/* binding */ flatMap),
/* harmony export */ "mergeMap": () => (/* binding */ mergeMap)
/* harmony export */ });
/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map */ 6942);
/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/from */ 4383);
/* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../innerSubscribe */ 2831);
function mergeMap(project, resultSelector, concurrent = Number.POSITIVE_INFINITY) {
if (typeof resultSelector === 'function') {
return source => source.pipe(mergeMap((a, i) => (0,_observable_from__WEBPACK_IMPORTED_MODULE_0__.from)(project(a, i)).pipe((0,_map__WEBPACK_IMPORTED_MODULE_1__.map)((b, ii) => resultSelector(a, b, i, ii))), concurrent));
} else if (typeof resultSelector === 'number') {
concurrent = resultSelector;
}
return source => source.lift(new MergeMapOperator(project, concurrent));
}
class MergeMapOperator {
constructor(project, concurrent = Number.POSITIVE_INFINITY) {
this.project = project;
this.concurrent = concurrent;
}
call(observer, source) {
return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));
}
}
class MergeMapSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__.SimpleOuterSubscriber {
constructor(destination, project, concurrent = Number.POSITIVE_INFINITY) {
super(destination);
this.project = project;
this.concurrent = concurrent;
this.hasCompleted = false;
this.buffer = [];
this.active = 0;
this.index = 0;
}
_next(value) {
if (this.active < this.concurrent) {
this._tryNext(value);
} else {
this.buffer.push(value);
}
}
_tryNext(value) {
let result;
const index = this.index++;
try {
result = this.project(value, index);
} catch (err) {
this.destination.error(err);
return;
}
this.active++;
this._innerSub(result);
}
_innerSub(ish) {
const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__.SimpleInnerSubscriber(this);
const destination = this.destination;
destination.add(innerSubscriber);
const innerSubscription = (0,_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__.innerSubscribe)(ish, innerSubscriber);
if (innerSubscription !== innerSubscriber) {
destination.add(innerSubscription);
}
}
_complete() {
this.hasCompleted = true;
if (this.active === 0 && this.buffer.length === 0) {
this.destination.complete();
}
this.unsubscribe();
}
notifyNext(innerValue) {
this.destination.next(innerValue);
}
notifyComplete() {
const buffer = this.buffer;
this.active--;
if (buffer.length > 0) {
this._next(buffer.shift());
} else if (this.active === 0 && this.hasCompleted) {
this.destination.complete();
}
}
}
const flatMap = mergeMap;
/***/ }),
/***/ 2787:
/*!********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/multicast.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "MulticastOperator": () => (/* binding */ MulticastOperator),
/* harmony export */ "multicast": () => (/* binding */ multicast)
/* harmony export */ });
/* harmony import */ var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/ConnectableObservable */ 4483);
function multicast(subjectOrSubjectFactory, selector) {
return function multicastOperatorFunction(source) {
let subjectFactory;
if (typeof subjectOrSubjectFactory === 'function') {
subjectFactory = subjectOrSubjectFactory;
} else {
subjectFactory = function subjectFactory() {
return subjectOrSubjectFactory;
};
}
if (typeof selector === 'function') {
return source.lift(new MulticastOperator(subjectFactory, selector));
}
const connectable = Object.create(source, _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__.connectableObservableDescriptor);
connectable.source = source;
connectable.subjectFactory = subjectFactory;
return connectable;
};
}
class MulticastOperator {
constructor(subjectFactory, selector) {
this.subjectFactory = subjectFactory;
this.selector = selector;
}
call(subscriber, source) {
const {
selector
} = this;
const subject = this.subjectFactory();
const subscription = selector(subject).subscribe(subscriber);
subscription.add(source.subscribe(subject));
return subscription;
}
}
/***/ }),
/***/ 8331:
/*!*******************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/refCount.js ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "refCount": () => (/* binding */ refCount)
/* harmony export */ });
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ 14);
function refCount() {
return function refCountOperatorFunction(source) {
return source.lift(new RefCountOperator(source));
};
}
class RefCountOperator {
constructor(connectable) {
this.connectable = connectable;
}
call(subscriber, source) {
const {
connectable
} = this;
connectable._refCount++;
const refCounter = new RefCountSubscriber(subscriber, connectable);
const subscription = source.subscribe(refCounter);
if (!refCounter.closed) {
refCounter.connection = connectable.connect();
}
return subscription;
}
}
class RefCountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
constructor(destination, connectable) {
super(destination);
this.connectable = connectable;
}
_unsubscribe() {
const {
connectable
} = this;
if (!connectable) {
this.connection = null;
return;
}
this.connectable = null;
const refCount = connectable._refCount;
if (refCount <= 0) {
this.connection = null;
return;
}
connectable._refCount = refCount - 1;
if (refCount > 1) {
this.connection = null;
return;
}
const {
connection
} = this;
const sharedConnection = connectable._connection;
this.connection = null;
if (sharedConnection && (!connection || sharedConnection === connection)) {
sharedConnection.unsubscribe();
}
}
}
/***/ }),
/***/ 2647:
/*!***************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/scan.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "scan": () => (/* binding */ scan)
/* harmony export */ });
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ 14);
function scan(accumulator, seed) {
let hasSeed = false;
if (arguments.length >= 2) {
hasSeed = true;
}
return function scanOperatorFunction(source) {
return source.lift(new ScanOperator(accumulator, seed, hasSeed));
};
}
class ScanOperator {
constructor(accumulator, seed, hasSeed = false) {
this.accumulator = accumulator;
this.seed = seed;
this.hasSeed = hasSeed;
}
call(subscriber, source) {
return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));
}
}
class ScanSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
constructor(destination, accumulator, _seed, hasSeed) {
super(destination);
this.accumulator = accumulator;
this._seed = _seed;
this.hasSeed = hasSeed;
this.index = 0;
}
get seed() {
return this._seed;
}
set seed(value) {
this.hasSeed = true;
this._seed = value;
}
_next(value) {
if (!this.hasSeed) {
this.seed = value;
this.destination.next(value);
} else {
return this._tryNext(value);
}
}
_tryNext(value) {
const index = this.index++;
let result;
try {
result = this.accumulator(this.seed, value, index);
} catch (err) {
this.destination.error(err);
}
this.seed = result;
this.destination.next(result);
}
}
/***/ }),
/***/ 4514:
/*!****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/share.js ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "share": () => (/* binding */ share)
/* harmony export */ });
/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./multicast */ 2787);
/* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./refCount */ 8331);
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ 2218);
function shareSubjectFactory() {
return new _Subject__WEBPACK_IMPORTED_MODULE_0__.Subject();
}
function share() {
return source => (0,_refCount__WEBPACK_IMPORTED_MODULE_1__.refCount)()((0,_multicast__WEBPACK_IMPORTED_MODULE_2__.multicast)(shareSubjectFactory)(source));
}
/***/ }),
/***/ 5722:
/*!********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/startWith.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "startWith": () => (/* binding */ startWith)
/* harmony export */ });
/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/concat */ 5828);
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isScheduler */ 7507);
function startWith(...array) {
const scheduler = array[array.length - 1];
if ((0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__.isScheduler)(scheduler)) {
array.pop();
return source => (0,_observable_concat__WEBPACK_IMPORTED_MODULE_1__.concat)(array, source, scheduler);
} else {
return source => (0,_observable_concat__WEBPACK_IMPORTED_MODULE_1__.concat)(array, source);
}
}
/***/ }),
/***/ 9095:
/*!********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/switchMap.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "switchMap": () => (/* binding */ switchMap)
/* harmony export */ });
/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map */ 6942);
/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/from */ 4383);
/* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../innerSubscribe */ 2831);
function switchMap(project, resultSelector) {
if (typeof resultSelector === 'function') {
return source => source.pipe(switchMap((a, i) => (0,_observable_from__WEBPACK_IMPORTED_MODULE_0__.from)(project(a, i)).pipe((0,_map__WEBPACK_IMPORTED_MODULE_1__.map)((b, ii) => resultSelector(a, b, i, ii)))));
}
return source => source.lift(new SwitchMapOperator(project));
}
class SwitchMapOperator {
constructor(project) {
this.project = project;
}
call(subscriber, source) {
return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));
}
}
class SwitchMapSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__.SimpleOuterSubscriber {
constructor(destination, project) {
super(destination);
this.project = project;
this.index = 0;
}
_next(value) {
let result;
const index = this.index++;
try {
result = this.project(value, index);
} catch (error) {
this.destination.error(error);
return;
}
this._innerSub(result);
}
_innerSub(result) {
const innerSubscription = this.innerSubscription;
if (innerSubscription) {
innerSubscription.unsubscribe();
}
const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__.SimpleInnerSubscriber(this);
const destination = this.destination;
destination.add(innerSubscriber);
this.innerSubscription = (0,_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__.innerSubscribe)(result, innerSubscriber);
if (this.innerSubscription !== innerSubscriber) {
destination.add(this.innerSubscription);
}
}
_complete() {
const {
innerSubscription
} = this;
if (!innerSubscription || innerSubscription.closed) {
super._complete();
}
this.unsubscribe();
}
_unsubscribe() {
this.innerSubscription = undefined;
}
notifyComplete() {
this.innerSubscription = undefined;
if (this.isStopped) {
super._complete();
}
}
notifyNext(innerValue) {
this.destination.next(innerValue);
}
}
/***/ }),
/***/ 3910:
/*!***************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/take.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "take": () => (/* binding */ take)
/* harmony export */ });
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscriber */ 14);
/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ 2846);
/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/empty */ 6439);
function take(count) {
return source => {
if (count === 0) {
return (0,_observable_empty__WEBPACK_IMPORTED_MODULE_0__.empty)();
} else {
return source.lift(new TakeOperator(count));
}
};
}
class TakeOperator {
constructor(total) {
this.total = total;
if (this.total < 0) {
throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__.ArgumentOutOfRangeError();
}
}
call(subscriber, source) {
return source.subscribe(new TakeSubscriber(subscriber, this.total));
}
}
class TakeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_2__.Subscriber {
constructor(destination, total) {
super(destination);
this.total = total;
this.count = 0;
}
_next(value) {
const total = this.total;
const count = ++this.count;
if (count <= total) {
this.destination.next(value);
if (count === total) {
this.destination.complete();
this.unsubscribe();
}
}
}
}
/***/ }),
/***/ 7760:
/*!*******************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/takeLast.js ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "takeLast": () => (/* binding */ takeLast)
/* harmony export */ });
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscriber */ 14);
/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ 2846);
/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/empty */ 6439);
function takeLast(count) {
return function takeLastOperatorFunction(source) {
if (count === 0) {
return (0,_observable_empty__WEBPACK_IMPORTED_MODULE_0__.empty)();
} else {
return source.lift(new TakeLastOperator(count));
}
};
}
class TakeLastOperator {
constructor(total) {
this.total = total;
if (this.total < 0) {
throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__.ArgumentOutOfRangeError();
}
}
call(subscriber, source) {
return source.subscribe(new TakeLastSubscriber(subscriber, this.total));
}
}
class TakeLastSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_2__.Subscriber {
constructor(destination, total) {
super(destination);
this.total = total;
this.ring = new Array();
this.count = 0;
}
_next(value) {
const ring = this.ring;
const total = this.total;
const count = this.count++;
if (ring.length < total) {
ring.push(value);
} else {
const index = count % total;
ring[index] = value;
}
}
_complete() {
const destination = this.destination;
let count = this.count;
if (count > 0) {
const total = this.count >= this.total ? this.total : this.count;
const ring = this.ring;
for (let i = 0; i < total; i++) {
const idx = count++ % total;
destination.next(ring[idx]);
}
}
destination.complete();
}
}
/***/ }),
/***/ 5050:
/*!********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/takeWhile.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "takeWhile": () => (/* binding */ takeWhile)
/* harmony export */ });
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ 14);
function takeWhile(predicate, inclusive = false) {
return source => source.lift(new TakeWhileOperator(predicate, inclusive));
}
class TakeWhileOperator {
constructor(predicate, inclusive) {
this.predicate = predicate;
this.inclusive = inclusive;
}
call(subscriber, source) {
return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive));
}
}
class TakeWhileSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
constructor(destination, predicate, inclusive) {
super(destination);
this.predicate = predicate;
this.inclusive = inclusive;
this.index = 0;
}
_next(value) {
const destination = this.destination;
let result;
try {
result = this.predicate(value, this.index++);
} catch (err) {
destination.error(err);
return;
}
this.nextOrComplete(value, result);
}
nextOrComplete(value, predicateResult) {
const destination = this.destination;
if (Boolean(predicateResult)) {
destination.next(value);
} else {
if (this.inclusive) {
destination.next(value);
}
destination.complete();
}
}
}
/***/ }),
/***/ 8759:
/*!**************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/tap.js ***!
\**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "tap": () => (/* binding */ tap)
/* harmony export */ });
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ 14);
/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/noop */ 6882);
/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isFunction */ 1900);
function tap(nextOrObserver, error, complete) {
return function tapOperatorFunction(source) {
return source.lift(new DoOperator(nextOrObserver, error, complete));
};
}
class DoOperator {
constructor(nextOrObserver, error, complete) {
this.nextOrObserver = nextOrObserver;
this.error = error;
this.complete = complete;
}
call(subscriber, source) {
return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));
}
}
class TapSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
constructor(destination, observerOrNext, error, complete) {
super(destination);
this._tapNext = _util_noop__WEBPACK_IMPORTED_MODULE_1__.noop;
this._tapError = _util_noop__WEBPACK_IMPORTED_MODULE_1__.noop;
this._tapComplete = _util_noop__WEBPACK_IMPORTED_MODULE_1__.noop;
this._tapError = error || _util_noop__WEBPACK_IMPORTED_MODULE_1__.noop;
this._tapComplete = complete || _util_noop__WEBPACK_IMPORTED_MODULE_1__.noop;
if ((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_2__.isFunction)(observerOrNext)) {
this._context = this;
this._tapNext = observerOrNext;
} else if (observerOrNext) {
this._context = observerOrNext;
this._tapNext = observerOrNext.next || _util_noop__WEBPACK_IMPORTED_MODULE_1__.noop;
this._tapError = observerOrNext.error || _util_noop__WEBPACK_IMPORTED_MODULE_1__.noop;
this._tapComplete = observerOrNext.complete || _util_noop__WEBPACK_IMPORTED_MODULE_1__.noop;
}
}
_next(value) {
try {
this._tapNext.call(this._context, value);
} catch (err) {
this.destination.error(err);
return;
}
this.destination.next(value);
}
_error(err) {
try {
this._tapError.call(this._context, err);
} catch (err) {
this.destination.error(err);
return;
}
this.destination.error(err);
}
_complete() {
try {
this._tapComplete.call(this._context);
} catch (err) {
this.destination.error(err);
return;
}
return this.destination.complete();
}
}
/***/ }),
/***/ 2013:
/*!***********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/operators/throwIfEmpty.js ***!
\***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "throwIfEmpty": () => (/* binding */ throwIfEmpty)
/* harmony export */ });
/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/EmptyError */ 213);
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ 14);
function throwIfEmpty(errorFactory = defaultErrorFactory) {
return source => {
return source.lift(new ThrowIfEmptyOperator(errorFactory));
};
}
class ThrowIfEmptyOperator {
constructor(errorFactory) {
this.errorFactory = errorFactory;
}
call(subscriber, source) {
return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory));
}
}
class ThrowIfEmptySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber {
constructor(destination, errorFactory) {
super(destination);
this.errorFactory = errorFactory;
this.hasValue = false;
}
_next(value) {
this.hasValue = true;
this.destination.next(value);
}
_complete() {
if (!this.hasValue) {
let err;
try {
err = this.errorFactory();
} catch (e) {
err = e;
}
this.destination.error(err);
} else {
return this.destination.complete();
}
}
}
function defaultErrorFactory() {
return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__.EmptyError();
}
/***/ }),
/***/ 8403:
/*!************************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduleArray.js ***!
\************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "scheduleArray": () => (/* binding */ scheduleArray)
/* harmony export */ });
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 2378);
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ 2425);
function scheduleArray(input, scheduler) {
return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => {
const sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription();
let i = 0;
sub.add(scheduler.schedule(function () {
if (i === input.length) {
subscriber.complete();
return;
}
subscriber.next(input[i++]);
if (!subscriber.closed) {
sub.add(this.schedule());
}
}));
return sub;
});
}
/***/ }),
/***/ 1232:
/*!***************************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduleIterable.js ***!
\***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "scheduleIterable": () => (/* binding */ scheduleIterable)
/* harmony export */ });
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 2378);
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ 2425);
/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../symbol/iterator */ 2803);
function scheduleIterable(input, scheduler) {
if (!input) {
throw new Error('Iterable cannot be null');
}
return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => {
const sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription();
let iterator;
sub.add(() => {
if (iterator && typeof iterator.return === 'function') {
iterator.return();
}
});
sub.add(scheduler.schedule(() => {
iterator = input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_2__.iterator]();
sub.add(scheduler.schedule(function () {
if (subscriber.closed) {
return;
}
let value;
let done;
try {
const result = iterator.next();
value = result.value;
done = result.done;
} catch (err) {
subscriber.error(err);
return;
}
if (done) {
subscriber.complete();
} else {
subscriber.next(value);
this.schedule();
}
}));
}));
return sub;
});
}
/***/ }),
/***/ 1145:
/*!*****************************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduleObservable.js ***!
\*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "scheduleObservable": () => (/* binding */ scheduleObservable)
/* harmony export */ });
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 2378);
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ 2425);
/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../symbol/observable */ 6831);
function scheduleObservable(input, scheduler) {
return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => {
const sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription();
sub.add(scheduler.schedule(() => {
const observable = input[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__.observable]();
sub.add(observable.subscribe({
next(value) {
sub.add(scheduler.schedule(() => subscriber.next(value)));
},
error(err) {
sub.add(scheduler.schedule(() => subscriber.error(err)));
},
complete() {
sub.add(scheduler.schedule(() => subscriber.complete()));
}
}));
}));
return sub;
});
}
/***/ }),
/***/ 467:
/*!**************************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/scheduled/schedulePromise.js ***!
\**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "schedulePromise": () => (/* binding */ schedulePromise)
/* harmony export */ });
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 2378);
/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ 2425);
function schedulePromise(input, scheduler) {
return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => {
const sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription();
sub.add(scheduler.schedule(() => input.then(value => {
sub.add(scheduler.schedule(() => {
subscriber.next(value);
sub.add(scheduler.schedule(() => subscriber.complete()));
}));
}, err => {
sub.add(scheduler.schedule(() => subscriber.error(err)));
})));
return sub;
});
}
/***/ }),
/***/ 2476:
/*!********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduled.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "scheduled": () => (/* binding */ scheduled)
/* harmony export */ });
/* harmony import */ var _scheduleObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scheduleObservable */ 1145);
/* harmony import */ var _schedulePromise__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./schedulePromise */ 467);
/* harmony import */ var _scheduleArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./scheduleArray */ 8403);
/* harmony import */ var _scheduleIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./scheduleIterable */ 1232);
/* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isInteropObservable */ 5781);
/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isPromise */ 5192);
/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isArrayLike */ 5122);
/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util/isIterable */ 9674);
function scheduled(input, scheduler) {
if (input != null) {
if ((0,_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_0__.isInteropObservable)(input)) {
return (0,_scheduleObservable__WEBPACK_IMPORTED_MODULE_1__.scheduleObservable)(input, scheduler);
} else if ((0,_util_isPromise__WEBPACK_IMPORTED_MODULE_2__.isPromise)(input)) {
return (0,_schedulePromise__WEBPACK_IMPORTED_MODULE_3__.schedulePromise)(input, scheduler);
} else if ((0,_util_isArrayLike__WEBPACK_IMPORTED_MODULE_4__.isArrayLike)(input)) {
return (0,_scheduleArray__WEBPACK_IMPORTED_MODULE_5__.scheduleArray)(input, scheduler);
} else if ((0,_util_isIterable__WEBPACK_IMPORTED_MODULE_6__.isIterable)(input) || typeof input === 'string') {
return (0,_scheduleIterable__WEBPACK_IMPORTED_MODULE_7__.scheduleIterable)(input, scheduler);
}
}
throw new TypeError((input !== null && typeof input || input) + ' is not observable');
}
/***/ }),
/***/ 2803:
/*!****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/symbol/iterator.js ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "$$iterator": () => (/* binding */ $$iterator),
/* harmony export */ "getSymbolIterator": () => (/* binding */ getSymbolIterator),
/* harmony export */ "iterator": () => (/* binding */ iterator)
/* harmony export */ });
function getSymbolIterator() {
if (typeof Symbol !== 'function' || !Symbol.iterator) {
return '@@iterator';
}
return Symbol.iterator;
}
const iterator = getSymbolIterator();
const $$iterator = iterator;
/***/ }),
/***/ 6831:
/*!******************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/symbol/observable.js ***!
\******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "observable": () => (/* binding */ observable)
/* harmony export */ });
const observable = (() => typeof Symbol === 'function' && Symbol.observable || '@@observable')();
/***/ }),
/***/ 1482:
/*!********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/symbol/rxSubscriber.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "$$rxSubscriber": () => (/* binding */ $$rxSubscriber),
/* harmony export */ "rxSubscriber": () => (/* binding */ rxSubscriber)
/* harmony export */ });
const rxSubscriber = (() => typeof Symbol === 'function' ? Symbol('rxSubscriber') : '@@rxSubscriber_' + Math.random())();
const $$rxSubscriber = rxSubscriber;
/***/ }),
/***/ 2846:
/*!*****************************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/ArgumentOutOfRangeError.js ***!
\*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ArgumentOutOfRangeError": () => (/* binding */ ArgumentOutOfRangeError)
/* harmony export */ });
const ArgumentOutOfRangeErrorImpl = (() => {
function ArgumentOutOfRangeErrorImpl() {
Error.call(this);
this.message = 'argument out of range';
this.name = 'ArgumentOutOfRangeError';
return this;
}
ArgumentOutOfRangeErrorImpl.prototype = Object.create(Error.prototype);
return ArgumentOutOfRangeErrorImpl;
})();
const ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;
/***/ }),
/***/ 213:
/*!****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/EmptyError.js ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "EmptyError": () => (/* binding */ EmptyError)
/* harmony export */ });
const EmptyErrorImpl = (() => {
function EmptyErrorImpl() {
Error.call(this);
this.message = 'no elements in sequence';
this.name = 'EmptyError';
return this;
}
EmptyErrorImpl.prototype = Object.create(Error.prototype);
return EmptyErrorImpl;
})();
const EmptyError = EmptyErrorImpl;
/***/ }),
/***/ 9086:
/*!*****************************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/ObjectUnsubscribedError.js ***!
\*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "ObjectUnsubscribedError": () => (/* binding */ ObjectUnsubscribedError)
/* harmony export */ });
const ObjectUnsubscribedErrorImpl = (() => {
function ObjectUnsubscribedErrorImpl() {
Error.call(this);
this.message = 'object unsubscribed';
this.name = 'ObjectUnsubscribedError';
return this;
}
ObjectUnsubscribedErrorImpl.prototype = Object.create(Error.prototype);
return ObjectUnsubscribedErrorImpl;
})();
const ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;
/***/ }),
/***/ 7875:
/*!*************************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/UnsubscriptionError.js ***!
\*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "UnsubscriptionError": () => (/* binding */ UnsubscriptionError)
/* harmony export */ });
const UnsubscriptionErrorImpl = (() => {
function UnsubscriptionErrorImpl(errors) {
Error.call(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;
return this;
}
UnsubscriptionErrorImpl.prototype = Object.create(Error.prototype);
return UnsubscriptionErrorImpl;
})();
const UnsubscriptionError = UnsubscriptionErrorImpl;
/***/ }),
/***/ 5739:
/*!********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/canReportError.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "canReportError": () => (/* binding */ canReportError)
/* harmony export */ });
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ 14);
function canReportError(observer) {
while (observer) {
const {
closed,
destination,
isStopped
} = observer;
if (closed || isStopped) {
return false;
} else if (destination && destination instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber) {
observer = destination;
} else {
observer = null;
}
}
return true;
}
/***/ }),
/***/ 8897:
/*!*********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/hostReportError.js ***!
\*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "hostReportError": () => (/* binding */ hostReportError)
/* harmony export */ });
function hostReportError(err) {
setTimeout(() => {
throw err;
}, 0);
}
/***/ }),
/***/ 1356:
/*!**************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/identity.js ***!
\**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "identity": () => (/* binding */ identity)
/* harmony export */ });
function identity(x) {
return x;
}
/***/ }),
/***/ 4327:
/*!*************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/isArray.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "isArray": () => (/* binding */ isArray)
/* harmony export */ });
const isArray = (() => Array.isArray || (x => x && typeof x.length === 'number'))();
/***/ }),
/***/ 5122:
/*!*****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/isArrayLike.js ***!
\*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "isArrayLike": () => (/* binding */ isArrayLike)
/* harmony export */ });
const isArrayLike = x => x && typeof x.length === 'number' && typeof x !== 'function';
/***/ }),
/***/ 1900:
/*!****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/isFunction.js ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "isFunction": () => (/* binding */ isFunction)
/* harmony export */ });
function isFunction(x) {
return typeof x === 'function';
}
/***/ }),
/***/ 5781:
/*!*************************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/isInteropObservable.js ***!
\*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "isInteropObservable": () => (/* binding */ isInteropObservable)
/* harmony export */ });
/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/observable */ 6831);
function isInteropObservable(input) {
return input && typeof input[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__.observable] === 'function';
}
/***/ }),
/***/ 9674:
/*!****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/isIterable.js ***!
\****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "isIterable": () => (/* binding */ isIterable)
/* harmony export */ });
/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/iterator */ 2803);
function isIterable(input) {
return input && typeof input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__.iterator] === 'function';
}
/***/ }),
/***/ 6549:
/*!**************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/isObject.js ***!
\**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "isObject": () => (/* binding */ isObject)
/* harmony export */ });
function isObject(x) {
return x !== null && typeof x === 'object';
}
/***/ }),
/***/ 5192:
/*!***************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/isPromise.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "isPromise": () => (/* binding */ isPromise)
/* harmony export */ });
function isPromise(value) {
return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';
}
/***/ }),
/***/ 7507:
/*!*****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/isScheduler.js ***!
\*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "isScheduler": () => (/* binding */ isScheduler)
/* harmony export */ });
function isScheduler(value) {
return value && typeof value.schedule === 'function';
}
/***/ }),
/***/ 6882:
/*!**********************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/noop.js ***!
\**********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "noop": () => (/* binding */ noop)
/* harmony export */ });
function noop() {}
/***/ }),
/***/ 6800:
/*!**********************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/pipe.js ***!
\**********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "pipe": () => (/* binding */ pipe),
/* harmony export */ "pipeFromArray": () => (/* binding */ pipeFromArray)
/* harmony export */ });
/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./identity */ 1356);
function pipe(...fns) {
return pipeFromArray(fns);
}
function pipeFromArray(fns) {
if (fns.length === 0) {
return _identity__WEBPACK_IMPORTED_MODULE_0__.identity;
}
if (fns.length === 1) {
return fns[0];
}
return function piped(input) {
return fns.reduce((prev, fn) => fn(prev), input);
};
}
/***/ }),
/***/ 6983:
/*!*****************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/subscribeTo.js ***!
\*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "subscribeTo": () => (/* binding */ subscribeTo)
/* harmony export */ });
/* harmony import */ var _subscribeToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./subscribeToArray */ 5414);
/* harmony import */ var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./subscribeToPromise */ 4276);
/* harmony import */ var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./subscribeToIterable */ 6473);
/* harmony import */ var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./subscribeToObservable */ 1492);
/* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isArrayLike */ 5122);
/* harmony import */ var _isPromise__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./isPromise */ 5192);
/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./isObject */ 6549);
/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../symbol/iterator */ 2803);
/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/observable */ 6831);
const subscribeTo = result => {
if (!!result && typeof result[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__.observable] === 'function') {
return (0,_subscribeToObservable__WEBPACK_IMPORTED_MODULE_1__.subscribeToObservable)(result);
} else if ((0,_isArrayLike__WEBPACK_IMPORTED_MODULE_2__.isArrayLike)(result)) {
return (0,_subscribeToArray__WEBPACK_IMPORTED_MODULE_3__.subscribeToArray)(result);
} else if ((0,_isPromise__WEBPACK_IMPORTED_MODULE_4__.isPromise)(result)) {
return (0,_subscribeToPromise__WEBPACK_IMPORTED_MODULE_5__.subscribeToPromise)(result);
} else if (!!result && typeof result[_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__.iterator] === 'function') {
return (0,_subscribeToIterable__WEBPACK_IMPORTED_MODULE_7__.subscribeToIterable)(result);
} else {
const value = (0,_isObject__WEBPACK_IMPORTED_MODULE_8__.isObject)(result) ? 'an invalid object' : `'${result}'`;
const msg = `You provided ${value} where a stream was expected.` + ' You can provide an Observable, Promise, Array, or Iterable.';
throw new TypeError(msg);
}
};
/***/ }),
/***/ 5414:
/*!**********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToArray.js ***!
\**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "subscribeToArray": () => (/* binding */ subscribeToArray)
/* harmony export */ });
const subscribeToArray = array => subscriber => {
for (let i = 0, len = array.length; i < len && !subscriber.closed; i++) {
subscriber.next(array[i]);
}
subscriber.complete();
};
/***/ }),
/***/ 6473:
/*!*************************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToIterable.js ***!
\*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "subscribeToIterable": () => (/* binding */ subscribeToIterable)
/* harmony export */ });
/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/iterator */ 2803);
const subscribeToIterable = iterable => subscriber => {
const iterator = iterable[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__.iterator]();
do {
let item;
try {
item = iterator.next();
} catch (err) {
subscriber.error(err);
return subscriber;
}
if (item.done) {
subscriber.complete();
break;
}
subscriber.next(item.value);
if (subscriber.closed) {
break;
}
} while (true);
if (typeof iterator.return === 'function') {
subscriber.add(() => {
if (iterator.return) {
iterator.return();
}
});
}
return subscriber;
};
/***/ }),
/***/ 1492:
/*!***************************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToObservable.js ***!
\***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "subscribeToObservable": () => (/* binding */ subscribeToObservable)
/* harmony export */ });
/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/observable */ 6831);
const subscribeToObservable = obj => subscriber => {
const obs = obj[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__.observable]();
if (typeof obs.subscribe !== 'function') {
throw new TypeError('Provided object does not correctly implement Symbol.observable');
} else {
return obs.subscribe(subscriber);
}
};
/***/ }),
/***/ 4276:
/*!************************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToPromise.js ***!
\************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "subscribeToPromise": () => (/* binding */ subscribeToPromise)
/* harmony export */ });
/* harmony import */ var _hostReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hostReportError */ 8897);
const subscribeToPromise = promise => subscriber => {
promise.then(value => {
if (!subscriber.closed) {
subscriber.next(value);
subscriber.complete();
}
}, err => subscriber.error(err)).then(null, _hostReportError__WEBPACK_IMPORTED_MODULE_0__.hostReportError);
return subscriber;
};
/***/ }),
/***/ 640:
/*!***********************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js ***!
\***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "subscribeToResult": () => (/* binding */ subscribeToResult)
/* harmony export */ });
/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../InnerSubscriber */ 472);
/* harmony import */ var _subscribeTo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./subscribeTo */ 6983);
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Observable */ 2378);
function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__.InnerSubscriber(outerSubscriber, outerValue, outerIndex)) {
if (innerSubscriber.closed) {
return undefined;
}
if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_1__.Observable) {
return result.subscribe(innerSubscriber);
}
return (0,_subscribeTo__WEBPACK_IMPORTED_MODULE_2__.subscribeTo)(result)(innerSubscriber);
}
/***/ }),
/***/ 8333:
/*!******************************************************************!*\
!*** ./node_modules/rxjs/_esm2015/internal/util/toSubscriber.js ***!
\******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "toSubscriber": () => (/* binding */ toSubscriber)
/* harmony export */ });
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ 14);
/* harmony import */ var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../symbol/rxSubscriber */ 1482);
/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observer */ 9957);
function toSubscriber(nextOrObserver, error, complete) {
if (nextOrObserver) {
if (nextOrObserver instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber) {
return nextOrObserver;
}
if (nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__.rxSubscriber]) {
return nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__.rxSubscriber]();
}
}
if (!nextOrObserver && !error && !complete) {
return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber(_Observer__WEBPACK_IMPORTED_MODULE_2__.empty);
}
return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber(nextOrObserver, error, complete);
}
/***/ }),
/***/ 4929:
/*!*****************************************!*\
!*** ./node_modules/tslib/tslib.es6.js ***!
\*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "__assign": () => (/* binding */ __assign),
/* harmony export */ "__asyncDelegator": () => (/* binding */ __asyncDelegator),
/* harmony export */ "__asyncGenerator": () => (/* binding */ __asyncGenerator),
/* harmony export */ "__asyncValues": () => (/* binding */ __asyncValues),
/* harmony export */ "__await": () => (/* binding */ __await),
/* harmony export */ "__awaiter": () => (/* binding */ __awaiter),
/* harmony export */ "__classPrivateFieldGet": () => (/* binding */ __classPrivateFieldGet),
/* harmony export */ "__classPrivateFieldIn": () => (/* binding */ __classPrivateFieldIn),
/* harmony export */ "__classPrivateFieldSet": () => (/* binding */ __classPrivateFieldSet),
/* harmony export */ "__createBinding": () => (/* binding */ __createBinding),
/* harmony export */ "__decorate": () => (/* binding */ __decorate),
/* harmony export */ "__exportStar": () => (/* binding */ __exportStar),
/* harmony export */ "__extends": () => (/* binding */ __extends),
/* harmony export */ "__generator": () => (/* binding */ __generator),
/* harmony export */ "__importDefault": () => (/* binding */ __importDefault),
/* harmony export */ "__importStar": () => (/* binding */ __importStar),
/* harmony export */ "__makeTemplateObject": () => (/* binding */ __makeTemplateObject),
/* harmony export */ "__metadata": () => (/* binding */ __metadata),
/* harmony export */ "__param": () => (/* binding */ __param),
/* harmony export */ "__read": () => (/* binding */ __read),
/* harmony export */ "__rest": () => (/* binding */ __rest),
/* harmony export */ "__spread": () => (/* binding */ __spread),
/* harmony export */ "__spreadArray": () => (/* binding */ __spreadArray),
/* harmony export */ "__spreadArrays": () => (/* binding */ __spreadArrays),
/* harmony export */ "__values": () => (/* binding */ __values)
/* harmony export */ });
/******************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
}
return __assign.apply(this, arguments);
}
function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
}
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
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 __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
var __createBinding = Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
});
function __exportStar(m, o) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
}
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 __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
}
/** @deprecated */
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
/** @deprecated */
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
}
function __spreadArray(to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
}
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 = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
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 __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
}
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(v) { resolve({ value: v, done: d }); }, reject); }
}
function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
var __setModuleDefault = Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
};
function __importStar(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
}
function __importDefault(mod) {
return (mod && mod.__esModule) ? mod : { default: mod };
}
function __classPrivateFieldGet(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}
function __classPrivateFieldSet(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
}
function __classPrivateFieldIn(state, receiver) {
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
return typeof state === "function" ? receiver === state : state.has(receiver);
}
/***/ }),
/***/ 6362:
/*!**********************************************************!*\
!*** ./node_modules/@angular/common/fesm2015/common.mjs ***!
\**********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "APP_BASE_HREF": () => (/* binding */ APP_BASE_HREF),
/* harmony export */ "AsyncPipe": () => (/* binding */ AsyncPipe),
/* harmony export */ "CommonModule": () => (/* binding */ CommonModule),
/* harmony export */ "CurrencyPipe": () => (/* binding */ CurrencyPipe),
/* harmony export */ "DATE_PIPE_DEFAULT_TIMEZONE": () => (/* binding */ DATE_PIPE_DEFAULT_TIMEZONE),
/* harmony export */ "DOCUMENT": () => (/* binding */ DOCUMENT),
/* harmony export */ "DatePipe": () => (/* binding */ DatePipe),
/* harmony export */ "DecimalPipe": () => (/* binding */ DecimalPipe),
/* harmony export */ "FormStyle": () => (/* binding */ FormStyle),
/* harmony export */ "FormatWidth": () => (/* binding */ FormatWidth),
/* harmony export */ "HashLocationStrategy": () => (/* binding */ HashLocationStrategy),
/* harmony export */ "I18nPluralPipe": () => (/* binding */ I18nPluralPipe),
/* harmony export */ "I18nSelectPipe": () => (/* binding */ I18nSelectPipe),
/* harmony export */ "IMAGE_LOADER": () => (/* binding */ IMAGE_LOADER),
/* harmony export */ "JsonPipe": () => (/* binding */ JsonPipe),
/* harmony export */ "KeyValuePipe": () => (/* binding */ KeyValuePipe),
/* harmony export */ "LOCATION_INITIALIZED": () => (/* binding */ LOCATION_INITIALIZED),
/* harmony export */ "Location": () => (/* binding */ Location),
/* harmony export */ "LocationStrategy": () => (/* binding */ LocationStrategy),
/* harmony export */ "LowerCasePipe": () => (/* binding */ LowerCasePipe),
/* harmony export */ "NgClass": () => (/* binding */ NgClass),
/* harmony export */ "NgComponentOutlet": () => (/* binding */ NgComponentOutlet),
/* harmony export */ "NgFor": () => (/* binding */ NgForOf),
/* harmony export */ "NgForOf": () => (/* binding */ NgForOf),
/* harmony export */ "NgForOfContext": () => (/* binding */ NgForOfContext),
/* harmony export */ "NgIf": () => (/* binding */ NgIf),
/* harmony export */ "NgIfContext": () => (/* binding */ NgIfContext),
/* harmony export */ "NgLocaleLocalization": () => (/* binding */ NgLocaleLocalization),
/* harmony export */ "NgLocalization": () => (/* binding */ NgLocalization),
/* harmony export */ "NgOptimizedImage": () => (/* binding */ NgOptimizedImage),
/* harmony export */ "NgPlural": () => (/* binding */ NgPlural),
/* harmony export */ "NgPluralCase": () => (/* binding */ NgPluralCase),
/* harmony export */ "NgStyle": () => (/* binding */ NgStyle),
/* harmony export */ "NgSwitch": () => (/* binding */ NgSwitch),
/* harmony export */ "NgSwitchCase": () => (/* binding */ NgSwitchCase),
/* harmony export */ "NgSwitchDefault": () => (/* binding */ NgSwitchDefault),
/* harmony export */ "NgTemplateOutlet": () => (/* binding */ NgTemplateOutlet),
/* harmony export */ "NumberFormatStyle": () => (/* binding */ NumberFormatStyle),
/* harmony export */ "NumberSymbol": () => (/* binding */ NumberSymbol),
/* harmony export */ "PRECONNECT_CHECK_BLOCKLIST": () => (/* binding */ PRECONNECT_CHECK_BLOCKLIST),
/* harmony export */ "PathLocationStrategy": () => (/* binding */ PathLocationStrategy),
/* harmony export */ "PercentPipe": () => (/* binding */ PercentPipe),
/* harmony export */ "PlatformLocation": () => (/* binding */ PlatformLocation),
/* harmony export */ "Plural": () => (/* binding */ Plural),
/* harmony export */ "SlicePipe": () => (/* binding */ SlicePipe),
/* harmony export */ "TitleCasePipe": () => (/* binding */ TitleCasePipe),
/* harmony export */ "TranslationWidth": () => (/* binding */ TranslationWidth),
/* harmony export */ "UpperCasePipe": () => (/* binding */ UpperCasePipe),
/* harmony export */ "VERSION": () => (/* binding */ VERSION),
/* harmony export */ "ViewportScroller": () => (/* binding */ ViewportScroller),
/* harmony export */ "WeekDay": () => (/* binding */ WeekDay),
/* harmony export */ "XhrFactory": () => (/* binding */ XhrFactory),
/* harmony export */ "formatCurrency": () => (/* binding */ formatCurrency),
/* harmony export */ "formatDate": () => (/* binding */ formatDate),
/* harmony export */ "formatNumber": () => (/* binding */ formatNumber),
/* harmony export */ "formatPercent": () => (/* binding */ formatPercent),
/* harmony export */ "getCurrencySymbol": () => (/* binding */ getCurrencySymbol),
/* harmony export */ "getLocaleCurrencyCode": () => (/* binding */ getLocaleCurrencyCode),
/* harmony export */ "getLocaleCurrencyName": () => (/* binding */ getLocaleCurrencyName),
/* harmony export */ "getLocaleCurrencySymbol": () => (/* binding */ getLocaleCurrencySymbol),
/* harmony export */ "getLocaleDateFormat": () => (/* binding */ getLocaleDateFormat),
/* harmony export */ "getLocaleDateTimeFormat": () => (/* binding */ getLocaleDateTimeFormat),
/* harmony export */ "getLocaleDayNames": () => (/* binding */ getLocaleDayNames),
/* harmony export */ "getLocaleDayPeriods": () => (/* binding */ getLocaleDayPeriods),
/* harmony export */ "getLocaleDirection": () => (/* binding */ getLocaleDirection),
/* harmony export */ "getLocaleEraNames": () => (/* binding */ getLocaleEraNames),
/* harmony export */ "getLocaleExtraDayPeriodRules": () => (/* binding */ getLocaleExtraDayPeriodRules),
/* harmony export */ "getLocaleExtraDayPeriods": () => (/* binding */ getLocaleExtraDayPeriods),
/* harmony export */ "getLocaleFirstDayOfWeek": () => (/* binding */ getLocaleFirstDayOfWeek),
/* harmony export */ "getLocaleId": () => (/* binding */ getLocaleId),
/* harmony export */ "getLocaleMonthNames": () => (/* binding */ getLocaleMonthNames),
/* harmony export */ "getLocaleNumberFormat": () => (/* binding */ getLocaleNumberFormat),
/* harmony export */ "getLocaleNumberSymbol": () => (/* binding */ getLocaleNumberSymbol),
/* harmony export */ "getLocalePluralCase": () => (/* binding */ getLocalePluralCase),
/* harmony export */ "getLocaleTimeFormat": () => (/* binding */ getLocaleTimeFormat),
/* harmony export */ "getLocaleWeekEndRange": () => (/* binding */ getLocaleWeekEndRange),
/* harmony export */ "getNumberOfCurrencyDigits": () => (/* binding */ getNumberOfCurrencyDigits),
/* harmony export */ "isPlatformBrowser": () => (/* binding */ isPlatformBrowser),
/* harmony export */ "isPlatformServer": () => (/* binding */ isPlatformServer),
/* harmony export */ "isPlatformWorkerApp": () => (/* binding */ isPlatformWorkerApp),
/* harmony export */ "isPlatformWorkerUi": () => (/* binding */ isPlatformWorkerUi),
/* harmony export */ "provideCloudflareLoader": () => (/* binding */ provideCloudflareLoader),
/* harmony export */ "provideCloudinaryLoader": () => (/* binding */ provideCloudinaryLoader),
/* harmony export */ "provideImageKitLoader": () => (/* binding */ provideImageKitLoader),
/* harmony export */ "provideImgixLoader": () => (/* binding */ provideImgixLoader),
/* harmony export */ "registerLocaleData": () => (/* binding */ registerLocaleData),
/* harmony export */ "ɵBrowserPlatformLocation": () => (/* binding */ BrowserPlatformLocation),
/* harmony export */ "ɵDomAdapter": () => (/* binding */ DomAdapter),
/* harmony export */ "ɵNullViewportScroller": () => (/* binding */ NullViewportScroller),
/* harmony export */ "ɵPLATFORM_BROWSER_ID": () => (/* binding */ PLATFORM_BROWSER_ID),
/* harmony export */ "ɵPLATFORM_SERVER_ID": () => (/* binding */ PLATFORM_SERVER_ID),
/* harmony export */ "ɵPLATFORM_WORKER_APP_ID": () => (/* binding */ PLATFORM_WORKER_APP_ID),
/* harmony export */ "ɵPLATFORM_WORKER_UI_ID": () => (/* binding */ PLATFORM_WORKER_UI_ID),
/* harmony export */ "ɵgetDOM": () => (/* binding */ getDOM),
/* harmony export */ "ɵparseCookieValue": () => (/* binding */ parseCookieValue),
/* harmony export */ "ɵsetRootDomAdapter": () => (/* binding */ setRootDomAdapter)
/* harmony export */ });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 3184);
/**
* @license Angular v14.2.7
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
let _DOM = null;
function getDOM() {
return _DOM;
}
function setDOM(adapter) {
_DOM = adapter;
}
function setRootDomAdapter(adapter) {
if (!_DOM) {
_DOM = adapter;
}
}
/* tslint:disable:requireParameterType */
/**
* Provides DOM operations in an environment-agnostic way.
*
* @security Tread carefully! Interacting with the DOM directly is dangerous and
* can introduce XSS risks.
*/
class DomAdapter {}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* A DI Token representing the main rendering context. In a browser this is the DOM Document.
*
* Note: Document might not be available in the Application Context when Application and Rendering
* Contexts are not the same (e.g. when running the application in a Web Worker).
*
* @publicApi
*/
const DOCUMENT = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken('DocumentToken');
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* This class should not be used directly by an application developer. Instead, use
* {@link Location}.
*
* `PlatformLocation` encapsulates all calls to DOM APIs, which allows the Router to be
* platform-agnostic.
* This means that we can have different implementation of `PlatformLocation` for the different
* platforms that Angular supports. For example, `@angular/platform-browser` provides an
* implementation specific to the browser environment, while `@angular/platform-server` provides
* one suitable for use with server-side rendering.
*
* The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy}
* when they need to interact with the DOM APIs like pushState, popState, etc.
*
* {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly
* by the {@link Router} in order to navigate between routes. Since all interactions between {@link
* Router} /
* {@link Location} / {@link LocationStrategy} and DOM APIs flow through the `PlatformLocation`
* class, they are all platform-agnostic.
*
* @publicApi
*/
class PlatformLocation {
historyGo(relativePosition) {
throw new Error('Not implemented');
}
}
PlatformLocation.ɵfac = function PlatformLocation_Factory(t) {
return new (t || PlatformLocation)();
};
PlatformLocation.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
token: PlatformLocation,
factory: function () {
return useBrowserPlatformLocation();
},
providedIn: 'platform'
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PlatformLocation, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable,
args: [{
providedIn: 'platform',
// See #23917
useFactory: useBrowserPlatformLocation
}]
}], null, null);
})();
function useBrowserPlatformLocation() {
return (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(BrowserPlatformLocation);
}
/**
* @description
* Indicates when a location is initialized.
*
* @publicApi
*/
const LOCATION_INITIALIZED = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken('Location Initialized');
/**
* `PlatformLocation` encapsulates all of the direct calls to platform APIs.
* This class should not be used directly by an application developer. Instead, use
* {@link Location}.
*/
class BrowserPlatformLocation extends PlatformLocation {
constructor(_doc) {
super();
this._doc = _doc;
this._init();
} // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it
/** @internal */
_init() {
this.location = window.location;
this._history = window.history;
}
getBaseHrefFromDOM() {
return getDOM().getBaseHref(this._doc);
}
onPopState(fn) {
const window = getDOM().getGlobalEventTarget(this._doc, 'window');
window.addEventListener('popstate', fn, false);
return () => window.removeEventListener('popstate', fn);
}
onHashChange(fn) {
const window = getDOM().getGlobalEventTarget(this._doc, 'window');
window.addEventListener('hashchange', fn, false);
return () => window.removeEventListener('hashchange', fn);
}
get href() {
return this.location.href;
}
get protocol() {
return this.location.protocol;
}
get hostname() {
return this.location.hostname;
}
get port() {
return this.location.port;
}
get pathname() {
return this.location.pathname;
}
get search() {
return this.location.search;
}
get hash() {
return this.location.hash;
}
set pathname(newPath) {
this.location.pathname = newPath;
}
pushState(state, title, url) {
if (supportsState()) {
this._history.pushState(state, title, url);
} else {
this.location.hash = url;
}
}
replaceState(state, title, url) {
if (supportsState()) {
this._history.replaceState(state, title, url);
} else {
this.location.hash = url;
}
}
forward() {
this._history.forward();
}
back() {
this._history.back();
}
historyGo(relativePosition = 0) {
this._history.go(relativePosition);
}
getState() {
return this._history.state;
}
}
BrowserPlatformLocation.ɵfac = function BrowserPlatformLocation_Factory(t) {
return new (t || BrowserPlatformLocation)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](DOCUMENT));
};
BrowserPlatformLocation.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
token: BrowserPlatformLocation,
factory: function () {
return createBrowserPlatformLocation();
},
providedIn: 'platform'
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](BrowserPlatformLocation, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable,
args: [{
providedIn: 'platform',
// See #23917
useFactory: createBrowserPlatformLocation
}]
}], function () {
return [{
type: undefined,
decorators: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject,
args: [DOCUMENT]
}]
}];
}, null);
})();
function supportsState() {
return !!window.history.pushState;
}
function createBrowserPlatformLocation() {
return new BrowserPlatformLocation((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(DOCUMENT));
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Joins two parts of a URL with a slash if needed.
*
* @param start URL string
* @param end URL string
*
*
* @returns The joined URL string.
*/
function joinWithSlash(start, end) {
if (start.length == 0) {
return end;
}
if (end.length == 0) {
return start;
}
let slashes = 0;
if (start.endsWith('/')) {
slashes++;
}
if (end.startsWith('/')) {
slashes++;
}
if (slashes == 2) {
return start + end.substring(1);
}
if (slashes == 1) {
return start + end;
}
return start + '/' + end;
}
/**
* Removes a trailing slash from a URL string if needed.
* Looks for the first occurrence of either `#`, `?`, or the end of the
* line as `/` characters and removes the trailing slash if one exists.
*
* @param url URL string.
*
* @returns The URL string, modified if needed.
*/
function stripTrailingSlash(url) {
const match = url.match(/#|\?|$/);
const pathEndIdx = match && match.index || url.length;
const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);
return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);
}
/**
* Normalizes URL parameters by prepending with `?` if needed.
*
* @param params String of URL parameters.
*
* @returns The normalized URL parameters string.
*/
function normalizeQueryParams(params) {
return params && params[0] !== '?' ? '?' + params : params;
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Enables the `Location` service to read route state from the browser's URL.
* Angular provides two strategies:
* `HashLocationStrategy` and `PathLocationStrategy`.
*
* Applications should use the `Router` or `Location` services to
* interact with application route state.
*
* For instance, `HashLocationStrategy` produces URLs like
*
http://example.com#/foo,
* and `PathLocationStrategy` produces
*
http://example.com/foo as an equivalent URL.
*
* See these two classes for more.
*
* @publicApi
*/
class LocationStrategy {
historyGo(relativePosition) {
throw new Error('Not implemented');
}
}
LocationStrategy.ɵfac = function LocationStrategy_Factory(t) {
return new (t || LocationStrategy)();
};
LocationStrategy.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
token: LocationStrategy,
factory: function () {
return (() => (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(PathLocationStrategy))();
},
providedIn: 'root'
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](LocationStrategy, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable,
args: [{
providedIn: 'root',
useFactory: () => (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(PathLocationStrategy)
}]
}], null, null);
})();
/**
* A predefined [DI token](guide/glossary#di-token) for the base href
* to be used with the `PathLocationStrategy`.
* The base href is the URL prefix that should be preserved when generating
* and recognizing URLs.
*
* @usageNotes
*
* The following example shows how to use this token to configure the root app injector
* with a base href value, so that the DI framework can supply the dependency anywhere in the app.
*
* ```typescript
* import {Component, NgModule} from '@angular/core';
* import {APP_BASE_HREF} from '@angular/common';
*
* @NgModule({
* providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}]
* })
* class AppModule {}
* ```
*
* @publicApi
*/
const APP_BASE_HREF = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken('appBaseHref');
/**
* @description
* A {@link LocationStrategy} used to configure the {@link Location} service to
* represent its state in the
* [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the
* browser's URL.
*
* If you're using `PathLocationStrategy`, you may provide a {@link APP_BASE_HREF}
* or add a `
` element to the document to override the default.
*
* For instance, if you provide an `APP_BASE_HREF` of `'/my/app/'` and call
* `location.go('/foo')`, the browser's URL will become
* `example.com/my/app/foo`. To ensure all relative URIs resolve correctly,
* the `
` and/or `APP_BASE_HREF` should end with a `/`.
*
* Similarly, if you add `
` to the document and call
* `location.go('/foo')`, the browser's URL will become
* `example.com/my/app/foo`.
*
* Note that when using `PathLocationStrategy`, neither the query nor
* the fragment in the `
` will be preserved, as outlined
* by the [RFC](https://tools.ietf.org/html/rfc3986#section-5.2.2).
*
* @usageNotes
*
* ### Example
*
* {@example common/location/ts/path_location_component.ts region='LocationComponent'}
*
* @publicApi
*/
class PathLocationStrategy extends LocationStrategy {
constructor(_platformLocation, href) {
var _a, _b, _c;
super();
this._platformLocation = _platformLocation;
this._removeListenerFns = [];
this._baseHref = (_c = (_a = href !== null && href !== void 0 ? href : this._platformLocation.getBaseHrefFromDOM()) !== null && _a !== void 0 ? _a : (_b = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(DOCUMENT).location) === null || _b === void 0 ? void 0 : _b.origin) !== null && _c !== void 0 ? _c : '';
}
/** @nodoc */
ngOnDestroy() {
while (this._removeListenerFns.length) {
this._removeListenerFns.pop()();
}
}
onPopState(fn) {
this._removeListenerFns.push(this._platformLocation.onPopState(fn), this._platformLocation.onHashChange(fn));
}
getBaseHref() {
return this._baseHref;
}
prepareExternalUrl(internal) {
return joinWithSlash(this._baseHref, internal);
}
path(includeHash = false) {
const pathname = this._platformLocation.pathname + normalizeQueryParams(this._platformLocation.search);
const hash = this._platformLocation.hash;
return hash && includeHash ? `${pathname}${hash}` : pathname;
}
pushState(state, title, url, queryParams) {
const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));
this._platformLocation.pushState(state, title, externalUrl);
}
replaceState(state, title, url, queryParams) {
const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));
this._platformLocation.replaceState(state, title, externalUrl);
}
forward() {
this._platformLocation.forward();
}
back() {
this._platformLocation.back();
}
getState() {
return this._platformLocation.getState();
}
historyGo(relativePosition = 0) {
var _a, _b;
(_b = (_a = this._platformLocation).historyGo) === null || _b === void 0 ? void 0 : _b.call(_a, relativePosition);
}
}
PathLocationStrategy.ɵfac = function PathLocationStrategy_Factory(t) {
return new (t || PathLocationStrategy)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](PlatformLocation), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](APP_BASE_HREF, 8));
};
PathLocationStrategy.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
token: PathLocationStrategy,
factory: PathLocationStrategy.ɵfac,
providedIn: 'root'
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PathLocationStrategy, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable,
args: [{
providedIn: 'root'
}]
}], function () {
return [{
type: PlatformLocation
}, {
type: undefined,
decorators: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional
}, {
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject,
args: [APP_BASE_HREF]
}]
}];
}, null);
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @description
* A {@link LocationStrategy} used to configure the {@link Location} service to
* represent its state in the
* [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax)
* of the browser's URL.
*
* For instance, if you call `location.go('/foo')`, the browser's URL will become
* `example.com#/foo`.
*
* @usageNotes
*
* ### Example
*
* {@example common/location/ts/hash_location_component.ts region='LocationComponent'}
*
* @publicApi
*/
class HashLocationStrategy extends LocationStrategy {
constructor(_platformLocation, _baseHref) {
super();
this._platformLocation = _platformLocation;
this._baseHref = '';
this._removeListenerFns = [];
if (_baseHref != null) {
this._baseHref = _baseHref;
}
}
/** @nodoc */
ngOnDestroy() {
while (this._removeListenerFns.length) {
this._removeListenerFns.pop()();
}
}
onPopState(fn) {
this._removeListenerFns.push(this._platformLocation.onPopState(fn), this._platformLocation.onHashChange(fn));
}
getBaseHref() {
return this._baseHref;
}
path(includeHash = false) {
// the hash value is always prefixed with a `#`
// and if it is empty then it will stay empty
let path = this._platformLocation.hash;
if (path == null) path = '#';
return path.length > 0 ? path.substring(1) : path;
}
prepareExternalUrl(internal) {
const url = joinWithSlash(this._baseHref, internal);
return url.length > 0 ? '#' + url : url;
}
pushState(state, title, path, queryParams) {
let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));
if (url.length == 0) {
url = this._platformLocation.pathname;
}
this._platformLocation.pushState(state, title, url);
}
replaceState(state, title, path, queryParams) {
let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));
if (url.length == 0) {
url = this._platformLocation.pathname;
}
this._platformLocation.replaceState(state, title, url);
}
forward() {
this._platformLocation.forward();
}
back() {
this._platformLocation.back();
}
getState() {
return this._platformLocation.getState();
}
historyGo(relativePosition = 0) {
var _a, _b;
(_b = (_a = this._platformLocation).historyGo) === null || _b === void 0 ? void 0 : _b.call(_a, relativePosition);
}
}
HashLocationStrategy.ɵfac = function HashLocationStrategy_Factory(t) {
return new (t || HashLocationStrategy)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](PlatformLocation), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](APP_BASE_HREF, 8));
};
HashLocationStrategy.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
token: HashLocationStrategy,
factory: HashLocationStrategy.ɵfac
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HashLocationStrategy, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable
}], function () {
return [{
type: PlatformLocation
}, {
type: undefined,
decorators: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional
}, {
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject,
args: [APP_BASE_HREF]
}]
}];
}, null);
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @description
*
* A service that applications can use to interact with a browser's URL.
*
* Depending on the `LocationStrategy` used, `Location` persists
* to the URL's path or the URL's hash segment.
*
* @usageNotes
*
* It's better to use the `Router.navigate()` service to trigger route changes. Use
* `Location` only if you need to interact with or create normalized URLs outside of
* routing.
*
* `Location` is responsible for normalizing the URL against the application's base href.
* A normalized URL is absolute from the URL host, includes the application's base href, and has no
* trailing slash:
* - `/my/app/user/123` is normalized
* - `my/app/user/123` **is not** normalized
* - `/my/app/user/123/` **is not** normalized
*
* ### Example
*
*
*
* @publicApi
*/
class Location {
constructor(locationStrategy) {
/** @internal */
this._subject = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter();
/** @internal */
this._urlChangeListeners = [];
/** @internal */
this._urlChangeSubscription = null;
this._locationStrategy = locationStrategy;
const browserBaseHref = this._locationStrategy.getBaseHref();
this._baseHref = stripTrailingSlash(_stripIndexHtml(browserBaseHref));
this._locationStrategy.onPopState(ev => {
this._subject.emit({
'url': this.path(true),
'pop': true,
'state': ev.state,
'type': ev.type
});
});
}
/** @nodoc */
ngOnDestroy() {
var _a;
(_a = this._urlChangeSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
this._urlChangeListeners = [];
}
/**
* Normalizes the URL path for this location.
*
* @param includeHash True to include an anchor fragment in the path.
*
* @returns The normalized URL path.
*/
// TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is
// removed.
path(includeHash = false) {
return this.normalize(this._locationStrategy.path(includeHash));
}
/**
* Reports the current state of the location history.
* @returns The current value of the `history.state` object.
*/
getState() {
return this._locationStrategy.getState();
}
/**
* Normalizes the given path and compares to the current normalized path.
*
* @param path The given URL path.
* @param query Query parameters.
*
* @returns True if the given URL path is equal to the current normalized path, false
* otherwise.
*/
isCurrentPathEqualTo(path, query = '') {
return this.path() == this.normalize(path + normalizeQueryParams(query));
}
/**
* Normalizes a URL path by stripping any trailing slashes.
*
* @param url String representing a URL.
*
* @returns The normalized URL string.
*/
normalize(url) {
return Location.stripTrailingSlash(_stripBaseHref(this._baseHref, _stripIndexHtml(url)));
}
/**
* Normalizes an external URL path.
* If the given URL doesn't begin with a leading slash (`'/'`), adds one
* before normalizing. Adds a hash if `HashLocationStrategy` is
* in use, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.
*
* @param url String representing a URL.
*
* @returns A normalized platform-specific URL.
*/
prepareExternalUrl(url) {
if (url && url[0] !== '/') {
url = '/' + url;
}
return this._locationStrategy.prepareExternalUrl(url);
} // TODO: rename this method to pushState
/**
* Changes the browser's URL to a normalized version of a given URL, and pushes a
* new item onto the platform's history.
*
* @param path URL path to normalize.
* @param query Query parameters.
* @param state Location history state.
*
*/
go(path, query = '', state = null) {
this._locationStrategy.pushState(state, '', path, query);
this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state);
}
/**
* Changes the browser's URL to a normalized version of the given URL, and replaces
* the top item on the platform's history stack.
*
* @param path URL path to normalize.
* @param query Query parameters.
* @param state Location history state.
*/
replaceState(path, query = '', state = null) {
this._locationStrategy.replaceState(state, '', path, query);
this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state);
}
/**
* Navigates forward in the platform's history.
*/
forward() {
this._locationStrategy.forward();
}
/**
* Navigates back in the platform's history.
*/
back() {
this._locationStrategy.back();
}
/**
* Navigate to a specific page from session history, identified by its relative position to the
* current page.
*
* @param relativePosition Position of the target page in the history relative to the current
* page.
* A negative value moves backwards, a positive value moves forwards, e.g. `location.historyGo(2)`
* moves forward two pages and `location.historyGo(-2)` moves back two pages. When we try to go
* beyond what's stored in the history session, we stay in the current page. Same behaviour occurs
* when `relativePosition` equals 0.
* @see https://developer.mozilla.org/en-US/docs/Web/API/History_API#Moving_to_a_specific_point_in_history
*/
historyGo(relativePosition = 0) {
var _a, _b;
(_b = (_a = this._locationStrategy).historyGo) === null || _b === void 0 ? void 0 : _b.call(_a, relativePosition);
}
/**
* Registers a URL change listener. Use to catch updates performed by the Angular
* framework that are not detectible through "popstate" or "hashchange" events.
*
* @param fn The change handler function, which take a URL and a location history state.
* @returns A function that, when executed, unregisters a URL change listener.
*/
onUrlChange(fn) {
this._urlChangeListeners.push(fn);
if (!this._urlChangeSubscription) {
this._urlChangeSubscription = this.subscribe(v => {
this._notifyUrlChangeListeners(v.url, v.state);
});
}
return () => {
var _a;
const fnIndex = this._urlChangeListeners.indexOf(fn);
this._urlChangeListeners.splice(fnIndex, 1);
if (this._urlChangeListeners.length === 0) {
(_a = this._urlChangeSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
this._urlChangeSubscription = null;
}
};
}
/** @internal */
_notifyUrlChangeListeners(url = '', state) {
this._urlChangeListeners.forEach(fn => fn(url, state));
}
/**
* Subscribes to the platform's `popState` events.
*
* Note: `Location.go()` does not trigger the `popState` event in the browser. Use
* `Location.onUrlChange()` to subscribe to URL changes instead.
*
* @param value Event that is triggered when the state history changes.
* @param exception The exception to throw.
*
* @see [onpopstate](https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate)
*
* @returns Subscribed events.
*/
subscribe(onNext, onThrow, onReturn) {
return this._subject.subscribe({
next: onNext,
error: onThrow,
complete: onReturn
});
}
}
/**
* Normalizes URL parameters by prepending with `?` if needed.
*
* @param params String of URL parameters.
*
* @returns The normalized URL parameters string.
*/
Location.normalizeQueryParams = normalizeQueryParams;
/**
* Joins two parts of a URL with a slash if needed.
*
* @param start URL string
* @param end URL string
*
*
* @returns The joined URL string.
*/
Location.joinWithSlash = joinWithSlash;
/**
* Removes a trailing slash from a URL string if needed.
* Looks for the first occurrence of either `#`, `?`, or the end of the
* line as `/` characters and removes the trailing slash if one exists.
*
* @param url URL string.
*
* @returns The URL string, modified if needed.
*/
Location.stripTrailingSlash = stripTrailingSlash;
Location.ɵfac = function Location_Factory(t) {
return new (t || Location)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](LocationStrategy));
};
Location.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
token: Location,
factory: function () {
return createLocation();
},
providedIn: 'root'
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](Location, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable,
args: [{
providedIn: 'root',
// See #23917
useFactory: createLocation
}]
}], function () {
return [{
type: LocationStrategy
}];
}, null);
})();
function createLocation() {
return new Location((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(LocationStrategy));
}
function _stripBaseHref(baseHref, url) {
return baseHref && url.startsWith(baseHref) ? url.substring(baseHref.length) : url;
}
function _stripIndexHtml(url) {
return url.replace(/\/index.html$/, '');
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/** @internal */
const CURRENCIES_EN = {
"ADP": [undefined, undefined, 0],
"AFN": [undefined, "؋", 0],
"ALL": [undefined, undefined, 0],
"AMD": [undefined, "֏", 2],
"AOA": [undefined, "Kz"],
"ARS": [undefined, "$"],
"AUD": ["A$", "$"],
"AZN": [undefined, "₼"],
"BAM": [undefined, "KM"],
"BBD": [undefined, "$"],
"BDT": [undefined, "৳"],
"BHD": [undefined, undefined, 3],
"BIF": [undefined, undefined, 0],
"BMD": [undefined, "$"],
"BND": [undefined, "$"],
"BOB": [undefined, "Bs"],
"BRL": ["R$"],
"BSD": [undefined, "$"],
"BWP": [undefined, "P"],
"BYN": [undefined, undefined, 2],
"BYR": [undefined, undefined, 0],
"BZD": [undefined, "$"],
"CAD": ["CA$", "$", 2],
"CHF": [undefined, undefined, 2],
"CLF": [undefined, undefined, 4],
"CLP": [undefined, "$", 0],
"CNY": ["CN¥", "¥"],
"COP": [undefined, "$", 2],
"CRC": [undefined, "₡", 2],
"CUC": [undefined, "$"],
"CUP": [undefined, "$"],
"CZK": [undefined, "Kč", 2],
"DJF": [undefined, undefined, 0],
"DKK": [undefined, "kr", 2],
"DOP": [undefined, "$"],
"EGP": [undefined, "E£"],
"ESP": [undefined, "₧", 0],
"EUR": ["€"],
"FJD": [undefined, "$"],
"FKP": [undefined, "£"],
"GBP": ["£"],
"GEL": [undefined, "₾"],
"GHS": [undefined, "GH₵"],
"GIP": [undefined, "£"],
"GNF": [undefined, "FG", 0],
"GTQ": [undefined, "Q"],
"GYD": [undefined, "$", 2],
"HKD": ["HK$", "$"],
"HNL": [undefined, "L"],
"HRK": [undefined, "kn"],
"HUF": [undefined, "Ft", 2],
"IDR": [undefined, "Rp", 2],
"ILS": ["₪"],
"INR": ["₹"],
"IQD": [undefined, undefined, 0],
"IRR": [undefined, undefined, 0],
"ISK": [undefined, "kr", 0],
"ITL": [undefined, undefined, 0],
"JMD": [undefined, "$"],
"JOD": [undefined, undefined, 3],
"JPY": ["¥", undefined, 0],
"KHR": [undefined, "៛"],
"KMF": [undefined, "CF", 0],
"KPW": [undefined, "₩", 0],
"KRW": ["₩", undefined, 0],
"KWD": [undefined, undefined, 3],
"KYD": [undefined, "$"],
"KZT": [undefined, "₸"],
"LAK": [undefined, "₭", 0],
"LBP": [undefined, "L£", 0],
"LKR": [undefined, "Rs"],
"LRD": [undefined, "$"],
"LTL": [undefined, "Lt"],
"LUF": [undefined, undefined, 0],
"LVL": [undefined, "Ls"],
"LYD": [undefined, undefined, 3],
"MGA": [undefined, "Ar", 0],
"MGF": [undefined, undefined, 0],
"MMK": [undefined, "K", 0],
"MNT": [undefined, "₮", 2],
"MRO": [undefined, undefined, 0],
"MUR": [undefined, "Rs", 2],
"MXN": ["MX$", "$"],
"MYR": [undefined, "RM"],
"NAD": [undefined, "$"],
"NGN": [undefined, "₦"],
"NIO": [undefined, "C$"],
"NOK": [undefined, "kr", 2],
"NPR": [undefined, "Rs"],
"NZD": ["NZ$", "$"],
"OMR": [undefined, undefined, 3],
"PHP": ["₱"],
"PKR": [undefined, "Rs", 2],
"PLN": [undefined, "zł"],
"PYG": [undefined, "₲", 0],
"RON": [undefined, "lei"],
"RSD": [undefined, undefined, 0],
"RUB": [undefined, "₽"],
"RWF": [undefined, "RF", 0],
"SBD": [undefined, "$"],
"SEK": [undefined, "kr", 2],
"SGD": [undefined, "$"],
"SHP": [undefined, "£"],
"SLE": [undefined, undefined, 2],
"SLL": [undefined, undefined, 0],
"SOS": [undefined, undefined, 0],
"SRD": [undefined, "$"],
"SSP": [undefined, "£"],
"STD": [undefined, undefined, 0],
"STN": [undefined, "Db"],
"SYP": [undefined, "£", 0],
"THB": [undefined, "฿"],
"TMM": [undefined, undefined, 0],
"TND": [undefined, undefined, 3],
"TOP": [undefined, "T$"],
"TRL": [undefined, undefined, 0],
"TRY": [undefined, "₺"],
"TTD": [undefined, "$"],
"TWD": ["NT$", "$", 2],
"TZS": [undefined, undefined, 2],
"UAH": [undefined, "₴"],
"UGX": [undefined, undefined, 0],
"USD": ["$"],
"UYI": [undefined, undefined, 0],
"UYU": [undefined, "$"],
"UYW": [undefined, undefined, 4],
"UZS": [undefined, undefined, 2],
"VEF": [undefined, "Bs", 2],
"VND": ["₫", undefined, 0],
"VUV": [undefined, undefined, 0],
"XAF": ["FCFA", undefined, 0],
"XCD": ["EC$", "$"],
"XOF": ["F CFA", undefined, 0],
"XPF": ["CFPF", undefined, 0],
"XXX": ["¤"],
"YER": [undefined, undefined, 0],
"ZAR": [undefined, "R"],
"ZMK": [undefined, undefined, 0],
"ZMW": [undefined, "ZK"],
"ZWD": [undefined, undefined, 0]
};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Format styles that can be used to represent numbers.
* @see `getLocaleNumberFormat()`.
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
var NumberFormatStyle;
(function (NumberFormatStyle) {
NumberFormatStyle[NumberFormatStyle["Decimal"] = 0] = "Decimal";
NumberFormatStyle[NumberFormatStyle["Percent"] = 1] = "Percent";
NumberFormatStyle[NumberFormatStyle["Currency"] = 2] = "Currency";
NumberFormatStyle[NumberFormatStyle["Scientific"] = 3] = "Scientific";
})(NumberFormatStyle || (NumberFormatStyle = {}));
/**
* Plurality cases used for translating plurals to different languages.
*
* @see `NgPlural`
* @see `NgPluralCase`
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
var Plural;
(function (Plural) {
Plural[Plural["Zero"] = 0] = "Zero";
Plural[Plural["One"] = 1] = "One";
Plural[Plural["Two"] = 2] = "Two";
Plural[Plural["Few"] = 3] = "Few";
Plural[Plural["Many"] = 4] = "Many";
Plural[Plural["Other"] = 5] = "Other";
})(Plural || (Plural = {}));
/**
* Context-dependant translation forms for strings.
* Typically the standalone version is for the nominative form of the word,
* and the format version is used for the genitive case.
* @see [CLDR website](http://cldr.unicode.org/translation/date-time-1/date-time#TOC-Standalone-vs.-Format-Styles)
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
var FormStyle;
(function (FormStyle) {
FormStyle[FormStyle["Format"] = 0] = "Format";
FormStyle[FormStyle["Standalone"] = 1] = "Standalone";
})(FormStyle || (FormStyle = {}));
/**
* String widths available for translations.
* The specific character widths are locale-specific.
* Examples are given for the word "Sunday" in English.
*
* @publicApi
*/
var TranslationWidth;
(function (TranslationWidth) {
/** 1 character for `en-US`. For example: 'S' */
TranslationWidth[TranslationWidth["Narrow"] = 0] = "Narrow";
/** 3 characters for `en-US`. For example: 'Sun' */
TranslationWidth[TranslationWidth["Abbreviated"] = 1] = "Abbreviated";
/** Full length for `en-US`. For example: "Sunday" */
TranslationWidth[TranslationWidth["Wide"] = 2] = "Wide";
/** 2 characters for `en-US`, For example: "Su" */
TranslationWidth[TranslationWidth["Short"] = 3] = "Short";
})(TranslationWidth || (TranslationWidth = {}));
/**
* String widths available for date-time formats.
* The specific character widths are locale-specific.
* Examples are given for `en-US`.
*
* @see `getLocaleDateFormat()`
* @see `getLocaleTimeFormat()`
* @see `getLocaleDateTimeFormat()`
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
* @publicApi
*/
var FormatWidth;
(function (FormatWidth) {
/**
* For `en-US`, 'M/d/yy, h:mm a'`
* (Example: `6/15/15, 9:03 AM`)
*/
FormatWidth[FormatWidth["Short"] = 0] = "Short";
/**
* For `en-US`, `'MMM d, y, h:mm:ss a'`
* (Example: `Jun 15, 2015, 9:03:01 AM`)
*/
FormatWidth[FormatWidth["Medium"] = 1] = "Medium";
/**
* For `en-US`, `'MMMM d, y, h:mm:ss a z'`
* (Example: `June 15, 2015 at 9:03:01 AM GMT+1`)
*/
FormatWidth[FormatWidth["Long"] = 2] = "Long";
/**
* For `en-US`, `'EEEE, MMMM d, y, h:mm:ss a zzzz'`
* (Example: `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00`)
*/
FormatWidth[FormatWidth["Full"] = 3] = "Full";
})(FormatWidth || (FormatWidth = {}));
/**
* Symbols that can be used to replace placeholders in number patterns.
* Examples are based on `en-US` values.
*
* @see `getLocaleNumberSymbol()`
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
var NumberSymbol;
(function (NumberSymbol) {
/**
* Decimal separator.
* For `en-US`, the dot character.
* Example: 2,345`.`67
*/
NumberSymbol[NumberSymbol["Decimal"] = 0] = "Decimal";
/**
* Grouping separator, typically for thousands.
* For `en-US`, the comma character.
* Example: 2`,`345.67
*/
NumberSymbol[NumberSymbol["Group"] = 1] = "Group";
/**
* List-item separator.
* Example: "one, two, and three"
*/
NumberSymbol[NumberSymbol["List"] = 2] = "List";
/**
* Sign for percentage (out of 100).
* Example: 23.4%
*/
NumberSymbol[NumberSymbol["PercentSign"] = 3] = "PercentSign";
/**
* Sign for positive numbers.
* Example: +23
*/
NumberSymbol[NumberSymbol["PlusSign"] = 4] = "PlusSign";
/**
* Sign for negative numbers.
* Example: -23
*/
NumberSymbol[NumberSymbol["MinusSign"] = 5] = "MinusSign";
/**
* Computer notation for exponential value (n times a power of 10).
* Example: 1.2E3
*/
NumberSymbol[NumberSymbol["Exponential"] = 6] = "Exponential";
/**
* Human-readable format of exponential.
* Example: 1.2x103
*/
NumberSymbol[NumberSymbol["SuperscriptingExponent"] = 7] = "SuperscriptingExponent";
/**
* Sign for permille (out of 1000).
* Example: 23.4‰
*/
NumberSymbol[NumberSymbol["PerMille"] = 8] = "PerMille";
/**
* Infinity, can be used with plus and minus.
* Example: ∞, +∞, -∞
*/
NumberSymbol[NumberSymbol["Infinity"] = 9] = "Infinity";
/**
* Not a number.
* Example: NaN
*/
NumberSymbol[NumberSymbol["NaN"] = 10] = "NaN";
/**
* Symbol used between time units.
* Example: 10:52
*/
NumberSymbol[NumberSymbol["TimeSeparator"] = 11] = "TimeSeparator";
/**
* Decimal separator for currency values (fallback to `Decimal`).
* Example: $2,345.67
*/
NumberSymbol[NumberSymbol["CurrencyDecimal"] = 12] = "CurrencyDecimal";
/**
* Group separator for currency values (fallback to `Group`).
* Example: $2,345.67
*/
NumberSymbol[NumberSymbol["CurrencyGroup"] = 13] = "CurrencyGroup";
})(NumberSymbol || (NumberSymbol = {}));
/**
* The value for each day of the week, based on the `en-US` locale
*
* @publicApi
*/
var WeekDay;
(function (WeekDay) {
WeekDay[WeekDay["Sunday"] = 0] = "Sunday";
WeekDay[WeekDay["Monday"] = 1] = "Monday";
WeekDay[WeekDay["Tuesday"] = 2] = "Tuesday";
WeekDay[WeekDay["Wednesday"] = 3] = "Wednesday";
WeekDay[WeekDay["Thursday"] = 4] = "Thursday";
WeekDay[WeekDay["Friday"] = 5] = "Friday";
WeekDay[WeekDay["Saturday"] = 6] = "Saturday";
})(WeekDay || (WeekDay = {}));
/**
* Retrieves the locale ID from the currently loaded locale.
* The loaded locale could be, for example, a global one rather than a regional one.
* @param locale A locale code, such as `fr-FR`.
* @returns The locale code. For example, `fr`.
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getLocaleId(locale) {
return (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale)[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].LocaleId];
}
/**
* Retrieves day period strings for the given locale.
*
* @param locale A locale code for the locale format rules to use.
* @param formStyle The required grammatical form.
* @param width The required character width.
* @returns An array of localized period strings. For example, `[AM, PM]` for `en-US`.
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getLocaleDayPeriods(locale, formStyle, width) {
const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
const amPmData = [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DayPeriodsFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DayPeriodsStandalone]];
const amPm = getLastDefinedValue(amPmData, formStyle);
return getLastDefinedValue(amPm, width);
}
/**
* Retrieves days of the week for the given locale, using the Gregorian calendar.
*
* @param locale A locale code for the locale format rules to use.
* @param formStyle The required grammatical form.
* @param width The required character width.
* @returns An array of localized name strings.
* For example,`[Sunday, Monday, ... Saturday]` for `en-US`.
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getLocaleDayNames(locale, formStyle, width) {
const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
const daysData = [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DaysFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DaysStandalone]];
const days = getLastDefinedValue(daysData, formStyle);
return getLastDefinedValue(days, width);
}
/**
* Retrieves months of the year for the given locale, using the Gregorian calendar.
*
* @param locale A locale code for the locale format rules to use.
* @param formStyle The required grammatical form.
* @param width The required character width.
* @returns An array of localized name strings.
* For example, `[January, February, ...]` for `en-US`.
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getLocaleMonthNames(locale, formStyle, width) {
const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
const monthsData = [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].MonthsFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].MonthsStandalone]];
const months = getLastDefinedValue(monthsData, formStyle);
return getLastDefinedValue(months, width);
}
/**
* Retrieves Gregorian-calendar eras for the given locale.
* @param locale A locale code for the locale format rules to use.
* @param width The required character width.
* @returns An array of localized era strings.
* For example, `[AD, BC]` for `en-US`.
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getLocaleEraNames(locale, width) {
const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
const erasData = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].Eras];
return getLastDefinedValue(erasData, width);
}
/**
* Retrieves the first day of the week for the given locale.
*
* @param locale A locale code for the locale format rules to use.
* @returns A day index number, using the 0-based week-day index for `en-US`
* (Sunday = 0, Monday = 1, ...).
* For example, for `fr-FR`, returns 1 to indicate that the first day is Monday.
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getLocaleFirstDayOfWeek(locale) {
const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].FirstDayOfWeek];
}
/**
* Range of week days that are considered the week-end for the given locale.
*
* @param locale A locale code for the locale format rules to use.
* @returns The range of day values, `[startDay, endDay]`.
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getLocaleWeekEndRange(locale) {
const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].WeekendRange];
}
/**
* Retrieves a localized date-value formatting string.
*
* @param locale A locale code for the locale format rules to use.
* @param width The format type.
* @returns The localized formatting string.
* @see `FormatWidth`
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getLocaleDateFormat(locale, width) {
const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
return getLastDefinedValue(data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DateFormat], width);
}
/**
* Retrieves a localized time-value formatting string.
*
* @param locale A locale code for the locale format rules to use.
* @param width The format type.
* @returns The localized formatting string.
* @see `FormatWidth`
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
* @publicApi
*/
function getLocaleTimeFormat(locale, width) {
const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
return getLastDefinedValue(data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].TimeFormat], width);
}
/**
* Retrieves a localized date-time formatting string.
*
* @param locale A locale code for the locale format rules to use.
* @param width The format type.
* @returns The localized formatting string.
* @see `FormatWidth`
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getLocaleDateTimeFormat(locale, width) {
const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
const dateTimeFormatData = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DateTimeFormat];
return getLastDefinedValue(dateTimeFormatData, width);
}
/**
* Retrieves a localized number symbol that can be used to replace placeholders in number formats.
* @param locale The locale code.
* @param symbol The symbol to localize.
* @returns The character for the localized symbol.
* @see `NumberSymbol`
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getLocaleNumberSymbol(locale, symbol) {
const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
const res = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberSymbols][symbol];
if (typeof res === 'undefined') {
if (symbol === NumberSymbol.CurrencyDecimal) {
return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberSymbols][NumberSymbol.Decimal];
} else if (symbol === NumberSymbol.CurrencyGroup) {
return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberSymbols][NumberSymbol.Group];
}
}
return res;
}
/**
* Retrieves a number format for a given locale.
*
* Numbers are formatted using patterns, like `#,###.00`. For example, the pattern `#,###.00`
* when used to format the number 12345.678 could result in "12'345,678". That would happen if the
* grouping separator for your language is an apostrophe, and the decimal separator is a comma.
*
*
Important: The characters `.` `,` `0` `#` (and others below) are special placeholders
* that stand for the decimal separator, and so on, and are NOT real characters.
* You must NOT "translate" the placeholders. For example, don't change `.` to `,` even though in
* your language the decimal point is written with a comma. The symbols should be replaced by the
* local equivalents, using the appropriate `NumberSymbol` for your language.
*
* Here are the special characters used in number patterns:
*
* | Symbol | Meaning |
* |--------|---------|
* | . | Replaced automatically by the character used for the decimal point. |
* | , | Replaced by the "grouping" (thousands) separator. |
* | 0 | Replaced by a digit (or zero if there aren't enough digits). |
* | # | Replaced by a digit (or nothing if there aren't enough). |
* | ¤ | Replaced by a currency symbol, such as $ or USD. |
* | % | Marks a percent format. The % symbol may change position, but must be retained. |
* | E | Marks a scientific format. The E symbol may change position, but must be retained. |
* | ' | Special characters used as literal characters are quoted with ASCII single quotes. |
*
* @param locale A locale code for the locale format rules to use.
* @param type The type of numeric value to be formatted (such as `Decimal` or `Currency`.)
* @returns The localized format string.
* @see `NumberFormatStyle`
* @see [CLDR website](http://cldr.unicode.org/translation/number-patterns)
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getLocaleNumberFormat(locale, type) {
const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberFormats][type];
}
/**
* Retrieves the symbol used to represent the currency for the main country
* corresponding to a given locale. For example, '$' for `en-US`.
*
* @param locale A locale code for the locale format rules to use.
* @returns The localized symbol character,
* or `null` if the main country cannot be determined.
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getLocaleCurrencySymbol(locale) {
const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].CurrencySymbol] || null;
}
/**
* Retrieves the name of the currency for the main country corresponding
* to a given locale. For example, 'US Dollar' for `en-US`.
* @param locale A locale code for the locale format rules to use.
* @returns The currency name,
* or `null` if the main country cannot be determined.
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getLocaleCurrencyName(locale) {
const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].CurrencyName] || null;
}
/**
* Retrieves the default currency code for the given locale.
*
* The default is defined as the first currency which is still in use.
*
* @param locale The code of the locale whose currency code we want.
* @returns The code of the default currency for the given locale.
*
* @publicApi
*/
function getLocaleCurrencyCode(locale) {
return (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵgetLocaleCurrencyCode"])(locale);
}
/**
* Retrieves the currency values for a given locale.
* @param locale A locale code for the locale format rules to use.
* @returns The currency values.
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*/
function getLocaleCurrencies(locale) {
const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].Currencies];
}
/**
* @alias core/ɵgetLocalePluralCase
* @publicApi
*/
const getLocalePluralCase = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵgetLocalePluralCase"];
function checkFullData(data) {
if (!data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData]) {
throw new Error(`Missing extra locale data for the locale "${data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`);
}
}
/**
* Retrieves locale-specific rules used to determine which day period to use
* when more than one period is defined for a locale.
*
* There is a rule for each defined day period. The
* first rule is applied to the first day period and so on.
* Fall back to AM/PM when no rules are available.
*
* A rule can specify a period as time range, or as a single time value.
*
* This functionality is only available when you have loaded the full locale data.
* See the ["I18n guide"](guide/i18n-common-format-data-locale).
*
* @param locale A locale code for the locale format rules to use.
* @returns The rules for the locale, a single time value or array of *from-time, to-time*,
* or null if no periods are available.
*
* @see `getLocaleExtraDayPeriods()`
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getLocaleExtraDayPeriodRules(locale) {
const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
checkFullData(data);
const rules = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][2
/* ɵExtraLocaleDataIndex.ExtraDayPeriodsRules */
] || [];
return rules.map(rule => {
if (typeof rule === 'string') {
return extractTime(rule);
}
return [extractTime(rule[0]), extractTime(rule[1])];
});
}
/**
* Retrieves locale-specific day periods, which indicate roughly how a day is broken up
* in different languages.
* For example, for `en-US`, periods are morning, noon, afternoon, evening, and midnight.
*
* This functionality is only available when you have loaded the full locale data.
* See the ["I18n guide"](guide/i18n-common-format-data-locale).
*
* @param locale A locale code for the locale format rules to use.
* @param formStyle The required grammatical form.
* @param width The required character width.
* @returns The translated day-period strings.
* @see `getLocaleExtraDayPeriodRules()`
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getLocaleExtraDayPeriods(locale, formStyle, width) {
const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
checkFullData(data);
const dayPeriodsData = [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][0
/* ɵExtraLocaleDataIndex.ExtraDayPeriodFormats */
], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][1
/* ɵExtraLocaleDataIndex.ExtraDayPeriodStandalone */
]];
const dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];
return getLastDefinedValue(dayPeriods, width) || [];
}
/**
* Retrieves the writing direction of a specified locale
* @param locale A locale code for the locale format rules to use.
* @publicApi
* @returns 'rtl' or 'ltr'
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*/
function getLocaleDirection(locale) {
const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].Directionality];
}
/**
* Retrieves the first value that is defined in an array, going backwards from an index position.
*
* To avoid repeating the same data (as when the "format" and "standalone" forms are the same)
* add the first value to the locale data arrays, and add other values only if they are different.
*
* @param data The data array to retrieve from.
* @param index A 0-based index into the array to start from.
* @returns The value immediately before the given index position.
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getLastDefinedValue(data, index) {
for (let i = index; i > -1; i--) {
if (typeof data[i] !== 'undefined') {
return data[i];
}
}
throw new Error('Locale data API: locale data undefined');
}
/**
* Extracts the hours and minutes from a string like "15:45"
*/
function extractTime(time) {
const [h, m] = time.split(':');
return {
hours: +h,
minutes: +m
};
}
/**
* Retrieves the currency symbol for a given currency code.
*
* For example, for the default `en-US` locale, the code `USD` can
* be represented by the narrow symbol `$` or the wide symbol `US$`.
*
* @param code The currency code.
* @param format The format, `wide` or `narrow`.
* @param locale A locale code for the locale format rules to use.
*
* @returns The symbol, or the currency code if no symbol is available.
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getCurrencySymbol(code, format, locale = 'en') {
const currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];
const symbolNarrow = currency[1
/* ɵCurrencyIndex.SymbolNarrow */
];
if (format === 'narrow' && typeof symbolNarrow === 'string') {
return symbolNarrow;
}
return currency[0
/* ɵCurrencyIndex.Symbol */
] || code;
} // Most currencies have cents, that's why the default is 2
const DEFAULT_NB_OF_CURRENCY_DIGITS = 2;
/**
* Reports the number of decimal digits for a given currency.
* The value depends upon the presence of cents in that particular currency.
*
* @param code The currency code.
* @returns The number of decimal digits, typically 0 or 2.
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function getNumberOfCurrencyDigits(code) {
let digits;
const currency = CURRENCIES_EN[code];
if (currency) {
digits = currency[2
/* ɵCurrencyIndex.NbOfDigits */
];
}
return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS;
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
const ISO8601_DATE_REGEX = /^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; // 1 2 3 4 5 6 7 8 9 10 11
const NAMED_FORMATS = {};
const DATE_FORMATS_SPLIT = /((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;
var ZoneWidth;
(function (ZoneWidth) {
ZoneWidth[ZoneWidth["Short"] = 0] = "Short";
ZoneWidth[ZoneWidth["ShortGMT"] = 1] = "ShortGMT";
ZoneWidth[ZoneWidth["Long"] = 2] = "Long";
ZoneWidth[ZoneWidth["Extended"] = 3] = "Extended";
})(ZoneWidth || (ZoneWidth = {}));
var DateType;
(function (DateType) {
DateType[DateType["FullYear"] = 0] = "FullYear";
DateType[DateType["Month"] = 1] = "Month";
DateType[DateType["Date"] = 2] = "Date";
DateType[DateType["Hours"] = 3] = "Hours";
DateType[DateType["Minutes"] = 4] = "Minutes";
DateType[DateType["Seconds"] = 5] = "Seconds";
DateType[DateType["FractionalSeconds"] = 6] = "FractionalSeconds";
DateType[DateType["Day"] = 7] = "Day";
})(DateType || (DateType = {}));
var TranslationType;
(function (TranslationType) {
TranslationType[TranslationType["DayPeriods"] = 0] = "DayPeriods";
TranslationType[TranslationType["Days"] = 1] = "Days";
TranslationType[TranslationType["Months"] = 2] = "Months";
TranslationType[TranslationType["Eras"] = 3] = "Eras";
})(TranslationType || (TranslationType = {}));
/**
* @ngModule CommonModule
* @description
*
* Formats a date according to locale rules.
*
* @param value The date to format, as a Date, or a number (milliseconds since UTC epoch)
* or an [ISO date-time string](https://www.w3.org/TR/NOTE-datetime).
* @param format The date-time components to include. See `DatePipe` for details.
* @param locale A locale code for the locale format rules to use.
* @param timezone The time zone. A time zone offset from GMT (such as `'+0430'`),
* or a standard UTC/GMT or continental US time zone abbreviation.
* If not specified, uses host system settings.
*
* @returns The formatted date string.
*
* @see `DatePipe`
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function formatDate(value, format, locale, timezone) {
let date = toDate(value);
const namedFormat = getNamedFormat(locale, format);
format = namedFormat || format;
let parts = [];
let match;
while (format) {
match = DATE_FORMATS_SPLIT.exec(format);
if (match) {
parts = parts.concat(match.slice(1));
const part = parts.pop();
if (!part) {
break;
}
format = part;
} else {
parts.push(format);
break;
}
}
let dateTimezoneOffset = date.getTimezoneOffset();
if (timezone) {
dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
date = convertTimezoneToLocal(date, timezone, true);
}
let text = '';
parts.forEach(value => {
const dateFormatter = getDateFormatter(value);
text += dateFormatter ? dateFormatter(date, locale, dateTimezoneOffset) : value === '\'\'' ? '\'' : value.replace(/(^'|'$)/g, '').replace(/''/g, '\'');
});
return text;
}
/**
* Create a new Date object with the given date value, and the time set to midnight.
*
* We cannot use `new Date(year, month, date)` because it maps years between 0 and 99 to 1900-1999.
* See: https://github.com/angular/angular/issues/40377
*
* Note that this function returns a Date object whose time is midnight in the current locale's
* timezone. In the future we might want to change this to be midnight in UTC, but this would be a
* considerable breaking change.
*/
function createDate(year, month, date) {
// The `newDate` is set to midnight (UTC) on January 1st 1970.
// - In PST this will be December 31st 1969 at 4pm.
// - In GMT this will be January 1st 1970 at 1am.
// Note that they even have different years, dates and months!
const newDate = new Date(0); // `setFullYear()` allows years like 0001 to be set correctly. This function does not
// change the internal time of the date.
// Consider calling `setFullYear(2019, 8, 20)` (September 20, 2019).
// - In PST this will now be September 20, 2019 at 4pm
// - In GMT this will now be September 20, 2019 at 1am
newDate.setFullYear(year, month, date); // We want the final date to be at local midnight, so we reset the time.
// - In PST this will now be September 20, 2019 at 12am
// - In GMT this will now be September 20, 2019 at 12am
newDate.setHours(0, 0, 0);
return newDate;
}
function getNamedFormat(locale, format) {
const localeId = getLocaleId(locale);
NAMED_FORMATS[localeId] = NAMED_FORMATS[localeId] || {};
if (NAMED_FORMATS[localeId][format]) {
return NAMED_FORMATS[localeId][format];
}
let formatValue = '';
switch (format) {
case 'shortDate':
formatValue = getLocaleDateFormat(locale, FormatWidth.Short);
break;
case 'mediumDate':
formatValue = getLocaleDateFormat(locale, FormatWidth.Medium);
break;
case 'longDate':
formatValue = getLocaleDateFormat(locale, FormatWidth.Long);
break;
case 'fullDate':
formatValue = getLocaleDateFormat(locale, FormatWidth.Full);
break;
case 'shortTime':
formatValue = getLocaleTimeFormat(locale, FormatWidth.Short);
break;
case 'mediumTime':
formatValue = getLocaleTimeFormat(locale, FormatWidth.Medium);
break;
case 'longTime':
formatValue = getLocaleTimeFormat(locale, FormatWidth.Long);
break;
case 'fullTime':
formatValue = getLocaleTimeFormat(locale, FormatWidth.Full);
break;
case 'short':
const shortTime = getNamedFormat(locale, 'shortTime');
const shortDate = getNamedFormat(locale, 'shortDate');
formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]);
break;
case 'medium':
const mediumTime = getNamedFormat(locale, 'mediumTime');
const mediumDate = getNamedFormat(locale, 'mediumDate');
formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]);
break;
case 'long':
const longTime = getNamedFormat(locale, 'longTime');
const longDate = getNamedFormat(locale, 'longDate');
formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]);
break;
case 'full':
const fullTime = getNamedFormat(locale, 'fullTime');
const fullDate = getNamedFormat(locale, 'fullDate');
formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]);
break;
}
if (formatValue) {
NAMED_FORMATS[localeId][format] = formatValue;
}
return formatValue;
}
function formatDateTime(str, opt_values) {
if (opt_values) {
str = str.replace(/\{([^}]+)}/g, function (match, key) {
return opt_values != null && key in opt_values ? opt_values[key] : match;
});
}
return str;
}
function padNumber(num, digits, minusSign = '-', trim, negWrap) {
let neg = '';
if (num < 0 || negWrap && num <= 0) {
if (negWrap) {
num = -num + 1;
} else {
num = -num;
neg = minusSign;
}
}
let strNum = String(num);
while (strNum.length < digits) {
strNum = '0' + strNum;
}
if (trim) {
strNum = strNum.slice(strNum.length - digits);
}
return neg + strNum;
}
function formatFractionalSeconds(milliseconds, digits) {
const strMs = padNumber(milliseconds, 3);
return strMs.substring(0, digits);
}
/**
* Returns a date formatter that transforms a date into its locale digit representation
*/
function dateGetter(name, size, offset = 0, trim = false, negWrap = false) {
return function (date, locale) {
let part = getDatePart(name, date);
if (offset > 0 || part > -offset) {
part += offset;
}
if (name === DateType.Hours) {
if (part === 0 && offset === -12) {
part = 12;
}
} else if (name === DateType.FractionalSeconds) {
return formatFractionalSeconds(part, size);
}
const localeMinus = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);
return padNumber(part, size, localeMinus, trim, negWrap);
};
}
function getDatePart(part, date) {
switch (part) {
case DateType.FullYear:
return date.getFullYear();
case DateType.Month:
return date.getMonth();
case DateType.Date:
return date.getDate();
case DateType.Hours:
return date.getHours();
case DateType.Minutes:
return date.getMinutes();
case DateType.Seconds:
return date.getSeconds();
case DateType.FractionalSeconds:
return date.getMilliseconds();
case DateType.Day:
return date.getDay();
default:
throw new Error(`Unknown DateType value "${part}".`);
}
}
/**
* Returns a date formatter that transforms a date into its locale string representation
*/
function dateStrGetter(name, width, form = FormStyle.Format, extended = false) {
return function (date, locale) {
return getDateTranslation(date, locale, name, width, form, extended);
};
}
/**
* Returns the locale translation of a date for a given form, type and width
*/
function getDateTranslation(date, locale, name, width, form, extended) {
switch (name) {
case TranslationType.Months:
return getLocaleMonthNames(locale, form, width)[date.getMonth()];
case TranslationType.Days:
return getLocaleDayNames(locale, form, width)[date.getDay()];
case TranslationType.DayPeriods:
const currentHours = date.getHours();
const currentMinutes = date.getMinutes();
if (extended) {
const rules = getLocaleExtraDayPeriodRules(locale);
const dayPeriods = getLocaleExtraDayPeriods(locale, form, width);
const index = rules.findIndex(rule => {
if (Array.isArray(rule)) {
// morning, afternoon, evening, night
const [from, to] = rule;
const afterFrom = currentHours >= from.hours && currentMinutes >= from.minutes;
const beforeTo = currentHours < to.hours || currentHours === to.hours && currentMinutes < to.minutes; // We must account for normal rules that span a period during the day (e.g. 6am-9am)
// where `from` is less (earlier) than `to`. But also rules that span midnight (e.g.
// 10pm - 5am) where `from` is greater (later!) than `to`.
//
// In the first case the current time must be BOTH after `from` AND before `to`
// (e.g. 8am is after 6am AND before 10am).
//
// In the second case the current time must be EITHER after `from` OR before `to`
// (e.g. 4am is before 5am but not after 10pm; and 11pm is not before 5am but it is
// after 10pm).
if (from.hours < to.hours) {
if (afterFrom && beforeTo) {
return true;
}
} else if (afterFrom || beforeTo) {
return true;
}
} else {
// noon or midnight
if (rule.hours === currentHours && rule.minutes === currentMinutes) {
return true;
}
}
return false;
});
if (index !== -1) {
return dayPeriods[index];
}
} // if no rules for the day periods, we use am/pm by default
return getLocaleDayPeriods(locale, form, width)[currentHours < 12 ? 0 : 1];
case TranslationType.Eras:
return getLocaleEraNames(locale, width)[date.getFullYear() <= 0 ? 0 : 1];
default:
// This default case is not needed by TypeScript compiler, as the switch is exhaustive.
// However Closure Compiler does not understand that and reports an error in typed mode.
// The `throw new Error` below works around the problem, and the unexpected: never variable
// makes sure tsc still checks this code is unreachable.
const unexpected = name;
throw new Error(`unexpected translation type ${unexpected}`);
}
}
/**
* Returns a date formatter that transforms a date and an offset into a timezone with ISO8601 or
* GMT format depending on the width (eg: short = +0430, short:GMT = GMT+4, long = GMT+04:30,
* extended = +04:30)
*/
function timeZoneGetter(width) {
return function (date, locale, offset) {
const zone = -1 * offset;
const minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);
const hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);
switch (width) {
case ZoneWidth.Short:
return (zone >= 0 ? '+' : '') + padNumber(hours, 2, minusSign) + padNumber(Math.abs(zone % 60), 2, minusSign);
case ZoneWidth.ShortGMT:
return 'GMT' + (zone >= 0 ? '+' : '') + padNumber(hours, 1, minusSign);
case ZoneWidth.Long:
return 'GMT' + (zone >= 0 ? '+' : '') + padNumber(hours, 2, minusSign) + ':' + padNumber(Math.abs(zone % 60), 2, minusSign);
case ZoneWidth.Extended:
if (offset === 0) {
return 'Z';
} else {
return (zone >= 0 ? '+' : '') + padNumber(hours, 2, minusSign) + ':' + padNumber(Math.abs(zone % 60), 2, minusSign);
}
default:
throw new Error(`Unknown zone width "${width}"`);
}
};
}
const JANUARY = 0;
const THURSDAY = 4;
function getFirstThursdayOfYear(year) {
const firstDayOfYear = createDate(year, JANUARY, 1).getDay();
return createDate(year, 0, 1 + (firstDayOfYear <= THURSDAY ? THURSDAY : THURSDAY + 7) - firstDayOfYear);
}
function getThursdayThisWeek(datetime) {
return createDate(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + (THURSDAY - datetime.getDay()));
}
function weekGetter(size, monthBased = false) {
return function (date, locale) {
let result;
if (monthBased) {
const nbDaysBefore1stDayOfMonth = new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1;
const today = date.getDate();
result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);
} else {
const thisThurs = getThursdayThisWeek(date); // Some days of a year are part of next year according to ISO 8601.
// Compute the firstThurs from the year of this week's Thursday
const firstThurs = getFirstThursdayOfYear(thisThurs.getFullYear());
const diff = thisThurs.getTime() - firstThurs.getTime();
result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week
}
return padNumber(result, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
};
}
/**
* Returns a date formatter that provides the week-numbering year for the input date.
*/
function weekNumberingYearGetter(size, trim = false) {
return function (date, locale) {
const thisThurs = getThursdayThisWeek(date);
const weekNumberingYear = thisThurs.getFullYear();
return padNumber(weekNumberingYear, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign), trim);
};
}
const DATE_FORMATS = {}; // Based on CLDR formats:
// See complete list: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
// See also explanations: http://cldr.unicode.org/translation/date-time
// TODO(ocombe): support all missing cldr formats: U, Q, D, F, e, j, J, C, A, v, V, X, x
function getDateFormatter(format) {
if (DATE_FORMATS[format]) {
return DATE_FORMATS[format];
}
let formatter;
switch (format) {
// Era name (AD/BC)
case 'G':
case 'GG':
case 'GGG':
formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Abbreviated);
break;
case 'GGGG':
formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Wide);
break;
case 'GGGGG':
formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Narrow);
break;
// 1 digit representation of the year, e.g. (AD 1 => 1, AD 199 => 199)
case 'y':
formatter = dateGetter(DateType.FullYear, 1, 0, false, true);
break;
// 2 digit representation of the year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)
case 'yy':
formatter = dateGetter(DateType.FullYear, 2, 0, true, true);
break;
// 3 digit representation of the year, padded (000-999). (e.g. AD 2001 => 01, AD 2010 => 10)
case 'yyy':
formatter = dateGetter(DateType.FullYear, 3, 0, false, true);
break;
// 4 digit representation of the year (e.g. AD 1 => 0001, AD 2010 => 2010)
case 'yyyy':
formatter = dateGetter(DateType.FullYear, 4, 0, false, true);
break;
// 1 digit representation of the week-numbering year, e.g. (AD 1 => 1, AD 199 => 199)
case 'Y':
formatter = weekNumberingYearGetter(1);
break;
// 2 digit representation of the week-numbering year, padded (00-99). (e.g. AD 2001 => 01, AD
// 2010 => 10)
case 'YY':
formatter = weekNumberingYearGetter(2, true);
break;
// 3 digit representation of the week-numbering year, padded (000-999). (e.g. AD 1 => 001, AD
// 2010 => 2010)
case 'YYY':
formatter = weekNumberingYearGetter(3);
break;
// 4 digit representation of the week-numbering year (e.g. AD 1 => 0001, AD 2010 => 2010)
case 'YYYY':
formatter = weekNumberingYearGetter(4);
break;
// Month of the year (1-12), numeric
case 'M':
case 'L':
formatter = dateGetter(DateType.Month, 1, 1);
break;
case 'MM':
case 'LL':
formatter = dateGetter(DateType.Month, 2, 1);
break;
// Month of the year (January, ...), string, format
case 'MMM':
formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated);
break;
case 'MMMM':
formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide);
break;
case 'MMMMM':
formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow);
break;
// Month of the year (January, ...), string, standalone
case 'LLL':
formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);
break;
case 'LLLL':
formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);
break;
case 'LLLLL':
formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone);
break;
// Week of the year (1, ... 52)
case 'w':
formatter = weekGetter(1);
break;
case 'ww':
formatter = weekGetter(2);
break;
// Week of the month (1, ...)
case 'W':
formatter = weekGetter(1, true);
break;
// Day of the month (1-31)
case 'd':
formatter = dateGetter(DateType.Date, 1);
break;
case 'dd':
formatter = dateGetter(DateType.Date, 2);
break;
// Day of the Week StandAlone (1, 1, Mon, Monday, M, Mo)
case 'c':
case 'cc':
formatter = dateGetter(DateType.Day, 1);
break;
case 'ccc':
formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated, FormStyle.Standalone);
break;
case 'cccc':
formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide, FormStyle.Standalone);
break;
case 'ccccc':
formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow, FormStyle.Standalone);
break;
case 'cccccc':
formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short, FormStyle.Standalone);
break;
// Day of the Week
case 'E':
case 'EE':
case 'EEE':
formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated);
break;
case 'EEEE':
formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide);
break;
case 'EEEEE':
formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow);
break;
case 'EEEEEE':
formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short);
break;
// Generic period of the day (am-pm)
case 'a':
case 'aa':
case 'aaa':
formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated);
break;
case 'aaaa':
formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide);
break;
case 'aaaaa':
formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow);
break;
// Extended period of the day (midnight, at night, ...), standalone
case 'b':
case 'bb':
case 'bbb':
formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Standalone, true);
break;
case 'bbbb':
formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Standalone, true);
break;
case 'bbbbb':
formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Standalone, true);
break;
// Extended period of the day (midnight, night, ...), standalone
case 'B':
case 'BB':
case 'BBB':
formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Format, true);
break;
case 'BBBB':
formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true);
break;
case 'BBBBB':
formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true);
break;
// Hour in AM/PM, (1-12)
case 'h':
formatter = dateGetter(DateType.Hours, 1, -12);
break;
case 'hh':
formatter = dateGetter(DateType.Hours, 2, -12);
break;
// Hour of the day (0-23)
case 'H':
formatter = dateGetter(DateType.Hours, 1);
break;
// Hour in day, padded (00-23)
case 'HH':
formatter = dateGetter(DateType.Hours, 2);
break;
// Minute of the hour (0-59)
case 'm':
formatter = dateGetter(DateType.Minutes, 1);
break;
case 'mm':
formatter = dateGetter(DateType.Minutes, 2);
break;
// Second of the minute (0-59)
case 's':
formatter = dateGetter(DateType.Seconds, 1);
break;
case 'ss':
formatter = dateGetter(DateType.Seconds, 2);
break;
// Fractional second
case 'S':
formatter = dateGetter(DateType.FractionalSeconds, 1);
break;
case 'SS':
formatter = dateGetter(DateType.FractionalSeconds, 2);
break;
case 'SSS':
formatter = dateGetter(DateType.FractionalSeconds, 3);
break;
// Timezone ISO8601 short format (-0430)
case 'Z':
case 'ZZ':
case 'ZZZ':
formatter = timeZoneGetter(ZoneWidth.Short);
break;
// Timezone ISO8601 extended format (-04:30)
case 'ZZZZZ':
formatter = timeZoneGetter(ZoneWidth.Extended);
break;
// Timezone GMT short format (GMT+4)
case 'O':
case 'OO':
case 'OOO': // Should be location, but fallback to format O instead because we don't have the data yet
case 'z':
case 'zz':
case 'zzz':
formatter = timeZoneGetter(ZoneWidth.ShortGMT);
break;
// Timezone GMT long format (GMT+0430)
case 'OOOO':
case 'ZZZZ': // Should be location, but fallback to format O instead because we don't have the data yet
case 'zzzz':
formatter = timeZoneGetter(ZoneWidth.Long);
break;
default:
return null;
}
DATE_FORMATS[format] = formatter;
return formatter;
}
function timezoneToOffset(timezone, fallback) {
// Support: IE 11 only, Edge 13-15+
// IE/Edge do not "understand" colon (`:`) in timezone
timezone = timezone.replace(/:/g, '');
const requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;
}
function addDateMinutes(date, minutes) {
date = new Date(date.getTime());
date.setMinutes(date.getMinutes() + minutes);
return date;
}
function convertTimezoneToLocal(date, timezone, reverse) {
const reverseValue = reverse ? -1 : 1;
const dateTimezoneOffset = date.getTimezoneOffset();
const timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset));
}
/**
* Converts a value to date.
*
* Supported input formats:
* - `Date`
* - number: timestamp
* - string: numeric (e.g. "1234"), ISO and date strings in a format supported by
* [Date.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).
* Note: ISO strings without time return a date without timeoffset.
*
* Throws if unable to convert to a date.
*/
function toDate(value) {
if (isDate(value)) {
return value;
}
if (typeof value === 'number' && !isNaN(value)) {
return new Date(value);
}
if (typeof value === 'string') {
value = value.trim();
if (/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(value)) {
/* For ISO Strings without time the day, month and year must be extracted from the ISO String
before Date creation to avoid time offset and errors in the new Date.
If we only replace '-' with ',' in the ISO String ("2015,01,01"), and try to create a new
date, some browsers (e.g. IE 9) will throw an invalid Date error.
If we leave the '-' ("2015-01-01") and try to create a new Date("2015-01-01") the timeoffset
is applied.
Note: ISO months are 0 for January, 1 for February, ... */
const [y, m = 1, d = 1] = value.split('-').map(val => +val);
return createDate(y, m - 1, d);
}
const parsedNb = parseFloat(value); // any string that only contains numbers, like "1234" but not like "1234hello"
if (!isNaN(value - parsedNb)) {
return new Date(parsedNb);
}
let match;
if (match = value.match(ISO8601_DATE_REGEX)) {
return isoStringToDate(match);
}
}
const date = new Date(value);
if (!isDate(date)) {
throw new Error(`Unable to convert "${value}" into a date`);
}
return date;
}
/**
* Converts a date in ISO8601 to a Date.
* Used instead of `Date.parse` because of browser discrepancies.
*/
function isoStringToDate(match) {
const date = new Date(0);
let tzHour = 0;
let tzMin = 0; // match[8] means that the string contains "Z" (UTC) or a timezone like "+01:00" or "+0100"
const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;
const timeSetter = match[8] ? date.setUTCHours : date.setHours; // if there is a timezone defined like "+01:00" or "+0100"
if (match[9]) {
tzHour = Number(match[9] + match[10]);
tzMin = Number(match[9] + match[11]);
}
dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));
const h = Number(match[4] || 0) - tzHour;
const m = Number(match[5] || 0) - tzMin;
const s = Number(match[6] || 0); // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)
// defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`
// becomes `999ms`.
const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);
timeSetter.call(date, h, m, s, ms);
return date;
}
function isDate(value) {
return value instanceof Date && !isNaN(value.valueOf());
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
const NUMBER_FORMAT_REGEXP = /^(\d+)?\.((\d+)(-(\d+))?)?$/;
const MAX_DIGITS = 22;
const DECIMAL_SEP = '.';
const ZERO_CHAR = '0';
const PATTERN_SEP = ';';
const GROUP_SEP = ',';
const DIGIT_CHAR = '#';
const CURRENCY_CHAR = '¤';
const PERCENT_CHAR = '%';
/**
* Transforms a number to a locale string based on a style and a format.
*/
function formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimalSymbol, digitsInfo, isPercent = false) {
let formattedText = '';
let isZero = false;
if (!isFinite(value)) {
formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity);
} else {
let parsedNumber = parseNumber(value);
if (isPercent) {
parsedNumber = toPercent(parsedNumber);
}
let minInt = pattern.minInt;
let minFraction = pattern.minFrac;
let maxFraction = pattern.maxFrac;
if (digitsInfo) {
const parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);
if (parts === null) {
throw new Error(`${digitsInfo} is not a valid digit info`);
}
const minIntPart = parts[1];
const minFractionPart = parts[3];
const maxFractionPart = parts[5];
if (minIntPart != null) {
minInt = parseIntAutoRadix(minIntPart);
}
if (minFractionPart != null) {
minFraction = parseIntAutoRadix(minFractionPart);
}
if (maxFractionPart != null) {
maxFraction = parseIntAutoRadix(maxFractionPart);
} else if (minFractionPart != null && minFraction > maxFraction) {
maxFraction = minFraction;
}
}
roundNumber(parsedNumber, minFraction, maxFraction);
let digits = parsedNumber.digits;
let integerLen = parsedNumber.integerLen;
const exponent = parsedNumber.exponent;
let decimals = [];
isZero = digits.every(d => !d); // pad zeros for small numbers
for (; integerLen < minInt; integerLen++) {
digits.unshift(0);
} // pad zeros for small numbers
for (; integerLen < 0; integerLen++) {
digits.unshift(0);
} // extract decimals digits
if (integerLen > 0) {
decimals = digits.splice(integerLen, digits.length);
} else {
decimals = digits;
digits = [0];
} // format the integer digits with grouping separators
const groups = [];
if (digits.length >= pattern.lgSize) {
groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(''));
}
while (digits.length > pattern.gSize) {
groups.unshift(digits.splice(-pattern.gSize, digits.length).join(''));
}
if (digits.length) {
groups.unshift(digits.join(''));
}
formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol)); // append the decimal digits
if (decimals.length) {
formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join('');
}
if (exponent) {
formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + '+' + exponent;
}
}
if (value < 0 && !isZero) {
formattedText = pattern.negPre + formattedText + pattern.negSuf;
} else {
formattedText = pattern.posPre + formattedText + pattern.posSuf;
}
return formattedText;
}
/**
* @ngModule CommonModule
* @description
*
* Formats a number as currency using locale rules.
*
* @param value The number to format.
* @param locale A locale code for the locale format rules to use.
* @param currency A string containing the currency symbol or its name,
* such as "$" or "Canadian Dollar". Used in output string, but does not affect the operation
* of the function.
* @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)
* currency code, such as `USD` for the US dollar and `EUR` for the euro.
* Used to determine the number of digits in the decimal part.
* @param digitsInfo Decimal representation options, specified by a string in the following format:
* `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.
*
* @returns The formatted currency value.
*
* @see `formatNumber()`
* @see `DecimalPipe`
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function formatCurrency(value, locale, currency, currencyCode, digitsInfo) {
const format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency);
const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
pattern.minFrac = getNumberOfCurrencyDigits(currencyCode);
pattern.maxFrac = pattern.minFrac;
const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo);
return res.replace(CURRENCY_CHAR, currency) // if we have 2 time the currency character, the second one is ignored
.replace(CURRENCY_CHAR, '') // If there is a spacing between currency character and the value and
// the currency character is suppressed by passing an empty string, the
// spacing character would remain as part of the string. Then we
// should remove it.
.trim();
}
/**
* @ngModule CommonModule
* @description
*
* Formats a number as a percentage according to locale rules.
*
* @param value The number to format.
* @param locale A locale code for the locale format rules to use.
* @param digitsInfo Decimal representation options, specified by a string in the following format:
* `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.
*
* @returns The formatted percentage value.
*
* @see `formatNumber()`
* @see `DecimalPipe`
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
* @publicApi
*
*/
function formatPercent(value, locale, digitsInfo) {
const format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);
const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo, true);
return res.replace(new RegExp(PERCENT_CHAR, 'g'), getLocaleNumberSymbol(locale, NumberSymbol.PercentSign));
}
/**
* @ngModule CommonModule
* @description
*
* Formats a number as text, with group sizing, separator, and other
* parameters based on the locale.
*
* @param value The number to format.
* @param locale A locale code for the locale format rules to use.
* @param digitsInfo Decimal representation options, specified by a string in the following format:
* `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.
*
* @returns The formatted text string.
* @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
*
* @publicApi
*/
function formatNumber(value, locale, digitsInfo) {
const format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);
const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
return formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo);
}
function parseNumberFormat(format, minusSign = '-') {
const p = {
minInt: 1,
minFrac: 0,
maxFrac: 0,
posPre: '',
posSuf: '',
negPre: '',
negSuf: '',
gSize: 0,
lgSize: 0
};
const patternParts = format.split(PATTERN_SEP);
const positive = patternParts[0];
const negative = patternParts[1];
const positiveParts = positive.indexOf(DECIMAL_SEP) !== -1 ? positive.split(DECIMAL_SEP) : [positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1), positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1)],
integer = positiveParts[0],
fraction = positiveParts[1] || '';
p.posPre = integer.substring(0, integer.indexOf(DIGIT_CHAR));
for (let i = 0; i < fraction.length; i++) {
const ch = fraction.charAt(i);
if (ch === ZERO_CHAR) {
p.minFrac = p.maxFrac = i + 1;
} else if (ch === DIGIT_CHAR) {
p.maxFrac = i + 1;
} else {
p.posSuf += ch;
}
}
const groups = integer.split(GROUP_SEP);
p.gSize = groups[1] ? groups[1].length : 0;
p.lgSize = groups[2] || groups[1] ? (groups[2] || groups[1]).length : 0;
if (negative) {
const trunkLen = positive.length - p.posPre.length - p.posSuf.length,
pos = negative.indexOf(DIGIT_CHAR);
p.negPre = negative.substring(0, pos).replace(/'/g, '');
p.negSuf = negative.slice(pos + trunkLen).replace(/'/g, '');
} else {
p.negPre = minusSign + p.posPre;
p.negSuf = p.posSuf;
}
return p;
} // Transforms a parsed number into a percentage by multiplying it by 100
function toPercent(parsedNumber) {
// if the number is 0, don't do anything
if (parsedNumber.digits[0] === 0) {
return parsedNumber;
} // Getting the current number of decimals
const fractionLen = parsedNumber.digits.length - parsedNumber.integerLen;
if (parsedNumber.exponent) {
parsedNumber.exponent += 2;
} else {
if (fractionLen === 0) {
parsedNumber.digits.push(0, 0);
} else if (fractionLen === 1) {
parsedNumber.digits.push(0);
}
parsedNumber.integerLen += 2;
}
return parsedNumber;
}
/**
* Parses a number.
* Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/
*/
function parseNumber(num) {
let numStr = Math.abs(num) + '';
let exponent = 0,
digits,
integerLen;
let i, j, zeros; // Decimal point?
if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) {
numStr = numStr.replace(DECIMAL_SEP, '');
} // Exponential form?
if ((i = numStr.search(/e/i)) > 0) {
// Work out the exponent.
if (integerLen < 0) integerLen = i;
integerLen += +numStr.slice(i + 1);
numStr = numStr.substring(0, i);
} else if (integerLen < 0) {
// There was no decimal point or exponent so it is an integer.
integerLen = numStr.length;
} // Count the number of leading zeros.
for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) {
/* empty */
}
if (i === (zeros = numStr.length)) {
// The digits are all zero.
digits = [0];
integerLen = 1;
} else {
// Count the number of trailing zeros
zeros--;
while (numStr.charAt(zeros) === ZERO_CHAR) zeros--; // Trailing zeros are insignificant so ignore them
integerLen -= i;
digits = []; // Convert string to array of digits without leading/trailing zeros.
for (j = 0; i <= zeros; i++, j++) {
digits[j] = Number(numStr.charAt(i));
}
} // If the number overflows the maximum allowed digits then use an exponent.
if (integerLen > MAX_DIGITS) {
digits = digits.splice(0, MAX_DIGITS - 1);
exponent = integerLen - 1;
integerLen = 1;
}
return {
digits,
exponent,
integerLen
};
}
/**
* Round the parsed number to the specified number of decimal places
* This function changes the parsedNumber in-place
*/
function roundNumber(parsedNumber, minFrac, maxFrac) {
if (minFrac > maxFrac) {
throw new Error(`The minimum number of digits after fraction (${minFrac}) is higher than the maximum (${maxFrac}).`);
}
let digits = parsedNumber.digits;
let fractionLen = digits.length - parsedNumber.integerLen;
const fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac); // The index of the digit to where rounding is to occur
let roundAt = fractionSize + parsedNumber.integerLen;
let digit = digits[roundAt];
if (roundAt > 0) {
// Drop fractional digits beyond `roundAt`
digits.splice(Math.max(parsedNumber.integerLen, roundAt)); // Set non-fractional digits beyond `roundAt` to 0
for (let j = roundAt; j < digits.length; j++) {
digits[j] = 0;
}
} else {
// We rounded to zero so reset the parsedNumber
fractionLen = Math.max(0, fractionLen);
parsedNumber.integerLen = 1;
digits.length = Math.max(1, roundAt = fractionSize + 1);
digits[0] = 0;
for (let i = 1; i < roundAt; i++) digits[i] = 0;
}
if (digit >= 5) {
if (roundAt - 1 < 0) {
for (let k = 0; k > roundAt; k--) {
digits.unshift(0);
parsedNumber.integerLen++;
}
digits.unshift(1);
parsedNumber.integerLen++;
} else {
digits[roundAt - 1]++;
}
} // Pad out with zeros to get the required fraction length
for (; fractionLen < Math.max(0, fractionSize); fractionLen++) digits.push(0);
let dropTrailingZeros = fractionSize !== 0; // Minimal length = nb of decimals required + current nb of integers
// Any number besides that is optional and can be removed if it's a trailing 0
const minLen = minFrac + parsedNumber.integerLen; // Do any carrying, e.g. a digit was rounded up to 10
const carry = digits.reduceRight(function (carry, d, i, digits) {
d = d + carry;
digits[i] = d < 10 ? d : d - 10; // d % 10
if (dropTrailingZeros) {
// Do not keep meaningless fractional trailing zeros (e.g. 15.52000 --> 15.52)
if (digits[i] === 0 && i >= minLen) {
digits.pop();
} else {
dropTrailingZeros = false;
}
}
return d >= 10 ? 1 : 0; // Math.floor(d / 10);
}, 0);
if (carry) {
digits.unshift(carry);
parsedNumber.integerLen++;
}
}
function parseIntAutoRadix(text) {
const result = parseInt(text);
if (isNaN(result)) {
throw new Error('Invalid integer literal when parsing ' + text);
}
return result;
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @publicApi
*/
class NgLocalization {}
NgLocalization.ɵfac = function NgLocalization_Factory(t) {
return new (t || NgLocalization)();
};
NgLocalization.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
token: NgLocalization,
factory: function NgLocalization_Factory(t) {
let r = null;
if (t) {
r = new t();
} else {
r = (locale => new NgLocaleLocalization(locale))(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID));
}
return r;
},
providedIn: 'root'
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgLocalization, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable,
args: [{
providedIn: 'root',
useFactory: locale => new NgLocaleLocalization(locale),
deps: [_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID]
}]
}], null, null);
})();
/**
* Returns the plural category for a given value.
* - "=value" when the case exists,
* - the plural category otherwise
*/
function getPluralCategory(value, cases, ngLocalization, locale) {
let key = `=${value}`;
if (cases.indexOf(key) > -1) {
return key;
}
key = ngLocalization.getPluralCategory(value, locale);
if (cases.indexOf(key) > -1) {
return key;
}
if (cases.indexOf('other') > -1) {
return 'other';
}
throw new Error(`No plural message found for value "${value}"`);
}
/**
* Returns the plural case based on the locale
*
* @publicApi
*/
class NgLocaleLocalization extends NgLocalization {
constructor(locale) {
super();
this.locale = locale;
}
getPluralCategory(value, locale) {
const plural = getLocalePluralCase(locale || this.locale)(value);
switch (plural) {
case Plural.Zero:
return 'zero';
case Plural.One:
return 'one';
case Plural.Two:
return 'two';
case Plural.Few:
return 'few';
case Plural.Many:
return 'many';
default:
return 'other';
}
}
}
NgLocaleLocalization.ɵfac = function NgLocaleLocalization_Factory(t) {
return new (t || NgLocaleLocalization)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID));
};
NgLocaleLocalization.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
token: NgLocaleLocalization,
factory: NgLocaleLocalization.ɵfac
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgLocaleLocalization, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable
}], function () {
return [{
type: undefined,
decorators: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject,
args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID]
}]
}];
}, null);
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Register global data to be used internally by Angular. See the
* ["I18n guide"](guide/i18n-common-format-data-locale) to know how to import additional locale
* data.
*
* The signature registerLocaleData(data: any, extraData?: any) is deprecated since v5.1
*
* @publicApi
*/
function registerLocaleData(data, localeId, extraData) {
return (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵregisterLocaleData"])(data, localeId, extraData);
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function parseCookieValue(cookieStr, name) {
name = encodeURIComponent(name);
for (const cookie of cookieStr.split(';')) {
const eqIndex = cookie.indexOf('=');
const [cookieName, cookieValue] = eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)];
if (cookieName.trim() === name) {
return decodeURIComponent(cookieValue);
}
}
return null;
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @ngModule CommonModule
*
* @usageNotes
* ```
*
...
*
*
...
*
*
...
*
*
...
*
*
...
* ```
*
* @description
*
* Adds and removes CSS classes on an HTML element.
*
* The CSS classes are updated as follows, depending on the type of the expression evaluation:
* - `string` - the CSS classes listed in the string (space delimited) are added,
* - `Array` - the CSS classes declared as Array elements are added,
* - `Object` - keys are CSS classes that get added when the expression given in the value
* evaluates to a truthy value, otherwise they are removed.
*
* @publicApi
*/
class NgClass {
constructor(_iterableDiffers, _keyValueDiffers, _ngEl, _renderer) {
this._iterableDiffers = _iterableDiffers;
this._keyValueDiffers = _keyValueDiffers;
this._ngEl = _ngEl;
this._renderer = _renderer;
this._iterableDiffer = null;
this._keyValueDiffer = null;
this._initialClasses = [];
this._rawClass = null;
}
set klass(value) {
this._removeClasses(this._initialClasses);
this._initialClasses = typeof value === 'string' ? value.split(/\s+/) : [];
this._applyClasses(this._initialClasses);
this._applyClasses(this._rawClass);
}
set ngClass(value) {
this._removeClasses(this._rawClass);
this._applyClasses(this._initialClasses);
this._iterableDiffer = null;
this._keyValueDiffer = null;
this._rawClass = typeof value === 'string' ? value.split(/\s+/) : value;
if (this._rawClass) {
if ((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisListLikeIterable"])(this._rawClass)) {
this._iterableDiffer = this._iterableDiffers.find(this._rawClass).create();
} else {
this._keyValueDiffer = this._keyValueDiffers.find(this._rawClass).create();
}
}
}
ngDoCheck() {
if (this._iterableDiffer) {
const iterableChanges = this._iterableDiffer.diff(this._rawClass);
if (iterableChanges) {
this._applyIterableChanges(iterableChanges);
}
} else if (this._keyValueDiffer) {
const keyValueChanges = this._keyValueDiffer.diff(this._rawClass);
if (keyValueChanges) {
this._applyKeyValueChanges(keyValueChanges);
}
}
}
_applyKeyValueChanges(changes) {
changes.forEachAddedItem(record => this._toggleClass(record.key, record.currentValue));
changes.forEachChangedItem(record => this._toggleClass(record.key, record.currentValue));
changes.forEachRemovedItem(record => {
if (record.previousValue) {
this._toggleClass(record.key, false);
}
});
}
_applyIterableChanges(changes) {
changes.forEachAddedItem(record => {
if (typeof record.item === 'string') {
this._toggleClass(record.item, true);
} else {
throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${(0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(record.item)}`);
}
});
changes.forEachRemovedItem(record => this._toggleClass(record.item, false));
}
/**
* Applies a collection of CSS classes to the DOM element.
*
* For argument of type Set and Array CSS class names contained in those collections are always
* added.
* For argument of type Map CSS class name in the map's key is toggled based on the value (added
* for truthy and removed for falsy).
*/
_applyClasses(rawClassVal) {
if (rawClassVal) {
if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {
rawClassVal.forEach(klass => this._toggleClass(klass, true));
} else {
Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, !!rawClassVal[klass]));
}
}
}
/**
* Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup
* purposes.
*/
_removeClasses(rawClassVal) {
if (rawClassVal) {
if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {
rawClassVal.forEach(klass => this._toggleClass(klass, false));
} else {
Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, false));
}
}
}
_toggleClass(klass, enabled) {
klass = klass.trim();
if (klass) {
klass.split(/\s+/g).forEach(klass => {
if (enabled) {
this._renderer.addClass(this._ngEl.nativeElement, klass);
} else {
this._renderer.removeClass(this._ngEl.nativeElement, klass);
}
});
}
}
}
NgClass.ɵfac = function NgClass_Factory(t) {
return new (t || NgClass)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.IterableDiffers), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.KeyValueDiffers), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2));
};
NgClass.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
type: NgClass,
selectors: [["", "ngClass", ""]],
inputs: {
klass: ["class", "klass"],
ngClass: "ngClass"
},
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgClass, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive,
args: [{
selector: '[ngClass]',
standalone: true
}]
}], function () {
return [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.IterableDiffers
}, {
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.KeyValueDiffers
}, {
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef
}, {
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2
}];
}, {
klass: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input,
args: ['class']
}],
ngClass: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input,
args: ['ngClass']
}]
});
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Instantiates a {@link Component} type and inserts its Host View into the current View.
* `NgComponentOutlet` provides a declarative approach for dynamic component creation.
*
* `NgComponentOutlet` requires a component type, if a falsy value is set the view will clear and
* any existing component will be destroyed.
*
* @usageNotes
*
* ### Fine tune control
*
* You can control the component creation process by using the following optional attributes:
*
* * `ngComponentOutletInjector`: Optional custom {@link Injector} that will be used as parent for
* the Component. Defaults to the injector of the current view container.
*
* * `ngComponentOutletContent`: Optional list of projectable nodes to insert into the content
* section of the component, if it exists.
*
* * `ngComponentOutletNgModule`: Optional NgModule class reference to allow loading another
* module dynamically, then loading a component from that module.
*
* * `ngComponentOutletNgModuleFactory`: Deprecated config option that allows providing optional
* NgModule factory to allow loading another module dynamically, then loading a component from that
* module. Use `ngComponentOutletNgModule` instead.
*
* ### Syntax
*
* Simple
* ```
*
* ```
*
* Customized injector/content
* ```
*
*
* ```
*
* Customized NgModule reference
* ```
*
*
* ```
*
* ### A simple example
*
* {@example common/ngComponentOutlet/ts/module.ts region='SimpleExample'}
*
* A more complete example with additional options:
*
* {@example common/ngComponentOutlet/ts/module.ts region='CompleteExample'}
*
* @publicApi
* @ngModule CommonModule
*/
class NgComponentOutlet {
constructor(_viewContainerRef) {
this._viewContainerRef = _viewContainerRef;
this.ngComponentOutlet = null;
}
/** @nodoc */
ngOnChanges(changes) {
const {
_viewContainerRef: viewContainerRef,
ngComponentOutletNgModule: ngModule,
ngComponentOutletNgModuleFactory: ngModuleFactory
} = this;
viewContainerRef.clear();
this._componentRef = undefined;
if (this.ngComponentOutlet) {
const injector = this.ngComponentOutletInjector || viewContainerRef.parentInjector;
if (changes['ngComponentOutletNgModule'] || changes['ngComponentOutletNgModuleFactory']) {
if (this._moduleRef) this._moduleRef.destroy();
if (ngModule) {
this._moduleRef = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.createNgModule)(ngModule, getParentInjector(injector));
} else if (ngModuleFactory) {
this._moduleRef = ngModuleFactory.create(getParentInjector(injector));
} else {
this._moduleRef = undefined;
}
}
this._componentRef = viewContainerRef.createComponent(this.ngComponentOutlet, {
index: viewContainerRef.length,
injector,
ngModuleRef: this._moduleRef,
projectableNodes: this.ngComponentOutletContent
});
}
}
/** @nodoc */
ngOnDestroy() {
if (this._moduleRef) this._moduleRef.destroy();
}
}
NgComponentOutlet.ɵfac = function NgComponentOutlet_Factory(t) {
return new (t || NgComponentOutlet)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef));
};
NgComponentOutlet.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
type: NgComponentOutlet,
selectors: [["", "ngComponentOutlet", ""]],
inputs: {
ngComponentOutlet: "ngComponentOutlet",
ngComponentOutletInjector: "ngComponentOutletInjector",
ngComponentOutletContent: "ngComponentOutletContent",
ngComponentOutletNgModule: "ngComponentOutletNgModule",
ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory"
},
standalone: true,
features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]]
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgComponentOutlet, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive,
args: [{
selector: '[ngComponentOutlet]',
standalone: true
}]
}], function () {
return [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef
}];
}, {
ngComponentOutlet: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
ngComponentOutletInjector: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
ngComponentOutletContent: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
ngComponentOutletNgModule: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
ngComponentOutletNgModuleFactory: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}]
});
})(); // Helper function that returns an Injector instance of a parent NgModule.
function getParentInjector(injector) {
const parentNgModule = injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModuleRef);
return parentNgModule.injector;
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
const NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;
/**
* @publicApi
*/
class NgForOfContext {
constructor($implicit, ngForOf, index, count) {
this.$implicit = $implicit;
this.ngForOf = ngForOf;
this.index = index;
this.count = count;
}
get first() {
return this.index === 0;
}
get last() {
return this.index === this.count - 1;
}
get even() {
return this.index % 2 === 0;
}
get odd() {
return !this.even;
}
}
/**
* A [structural directive](guide/structural-directives) that renders
* a template for each item in a collection.
* The directive is placed on an element, which becomes the parent
* of the cloned templates.
*
* The `ngForOf` directive is generally used in the
* [shorthand form](guide/structural-directives#asterisk) `*ngFor`.
* In this form, the template to be rendered for each iteration is the content
* of an anchor element containing the directive.
*
* The following example shows the shorthand syntax with some options,
* contained in an `
` element.
*
* ```
* ...
* ```
*
* The shorthand form expands into a long form that uses the `ngForOf` selector
* on an `
` element.
* The content of the `` element is the `` element that held the
* short-form directive.
*
* Here is the expanded version of the short-form example.
*
* ```
*
* ...
*
* ```
*
* Angular automatically expands the shorthand syntax as it compiles the template.
* The context for each embedded view is logically merged to the current component
* context according to its lexical position.
*
* When using the shorthand syntax, Angular allows only [one structural directive
* on an element](guide/structural-directives#one-per-element).
* If you want to iterate conditionally, for example,
* put the `*ngIf` on a container element that wraps the `*ngFor` element.
* For further discussion, see
* [Structural Directives](guide/structural-directives#one-per-element).
*
* @usageNotes
*
* ### Local variables
*
* `NgForOf` provides exported values that can be aliased to local variables.
* For example:
*
* ```
*
* {{i}}/{{users.length}}. {{user}} default
*
* ```
*
* The following exported values can be aliased to local variables:
*
* - `$implicit: T`: The value of the individual items in the iterable (`ngForOf`).
* - `ngForOf: NgIterable`: The value of the iterable expression. Useful when the expression is
* more complex then a property access, for example when using the async pipe (`userStreams |
* async`).
* - `index: number`: The index of the current item in the iterable.
* - `count: number`: The length of the iterable.
* - `first: boolean`: True when the item is the first item in the iterable.
* - `last: boolean`: True when the item is the last item in the iterable.
* - `even: boolean`: True when the item has an even index in the iterable.
* - `odd: boolean`: True when the item has an odd index in the iterable.
*
* ### Change propagation
*
* When the contents of the iterator changes, `NgForOf` makes the corresponding changes to the DOM:
*
* * When an item is added, a new instance of the template is added to the DOM.
* * When an item is removed, its template instance is removed from the DOM.
* * When items are reordered, their respective templates are reordered in the DOM.
*
* Angular uses object identity to track insertions and deletions within the iterator and reproduce
* those changes in the DOM. This has important implications for animations and any stateful
* controls that are present, such as `` elements that accept user input. Inserted rows can
* be animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state
* such as user input.
* For more on animations, see [Transitions and Triggers](guide/transition-and-triggers).
*
* The identities of elements in the iterator can change while the data does not.
* This can happen, for example, if the iterator is produced from an RPC to the server, and that
* RPC is re-run. Even if the data hasn't changed, the second response produces objects with
* different identities, and Angular must tear down the entire DOM and rebuild it (as if all old
* elements were deleted and all new elements inserted).
*
* To avoid this expensive operation, you can customize the default tracking algorithm.
* by supplying the `trackBy` option to `NgForOf`.
* `trackBy` takes a function that has two arguments: `index` and `item`.
* If `trackBy` is given, Angular tracks changes by the return value of the function.
*
* @see [Structural Directives](guide/structural-directives)
* @ngModule CommonModule
* @publicApi
*/
class NgForOf {
constructor(_viewContainer, _template, _differs) {
this._viewContainer = _viewContainer;
this._template = _template;
this._differs = _differs;
this._ngForOf = null;
this._ngForOfDirty = true;
this._differ = null;
}
/**
* The value of the iterable expression, which can be used as a
* [template input variable](guide/structural-directives#shorthand).
*/
set ngForOf(ngForOf) {
this._ngForOf = ngForOf;
this._ngForOfDirty = true;
}
/**
* Specifies a custom `TrackByFunction` to compute the identity of items in an iterable.
*
* If a custom `TrackByFunction` is not provided, `NgForOf` will use the item's [object
* identity](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is)
* as the key.
*
* `NgForOf` uses the computed key to associate items in an iterable with DOM elements
* it produces for these items.
*
* A custom `TrackByFunction` is useful to provide good user experience in cases when items in an
* iterable rendered using `NgForOf` have a natural identifier (for example, custom ID or a
* primary key), and this iterable could be updated with new object instances that still
* represent the same underlying entity (for example, when data is re-fetched from the server,
* and the iterable is recreated and re-rendered, but most of the data is still the same).
*
* @see `TrackByFunction`
*/
set ngForTrackBy(fn) {
if (NG_DEV_MODE && fn != null && typeof fn !== 'function') {
// TODO(vicb): use a log service once there is a public one available
if (console && console.warn) {
console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}. ` + `See https://angular.io/api/common/NgForOf#change-propagation for more information.`);
}
}
this._trackByFn = fn;
}
get ngForTrackBy() {
return this._trackByFn;
}
/**
* A reference to the template that is stamped out for each item in the iterable.
* @see [template reference variable](guide/template-reference-variables)
*/
set ngForTemplate(value) {
// TODO(TS2.1): make TemplateRef>> once we move to TS v2.1
// The current type is too restrictive; a template that just uses index, for example,
// should be acceptable.
if (value) {
this._template = value;
}
}
/**
* Applies the changes when needed.
* @nodoc
*/
ngDoCheck() {
if (this._ngForOfDirty) {
this._ngForOfDirty = false; // React on ngForOf changes only once all inputs have been initialized
const value = this._ngForOf;
if (!this._differ && value) {
if (NG_DEV_MODE) {
try {
// CAUTION: this logic is duplicated for production mode below, as the try-catch
// is only present in development builds.
this._differ = this._differs.find(value).create(this.ngForTrackBy);
} catch (_a) {
let errorMessage = `Cannot find a differ supporting object '${value}' of type '` + `${getTypeName(value)}'. NgFor only supports binding to Iterables, such as Arrays.`;
if (typeof value === 'object') {
errorMessage += ' Did you mean to use the keyvalue pipe?';
}
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](-2200
/* RuntimeErrorCode.NG_FOR_MISSING_DIFFER */
, errorMessage);
}
} else {
// CAUTION: this logic is duplicated for development mode above, as the try-catch
// is only present in development builds.
this._differ = this._differs.find(value).create(this.ngForTrackBy);
}
}
}
if (this._differ) {
const changes = this._differ.diff(this._ngForOf);
if (changes) this._applyChanges(changes);
}
}
_applyChanges(changes) {
const viewContainer = this._viewContainer;
changes.forEachOperation((item, adjustedPreviousIndex, currentIndex) => {
if (item.previousIndex == null) {
// NgForOf is never "null" or "undefined" here because the differ detected
// that a new item needs to be inserted from the iterable. This implies that
// there is an iterable value for "_ngForOf".
viewContainer.createEmbeddedView(this._template, new NgForOfContext(item.item, this._ngForOf, -1, -1), currentIndex === null ? undefined : currentIndex);
} else if (currentIndex == null) {
viewContainer.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex);
} else if (adjustedPreviousIndex !== null) {
const view = viewContainer.get(adjustedPreviousIndex);
viewContainer.move(view, currentIndex);
applyViewChange(view, item);
}
});
for (let i = 0, ilen = viewContainer.length; i < ilen; i++) {
const viewRef = viewContainer.get(i);
const context = viewRef.context;
context.index = i;
context.count = ilen;
context.ngForOf = this._ngForOf;
}
changes.forEachIdentityChange(record => {
const viewRef = viewContainer.get(record.currentIndex);
applyViewChange(viewRef, record);
});
}
/**
* Asserts the correct type of the context for the template that `NgForOf` will render.
*
* The presence of this method is a signal to the Ivy template type-check compiler that the
* `NgForOf` structural directive renders its template with a specific context type.
*/
static ngTemplateContextGuard(dir, ctx) {
return true;
}
}
NgForOf.ɵfac = function NgForOf_Factory(t) {
return new (t || NgForOf)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.IterableDiffers));
};
NgForOf.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
type: NgForOf,
selectors: [["", "ngFor", "", "ngForOf", ""]],
inputs: {
ngForOf: "ngForOf",
ngForTrackBy: "ngForTrackBy",
ngForTemplate: "ngForTemplate"
},
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgForOf, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive,
args: [{
selector: '[ngFor][ngForOf]',
standalone: true
}]
}], function () {
return [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef
}, {
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef
}, {
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.IterableDiffers
}];
}, {
ngForOf: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
ngForTrackBy: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
ngForTemplate: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}]
});
})();
function applyViewChange(view, record) {
view.context.$implicit = record.item;
}
function getTypeName(type) {
return type['name'] || typeof type;
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* A structural directive that conditionally includes a template based on the value of
* an expression coerced to Boolean.
* When the expression evaluates to true, Angular renders the template
* provided in a `then` clause, and when false or null,
* Angular renders the template provided in an optional `else` clause. The default
* template for the `else` clause is blank.
*
* A [shorthand form](guide/structural-directives#asterisk) of the directive,
* `*ngIf="condition"`, is generally used, provided
* as an attribute of the anchor element for the inserted template.
* Angular expands this into a more explicit version, in which the anchor element
* is contained in an `` element.
*
* Simple form with shorthand syntax:
*
* ```
* Content to render when condition is true.
* ```
*
* Simple form with expanded syntax:
*
* ```
* Content to render when condition is
* true.
* ```
*
* Form with an "else" block:
*
* ```
* Content to render when condition is true.
* Content to render when condition is false.
* ```
*
* Shorthand form with "then" and "else" blocks:
*
* ```
*
* Content to render when condition is true.
* Content to render when condition is false.
* ```
*
* Form with storing the value locally:
*
* ```
* {{value}}
* Content to render when value is null.
* ```
*
* @usageNotes
*
* The `*ngIf` directive is most commonly used to conditionally show an inline template,
* as seen in the following example.
* The default `else` template is blank.
*
* {@example common/ngIf/ts/module.ts region='NgIfSimple'}
*
* ### Showing an alternative template using `else`
*
* To display a template when `expression` evaluates to false, use an `else` template
* binding as shown in the following example.
* The `else` binding points to an `` element labeled `#elseBlock`.
* The template can be defined anywhere in the component view, but is typically placed right after
* `ngIf` for readability.
*
* {@example common/ngIf/ts/module.ts region='NgIfElse'}
*
* ### Using an external `then` template
*
* In the previous example, the then-clause template is specified inline, as the content of the
* tag that contains the `ngIf` directive. You can also specify a template that is defined
* externally, by referencing a labeled `` element. When you do this, you can
* change which template to use at runtime, as shown in the following example.
*
* {@example common/ngIf/ts/module.ts region='NgIfThenElse'}
*
* ### Storing a conditional result in a variable
*
* You might want to show a set of properties from the same object. If you are waiting
* for asynchronous data, the object can be undefined.
* In this case, you can use `ngIf` and store the result of the condition in a local
* variable as shown in the following example.
*
* {@example common/ngIf/ts/module.ts region='NgIfAs'}
*
* This code uses only one `AsyncPipe`, so only one subscription is created.
* The conditional statement stores the result of `userStream|async` in the local variable `user`.
* You can then bind the local `user` repeatedly.
*
* The conditional displays the data only if `userStream` returns a value,
* so you don't need to use the
* safe-navigation-operator (`?.`)
* to guard against null values when accessing properties.
* You can display an alternative template while waiting for the data.
*
* ### Shorthand syntax
*
* The shorthand syntax `*ngIf` expands into two separate template specifications
* for the "then" and "else" clauses. For example, consider the following shorthand statement,
* that is meant to show a loading page while waiting for data to be loaded.
*
* ```
*
* ...
*
*
*
* Loading...
*
* ```
*
* You can see that the "else" clause references the ``
* with the `#loading` label, and the template for the "then" clause
* is provided as the content of the anchor element.
*
* However, when Angular expands the shorthand syntax, it creates
* another `` tag, with `ngIf` and `ngIfElse` directives.
* The anchor element containing the template for the "then" clause becomes
* the content of this unlabeled `` tag.
*
* ```
*
*
* ...
*
*
*
*
* Loading...
*
* ```
*
* The presence of the implicit template object has implications for the nesting of
* structural directives. For more on this subject, see
* [Structural Directives](guide/structural-directives#one-per-element).
*
* @ngModule CommonModule
* @publicApi
*/
class NgIf {
constructor(_viewContainer, templateRef) {
this._viewContainer = _viewContainer;
this._context = new NgIfContext();
this._thenTemplateRef = null;
this._elseTemplateRef = null;
this._thenViewRef = null;
this._elseViewRef = null;
this._thenTemplateRef = templateRef;
}
/**
* The Boolean expression to evaluate as the condition for showing a template.
*/
set ngIf(condition) {
this._context.$implicit = this._context.ngIf = condition;
this._updateView();
}
/**
* A template to show if the condition expression evaluates to true.
*/
set ngIfThen(templateRef) {
assertTemplate('ngIfThen', templateRef);
this._thenTemplateRef = templateRef;
this._thenViewRef = null; // clear previous view if any.
this._updateView();
}
/**
* A template to show if the condition expression evaluates to false.
*/
set ngIfElse(templateRef) {
assertTemplate('ngIfElse', templateRef);
this._elseTemplateRef = templateRef;
this._elseViewRef = null; // clear previous view if any.
this._updateView();
}
_updateView() {
if (this._context.$implicit) {
if (!this._thenViewRef) {
this._viewContainer.clear();
this._elseViewRef = null;
if (this._thenTemplateRef) {
this._thenViewRef = this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context);
}
}
} else {
if (!this._elseViewRef) {
this._viewContainer.clear();
this._thenViewRef = null;
if (this._elseTemplateRef) {
this._elseViewRef = this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);
}
}
}
}
/**
* Asserts the correct type of the context for the template that `NgIf` will render.
*
* The presence of this method is a signal to the Ivy template type-check compiler that the
* `NgIf` structural directive renders its template with a specific context type.
*/
static ngTemplateContextGuard(dir, ctx) {
return true;
}
}
NgIf.ɵfac = function NgIf_Factory(t) {
return new (t || NgIf)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef));
};
NgIf.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
type: NgIf,
selectors: [["", "ngIf", ""]],
inputs: {
ngIf: "ngIf",
ngIfThen: "ngIfThen",
ngIfElse: "ngIfElse"
},
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgIf, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive,
args: [{
selector: '[ngIf]',
standalone: true
}]
}], function () {
return [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef
}, {
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef
}];
}, {
ngIf: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
ngIfThen: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
ngIfElse: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}]
});
})();
/**
* @publicApi
*/
class NgIfContext {
constructor() {
this.$implicit = null;
this.ngIf = null;
}
}
function assertTemplate(property, templateRef) {
const isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView);
if (!isTemplateRefOrNull) {
throw new Error(`${property} must be a TemplateRef, but received '${(0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(templateRef)}'.`);
}
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
class SwitchView {
constructor(_viewContainerRef, _templateRef) {
this._viewContainerRef = _viewContainerRef;
this._templateRef = _templateRef;
this._created = false;
}
create() {
this._created = true;
this._viewContainerRef.createEmbeddedView(this._templateRef);
}
destroy() {
this._created = false;
this._viewContainerRef.clear();
}
enforceState(created) {
if (created && !this._created) {
this.create();
} else if (!created && this._created) {
this.destroy();
}
}
}
/**
* @ngModule CommonModule
*
* @description
* The `[ngSwitch]` directive on a container specifies an expression to match against.
* The expressions to match are provided by `ngSwitchCase` directives on views within the container.
* - Every view that matches is rendered.
* - If there are no matches, a view with the `ngSwitchDefault` directive is rendered.
* - Elements within the `[NgSwitch]` statement but outside of any `NgSwitchCase`
* or `ngSwitchDefault` directive are preserved at the location.
*
* @usageNotes
* Define a container element for the directive, and specify the switch expression
* to match against as an attribute:
*
* ```
*
* ```
*
* Within the container, `*ngSwitchCase` statements specify the match expressions
* as attributes. Include `*ngSwitchDefault` as the final case.
*
* ```
*
* ...
* ...
* ...
*
* ```
*
* ### Usage Examples
*
* The following example shows how to use more than one case to display the same view:
*
* ```
*
*
* ...
* ...
* ...
*
* ...
*
* ```
*
* The following example shows how cases can be nested:
* ```
*
* ...
* ...
* ...
*
*
*
*
*
* ...
*
* ```
*
* @publicApi
* @see `NgSwitchCase`
* @see `NgSwitchDefault`
* @see [Structural Directives](guide/structural-directives)
*
*/
class NgSwitch {
constructor() {
this._defaultUsed = false;
this._caseCount = 0;
this._lastCaseCheckIndex = 0;
this._lastCasesMatched = false;
}
set ngSwitch(newValue) {
this._ngSwitch = newValue;
if (this._caseCount === 0) {
this._updateDefaultCases(true);
}
}
/** @internal */
_addCase() {
return this._caseCount++;
}
/** @internal */
_addDefault(view) {
if (!this._defaultViews) {
this._defaultViews = [];
}
this._defaultViews.push(view);
}
/** @internal */
_matchCase(value) {
const matched = value == this._ngSwitch;
this._lastCasesMatched = this._lastCasesMatched || matched;
this._lastCaseCheckIndex++;
if (this._lastCaseCheckIndex === this._caseCount) {
this._updateDefaultCases(!this._lastCasesMatched);
this._lastCaseCheckIndex = 0;
this._lastCasesMatched = false;
}
return matched;
}
_updateDefaultCases(useDefault) {
if (this._defaultViews && useDefault !== this._defaultUsed) {
this._defaultUsed = useDefault;
for (let i = 0; i < this._defaultViews.length; i++) {
const defaultView = this._defaultViews[i];
defaultView.enforceState(useDefault);
}
}
}
}
NgSwitch.ɵfac = function NgSwitch_Factory(t) {
return new (t || NgSwitch)();
};
NgSwitch.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
type: NgSwitch,
selectors: [["", "ngSwitch", ""]],
inputs: {
ngSwitch: "ngSwitch"
},
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSwitch, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive,
args: [{
selector: '[ngSwitch]',
standalone: true
}]
}], null, {
ngSwitch: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}]
});
})();
/**
* @ngModule CommonModule
*
* @description
* Provides a switch case expression to match against an enclosing `ngSwitch` expression.
* When the expressions match, the given `NgSwitchCase` template is rendered.
* If multiple match expressions match the switch expression value, all of them are displayed.
*
* @usageNotes
*
* Within a switch container, `*ngSwitchCase` statements specify the match expressions
* as attributes. Include `*ngSwitchDefault` as the final case.
*
* ```
*
* ...
* ...
* ...
*
* ```
*
* Each switch-case statement contains an in-line HTML template or template reference
* that defines the subtree to be selected if the value of the match expression
* matches the value of the switch expression.
*
* Unlike JavaScript, which uses strict equality, Angular uses loose equality.
* This means that the empty string, `""` matches 0.
*
* @publicApi
* @see `NgSwitch`
* @see `NgSwitchDefault`
*
*/
class NgSwitchCase {
constructor(viewContainer, templateRef, ngSwitch) {
this.ngSwitch = ngSwitch;
if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) {
throwNgSwitchProviderNotFoundError('ngSwitchCase', 'NgSwitchCase');
}
ngSwitch._addCase();
this._view = new SwitchView(viewContainer, templateRef);
}
/**
* Performs case matching. For internal use only.
* @nodoc
*/
ngDoCheck() {
this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));
}
}
NgSwitchCase.ɵfac = function NgSwitchCase_Factory(t) {
return new (t || NgSwitchCase)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgSwitch, 9));
};
NgSwitchCase.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
type: NgSwitchCase,
selectors: [["", "ngSwitchCase", ""]],
inputs: {
ngSwitchCase: "ngSwitchCase"
},
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSwitchCase, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive,
args: [{
selector: '[ngSwitchCase]',
standalone: true
}]
}], function () {
return [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef
}, {
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef
}, {
type: NgSwitch,
decorators: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional
}, {
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Host
}]
}];
}, {
ngSwitchCase: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}]
});
})();
/**
* @ngModule CommonModule
*
* @description
*
* Creates a view that is rendered when no `NgSwitchCase` expressions
* match the `NgSwitch` expression.
* This statement should be the final case in an `NgSwitch`.
*
* @publicApi
* @see `NgSwitch`
* @see `NgSwitchCase`
*
*/
class NgSwitchDefault {
constructor(viewContainer, templateRef, ngSwitch) {
if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) {
throwNgSwitchProviderNotFoundError('ngSwitchDefault', 'NgSwitchDefault');
}
ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));
}
}
NgSwitchDefault.ɵfac = function NgSwitchDefault_Factory(t) {
return new (t || NgSwitchDefault)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgSwitch, 9));
};
NgSwitchDefault.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
type: NgSwitchDefault,
selectors: [["", "ngSwitchDefault", ""]],
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSwitchDefault, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive,
args: [{
selector: '[ngSwitchDefault]',
standalone: true
}]
}], function () {
return [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef
}, {
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef
}, {
type: NgSwitch,
decorators: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional
}, {
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Host
}]
}];
}, null);
})();
function throwNgSwitchProviderNotFoundError(attrName, directiveName) {
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2000
/* RuntimeErrorCode.PARENT_NG_SWITCH_NOT_FOUND */
, `An element with the "${attrName}" attribute ` + `(matching the "${directiveName}" directive) must be located inside an element with the "ngSwitch" attribute ` + `(matching "NgSwitch" directive)`);
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @ngModule CommonModule
*
* @usageNotes
* ```
*
* there is nothing
* there is one
* there are a few
*
* ```
*
* @description
*
* Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization.
*
* Displays DOM sub-trees that match the switch expression value, or failing that, DOM sub-trees
* that match the switch expression's pluralization category.
*
* To use this directive you must provide a container element that sets the `[ngPlural]` attribute
* to a switch expression. Inner elements with a `[ngPluralCase]` will display based on their
* expression:
* - if `[ngPluralCase]` is set to a value starting with `=`, it will only display if the value
* matches the switch expression exactly,
* - otherwise, the view will be treated as a "category match", and will only display if exact
* value matches aren't found and the value maps to its category for the defined locale.
*
* See http://cldr.unicode.org/index/cldr-spec/plural-rules
*
* @publicApi
*/
class NgPlural {
constructor(_localization) {
this._localization = _localization;
this._caseViews = {};
}
set ngPlural(value) {
this._switchValue = value;
this._updateView();
}
addCase(value, switchView) {
this._caseViews[value] = switchView;
}
_updateView() {
this._clearViews();
const cases = Object.keys(this._caseViews);
const key = getPluralCategory(this._switchValue, cases, this._localization);
this._activateView(this._caseViews[key]);
}
_clearViews() {
if (this._activeView) this._activeView.destroy();
}
_activateView(view) {
if (view) {
this._activeView = view;
this._activeView.create();
}
}
}
NgPlural.ɵfac = function NgPlural_Factory(t) {
return new (t || NgPlural)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgLocalization));
};
NgPlural.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
type: NgPlural,
selectors: [["", "ngPlural", ""]],
inputs: {
ngPlural: "ngPlural"
},
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgPlural, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive,
args: [{
selector: '[ngPlural]',
standalone: true
}]
}], function () {
return [{
type: NgLocalization
}];
}, {
ngPlural: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}]
});
})();
/**
* @ngModule CommonModule
*
* @description
*
* Creates a view that will be added/removed from the parent {@link NgPlural} when the
* given expression matches the plural expression according to CLDR rules.
*
* @usageNotes
* ```
*
* ...
* ...
*
*```
*
* See {@link NgPlural} for more details and example.
*
* @publicApi
*/
class NgPluralCase {
constructor(value, template, viewContainer, ngPlural) {
this.value = value;
const isANumber = !isNaN(Number(value));
ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));
}
}
NgPluralCase.ɵfac = function NgPluralCase_Factory(t) {
return new (t || NgPluralCase)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinjectAttribute"]('ngPluralCase'), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgPlural, 1));
};
NgPluralCase.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
type: NgPluralCase,
selectors: [["", "ngPluralCase", ""]],
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgPluralCase, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive,
args: [{
selector: '[ngPluralCase]',
standalone: true
}]
}], function () {
return [{
type: undefined,
decorators: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Attribute,
args: ['ngPluralCase']
}]
}, {
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef
}, {
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef
}, {
type: NgPlural,
decorators: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Host
}]
}];
}, null);
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @ngModule CommonModule
*
* @usageNotes
*
* Set the font of the containing element to the result of an expression.
*
* ```
* ...
* ```
*
* Set the width of the containing element to a pixel value returned by an expression.
*
* ```
* ...
* ```
*
* Set a collection of style values using an expression that returns key-value pairs.
*
* ```
* ...
* ```
*
* @description
*
* An attribute directive that updates styles for the containing HTML element.
* Sets one or more style properties, specified as colon-separated key-value pairs.
* The key is a style name, with an optional `.` suffix
* (such as 'top.px', 'font-style.em').
* The value is an expression to be evaluated.
* The resulting non-null value, expressed in the given unit,
* is assigned to the given style property.
* If the result of evaluation is null, the corresponding style is removed.
*
* @publicApi
*/
class NgStyle {
constructor(_ngEl, _differs, _renderer) {
this._ngEl = _ngEl;
this._differs = _differs;
this._renderer = _renderer;
this._ngStyle = null;
this._differ = null;
}
set ngStyle(values) {
this._ngStyle = values;
if (!this._differ && values) {
this._differ = this._differs.find(values).create();
}
}
ngDoCheck() {
if (this._differ) {
const changes = this._differ.diff(this._ngStyle);
if (changes) {
this._applyChanges(changes);
}
}
}
_setStyle(nameAndUnit, value) {
const [name, unit] = nameAndUnit.split('.');
const flags = name.indexOf('-') === -1 ? undefined : _angular_core__WEBPACK_IMPORTED_MODULE_0__.RendererStyleFlags2.DashCase;
if (value != null) {
this._renderer.setStyle(this._ngEl.nativeElement, name, unit ? `${value}${unit}` : value, flags);
} else {
this._renderer.removeStyle(this._ngEl.nativeElement, name, flags);
}
}
_applyChanges(changes) {
changes.forEachRemovedItem(record => this._setStyle(record.key, null));
changes.forEachAddedItem(record => this._setStyle(record.key, record.currentValue));
changes.forEachChangedItem(record => this._setStyle(record.key, record.currentValue));
}
}
NgStyle.ɵfac = function NgStyle_Factory(t) {
return new (t || NgStyle)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.KeyValueDiffers), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2));
};
NgStyle.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
type: NgStyle,
selectors: [["", "ngStyle", ""]],
inputs: {
ngStyle: "ngStyle"
},
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgStyle, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive,
args: [{
selector: '[ngStyle]',
standalone: true
}]
}], function () {
return [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef
}, {
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.KeyValueDiffers
}, {
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2
}];
}, {
ngStyle: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input,
args: ['ngStyle']
}]
});
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @ngModule CommonModule
*
* @description
*
* Inserts an embedded view from a prepared `TemplateRef`.
*
* You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`.
* `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding
* by the local template `let` declarations.
*
* @usageNotes
* ```
*
* ```
*
* Using the key `$implicit` in the context object will set its value as default.
*
* ### Example
*
* {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'}
*
* @publicApi
*/
class NgTemplateOutlet {
constructor(_viewContainerRef) {
this._viewContainerRef = _viewContainerRef;
this._viewRef = null;
/**
* A context object to attach to the {@link EmbeddedViewRef}. This should be an
* object, the object's keys will be available for binding by the local template `let`
* declarations.
* Using the key `$implicit` in the context object will set its value as default.
*/
this.ngTemplateOutletContext = null;
/**
* A string defining the template reference and optionally the context object for the template.
*/
this.ngTemplateOutlet = null;
/** Injector to be used within the embedded view. */
this.ngTemplateOutletInjector = null;
}
/** @nodoc */
ngOnChanges(changes) {
if (changes['ngTemplateOutlet'] || changes['ngTemplateOutletInjector']) {
const viewContainerRef = this._viewContainerRef;
if (this._viewRef) {
viewContainerRef.remove(viewContainerRef.indexOf(this._viewRef));
}
if (this.ngTemplateOutlet) {
const {
ngTemplateOutlet: template,
ngTemplateOutletContext: context,
ngTemplateOutletInjector: injector
} = this;
this._viewRef = viewContainerRef.createEmbeddedView(template, context, injector ? {
injector
} : undefined);
} else {
this._viewRef = null;
}
} else if (this._viewRef && changes['ngTemplateOutletContext'] && this.ngTemplateOutletContext) {
this._viewRef.context = this.ngTemplateOutletContext;
}
}
}
NgTemplateOutlet.ɵfac = function NgTemplateOutlet_Factory(t) {
return new (t || NgTemplateOutlet)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef));
};
NgTemplateOutlet.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
type: NgTemplateOutlet,
selectors: [["", "ngTemplateOutlet", ""]],
inputs: {
ngTemplateOutletContext: "ngTemplateOutletContext",
ngTemplateOutlet: "ngTemplateOutlet",
ngTemplateOutletInjector: "ngTemplateOutletInjector"
},
standalone: true,
features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]]
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgTemplateOutlet, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive,
args: [{
selector: '[ngTemplateOutlet]',
standalone: true
}]
}], function () {
return [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef
}];
}, {
ngTemplateOutletContext: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
ngTemplateOutlet: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
ngTemplateOutletInjector: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}]
});
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* A collection of Angular directives that are likely to be used in each and every Angular
* application.
*/
const COMMON_DIRECTIVES = [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase];
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function invalidPipeArgumentError(type, value) {
return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2100
/* RuntimeErrorCode.INVALID_PIPE_ARGUMENT */
, ngDevMode && `InvalidPipeArgument: '${value}' for pipe '${(0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(type)}'`);
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
class SubscribableStrategy {
createSubscription(async, updateLatestValue) {
return async.subscribe({
next: updateLatestValue,
error: e => {
throw e;
}
});
}
dispose(subscription) {
subscription.unsubscribe();
}
}
class PromiseStrategy {
createSubscription(async, updateLatestValue) {
return async.then(updateLatestValue, e => {
throw e;
});
}
dispose(subscription) {}
}
const _promiseStrategy = new PromiseStrategy();
const _subscribableStrategy = new SubscribableStrategy();
/**
* @ngModule CommonModule
* @description
*
* Unwraps a value from an asynchronous primitive.
*
* The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has
* emitted. When a new value is emitted, the `async` pipe marks the component to be checked for
* changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid
* potential memory leaks. When the reference of the expression changes, the `async` pipe
* automatically unsubscribes from the old `Observable` or `Promise` and subscribes to the new one.
*
* @usageNotes
*
* ### Examples
*
* This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the
* promise.
*
* {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'}
*
* It's also possible to use `async` with Observables. The example below binds the `time` Observable
* to the view. The Observable continuously updates the view with the current time.
*
* {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}
*
* @publicApi
*/
class AsyncPipe {
constructor(ref) {
this._latestValue = null;
this._subscription = null;
this._obj = null;
this._strategy = null; // Assign `ref` into `this._ref` manually instead of declaring `_ref` in the constructor
// parameter list, as the type of `this._ref` includes `null` unlike the type of `ref`.
this._ref = ref;
}
ngOnDestroy() {
if (this._subscription) {
this._dispose();
} // Clear the `ChangeDetectorRef` and its association with the view data, to mitigate
// potential memory leaks in Observables that could otherwise cause the view data to
// be retained.
// https://github.com/angular/angular/issues/17624
this._ref = null;
}
transform(obj) {
if (!this._obj) {
if (obj) {
this._subscribe(obj);
}
return this._latestValue;
}
if (obj !== this._obj) {
this._dispose();
return this.transform(obj);
}
return this._latestValue;
}
_subscribe(obj) {
this._obj = obj;
this._strategy = this._selectStrategy(obj);
this._subscription = this._strategy.createSubscription(obj, value => this._updateLatestValue(obj, value));
}
_selectStrategy(obj) {
if ((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisPromise"])(obj)) {
return _promiseStrategy;
}
if ((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisSubscribable"])(obj)) {
return _subscribableStrategy;
}
throw invalidPipeArgumentError(AsyncPipe, obj);
}
_dispose() {
// Note: `dispose` is only called if a subscription has been initialized before, indicating
// that `this._strategy` is also available.
this._strategy.dispose(this._subscription);
this._latestValue = null;
this._subscription = null;
this._obj = null;
}
_updateLatestValue(async, value) {
if (async === this._obj) {
this._latestValue = value; // Note: `this._ref` is only cleared in `ngOnDestroy` so is known to be available when a
// value is being updated.
this._ref.markForCheck();
}
}
}
AsyncPipe.ɵfac = function AsyncPipe_Factory(t) {
return new (t || AsyncPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef, 16));
};
AsyncPipe.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
name: "async",
type: AsyncPipe,
pure: false,
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](AsyncPipe, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe,
args: [{
name: 'async',
pure: false,
standalone: true
}]
}], function () {
return [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef
}];
}, null);
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Transforms text to all lower case.
*
* @see `UpperCasePipe`
* @see `TitleCasePipe`
* @usageNotes
*
* The following example defines a view that allows the user to enter
* text, and then uses the pipe to convert the input text to all lower case.
*
*
*
* @ngModule CommonModule
* @publicApi
*/
class LowerCasePipe {
transform(value) {
if (value == null) return null;
if (typeof value !== 'string') {
throw invalidPipeArgumentError(LowerCasePipe, value);
}
return value.toLowerCase();
}
}
LowerCasePipe.ɵfac = function LowerCasePipe_Factory(t) {
return new (t || LowerCasePipe)();
};
LowerCasePipe.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
name: "lowercase",
type: LowerCasePipe,
pure: true,
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](LowerCasePipe, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe,
args: [{
name: 'lowercase',
standalone: true
}]
}], null, null);
})(); //
// Regex below matches any Unicode word and number compatible with ES5. In ES2018 the same result
// can be achieved by using /[0-9\p{L}]\S*/gu and also known as Unicode Property Escapes
// (https://2ality.com/2017/07/regexp-unicode-property-escapes.html). Since there is no
// transpilation of this functionality down to ES5 without external tool, the only solution is
// to use already transpiled form. Example can be found here -
// https://mothereff.in/regexpu#input=var+regex+%3D+%2F%5B0-9%5Cp%7BL%7D%5D%5CS*%2Fgu%3B%0A%0A&unicodePropertyEscape=1
//
const unicodeWordMatch = /(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g;
/**
* Transforms text to title case.
* Capitalizes the first letter of each word and transforms the
* rest of the word to lower case.
* Words are delimited by any whitespace character, such as a space, tab, or line-feed character.
*
* @see `LowerCasePipe`
* @see `UpperCasePipe`
*
* @usageNotes
* The following example shows the result of transforming various strings into title case.
*
*
*
* @ngModule CommonModule
* @publicApi
*/
class TitleCasePipe {
transform(value) {
if (value == null) return null;
if (typeof value !== 'string') {
throw invalidPipeArgumentError(TitleCasePipe, value);
}
return value.replace(unicodeWordMatch, txt => txt[0].toUpperCase() + txt.slice(1).toLowerCase());
}
}
TitleCasePipe.ɵfac = function TitleCasePipe_Factory(t) {
return new (t || TitleCasePipe)();
};
TitleCasePipe.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
name: "titlecase",
type: TitleCasePipe,
pure: true,
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](TitleCasePipe, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe,
args: [{
name: 'titlecase',
standalone: true
}]
}], null, null);
})();
/**
* Transforms text to all upper case.
* @see `LowerCasePipe`
* @see `TitleCasePipe`
*
* @ngModule CommonModule
* @publicApi
*/
class UpperCasePipe {
transform(value) {
if (value == null) return null;
if (typeof value !== 'string') {
throw invalidPipeArgumentError(UpperCasePipe, value);
}
return value.toUpperCase();
}
}
UpperCasePipe.ɵfac = function UpperCasePipe_Factory(t) {
return new (t || UpperCasePipe)();
};
UpperCasePipe.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
name: "uppercase",
type: UpperCasePipe,
pure: true,
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](UpperCasePipe, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe,
args: [{
name: 'uppercase',
standalone: true
}]
}], null, null);
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Optionally-provided default timezone to use for all instances of `DatePipe` (such as `'+0430'`).
* If the value isn't provided, the `DatePipe` will use the end-user's local system timezone.
*/
const DATE_PIPE_DEFAULT_TIMEZONE = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken('DATE_PIPE_DEFAULT_TIMEZONE'); // clang-format off
/**
* @ngModule CommonModule
* @description
*
* Formats a date value according to locale rules.
*
* `DatePipe` is executed only when it detects a pure change to the input value.
* A pure change is either a change to a primitive input value
* (such as `String`, `Number`, `Boolean`, or `Symbol`),
* or a changed object reference (such as `Date`, `Array`, `Function`, or `Object`).
*
* Note that mutating a `Date` object does not cause the pipe to be rendered again.
* To ensure that the pipe is executed, you must create a new `Date` object.
*
* Only the `en-US` locale data comes with Angular. To localize dates
* in another language, you must import the corresponding locale data.
* See the [I18n guide](guide/i18n-common-format-data-locale) for more information.
*
* The time zone of the formatted value can be specified either by passing it in as the second
* parameter of the pipe, or by setting the default through the `DATE_PIPE_DEFAULT_TIMEZONE`
* injection token. The value that is passed in as the second parameter takes precedence over
* the one defined using the injection token.
*
* @see `formatDate()`
*
*
* @usageNotes
*
* The result of this pipe is not reevaluated when the input is mutated. To avoid the need to
* reformat the date on every change-detection cycle, treat the date as an immutable object
* and change the reference when the pipe needs to run again.
*
* ### Pre-defined format options
*
* | Option | Equivalent to | Examples (given in `en-US` locale) |
* |---------------|-------------------------------------|-------------------------------------------------|
* | `'short'` | `'M/d/yy, h:mm a'` | `6/15/15, 9:03 AM` |
* | `'medium'` | `'MMM d, y, h:mm:ss a'` | `Jun 15, 2015, 9:03:01 AM` |
* | `'long'` | `'MMMM d, y, h:mm:ss a z'` | `June 15, 2015 at 9:03:01 AM GMT+1` |
* | `'full'` | `'EEEE, MMMM d, y, h:mm:ss a zzzz'` | `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00` |
* | `'shortDate'` | `'M/d/yy'` | `6/15/15` |
* | `'mediumDate'`| `'MMM d, y'` | `Jun 15, 2015` |
* | `'longDate'` | `'MMMM d, y'` | `June 15, 2015` |
* | `'fullDate'` | `'EEEE, MMMM d, y'` | `Monday, June 15, 2015` |
* | `'shortTime'` | `'h:mm a'` | `9:03 AM` |
* | `'mediumTime'`| `'h:mm:ss a'` | `9:03:01 AM` |
* | `'longTime'` | `'h:mm:ss a z'` | `9:03:01 AM GMT+1` |
* | `'fullTime'` | `'h:mm:ss a zzzz'` | `9:03:01 AM GMT+01:00` |
*
* ### Custom format options
*
* You can construct a format string using symbols to specify the components
* of a date-time value, as described in the following table.
* Format details depend on the locale.
* Fields marked with (*) are only available in the extra data set for the given locale.
*
* | Field type | Format | Description | Example Value |
* |-------------------- |-------------|---------------------------------------------------------------|------------------------------------------------------------|
* | Era | G, GG & GGG | Abbreviated | AD |
* | | GGGG | Wide | Anno Domini |
* | | GGGGG | Narrow | A |
* | Year | y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |
* | | yy | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |
* | | yyy | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |
* | | yyyy | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |
* | Week-numbering year | Y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |
* | | YY | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |
* | | YYY | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |
* | | YYYY | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |
* | Month | M | Numeric: 1 digit | 9, 12 |
* | | MM | Numeric: 2 digits + zero padded | 09, 12 |
* | | MMM | Abbreviated | Sep |
* | | MMMM | Wide | September |
* | | MMMMM | Narrow | S |
* | Month standalone | L | Numeric: 1 digit | 9, 12 |
* | | LL | Numeric: 2 digits + zero padded | 09, 12 |
* | | LLL | Abbreviated | Sep |
* | | LLLL | Wide | September |
* | | LLLLL | Narrow | S |
* | Week of year | w | Numeric: minimum digits | 1... 53 |
* | | ww | Numeric: 2 digits + zero padded | 01... 53 |
* | Week of month | W | Numeric: 1 digit | 1... 5 |
* | Day of month | d | Numeric: minimum digits | 1 |
* | | dd | Numeric: 2 digits + zero padded | 01 |
* | Week day | E, EE & EEE | Abbreviated | Tue |
* | | EEEE | Wide | Tuesday |
* | | EEEEE | Narrow | T |
* | | EEEEEE | Short | Tu |
* | Week day standalone | c, cc | Numeric: 1 digit | 2 |
* | | ccc | Abbreviated | Tue |
* | | cccc | Wide | Tuesday |
* | | ccccc | Narrow | T |
* | | cccccc | Short | Tu |
* | Period | a, aa & aaa | Abbreviated | am/pm or AM/PM |
* | | aaaa | Wide (fallback to `a` when missing) | ante meridiem/post meridiem |
* | | aaaaa | Narrow | a/p |
* | Period* | B, BB & BBB | Abbreviated | mid. |
* | | BBBB | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |
* | | BBBBB | Narrow | md |
* | Period standalone* | b, bb & bbb | Abbreviated | mid. |
* | | bbbb | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |
* | | bbbbb | Narrow | md |
* | Hour 1-12 | h | Numeric: minimum digits | 1, 12 |
* | | hh | Numeric: 2 digits + zero padded | 01, 12 |
* | Hour 0-23 | H | Numeric: minimum digits | 0, 23 |
* | | HH | Numeric: 2 digits + zero padded | 00, 23 |
* | Minute | m | Numeric: minimum digits | 8, 59 |
* | | mm | Numeric: 2 digits + zero padded | 08, 59 |
* | Second | s | Numeric: minimum digits | 0... 59 |
* | | ss | Numeric: 2 digits + zero padded | 00... 59 |
* | Fractional seconds | S | Numeric: 1 digit | 0... 9 |
* | | SS | Numeric: 2 digits + zero padded | 00... 99 |
* | | SSS | Numeric: 3 digits + zero padded (= milliseconds) | 000... 999 |
* | Zone | z, zz & zzz | Short specific non location format (fallback to O) | GMT-8 |
* | | zzzz | Long specific non location format (fallback to OOOO) | GMT-08:00 |
* | | Z, ZZ & ZZZ | ISO8601 basic format | -0800 |
* | | ZZZZ | Long localized GMT format | GMT-8:00 |
* | | ZZZZZ | ISO8601 extended format + Z indicator for offset 0 (= XXXXX) | -08:00 |
* | | O, OO & OOO | Short localized GMT format | GMT-8 |
* | | OOOO | Long localized GMT format | GMT-08:00 |
*
*
* ### Format examples
*
* These examples transform a date into various formats,
* assuming that `dateObj` is a JavaScript `Date` object for
* year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11,
* given in the local time for the `en-US` locale.
*
* ```
* {{ dateObj | date }} // output is 'Jun 15, 2015'
* {{ dateObj | date:'medium' }} // output is 'Jun 15, 2015, 9:43:11 PM'
* {{ dateObj | date:'shortTime' }} // output is '9:43 PM'
* {{ dateObj | date:'mm:ss' }} // output is '43:11'
* ```
*
* ### Usage example
*
* The following component uses a date pipe to display the current date in different formats.
*
* ```
* @Component({
* selector: 'date-pipe',
* template: `
*
Today is {{today | date}}
*
Or if you prefer, {{today | date:'fullDate'}}
*
The time is {{today | date:'h:mm a z'}}
*
`
* })
* // Get the current date and time as a date-time value.
* export class DatePipeComponent {
* today: number = Date.now();
* }
* ```
*
* @publicApi
*/
// clang-format on
class DatePipe {
constructor(locale, defaultTimezone) {
this.locale = locale;
this.defaultTimezone = defaultTimezone;
}
transform(value, format = 'mediumDate', timezone, locale) {
var _a;
if (value == null || value === '' || value !== value) return null;
try {
return formatDate(value, format, locale || this.locale, (_a = timezone !== null && timezone !== void 0 ? timezone : this.defaultTimezone) !== null && _a !== void 0 ? _a : undefined);
} catch (error) {
throw invalidPipeArgumentError(DatePipe, error.message);
}
}
}
DatePipe.ɵfac = function DatePipe_Factory(t) {
return new (t || DatePipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID, 16), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](DATE_PIPE_DEFAULT_TIMEZONE, 24));
};
DatePipe.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
name: "date",
type: DatePipe,
pure: true,
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DatePipe, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe,
args: [{
name: 'date',
pure: true,
standalone: true
}]
}], function () {
return [{
type: undefined,
decorators: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject,
args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID]
}]
}, {
type: undefined,
decorators: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject,
args: [DATE_PIPE_DEFAULT_TIMEZONE]
}, {
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional
}]
}];
}, null);
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
const _INTERPOLATION_REGEXP = /#/g;
/**
* @ngModule CommonModule
* @description
*
* Maps a value to a string that pluralizes the value according to locale rules.
*
* @usageNotes
*
* ### Example
*
* {@example common/pipes/ts/i18n_pipe.ts region='I18nPluralPipeComponent'}
*
* @publicApi
*/
class I18nPluralPipe {
constructor(_localization) {
this._localization = _localization;
}
/**
* @param value the number to be formatted
* @param pluralMap an object that mimics the ICU format, see
* https://unicode-org.github.io/icu/userguide/format_parse/messages/.
* @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by
* default).
*/
transform(value, pluralMap, locale) {
if (value == null) return '';
if (typeof pluralMap !== 'object' || pluralMap === null) {
throw invalidPipeArgumentError(I18nPluralPipe, pluralMap);
}
const key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);
return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());
}
}
I18nPluralPipe.ɵfac = function I18nPluralPipe_Factory(t) {
return new (t || I18nPluralPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgLocalization, 16));
};
I18nPluralPipe.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
name: "i18nPlural",
type: I18nPluralPipe,
pure: true,
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](I18nPluralPipe, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe,
args: [{
name: 'i18nPlural',
pure: true,
standalone: true
}]
}], function () {
return [{
type: NgLocalization
}];
}, null);
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @ngModule CommonModule
* @description
*
* Generic selector that displays the string that matches the current value.
*
* If none of the keys of the `mapping` match the `value`, then the content
* of the `other` key is returned when present, otherwise an empty string is returned.
*
* @usageNotes
*
* ### Example
*
* {@example common/pipes/ts/i18n_pipe.ts region='I18nSelectPipeComponent'}
*
* @publicApi
*/
class I18nSelectPipe {
/**
* @param value a string to be internationalized.
* @param mapping an object that indicates the text that should be displayed
* for different values of the provided `value`.
*/
transform(value, mapping) {
if (value == null) return '';
if (typeof mapping !== 'object' || typeof value !== 'string') {
throw invalidPipeArgumentError(I18nSelectPipe, mapping);
}
if (mapping.hasOwnProperty(value)) {
return mapping[value];
}
if (mapping.hasOwnProperty('other')) {
return mapping['other'];
}
return '';
}
}
I18nSelectPipe.ɵfac = function I18nSelectPipe_Factory(t) {
return new (t || I18nSelectPipe)();
};
I18nSelectPipe.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
name: "i18nSelect",
type: I18nSelectPipe,
pure: true,
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](I18nSelectPipe, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe,
args: [{
name: 'i18nSelect',
pure: true,
standalone: true
}]
}], null, null);
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @ngModule CommonModule
* @description
*
* Converts a value into its JSON-format representation. Useful for debugging.
*
* @usageNotes
*
* The following component uses a JSON pipe to convert an object
* to JSON format, and displays the string in both formats for comparison.
*
* {@example common/pipes/ts/json_pipe.ts region='JsonPipe'}
*
* @publicApi
*/
class JsonPipe {
/**
* @param value A value of any type to convert into a JSON-format string.
*/
transform(value) {
return JSON.stringify(value, null, 2);
}
}
JsonPipe.ɵfac = function JsonPipe_Factory(t) {
return new (t || JsonPipe)();
};
JsonPipe.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
name: "json",
type: JsonPipe,
pure: false,
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](JsonPipe, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe,
args: [{
name: 'json',
pure: false,
standalone: true
}]
}], null, null);
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function makeKeyValuePair(key, value) {
return {
key: key,
value: value
};
}
/**
* @ngModule CommonModule
* @description
*
* Transforms Object or Map into an array of key value pairs.
*
* The output array will be ordered by keys.
* By default the comparator will be by Unicode point value.
* You can optionally pass a compareFn if your keys are complex types.
*
* @usageNotes
* ### Examples
*
* This examples show how an Object or a Map can be iterated by ngFor with the use of this
* keyvalue pipe.
*
* {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'}
*
* @publicApi
*/
class KeyValuePipe {
constructor(differs) {
this.differs = differs;
this.keyValues = [];
this.compareFn = defaultComparator;
}
transform(input, compareFn = defaultComparator) {
if (!input || !(input instanceof Map) && typeof input !== 'object') {
return null;
}
if (!this.differ) {
// make a differ for whatever type we've been passed in
this.differ = this.differs.find(input).create();
}
const differChanges = this.differ.diff(input);
const compareFnChanged = compareFn !== this.compareFn;
if (differChanges) {
this.keyValues = [];
differChanges.forEachItem(r => {
this.keyValues.push(makeKeyValuePair(r.key, r.currentValue));
});
}
if (differChanges || compareFnChanged) {
this.keyValues.sort(compareFn);
this.compareFn = compareFn;
}
return this.keyValues;
}
}
KeyValuePipe.ɵfac = function KeyValuePipe_Factory(t) {
return new (t || KeyValuePipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.KeyValueDiffers, 16));
};
KeyValuePipe.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
name: "keyvalue",
type: KeyValuePipe,
pure: false,
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](KeyValuePipe, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe,
args: [{
name: 'keyvalue',
pure: false,
standalone: true
}]
}], function () {
return [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.KeyValueDiffers
}];
}, null);
})();
function defaultComparator(keyValueA, keyValueB) {
const a = keyValueA.key;
const b = keyValueB.key; // if same exit with 0;
if (a === b) return 0; // make sure that undefined are at the end of the sort.
if (a === undefined) return 1;
if (b === undefined) return -1; // make sure that nulls are at the end of the sort.
if (a === null) return 1;
if (b === null) return -1;
if (typeof a == 'string' && typeof b == 'string') {
return a < b ? -1 : 1;
}
if (typeof a == 'number' && typeof b == 'number') {
return a - b;
}
if (typeof a == 'boolean' && typeof b == 'boolean') {
return a < b ? -1 : 1;
} // `a` and `b` are of different types. Compare their string values.
const aString = String(a);
const bString = String(b);
return aString == bString ? 0 : aString < bString ? -1 : 1;
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @ngModule CommonModule
* @description
*
* Formats a value according to digit options and locale rules.
* Locale determines group sizing and separator,
* decimal point character, and other locale-specific configurations.
*
* @see `formatNumber()`
*
* @usageNotes
*
* ### digitsInfo
*
* The value's decimal representation is specified by the `digitsInfo`
* parameter, written in the following format:
*
* ```
* {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}
* ```
*
* - `minIntegerDigits`:
* The minimum number of integer digits before the decimal point.
* Default is 1.
*
* - `minFractionDigits`:
* The minimum number of digits after the decimal point.
* Default is 0.
*
* - `maxFractionDigits`:
* The maximum number of digits after the decimal point.
* Default is 3.
*
* If the formatted value is truncated it will be rounded using the "to-nearest" method:
*
* ```
* {{3.6 | number: '1.0-0'}}
*
*
* {{-3.6 | number:'1.0-0'}}
*
* ```
*
* ### locale
*
* `locale` will format a value according to locale rules.
* Locale determines group sizing and separator,
* decimal point character, and other locale-specific configurations.
*
* When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
*
* See [Setting your app locale](guide/i18n-common-locale-id).
*
* ### Example
*
* The following code shows how the pipe transforms values
* according to various format specifications,
* where the caller's default locale is `en-US`.
*
*
*
* @publicApi
*/
class DecimalPipe {
constructor(_locale) {
this._locale = _locale;
}
/**
* @param value The value to be formatted.
* @param digitsInfo Sets digit and decimal representation.
* [See more](#digitsinfo).
* @param locale Specifies what locale format rules to use.
* [See more](#locale).
*/
transform(value, digitsInfo, locale) {
if (!isValue(value)) return null;
locale = locale || this._locale;
try {
const num = strToNumber(value);
return formatNumber(num, locale, digitsInfo);
} catch (error) {
throw invalidPipeArgumentError(DecimalPipe, error.message);
}
}
}
DecimalPipe.ɵfac = function DecimalPipe_Factory(t) {
return new (t || DecimalPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID, 16));
};
DecimalPipe.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
name: "number",
type: DecimalPipe,
pure: true,
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DecimalPipe, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe,
args: [{
name: 'number',
standalone: true
}]
}], function () {
return [{
type: undefined,
decorators: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject,
args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID]
}]
}];
}, null);
})();
/**
* @ngModule CommonModule
* @description
*
* Transforms a number to a percentage
* string, formatted according to locale rules that determine group sizing and
* separator, decimal-point character, and other locale-specific
* configurations.
*
* @see `formatPercent()`
*
* @usageNotes
* The following code shows how the pipe transforms numbers
* into text strings, according to various format specifications,
* where the caller's default locale is `en-US`.
*
*
*
* @publicApi
*/
class PercentPipe {
constructor(_locale) {
this._locale = _locale;
}
/**
*
* @param value The number to be formatted as a percentage.
* @param digitsInfo Decimal representation options, specified by a string
* in the following format:
* {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}.
* - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
* Default is `1`.
* - `minFractionDigits`: The minimum number of digits after the decimal point.
* Default is `0`.
* - `maxFractionDigits`: The maximum number of digits after the decimal point.
* Default is `0`.
* @param locale A locale code for the locale format rules to use.
* When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
* See [Setting your app locale](guide/i18n-common-locale-id).
*/
transform(value, digitsInfo, locale) {
if (!isValue(value)) return null;
locale = locale || this._locale;
try {
const num = strToNumber(value);
return formatPercent(num, locale, digitsInfo);
} catch (error) {
throw invalidPipeArgumentError(PercentPipe, error.message);
}
}
}
PercentPipe.ɵfac = function PercentPipe_Factory(t) {
return new (t || PercentPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID, 16));
};
PercentPipe.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
name: "percent",
type: PercentPipe,
pure: true,
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PercentPipe, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe,
args: [{
name: 'percent',
standalone: true
}]
}], function () {
return [{
type: undefined,
decorators: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject,
args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID]
}]
}];
}, null);
})();
/**
* @ngModule CommonModule
* @description
*
* Transforms a number to a currency string, formatted according to locale rules
* that determine group sizing and separator, decimal-point character,
* and other locale-specific configurations.
*
* {@a currency-code-deprecation}
*
*
* **Deprecation notice:**
*
* The default currency code is currently always `USD` but this is deprecated from v9.
*
* **In v11 the default currency code will be taken from the current locale identified by
* the `LOCALE_ID` token. See the [i18n guide](guide/i18n-common-locale-id) for
* more information.**
*
* If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in
* your application `NgModule`:
*
* ```ts
* {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}
* ```
*
*
*
* @see `getCurrencySymbol()`
* @see `formatCurrency()`
*
* @usageNotes
* The following code shows how the pipe transforms numbers
* into text strings, according to various format specifications,
* where the caller's default locale is `en-US`.
*
*
*
* @publicApi
*/
class CurrencyPipe {
constructor(_locale, _defaultCurrencyCode = 'USD') {
this._locale = _locale;
this._defaultCurrencyCode = _defaultCurrencyCode;
}
/**
*
* @param value The number to be formatted as currency.
* @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,
* such as `USD` for the US dollar and `EUR` for the euro. The default currency code can be
* configured using the `DEFAULT_CURRENCY_CODE` injection token.
* @param display The format for the currency indicator. One of the following:
* - `code`: Show the code (such as `USD`).
* - `symbol`(default): Show the symbol (such as `$`).
* - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their
* currency.
* For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the
* locale has no narrow symbol, uses the standard symbol for the locale.
* - String: Use the given string value instead of a code or a symbol.
* For example, an empty string will suppress the currency & symbol.
* - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.
*
* @param digitsInfo Decimal representation options, specified by a string
* in the following format:
* {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}.
* - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
* Default is `1`.
* - `minFractionDigits`: The minimum number of digits after the decimal point.
* Default is `2`.
* - `maxFractionDigits`: The maximum number of digits after the decimal point.
* Default is `2`.
* If not provided, the number will be formatted with the proper amount of digits,
* depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.
* For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.
* @param locale A locale code for the locale format rules to use.
* When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
* See [Setting your app locale](guide/i18n-common-locale-id).
*/
transform(value, currencyCode = this._defaultCurrencyCode, display = 'symbol', digitsInfo, locale) {
if (!isValue(value)) return null;
locale = locale || this._locale;
if (typeof display === 'boolean') {
if ((typeof ngDevMode === 'undefined' || ngDevMode) && console && console.warn) {
console.warn(`Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are "code", "symbol" or "symbol-narrow".`);
}
display = display ? 'symbol' : 'code';
}
let currency = currencyCode || this._defaultCurrencyCode;
if (display !== 'code') {
if (display === 'symbol' || display === 'symbol-narrow') {
currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale);
} else {
currency = display;
}
}
try {
const num = strToNumber(value);
return formatCurrency(num, locale, currency, currencyCode, digitsInfo);
} catch (error) {
throw invalidPipeArgumentError(CurrencyPipe, error.message);
}
}
}
CurrencyPipe.ɵfac = function CurrencyPipe_Factory(t) {
return new (t || CurrencyPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID, 16), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_CURRENCY_CODE, 16));
};
CurrencyPipe.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
name: "currency",
type: CurrencyPipe,
pure: true,
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CurrencyPipe, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe,
args: [{
name: 'currency',
standalone: true
}]
}], function () {
return [{
type: undefined,
decorators: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject,
args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID]
}]
}, {
type: undefined,
decorators: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject,
args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_CURRENCY_CODE]
}]
}];
}, null);
})();
function isValue(value) {
return !(value == null || value === '' || value !== value);
}
/**
* Transforms a string into a number (if needed).
*/
function strToNumber(value) {
// Convert strings to numbers
if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) {
return Number(value);
}
if (typeof value !== 'number') {
throw new Error(`${value} is not a number`);
}
return value;
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @ngModule CommonModule
* @description
*
* Creates a new `Array` or `String` containing a subset (slice) of the elements.
*
* @usageNotes
*
* All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()`
* and `String.prototype.slice()`.
*
* When operating on an `Array`, the returned `Array` is always a copy even when all
* the elements are being returned.
*
* When operating on a blank value, the pipe returns the blank value.
*
* ### List Example
*
* This `ngFor` example:
*
* {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'}
*
* produces the following:
*
* ```html
* b
* c
* ```
*
* ### String Examples
*
* {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'}
*
* @publicApi
*/
class SlicePipe {
transform(value, start, end) {
if (value == null) return null;
if (!this.supports(value)) {
throw invalidPipeArgumentError(SlicePipe, value);
}
return value.slice(start, end);
}
supports(obj) {
return typeof obj === 'string' || Array.isArray(obj);
}
}
SlicePipe.ɵfac = function SlicePipe_Factory(t) {
return new (t || SlicePipe)();
};
SlicePipe.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
name: "slice",
type: SlicePipe,
pure: false,
standalone: true
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](SlicePipe, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe,
args: [{
name: 'slice',
pure: false,
standalone: true
}]
}], null, null);
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* A collection of Angular pipes that are likely to be used in each and every application.
*/
const COMMON_PIPES = [AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe];
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// Note: This does not contain the location providers,
// as they need some platform specific implementations to work.
/**
* Exports all the basic Angular directives and pipes,
* such as `NgIf`, `NgForOf`, `DecimalPipe`, and so on.
* Re-exported by `BrowserModule`, which is included automatically in the root
* `AppModule` when you create a new app with the CLI `new` command.
*
* @publicApi
*/
class CommonModule {}
CommonModule.ɵfac = function CommonModule_Factory(t) {
return new (t || CommonModule)();
};
CommonModule.ɵmod = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({
type: CommonModule,
imports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe],
exports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe]
});
CommonModule.ɵinj = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CommonModule, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule,
args: [{
imports: [COMMON_DIRECTIVES, COMMON_PIPES],
exports: [COMMON_DIRECTIVES, COMMON_PIPES]
}]
}], null, null);
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
const PLATFORM_BROWSER_ID = 'browser';
const PLATFORM_SERVER_ID = 'server';
const PLATFORM_WORKER_APP_ID = 'browserWorkerApp';
const PLATFORM_WORKER_UI_ID = 'browserWorkerUi';
/**
* Returns whether a platform id represents a browser platform.
* @publicApi
*/
function isPlatformBrowser(platformId) {
return platformId === PLATFORM_BROWSER_ID;
}
/**
* Returns whether a platform id represents a server platform.
* @publicApi
*/
function isPlatformServer(platformId) {
return platformId === PLATFORM_SERVER_ID;
}
/**
* Returns whether a platform id represents a web worker app platform.
* @publicApi
*/
function isPlatformWorkerApp(platformId) {
return platformId === PLATFORM_WORKER_APP_ID;
}
/**
* Returns whether a platform id represents a web worker UI platform.
* @publicApi
*/
function isPlatformWorkerUi(platformId) {
return platformId === PLATFORM_WORKER_UI_ID;
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @publicApi
*/
const VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.Version('14.2.7');
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Defines a scroll position manager. Implemented by `BrowserViewportScroller`.
*
* @publicApi
*/
class ViewportScroller {} // De-sugared tree-shakable injection
// See #23917
/** @nocollapse */
ViewportScroller.ɵprov = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({
token: ViewportScroller,
providedIn: 'root',
factory: () => new BrowserViewportScroller((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(DOCUMENT), window)
});
/**
* Manages the scroll position for a browser window.
*/
class BrowserViewportScroller {
constructor(document, window) {
this.document = document;
this.window = window;
this.offset = () => [0, 0];
}
/**
* Configures the top offset used when scrolling to an anchor.
* @param offset A position in screen coordinates (a tuple with x and y values)
* or a function that returns the top offset position.
*
*/
setOffset(offset) {
if (Array.isArray(offset)) {
this.offset = () => offset;
} else {
this.offset = offset;
}
}
/**
* Retrieves the current scroll position.
* @returns The position in screen coordinates.
*/
getScrollPosition() {
if (this.supportsScrolling()) {
return [this.window.pageXOffset, this.window.pageYOffset];
} else {
return [0, 0];
}
}
/**
* Sets the scroll position.
* @param position The new position in screen coordinates.
*/
scrollToPosition(position) {
if (this.supportsScrolling()) {
this.window.scrollTo(position[0], position[1]);
}
}
/**
* Scrolls to an element and attempts to focus the element.
*
* Note that the function name here is misleading in that the target string may be an ID for a
* non-anchor element.
*
* @param target The ID of an element or name of the anchor.
*
* @see https://html.spec.whatwg.org/#the-indicated-part-of-the-document
* @see https://html.spec.whatwg.org/#scroll-to-fragid
*/
scrollToAnchor(target) {
if (!this.supportsScrolling()) {
return;
}
const elSelected = findAnchorFromDocument(this.document, target);
if (elSelected) {
this.scrollToElement(elSelected); // After scrolling to the element, the spec dictates that we follow the focus steps for the
// target. Rather than following the robust steps, simply attempt focus.
//
// @see https://html.spec.whatwg.org/#get-the-focusable-area
// @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus
// @see https://html.spec.whatwg.org/#focusable-area
elSelected.focus();
}
}
/**
* Disables automatic scroll restoration provided by the browser.
*/
setHistoryScrollRestoration(scrollRestoration) {
if (this.supportScrollRestoration()) {
const history = this.window.history;
if (history && history.scrollRestoration) {
history.scrollRestoration = scrollRestoration;
}
}
}
/**
* Scrolls to an element using the native offset and the specified offset set on this scroller.
*
* The offset can be used when we know that there is a floating header and scrolling naively to an
* element (ex: `scrollIntoView`) leaves the element hidden behind the floating header.
*/
scrollToElement(el) {
const rect = el.getBoundingClientRect();
const left = rect.left + this.window.pageXOffset;
const top = rect.top + this.window.pageYOffset;
const offset = this.offset();
this.window.scrollTo(left - offset[0], top - offset[1]);
}
/**
* We only support scroll restoration when we can get a hold of window.
* This means that we do not support this behavior when running in a web worker.
*
* Lifting this restriction right now would require more changes in the dom adapter.
* Since webworkers aren't widely used, we will lift it once RouterScroller is
* battle-tested.
*/
supportScrollRestoration() {
try {
if (!this.supportsScrolling()) {
return false;
} // The `scrollRestoration` property could be on the `history` instance or its prototype.
const scrollRestorationDescriptor = getScrollRestorationProperty(this.window.history) || getScrollRestorationProperty(Object.getPrototypeOf(this.window.history)); // We can write to the `scrollRestoration` property if it is a writable data field or it has a
// setter function.
return !!scrollRestorationDescriptor && !!(scrollRestorationDescriptor.writable || scrollRestorationDescriptor.set);
} catch (_a) {
return false;
}
}
supportsScrolling() {
try {
return !!this.window && !!this.window.scrollTo && 'pageXOffset' in this.window;
} catch (_a) {
return false;
}
}
}
function getScrollRestorationProperty(obj) {
return Object.getOwnPropertyDescriptor(obj, 'scrollRestoration');
}
function findAnchorFromDocument(document, target) {
const documentResult = document.getElementById(target) || document.getElementsByName(target)[0];
if (documentResult) {
return documentResult;
} // `getElementById` and `getElementsByName` won't pierce through the shadow DOM so we
// have to traverse the DOM manually and do the lookup through the shadow roots.
if (typeof document.createTreeWalker === 'function' && document.body && (document.body.createShadowRoot || document.body.attachShadow)) {
const treeWalker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);
let currentNode = treeWalker.currentNode;
while (currentNode) {
const shadowRoot = currentNode.shadowRoot;
if (shadowRoot) {
// Note that `ShadowRoot` doesn't support `getElementsByName`
// so we have to fall back to `querySelector`.
const result = shadowRoot.getElementById(target) || shadowRoot.querySelector(`[name="${target}"]`);
if (result) {
return result;
}
}
currentNode = treeWalker.nextNode();
}
}
return null;
}
/**
* Provides an empty implementation of the viewport scroller.
*/
class NullViewportScroller {
/**
* Empty implementation
*/
setOffset(offset) {}
/**
* Empty implementation
*/
getScrollPosition() {
return [0, 0];
}
/**
* Empty implementation
*/
scrollToPosition(position) {}
/**
* Empty implementation
*/
scrollToAnchor(anchor) {}
/**
* Empty implementation
*/
setHistoryScrollRestoration(scrollRestoration) {}
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* A wrapper around the `XMLHttpRequest` constructor.
*
* @publicApi
*/
class XhrFactory {}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Asserts that the application is in development mode. Throws an error if the application is in
* production mode. This assert can be used to make sure that there is no dev-mode code invoked in
* the prod mode accidentally.
*/
function assertDevMode(checkName) {
if (!ngDevMode) {
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2958
/* RuntimeErrorCode.UNEXPECTED_DEV_MODE_CHECK_IN_PROD_MODE */
, `Unexpected invocation of the ${checkName} in the prod mode. ` + `Please make sure that the prod mode is enabled for production builds.`);
}
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// Assembles directive details string, useful for error messages.
function imgDirectiveDetails(ngSrc, includeNgSrc = true) {
const ngSrcInfo = includeNgSrc ? `(activated on an
element with the \`ngSrc="${ngSrc}"\`) ` : '';
return `The NgOptimizedImage directive ${ngSrcInfo}has detected that`;
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// Converts a string that represents a URL into a URL class instance.
function getUrl(src, win) {
// Don't use a base URL is the URL is absolute.
return isAbsoluteUrl(src) ? new URL(src) : new URL(src, win.location.href);
} // Checks whether a URL is absolute (i.e. starts with `http://` or `https://`).
function isAbsoluteUrl(src) {
return /^https?:\/\//.test(src);
} // Given a URL, extract the hostname part.
// If a URL is a relative one - the URL is returned as is.
function extractHostname(url) {
return isAbsoluteUrl(url) ? new URL(url).hostname : url;
}
function isValidPath(path) {
const isString = typeof path === 'string';
if (!isString || path.trim() === '') {
return false;
} // Calling new URL() will throw if the path string is malformed
try {
const url = new URL(path);
return true;
} catch (_a) {
return false;
}
}
function normalizePath(path) {
return path.endsWith('/') ? path.slice(0, -1) : path;
}
function normalizeSrc(src) {
return src.startsWith('/') ? src.slice(1) : src;
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// Set of origins that are always excluded from the preconnect checks.
const INTERNAL_PRECONNECT_CHECK_BLOCKLIST = new Set(['localhost', '127.0.0.1', '0.0.0.0']);
/**
* Multi-provider injection token to configure which origins should be excluded
* from the preconnect checks. It can either be a single string or an array of strings
* to represent a group of origins, for example:
*
* ```typescript
* {provide: PRECONNECT_CHECK_BLOCKLIST, multi: true, useValue: 'https://your-domain.com'}
* ```
*
* or:
*
* ```typescript
* {provide: PRECONNECT_CHECK_BLOCKLIST, multi: true,
* useValue: ['https://your-domain-1.com', 'https://your-domain-2.com']}
* ```
*
* @publicApi
* @developerPreview
*/
const PRECONNECT_CHECK_BLOCKLIST = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken('PRECONNECT_CHECK_BLOCKLIST');
/**
* Contains the logic to detect whether an image, marked with the "priority" attribute
* has a corresponding `` tag in the `document.head`.
*
* Note: this is a dev-mode only class, which should not appear in prod bundles,
* thus there is no `ngDevMode` use in the code.
*/
class PreconnectLinkChecker {
constructor() {
this.document = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(DOCUMENT);
/**
* Set of tags found on this page.
* The `null` value indicates that there was no DOM query operation performed.
*/
this.preconnectLinks = null;
/*
* Keep track of all already seen origin URLs to avoid repeating the same check.
*/
this.alreadySeen = new Set();
this.window = null;
this.blocklist = new Set(INTERNAL_PRECONNECT_CHECK_BLOCKLIST);
assertDevMode('preconnect link checker');
const win = this.document.defaultView;
if (typeof win !== 'undefined') {
this.window = win;
}
const blocklist = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(PRECONNECT_CHECK_BLOCKLIST, {
optional: true
});
if (blocklist) {
this.populateBlocklist(blocklist);
}
}
populateBlocklist(origins) {
if (Array.isArray(origins)) {
deepForEach(origins, origin => {
this.blocklist.add(extractHostname(origin));
});
} else {
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2957
/* RuntimeErrorCode.INVALID_PRECONNECT_CHECK_BLOCKLIST */
, `The blocklist for the preconnect check was not provided as an array. ` + `Check that the \`PRECONNECT_CHECK_BLOCKLIST\` token is configured as a \`multi: true\` provider.`);
}
}
/**
* Checks that a preconnect resource hint exists in the head fo rthe
* given src.
*
* @param rewrittenSrc src formatted with loader
* @param originalNgSrc ngSrc value
*/
assertPreconnect(rewrittenSrc, originalNgSrc) {
if (!this.window) return;
const imgUrl = getUrl(rewrittenSrc, this.window);
if (this.blocklist.has(imgUrl.hostname) || this.alreadySeen.has(imgUrl.origin)) return; // Register this origin as seen, so we don't check it again later.
this.alreadySeen.add(imgUrl.origin);
if (!this.preconnectLinks) {
// Note: we query for preconnect links only *once* and cache the results
// for the entire lifespan of an application, since it's unlikely that the
// list would change frequently. This allows to make sure there are no
// performance implications of making extra DOM lookups for each image.
this.preconnectLinks = this.queryPreconnectLinks();
}
if (!this.preconnectLinks.has(imgUrl.origin)) {
console.warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2956
/* RuntimeErrorCode.PRIORITY_IMG_MISSING_PRECONNECT_TAG */
, `${imgDirectiveDetails(originalNgSrc)} there is no preconnect tag present for this ` + `image. Preconnecting to the origin(s) that serve priority images ensures that these ` + `images are delivered as soon as possible. To fix this, please add the following ` + `element into the of the document:\n` + ` `));
}
}
queryPreconnectLinks() {
const preconnectUrls = new Set();
const selector = 'link[rel=preconnect]';
const links = Array.from(this.document.querySelectorAll(selector));
for (let link of links) {
const url = getUrl(link.href, this.window);
preconnectUrls.add(url.origin);
}
return preconnectUrls;
}
ngOnDestroy() {
var _a;
(_a = this.preconnectLinks) === null || _a === void 0 ? void 0 : _a.clear();
this.alreadySeen.clear();
}
}
PreconnectLinkChecker.ɵfac = function PreconnectLinkChecker_Factory(t) {
return new (t || PreconnectLinkChecker)();
};
PreconnectLinkChecker.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
token: PreconnectLinkChecker,
factory: PreconnectLinkChecker.ɵfac,
providedIn: 'root'
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PreconnectLinkChecker, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable,
args: [{
providedIn: 'root'
}]
}], function () {
return [];
}, null);
})();
/**
* Invokes a callback for each element in the array. Also invokes a callback
* recursively for each nested array.
*/
function deepForEach(input, fn) {
for (let value of input) {
Array.isArray(value) ? deepForEach(value, fn) : fn(value);
}
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Noop image loader that does no transformation to the original src and just returns it as is.
* This loader is used as a default one if more specific logic is not provided in an app config.
*
* @see `ImageLoader`
* @see `NgOptimizedImage`
*/
const noopImageLoader = config => config.src;
/**
* Injection token that configures the image loader function.
*
* @see `ImageLoader`
* @see `NgOptimizedImage`
* @publicApi
* @developerPreview
*/
const IMAGE_LOADER = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken('ImageLoader', {
providedIn: 'root',
factory: () => noopImageLoader
});
/**
* Internal helper function that makes it easier to introduce custom image loaders for the
* `NgOptimizedImage` directive. It is enough to specify a URL builder function to obtain full DI
* configuration for a given loader: a DI token corresponding to the actual loader function, plus DI
* tokens managing preconnect check functionality.
* @param buildUrlFn a function returning a full URL based on loader's configuration
* @param exampleUrls example of full URLs for a given loader (used in error messages)
* @returns a set of DI providers corresponding to the configured image loader
*/
function createImageLoader(buildUrlFn, exampleUrls) {
return function provideImageLoader(path, options = {
ensurePreconnect: true
}) {
if (!isValidPath(path)) {
throwInvalidPathError(path, exampleUrls || []);
} // The trailing / is stripped (if provided) to make URL construction (concatenation) easier in
// the individual loader functions.
path = normalizePath(path);
const loaderFn = config => {
if (isAbsoluteUrl(config.src)) {
// Image loader functions expect an image file name (e.g. `my-image.png`)
// or a relative path + a file name (e.g. `/a/b/c/my-image.png`) as an input,
// so the final absolute URL can be constructed.
// When an absolute URL is provided instead - the loader can not
// build a final URL, thus the error is thrown to indicate that.
throwUnexpectedAbsoluteUrlError(path, config.src);
}
return buildUrlFn(path, Object.assign(Object.assign({}, config), {
src: normalizeSrc(config.src)
}));
};
const providers = [{
provide: IMAGE_LOADER,
useValue: loaderFn
}];
if (ngDevMode && options.ensurePreconnect === false) {
providers.push({
provide: PRECONNECT_CHECK_BLOCKLIST,
useValue: [path],
multi: true
});
}
return providers;
};
}
function throwInvalidPathError(path, exampleUrls) {
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2959
/* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */
, ngDevMode && `Image loader has detected an invalid path (\`${path}\`). ` + `To fix this, supply a path using one of the following formats: ${exampleUrls.join(' or ')}`);
}
function throwUnexpectedAbsoluteUrlError(path, url) {
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2959
/* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */
, ngDevMode && `Image loader has detected a \`
\` tag with an invalid \`ngSrc\` attribute: ${url}. ` + `This image loader expects \`ngSrc\` to be a relative URL - ` + `however the provided value is an absolute URL. ` + `To fix this, provide \`ngSrc\` as a path relative to the base URL ` + `configured for this loader (\`${path}\`).`);
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Function that generates an ImageLoader for [Cloudflare Image
* Resizing](https://developers.cloudflare.com/images/image-resizing/) and turns it into an Angular
* provider. Note: Cloudflare has multiple image products - this provider is specifically for
* Cloudflare Image Resizing; it will not work with Cloudflare Images or Cloudflare Polish.
*
* @param path Your domain name, e.g. https://mysite.com
* @param options An object with extra configuration:
* - `ensurePreconnect`: boolean flag indicating whether the NgOptimizedImage directive
* should verify that there is a corresponding ``
* present in the document's ``.
* @returns Provider that provides an ImageLoader function
*
* @publicApi
* @developerPreview
*/
const provideCloudflareLoader = createImageLoader(createCloudflareUrl, ngDevMode ? ['https:///cdn-cgi/image//'] : undefined);
function createCloudflareUrl(path, config) {
let params = `format=auto`;
if (config.width) {
params += `,width=${config.width}`;
} // Cloudflare image URLs format:
// https://developers.cloudflare.com/images/image-resizing/url-format/
return `${path}/cdn-cgi/image/${params}/${config.src}`;
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Function that generates an ImageLoader for Cloudinary and turns it into an Angular provider.
*
* @param path Base URL of your Cloudinary images
* This URL should match one of the following formats:
* https://res.cloudinary.com/mysite
* https://mysite.cloudinary.com
* https://subdomain.mysite.com
* @param options An object with extra configuration:
* - `ensurePreconnect`: boolean flag indicating whether the NgOptimizedImage directive
* should verify that there is a corresponding ``
* present in the document's ``.
* @returns Set of providers to configure the Cloudinary loader.
*
* @publicApi
* @developerPreview
*/
const provideCloudinaryLoader = createImageLoader(createCloudinaryUrl, ngDevMode ? ['https://res.cloudinary.com/mysite', 'https://mysite.cloudinary.com', 'https://subdomain.mysite.com'] : undefined);
function createCloudinaryUrl(path, config) {
// Cloudinary image URLformat:
// https://cloudinary.com/documentation/image_transformations#transformation_url_structure
// Example of a Cloudinary image URL:
// https://res.cloudinary.com/mysite/image/upload/c_scale,f_auto,q_auto,w_600/marketing/tile-topics-m.png
let params = `f_auto,q_auto`; // sets image format and quality to "auto"
if (config.width) {
params += `,w_${config.width}`;
}
return `${path}/image/upload/${params}/${config.src}`;
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Function that generates an ImageLoader for ImageKit and turns it into an Angular provider.
*
* @param path Base URL of your ImageKit images
* This URL should match one of the following formats:
* https://ik.imagekit.io/myaccount
* https://subdomain.mysite.com
* @param options An object with extra configuration:
* - `ensurePreconnect`: boolean flag indicating whether the NgOptimizedImage directive
* should verify that there is a corresponding ``
* present in the document's ``.
* @returns Set of providers to configure the ImageKit loader.
*
* @publicApi
* @developerPreview
*/
const provideImageKitLoader = createImageLoader(createImagekitUrl, ngDevMode ? ['https://ik.imagekit.io/mysite', 'https://subdomain.mysite.com'] : undefined);
function createImagekitUrl(path, config) {
// Example of an ImageKit image URL:
// https://ik.imagekit.io/demo/tr:w-300,h-300/medium_cafe_B1iTdD0C.jpg
let params = `tr:q-auto`; // applies the "auto quality" transformation
if (config.width) {
params += `,w-${config.width}`;
}
return `${path}/${params}/${config.src}`;
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Function that generates an ImageLoader for Imgix and turns it into an Angular provider.
*
* @param path path to the desired Imgix origin,
* e.g. https://somepath.imgix.net or https://images.mysite.com
* @param options An object with extra configuration:
* - `ensurePreconnect`: boolean flag indicating whether the NgOptimizedImage directive
* should verify that there is a corresponding ``
* present in the document's ``.
* @returns Set of providers to configure the Imgix loader.
*
* @publicApi
* @developerPreview
*/
const provideImgixLoader = createImageLoader(createImgixUrl, ngDevMode ? ['https://somepath.imgix.net/'] : undefined);
function createImgixUrl(path, config) {
const url = new URL(`${path}/${config.src}`); // This setting ensures the smallest allowable format is set.
url.searchParams.set('auto', 'format');
if (config.width) {
url.searchParams.set('w', config.width.toString());
}
return url.href;
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Observer that detects whether an image with `NgOptimizedImage`
* is treated as a Largest Contentful Paint (LCP) element. If so,
* asserts that the image has the `priority` attribute.
*
* Note: this is a dev-mode only class and it does not appear in prod bundles,
* thus there is no `ngDevMode` use in the code.
*
* Based on https://web.dev/lcp/#measure-lcp-in-javascript.
*/
class LCPImageObserver {
constructor() {
// Map of full image URLs -> original `ngSrc` values.
this.images = new Map(); // Keep track of images for which `console.warn` was produced.
this.alreadyWarned = new Set();
this.window = null;
this.observer = null;
assertDevMode('LCP checker');
const win = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(DOCUMENT).defaultView;
if (typeof win !== 'undefined' && typeof PerformanceObserver !== 'undefined') {
this.window = win;
this.observer = this.initPerformanceObserver();
}
}
/**
* Inits PerformanceObserver and subscribes to LCP events.
* Based on https://web.dev/lcp/#measure-lcp-in-javascript
*/
initPerformanceObserver() {
const observer = new PerformanceObserver(entryList => {
var _a, _b;
const entries = entryList.getEntries();
if (entries.length === 0) return; // We use the latest entry produced by the `PerformanceObserver` as the best
// signal on which element is actually an LCP one. As an example, the first image to load on
// a page, by virtue of being the only thing on the page so far, is often a LCP candidate
// and gets reported by PerformanceObserver, but isn't necessarily the LCP element.
const lcpElement = entries[entries.length - 1]; // Cast to `any` due to missing `element` on the `LargestContentfulPaint` type of entry.
// See https://developer.mozilla.org/en-US/docs/Web/API/LargestContentfulPaint
const imgSrc = (_b = (_a = lcpElement.element) === null || _a === void 0 ? void 0 : _a.src) !== null && _b !== void 0 ? _b : ''; // Exclude `data:` and `blob:` URLs, since they are not supported by the directive.
if (imgSrc.startsWith('data:') || imgSrc.startsWith('blob:')) return;
const imgNgSrc = this.images.get(imgSrc);
if (imgNgSrc && !this.alreadyWarned.has(imgSrc)) {
this.alreadyWarned.add(imgSrc);
logMissingPriorityWarning(imgSrc);
}
});
observer.observe({
type: 'largest-contentful-paint',
buffered: true
});
return observer;
}
registerImage(rewrittenSrc, originalNgSrc) {
if (!this.observer) return;
this.images.set(getUrl(rewrittenSrc, this.window).href, originalNgSrc);
}
unregisterImage(rewrittenSrc) {
if (!this.observer) return;
this.images.delete(getUrl(rewrittenSrc, this.window).href);
}
ngOnDestroy() {
if (!this.observer) return;
this.observer.disconnect();
this.images.clear();
this.alreadyWarned.clear();
}
}
LCPImageObserver.ɵfac = function LCPImageObserver_Factory(t) {
return new (t || LCPImageObserver)();
};
LCPImageObserver.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({
token: LCPImageObserver,
factory: LCPImageObserver.ɵfac,
providedIn: 'root'
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](LCPImageObserver, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable,
args: [{
providedIn: 'root'
}]
}], function () {
return [];
}, null);
})();
function logMissingPriorityWarning(ngSrc) {
const directiveDetails = imgDirectiveDetails(ngSrc);
console.warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2955
/* RuntimeErrorCode.LCP_IMG_MISSING_PRIORITY */
, `${directiveDetails} this image is the Largest Contentful Paint (LCP) ` + `element but was not marked "priority". This image should be marked ` + `"priority" in order to prioritize its loading. ` + `To fix this, add the "priority" attribute.`));
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* When a Base64-encoded image is passed as an input to the `NgOptimizedImage` directive,
* an error is thrown. The image content (as a string) might be very long, thus making
* it hard to read an error message if the entire string is included. This const defines
* the number of characters that should be included into the error message. The rest
* of the content is truncated.
*/
const BASE64_IMG_MAX_LENGTH_IN_ERROR = 50;
/**
* RegExpr to determine whether a src in a srcset is using width descriptors.
* Should match something like: "100w, 200w".
*/
const VALID_WIDTH_DESCRIPTOR_SRCSET = /^((\s*\d+w\s*(,|$)){1,})$/;
/**
* RegExpr to determine whether a src in a srcset is using density descriptors.
* Should match something like: "1x, 2x, 50x". Also supports decimals like "1.5x, 1.50x".
*/
const VALID_DENSITY_DESCRIPTOR_SRCSET = /^((\s*\d+(\.\d+)?x\s*(,|$)){1,})$/;
/**
* Srcset values with a density descriptor higher than this value will actively
* throw an error. Such densities are not permitted as they cause image sizes
* to be unreasonably large and slow down LCP.
*/
const ABSOLUTE_SRCSET_DENSITY_CAP = 3;
/**
* Used only in error message text to communicate best practices, as we will
* only throw based on the slightly more conservative ABSOLUTE_SRCSET_DENSITY_CAP.
*/
const RECOMMENDED_SRCSET_DENSITY_CAP = 2;
/**
* Used to determine whether two aspect ratios are similar in value.
*/
const ASPECT_RATIO_TOLERANCE = .1;
/**
* Used to determine whether the image has been requested at an overly
* large size compared to the actual rendered image size (after taking
* into account a typical device pixel ratio). In pixels.
*/
const OVERSIZED_IMAGE_TOLERANCE = 1000;
/**
* Directive that improves image loading performance by enforcing best practices.
*
* `NgOptimizedImage` ensures that the loading of the Largest Contentful Paint (LCP) image is
* prioritized by:
* - Automatically setting the `fetchpriority` attribute on the `
` tag
* - Lazy loading non-priority images by default
* - Asserting that there is a corresponding preconnect link tag in the document head
*
* In addition, the directive:
* - Generates appropriate asset URLs if a corresponding `ImageLoader` function is provided
* - Requires that `width` and `height` are set
* - Warns if `width` or `height` have been set incorrectly
* - Warns if the image will be visually distorted when rendered
*
* @usageNotes
* The `NgOptimizedImage` directive is marked as [standalone](guide/standalone-components) and can
* be imported directly.
*
* Follow the steps below to enable and use the directive:
* 1. Import it into the necessary NgModule or a standalone Component.
* 2. Optionally provide an `ImageLoader` if you use an image hosting service.
* 3. Update the necessary `
` tags in templates and replace `src` attributes with `ngSrc`.
* Using a `ngSrc` allows the directive to control when the `src` gets set, which triggers an image
* download.
*
* Step 1: import the `NgOptimizedImage` directive.
*
* ```typescript
* import { NgOptimizedImage } from '@angular/common';
*
* // Include it into the necessary NgModule
* @NgModule({
* imports: [NgOptimizedImage],
* })
* class AppModule {}
*
* // ... or a standalone Component
* @Component({
* standalone: true
* imports: [NgOptimizedImage],
* })
* class MyStandaloneComponent {}
* ```
*
* Step 2: configure a loader.
*
* To use the **default loader**: no additional code changes are necessary. The URL returned by the
* generic loader will always match the value of "src". In other words, this loader applies no
* transformations to the resource URL and the value of the `ngSrc` attribute will be used as is.
*
* To use an existing loader for a **third-party image service**: add the provider factory for your
* chosen service to the `providers` array. In the example below, the Imgix loader is used:
*
* ```typescript
* import {provideImgixLoader} from '@angular/common';
*
* // Call the function and add the result to the `providers` array:
* providers: [
* provideImgixLoader("https://my.base.url/"),
* ],
* ```
*
* The `NgOptimizedImage` directive provides the following functions:
* - `provideCloudflareLoader`
* - `provideCloudinaryLoader`
* - `provideImageKitLoader`
* - `provideImgixLoader`
*
* If you use a different image provider, you can create a custom loader function as described
* below.
*
* To use a **custom loader**: provide your loader function as a value for the `IMAGE_LOADER` DI
* token.
*
* ```typescript
* import {IMAGE_LOADER, ImageLoaderConfig} from '@angular/common';
*
* // Configure the loader using the `IMAGE_LOADER` token.
* providers: [
* {
* provide: IMAGE_LOADER,
* useValue: (config: ImageLoaderConfig) => {
* return `https://example.com/${config.src}-${config.width}.jpg}`;
* }
* },
* ],
* ```
*
* Step 3: update `
` tags in templates to use `ngSrc` instead of `src`.
*
* ```
*
* ```
*
* @publicApi
* @developerPreview
*/
class NgOptimizedImage {
constructor() {
this.imageLoader = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(IMAGE_LOADER);
this.renderer = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2);
this.imgElement = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef).nativeElement;
this.injector = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(_angular_core__WEBPACK_IMPORTED_MODULE_0__.Injector); // a LCP image observer - should be injected only in the dev mode
this.lcpObserver = ngDevMode ? this.injector.get(LCPImageObserver) : null;
/**
* Calculate the rewritten `src` once and store it.
* This is needed to avoid repetitive calculations and make sure the directive cleanup in the
* `ngOnDestroy` does not rely on the `IMAGE_LOADER` logic (which in turn can rely on some other
* instance that might be already destroyed).
*/
this._renderedSrc = null;
this._priority = false;
}
/**
* Previously, the `rawSrc` attribute was used to activate the directive.
* The attribute was renamed to `ngSrc` and this input just produces an error,
* suggesting to switch to `ngSrc` instead.
*
* This error should be removed in v15.
*
* @nodoc
* @deprecated Use `ngSrc` instead.
*/
set rawSrc(value) {
if (ngDevMode) {
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952
/* RuntimeErrorCode.INVALID_INPUT */
, `${imgDirectiveDetails(value, false)} the \`rawSrc\` attribute was used ` + `to activate the directive. Newer version of the directive uses the \`ngSrc\` ` + `attribute instead. Please replace \`rawSrc\` with \`ngSrc\` and ` + `\`rawSrcset\` with \`ngSrcset\` attributes in the template to ` + `enable image optimizations.`);
}
}
/**
* The intrinsic width of the image in pixels.
*/
set width(value) {
ngDevMode && assertGreaterThanZero(this, value, 'width');
this._width = inputToInteger(value);
}
get width() {
return this._width;
}
/**
* The intrinsic height of the image in pixels.
*/
set height(value) {
ngDevMode && assertGreaterThanZero(this, value, 'height');
this._height = inputToInteger(value);
}
get height() {
return this._height;
}
/**
* Indicates whether this image should have a high priority.
*/
set priority(value) {
this._priority = inputToBoolean(value);
}
get priority() {
return this._priority;
}
ngOnInit() {
if (ngDevMode) {
assertNonEmptyInput(this, 'ngSrc', this.ngSrc);
assertValidNgSrcset(this, this.ngSrcset);
assertNoConflictingSrc(this);
assertNoConflictingSrcset(this);
assertNotBase64Image(this);
assertNotBlobUrl(this);
assertNonEmptyWidthAndHeight(this);
assertValidLoadingInput(this);
assertNoImageDistortion(this, this.imgElement, this.renderer);
if (this.priority) {
const checker = this.injector.get(PreconnectLinkChecker);
checker.assertPreconnect(this.getRewrittenSrc(), this.ngSrc);
} else {
// Monitor whether an image is an LCP element only in case
// the `priority` attribute is missing. Otherwise, an image
// has the necessary settings and no extra checks are required.
if (this.lcpObserver !== null) {
const ngZone = this.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone);
ngZone.runOutsideAngular(() => {
this.lcpObserver.registerImage(this.getRewrittenSrc(), this.ngSrc);
});
}
}
}
this.setHostAttributes();
}
setHostAttributes() {
// Must set width/height explicitly in case they are bound (in which case they will
// only be reflected and not found by the browser)
this.setHostAttribute('width', this.width.toString());
this.setHostAttribute('height', this.height.toString());
this.setHostAttribute('loading', this.getLoadingBehavior());
this.setHostAttribute('fetchpriority', this.getFetchPriority()); // The `src` and `srcset` attributes should be set last since other attributes
// could affect the image's loading behavior.
this.setHostAttribute('src', this.getRewrittenSrc());
if (this.ngSrcset) {
this.setHostAttribute('srcset', this.getRewrittenSrcset());
}
}
ngOnChanges(changes) {
if (ngDevMode) {
assertNoPostInitInputChange(this, changes, ['ngSrc', 'ngSrcset', 'width', 'height', 'priority']);
}
}
getLoadingBehavior() {
if (!this.priority && this.loading !== undefined) {
return this.loading;
}
return this.priority ? 'eager' : 'lazy';
}
getFetchPriority() {
return this.priority ? 'high' : 'auto';
}
getRewrittenSrc() {
// ImageLoaderConfig supports setting a width property. However, we're not setting width here
// because if the developer uses rendered width instead of intrinsic width in the HTML width
// attribute, the image requested may be too small for 2x+ screens.
if (!this._renderedSrc) {
const imgConfig = {
src: this.ngSrc
}; // Cache calculated image src to reuse it later in the code.
this._renderedSrc = this.imageLoader(imgConfig);
}
return this._renderedSrc;
}
getRewrittenSrcset() {
const widthSrcSet = VALID_WIDTH_DESCRIPTOR_SRCSET.test(this.ngSrcset);
const finalSrcs = this.ngSrcset.split(',').filter(src => src !== '').map(srcStr => {
srcStr = srcStr.trim();
const width = widthSrcSet ? parseFloat(srcStr) : parseFloat(srcStr) * this.width;
return `${this.imageLoader({
src: this.ngSrc,
width
})} ${srcStr}`;
});
return finalSrcs.join(', ');
}
ngOnDestroy() {
if (ngDevMode) {
if (!this.priority && this._renderedSrc !== null && this.lcpObserver !== null) {
this.lcpObserver.unregisterImage(this._renderedSrc);
}
}
}
setHostAttribute(name, value) {
this.renderer.setAttribute(this.imgElement, name, value);
}
}
NgOptimizedImage.ɵfac = function NgOptimizedImage_Factory(t) {
return new (t || NgOptimizedImage)();
};
NgOptimizedImage.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({
type: NgOptimizedImage,
selectors: [["img", "ngSrc", ""], ["img", "rawSrc", ""]],
inputs: {
rawSrc: "rawSrc",
ngSrc: "ngSrc",
ngSrcset: "ngSrcset",
width: "width",
height: "height",
loading: "loading",
priority: "priority",
src: "src",
srcset: "srcset"
},
standalone: true,
features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]]
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgOptimizedImage, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive,
args: [{
standalone: true,
selector: 'img[ngSrc],img[rawSrc]'
}]
}], null, {
rawSrc: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
ngSrc: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
ngSrcset: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
width: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
height: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
loading: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
priority: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
src: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}],
srcset: [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input
}]
});
})();
/***** Helpers *****/
/**
* Convert input value to integer.
*/
function inputToInteger(value) {
return typeof value === 'string' ? parseInt(value, 10) : value;
}
/**
* Convert input value to boolean.
*/
function inputToBoolean(value) {
return value != null && `${value}` !== 'false';
}
/***** Assert functions *****/
/**
* Verifies that there is no `src` set on a host element.
*/
function assertNoConflictingSrc(dir) {
if (dir.src) {
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2950
/* RuntimeErrorCode.UNEXPECTED_SRC_ATTR */
, `${imgDirectiveDetails(dir.ngSrc)} both \`src\` and \`ngSrc\` have been set. ` + `Supplying both of these attributes breaks lazy loading. ` + `The NgOptimizedImage directive sets \`src\` itself based on the value of \`ngSrc\`. ` + `To fix this, please remove the \`src\` attribute.`);
}
}
/**
* Verifies that there is no `srcset` set on a host element.
*/
function assertNoConflictingSrcset(dir) {
if (dir.srcset) {
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2951
/* RuntimeErrorCode.UNEXPECTED_SRCSET_ATTR */
, `${imgDirectiveDetails(dir.ngSrc)} both \`srcset\` and \`ngSrcset\` have been set. ` + `Supplying both of these attributes breaks lazy loading. ` + `The NgOptimizedImage directive sets \`srcset\` itself based on the value of ` + `\`ngSrcset\`. To fix this, please remove the \`srcset\` attribute.`);
}
}
/**
* Verifies that the `ngSrc` is not a Base64-encoded image.
*/
function assertNotBase64Image(dir) {
let ngSrc = dir.ngSrc.trim();
if (ngSrc.startsWith('data:')) {
if (ngSrc.length > BASE64_IMG_MAX_LENGTH_IN_ERROR) {
ngSrc = ngSrc.substring(0, BASE64_IMG_MAX_LENGTH_IN_ERROR) + '...';
}
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952
/* RuntimeErrorCode.INVALID_INPUT */
, `${imgDirectiveDetails(dir.ngSrc, false)} \`ngSrc\` is a Base64-encoded string ` + `(${ngSrc}). NgOptimizedImage does not support Base64-encoded strings. ` + `To fix this, disable the NgOptimizedImage directive for this element ` + `by removing \`ngSrc\` and using a standard \`src\` attribute instead.`);
}
}
/**
* Verifies that the `ngSrc` is not a Blob URL.
*/
function assertNotBlobUrl(dir) {
const ngSrc = dir.ngSrc.trim();
if (ngSrc.startsWith('blob:')) {
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952
/* RuntimeErrorCode.INVALID_INPUT */
, `${imgDirectiveDetails(dir.ngSrc)} \`ngSrc\` was set to a blob URL (${ngSrc}). ` + `Blob URLs are not supported by the NgOptimizedImage directive. ` + `To fix this, disable the NgOptimizedImage directive for this element ` + `by removing \`ngSrc\` and using a regular \`src\` attribute instead.`);
}
}
/**
* Verifies that the input is set to a non-empty string.
*/
function assertNonEmptyInput(dir, name, value) {
const isString = typeof value === 'string';
const isEmptyString = isString && value.trim() === '';
if (!isString || isEmptyString) {
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952
/* RuntimeErrorCode.INVALID_INPUT */
, `${imgDirectiveDetails(dir.ngSrc)} \`${name}\` has an invalid value ` + `(\`${value}\`). To fix this, change the value to a non-empty string.`);
}
}
/**
* Verifies that the `ngSrcset` is in a valid format, e.g. "100w, 200w" or "1x, 2x".
*/
function assertValidNgSrcset(dir, value) {
if (value == null) return;
assertNonEmptyInput(dir, 'ngSrcset', value);
const stringVal = value;
const isValidWidthDescriptor = VALID_WIDTH_DESCRIPTOR_SRCSET.test(stringVal);
const isValidDensityDescriptor = VALID_DENSITY_DESCRIPTOR_SRCSET.test(stringVal);
if (isValidDensityDescriptor) {
assertUnderDensityCap(dir, stringVal);
}
const isValidSrcset = isValidWidthDescriptor || isValidDensityDescriptor;
if (!isValidSrcset) {
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952
/* RuntimeErrorCode.INVALID_INPUT */
, `${imgDirectiveDetails(dir.ngSrc)} \`ngSrcset\` has an invalid value (\`${value}\`). ` + `To fix this, supply \`ngSrcset\` using a comma-separated list of one or more width ` + `descriptors (e.g. "100w, 200w") or density descriptors (e.g. "1x, 2x").`);
}
}
function assertUnderDensityCap(dir, value) {
const underDensityCap = value.split(',').every(num => num === '' || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP);
if (!underDensityCap) {
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952
/* RuntimeErrorCode.INVALID_INPUT */
, `${imgDirectiveDetails(dir.ngSrc)} the \`ngSrcset\` contains an unsupported image density:` + `\`${value}\`. NgOptimizedImage generally recommends a max image density of ` + `${RECOMMENDED_SRCSET_DENSITY_CAP}x but supports image densities up to ` + `${ABSOLUTE_SRCSET_DENSITY_CAP}x. The human eye cannot distinguish between image densities ` + `greater than ${RECOMMENDED_SRCSET_DENSITY_CAP}x - which makes them unnecessary for ` + `most use cases. Images that will be pinch-zoomed are typically the primary use case for ` + `${ABSOLUTE_SRCSET_DENSITY_CAP}x images. Please remove the high density descriptor and try again.`);
}
}
/**
* Creates a `RuntimeError` instance to represent a situation when an input is set after
* the directive has initialized.
*/
function postInitInputChangeError(dir, inputName) {
return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2953
/* RuntimeErrorCode.UNEXPECTED_INPUT_CHANGE */
, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` was updated after initialization. ` + `The NgOptimizedImage directive will not react to this input change. ` + `To fix this, switch \`${inputName}\` a static value or wrap the image element ` + `in an *ngIf that is gated on the necessary value.`);
}
/**
* Verify that none of the listed inputs has changed.
*/
function assertNoPostInitInputChange(dir, changes, inputs) {
inputs.forEach(input => {
const isUpdated = changes.hasOwnProperty(input);
if (isUpdated && !changes[input].isFirstChange()) {
if (input === 'ngSrc') {
// When the `ngSrc` input changes, we detect that only in the
// `ngOnChanges` hook, thus the `ngSrc` is already set. We use
// `ngSrc` in the error message, so we use a previous value, but
// not the updated one in it.
dir = {
ngSrc: changes[input].previousValue
};
}
throw postInitInputChangeError(dir, input);
}
});
}
/**
* Verifies that a specified input is a number greater than 0.
*/
function assertGreaterThanZero(dir, inputValue, inputName) {
const validNumber = typeof inputValue === 'number' && inputValue > 0;
const validString = typeof inputValue === 'string' && /^\d+$/.test(inputValue.trim()) && parseInt(inputValue) > 0;
if (!validNumber && !validString) {
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952
/* RuntimeErrorCode.INVALID_INPUT */
, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` has an invalid value ` + `(\`${inputValue}\`). To fix this, provide \`${inputName}\` ` + `as a number greater than 0.`);
}
}
/**
* Verifies that the rendered image is not visually distorted. Effectively this is checking:
* - Whether the "width" and "height" attributes reflect the actual dimensions of the image.
* - Whether image styling is "correct" (see below for a longer explanation).
*/
function assertNoImageDistortion(dir, img, renderer) {
const removeListenerFn = renderer.listen(img, 'load', () => {
removeListenerFn(); // TODO: `clientWidth`, `clientHeight`, `naturalWidth` and `naturalHeight`
// are typed as number, but we run `parseFloat` (which accepts strings only).
// Verify whether `parseFloat` is needed in the cases below.
const renderedWidth = parseFloat(img.clientWidth);
const renderedHeight = parseFloat(img.clientHeight);
const renderedAspectRatio = renderedWidth / renderedHeight;
const nonZeroRenderedDimensions = renderedWidth !== 0 && renderedHeight !== 0;
const intrinsicWidth = parseFloat(img.naturalWidth);
const intrinsicHeight = parseFloat(img.naturalHeight);
const intrinsicAspectRatio = intrinsicWidth / intrinsicHeight;
const suppliedWidth = dir.width;
const suppliedHeight = dir.height;
const suppliedAspectRatio = suppliedWidth / suppliedHeight; // Tolerance is used to account for the impact of subpixel rendering.
// Due to subpixel rendering, the rendered, intrinsic, and supplied
// aspect ratios of a correctly configured image may not exactly match.
// For example, a `width=4030 height=3020` image might have a rendered
// size of "1062w, 796.48h". (An aspect ratio of 1.334... vs. 1.333...)
const inaccurateDimensions = Math.abs(suppliedAspectRatio - intrinsicAspectRatio) > ASPECT_RATIO_TOLERANCE;
const stylingDistortion = nonZeroRenderedDimensions && Math.abs(intrinsicAspectRatio - renderedAspectRatio) > ASPECT_RATIO_TOLERANCE;
if (inaccurateDimensions) {
console.warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2952
/* RuntimeErrorCode.INVALID_INPUT */
, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the image does not match ` + `the aspect ratio indicated by the width and height attributes. ` + `\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` + `(aspect-ratio: ${intrinsicAspectRatio}). \nSupplied width and height attributes: ` + `${suppliedWidth}w x ${suppliedHeight}h (aspect-ratio: ${suppliedAspectRatio}). ` + `\nTo fix this, update the width and height attributes.`));
} else if (stylingDistortion) {
console.warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2952
/* RuntimeErrorCode.INVALID_INPUT */
, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the rendered image ` + `does not match the image's intrinsic aspect ratio. ` + `\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` + `(aspect-ratio: ${intrinsicAspectRatio}). \nRendered image size: ` + `${renderedWidth}w x ${renderedHeight}h (aspect-ratio: ` + `${renderedAspectRatio}). \nThis issue can occur if "width" and "height" ` + `attributes are added to an image without updating the corresponding ` + `image styling. To fix this, adjust image styling. In most cases, ` + `adding "height: auto" or "width: auto" to the image styling will fix ` + `this issue.`));
} else if (!dir.ngSrcset && nonZeroRenderedDimensions) {
// If `ngSrcset` hasn't been set, sanity check the intrinsic size.
const recommendedWidth = RECOMMENDED_SRCSET_DENSITY_CAP * renderedWidth;
const recommendedHeight = RECOMMENDED_SRCSET_DENSITY_CAP * renderedHeight;
const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE;
const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE;
if (oversizedWidth || oversizedHeight) {
console.warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2960
/* RuntimeErrorCode.OVERSIZED_IMAGE */
, `${imgDirectiveDetails(dir.ngSrc)} the intrinsic image is significantly ` + `larger than necessary. ` + `\nRendered image size: ${renderedWidth}w x ${renderedHeight}h. ` + `\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h. ` + `\nRecommended intrinsic image size: ${recommendedWidth}w x ${recommendedHeight}h. ` + `\nNote: Recommended intrinsic image size is calculated assuming a maximum DPR of ` + `${RECOMMENDED_SRCSET_DENSITY_CAP}. To improve loading time, resize the image ` + `or consider using the "ngSrcset" and "sizes" attributes.`));
}
}
});
}
/**
* Verifies that a specified input is set.
*/
function assertNonEmptyWidthAndHeight(dir) {
let missingAttributes = [];
if (dir.width === undefined) missingAttributes.push('width');
if (dir.height === undefined) missingAttributes.push('height');
if (missingAttributes.length > 0) {
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2954
/* RuntimeErrorCode.REQUIRED_INPUT_MISSING */
, `${imgDirectiveDetails(dir.ngSrc)} these required attributes ` + `are missing: ${missingAttributes.map(attr => `"${attr}"`).join(', ')}. ` + `Including "width" and "height" attributes will prevent image-related layout shifts. ` + `To fix this, include "width" and "height" attributes on the image tag.`);
}
}
/**
* Verifies that the `loading` attribute is set to a valid input &
* is not used on priority images.
*/
function assertValidLoadingInput(dir) {
if (dir.loading && dir.priority) {
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952
/* RuntimeErrorCode.INVALID_INPUT */
, `${imgDirectiveDetails(dir.ngSrc)} the \`loading\` attribute ` + `was used on an image that was marked "priority". ` + `Setting \`loading\` on priority images is not allowed ` + `because these images will always be eagerly loaded. ` + `To fix this, remove the “loading” attribute from the priority image.`);
}
const validInputs = ['auto', 'eager', 'lazy'];
if (typeof dir.loading === 'string' && !validInputs.includes(dir.loading)) {
throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952
/* RuntimeErrorCode.INVALID_INPUT */
, `${imgDirectiveDetails(dir.ngSrc)} the \`loading\` attribute ` + `has an invalid value (\`${dir.loading}\`). ` + `To fix this, provide a valid value ("lazy", "eager", or "auto").`);
}
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// This file only reexports content of the `src` folder. Keep it that way.
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Generated bundle index. Do not edit.
*/
/***/ }),
/***/ 8784:
/*!********************************************************!*\
!*** ./node_modules/@angular/common/fesm2015/http.mjs ***!
\********************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "HTTP_INTERCEPTORS": () => (/* binding */ HTTP_INTERCEPTORS),
/* harmony export */ "HttpBackend": () => (/* binding */ HttpBackend),
/* harmony export */ "HttpClient": () => (/* binding */ HttpClient),
/* harmony export */ "HttpClientJsonpModule": () => (/* binding */ HttpClientJsonpModule),
/* harmony export */ "HttpClientModule": () => (/* binding */ HttpClientModule),
/* harmony export */ "HttpClientXsrfModule": () => (/* binding */ HttpClientXsrfModule),
/* harmony export */ "HttpContext": () => (/* binding */ HttpContext),
/* harmony export */ "HttpContextToken": () => (/* binding */ HttpContextToken),
/* harmony export */ "HttpErrorResponse": () => (/* binding */ HttpErrorResponse),
/* harmony export */ "HttpEventType": () => (/* binding */ HttpEventType),
/* harmony export */ "HttpHandler": () => (/* binding */ HttpHandler),
/* harmony export */ "HttpHeaderResponse": () => (/* binding */ HttpHeaderResponse),
/* harmony export */ "HttpHeaders": () => (/* binding */ HttpHeaders),
/* harmony export */ "HttpParams": () => (/* binding */ HttpParams),
/* harmony export */ "HttpRequest": () => (/* binding */ HttpRequest),
/* harmony export */ "HttpResponse": () => (/* binding */ HttpResponse),
/* harmony export */ "HttpResponseBase": () => (/* binding */ HttpResponseBase),
/* harmony export */ "HttpUrlEncodingCodec": () => (/* binding */ HttpUrlEncodingCodec),
/* harmony export */ "HttpXhrBackend": () => (/* binding */ HttpXhrBackend),
/* harmony export */ "HttpXsrfTokenExtractor": () => (/* binding */ HttpXsrfTokenExtractor),
/* harmony export */ "JsonpClientBackend": () => (/* binding */ JsonpClientBackend),
/* harmony export */ "JsonpInterceptor": () => (/* binding */ JsonpInterceptor),
/* harmony export */ "XhrFactory": () => (/* binding */ XhrFactory),
/* harmony export */ "ɵHttpInterceptingHandler": () => (/* binding */ HttpInterceptingHandler)
/* harmony export */ });
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common */ 6362);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 3184);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs */ 4139);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ 2378);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/operators */ 1133);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ 9151);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ 6942);
/**
* @license Angular v14.2.7
* (c) 2010-2022 Google LLC. https://angular.io/
* License: MIT
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a
* `HttpResponse`.
*
* `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the
* first interceptor in the chain, which dispatches to the second, etc, eventually reaching the
* `HttpBackend`.
*
* In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.
*
* @publicApi
*/
class HttpHandler {}
/**
* A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.
*
* Interceptors sit between the `HttpClient` interface and the `HttpBackend`.
*
* When injected, `HttpBackend` dispatches requests directly to the backend, without going
* through the interceptor chain.
*
* @publicApi
*/
class HttpBackend {}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Represents the header configuration options for an HTTP request.
* Instances are immutable. Modifying methods return a cloned
* instance with the change. The original object is never changed.
*
* @publicApi
*/
class HttpHeaders {
/** Constructs a new HTTP header object with the given values.*/
constructor(headers) {
/**
* Internal map of lowercased header names to the normalized
* form of the name (the form seen first).
*/
this.normalizedNames = new Map();
/**
* Queued updates to be materialized the next initialization.
*/
this.lazyUpdate = null;
if (!headers) {
this.headers = new Map();
} else if (typeof headers === 'string') {
this.lazyInit = () => {
this.headers = new Map();
headers.split('\n').forEach(line => {
const index = line.indexOf(':');
if (index > 0) {
const name = line.slice(0, index);
const key = name.toLowerCase();
const value = line.slice(index + 1).trim();
this.maybeSetNormalizedName(name, key);
if (this.headers.has(key)) {
this.headers.get(key).push(value);
} else {
this.headers.set(key, [value]);
}
}
});
};
} else {
this.lazyInit = () => {
if (typeof ngDevMode === 'undefined' || ngDevMode) {
assertValidHeaders(headers);
}
this.headers = new Map();
Object.keys(headers).forEach(name => {
let values = headers[name];
const key = name.toLowerCase();
if (typeof values === 'string') {
values = [values];
}
if (values.length > 0) {
this.headers.set(key, values);
this.maybeSetNormalizedName(name, key);
}
});
};
}
}
/**
* Checks for existence of a given header.
*
* @param name The header name to check for existence.
*
* @returns True if the header exists, false otherwise.
*/
has(name) {
this.init();
return this.headers.has(name.toLowerCase());
}
/**
* Retrieves the first value of a given header.
*
* @param name The header name.
*
* @returns The value string if the header exists, null otherwise
*/
get(name) {
this.init();
const values = this.headers.get(name.toLowerCase());
return values && values.length > 0 ? values[0] : null;
}
/**
* Retrieves the names of the headers.
*
* @returns A list of header names.
*/
keys() {
this.init();
return Array.from(this.normalizedNames.values());
}
/**
* Retrieves a list of values for a given header.
*
* @param name The header name from which to retrieve values.
*
* @returns A string of values if the header exists, null otherwise.
*/
getAll(name) {
this.init();
return this.headers.get(name.toLowerCase()) || null;
}
/**
* Appends a new value to the existing set of values for a header
* and returns them in a clone of the original instance.
*
* @param name The header name for which to append the values.
* @param value The value to append.
*
* @returns A clone of the HTTP headers object with the value appended to the given header.
*/
append(name, value) {
return this.clone({
name,
value,
op: 'a'
});
}
/**
* Sets or modifies a value for a given header in a clone of the original instance.
* If the header already exists, its value is replaced with the given value
* in the returned object.
*
* @param name The header name.
* @param value The value or values to set or override for the given header.
*
* @returns A clone of the HTTP headers object with the newly set header value.
*/
set(name, value) {
return this.clone({
name,
value,
op: 's'
});
}
/**
* Deletes values for a given header in a clone of the original instance.
*
* @param name The header name.
* @param value The value or values to delete for the given header.
*
* @returns A clone of the HTTP headers object with the given value deleted.
*/
delete(name, value) {
return this.clone({
name,
value,
op: 'd'
});
}
maybeSetNormalizedName(name, lcName) {
if (!this.normalizedNames.has(lcName)) {
this.normalizedNames.set(lcName, name);
}
}
init() {
if (!!this.lazyInit) {
if (this.lazyInit instanceof HttpHeaders) {
this.copyFrom(this.lazyInit);
} else {
this.lazyInit();
}
this.lazyInit = null;
if (!!this.lazyUpdate) {
this.lazyUpdate.forEach(update => this.applyUpdate(update));
this.lazyUpdate = null;
}
}
}
copyFrom(other) {
other.init();
Array.from(other.headers.keys()).forEach(key => {
this.headers.set(key, other.headers.get(key));
this.normalizedNames.set(key, other.normalizedNames.get(key));
});
}
clone(update) {
const clone = new HttpHeaders();
clone.lazyInit = !!this.lazyInit && this.lazyInit instanceof HttpHeaders ? this.lazyInit : this;
clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);
return clone;
}
applyUpdate(update) {
const key = update.name.toLowerCase();
switch (update.op) {
case 'a':
case 's':
let value = update.value;
if (typeof value === 'string') {
value = [value];
}
if (value.length === 0) {
return;
}
this.maybeSetNormalizedName(update.name, key);
const base = (update.op === 'a' ? this.headers.get(key) : undefined) || [];
base.push(...value);
this.headers.set(key, base);
break;
case 'd':
const toDelete = update.value;
if (!toDelete) {
this.headers.delete(key);
this.normalizedNames.delete(key);
} else {
let existing = this.headers.get(key);
if (!existing) {
return;
}
existing = existing.filter(value => toDelete.indexOf(value) === -1);
if (existing.length === 0) {
this.headers.delete(key);
this.normalizedNames.delete(key);
} else {
this.headers.set(key, existing);
}
}
break;
}
}
/**
* @internal
*/
forEach(fn) {
this.init();
Array.from(this.normalizedNames.keys()).forEach(key => fn(this.normalizedNames.get(key), this.headers.get(key)));
}
}
/**
* Verifies that the headers object has the right shape: the values
* must be either strings or arrays. Throws an error if an invalid
* header value is present.
*/
function assertValidHeaders(headers) {
for (const [key, value] of Object.entries(headers)) {
if (typeof value !== 'string' && !Array.isArray(value)) {
throw new Error(`Unexpected value of the \`${key}\` header provided. ` + `Expecting either a string or an array, but got: \`${value}\`.`);
}
}
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Provides encoding and decoding of URL parameter and query-string values.
*
* Serializes and parses URL parameter keys and values to encode and decode them.
* If you pass URL query parameters without encoding,
* the query parameters can be misinterpreted at the receiving end.
*
*
* @publicApi
*/
class HttpUrlEncodingCodec {
/**
* Encodes a key name for a URL parameter or query-string.
* @param key The key name.
* @returns The encoded key name.
*/
encodeKey(key) {
return standardEncoding(key);
}
/**
* Encodes the value of a URL parameter or query-string.
* @param value The value.
* @returns The encoded value.
*/
encodeValue(value) {
return standardEncoding(value);
}
/**
* Decodes an encoded URL parameter or query-string key.
* @param key The encoded key name.
* @returns The decoded key name.
*/
decodeKey(key) {
return decodeURIComponent(key);
}
/**
* Decodes an encoded URL parameter or query-string value.
* @param value The encoded value.
* @returns The decoded value.
*/
decodeValue(value) {
return decodeURIComponent(value);
}
}
function paramParser(rawParams, codec) {
const map = new Map();
if (rawParams.length > 0) {
// The `window.location.search` can be used while creating an instance of the `HttpParams` class
// (e.g. `new HttpParams({ fromString: window.location.search })`). The `window.location.search`
// may start with the `?` char, so we strip it if it's present.
const params = rawParams.replace(/^\?/, '').split('&');
params.forEach(param => {
const eqIdx = param.indexOf('=');
const [key, val] = eqIdx == -1 ? [codec.decodeKey(param), ''] : [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))];
const list = map.get(key) || [];
list.push(val);
map.set(key, list);
});
}
return map;
}
/**
* Encode input string with standard encodeURIComponent and then un-encode specific characters.
*/
const STANDARD_ENCODING_REGEX = /%(\d[a-f0-9])/gi;
const STANDARD_ENCODING_REPLACEMENTS = {
'40': '@',
'3A': ':',
'24': '$',
'2C': ',',
'3B': ';',
'3D': '=',
'3F': '?',
'2F': '/'
};
function standardEncoding(v) {
return encodeURIComponent(v).replace(STANDARD_ENCODING_REGEX, (s, t) => {
var _a;
return (_a = STANDARD_ENCODING_REPLACEMENTS[t]) !== null && _a !== void 0 ? _a : s;
});
}
function valueToString(value) {
return `${value}`;
}
/**
* An HTTP request/response body that represents serialized parameters,
* per the MIME type `application/x-www-form-urlencoded`.
*
* This class is immutable; all mutation operations return a new instance.
*
* @publicApi
*/
class HttpParams {
constructor(options = {}) {
this.updates = null;
this.cloneFrom = null;
this.encoder = options.encoder || new HttpUrlEncodingCodec();
if (!!options.fromString) {
if (!!options.fromObject) {
throw new Error(`Cannot specify both fromString and fromObject.`);
}
this.map = paramParser(options.fromString, this.encoder);
} else if (!!options.fromObject) {
this.map = new Map();
Object.keys(options.fromObject).forEach(key => {
const value = options.fromObject[key]; // convert the values to strings
const values = Array.isArray(value) ? value.map(valueToString) : [valueToString(value)];
this.map.set(key, values);
});
} else {
this.map = null;
}
}
/**
* Reports whether the body includes one or more values for a given parameter.
* @param param The parameter name.
* @returns True if the parameter has one or more values,
* false if it has no value or is not present.
*/
has(param) {
this.init();
return this.map.has(param);
}
/**
* Retrieves the first value for a parameter.
* @param param The parameter name.
* @returns The first value of the given parameter,
* or `null` if the parameter is not present.
*/
get(param) {
this.init();
const res = this.map.get(param);
return !!res ? res[0] : null;
}
/**
* Retrieves all values for a parameter.
* @param param The parameter name.
* @returns All values in a string array,
* or `null` if the parameter not present.
*/
getAll(param) {
this.init();
return this.map.get(param) || null;
}
/**
* Retrieves all the parameters for this body.
* @returns The parameter names in a string array.
*/
keys() {
this.init();
return Array.from(this.map.keys());
}
/**
* Appends a new value to existing values for a parameter.
* @param param The parameter name.
* @param value The new value to add.
* @return A new body with the appended value.
*/
append(param, value) {
return this.clone({
param,
value,
op: 'a'
});
}
/**
* Constructs a new body with appended values for the given parameter name.
* @param params parameters and values
* @return A new body with the new value.
*/
appendAll(params) {
const updates = [];
Object.keys(params).forEach(param => {
const value = params[param];
if (Array.isArray(value)) {
value.forEach(_value => {
updates.push({
param,
value: _value,
op: 'a'
});
});
} else {
updates.push({
param,
value: value,
op: 'a'
});
}
});
return this.clone(updates);
}
/**
* Replaces the value for a parameter.
* @param param The parameter name.
* @param value The new value.
* @return A new body with the new value.
*/
set(param, value) {
return this.clone({
param,
value,
op: 's'
});
}
/**
* Removes a given value or all values from a parameter.
* @param param The parameter name.
* @param value The value to remove, if provided.
* @return A new body with the given value removed, or with all values
* removed if no value is specified.
*/
delete(param, value) {
return this.clone({
param,
value,
op: 'd'
});
}
/**
* Serializes the body to an encoded string, where key-value pairs (separated by `=`) are
* separated by `&`s.
*/
toString() {
this.init();
return this.keys().map(key => {
const eKey = this.encoder.encodeKey(key); // `a: ['1']` produces `'a=1'`
// `b: []` produces `''`
// `c: ['1', '2']` produces `'c=1&c=2'`
return this.map.get(key).map(value => eKey + '=' + this.encoder.encodeValue(value)).join('&');
}) // filter out empty values because `b: []` produces `''`
// which results in `a=1&&c=1&c=2` instead of `a=1&c=1&c=2` if we don't
.filter(param => param !== '').join('&');
}
clone(update) {
const clone = new HttpParams({
encoder: this.encoder
});
clone.cloneFrom = this.cloneFrom || this;
clone.updates = (this.updates || []).concat(update);
return clone;
}
init() {
if (this.map === null) {
this.map = new Map();
}
if (this.cloneFrom !== null) {
this.cloneFrom.init();
this.cloneFrom.keys().forEach(key => this.map.set(key, this.cloneFrom.map.get(key)));
this.updates.forEach(update => {
switch (update.op) {
case 'a':
case 's':
const base = (update.op === 'a' ? this.map.get(update.param) : undefined) || [];
base.push(valueToString(update.value));
this.map.set(update.param, base);
break;
case 'd':
if (update.value !== undefined) {
let base = this.map.get(update.param) || [];
const idx = base.indexOf(valueToString(update.value));
if (idx !== -1) {
base.splice(idx, 1);
}
if (base.length > 0) {
this.map.set(update.param, base);
} else {
this.map.delete(update.param);
}
} else {
this.map.delete(update.param);
break;
}
}
});
this.cloneFrom = this.updates = null;
}
}
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* A token used to manipulate and access values stored in `HttpContext`.
*
* @publicApi
*/
class HttpContextToken {
constructor(defaultValue) {
this.defaultValue = defaultValue;
}
}
/**
* Http context stores arbitrary user defined values and ensures type safety without
* actually knowing the types. It is backed by a `Map` and guarantees that keys do not clash.
*
* This context is mutable and is shared between cloned requests unless explicitly specified.
*
* @usageNotes
*
* ### Usage Example
*
* ```typescript
* // inside cache.interceptors.ts
* export const IS_CACHE_ENABLED = new HttpContextToken(() => false);
*
* export class CacheInterceptor implements HttpInterceptor {
*
* intercept(req: HttpRequest, delegate: HttpHandler): Observable> {
* if (req.context.get(IS_CACHE_ENABLED) === true) {
* return ...;
* }
* return delegate.handle(req);
* }
* }
*
* // inside a service
*
* this.httpClient.get('/api/weather', {
* context: new HttpContext().set(IS_CACHE_ENABLED, true)
* }).subscribe(...);
* ```
*
* @publicApi
*/
class HttpContext {
constructor() {
this.map = new Map();
}
/**
* Store a value in the context. If a value is already present it will be overwritten.
*
* @param token The reference to an instance of `HttpContextToken`.
* @param value The value to store.
*
* @returns A reference to itself for easy chaining.
*/
set(token, value) {
this.map.set(token, value);
return this;
}
/**
* Retrieve the value associated with the given token.
*
* @param token The reference to an instance of `HttpContextToken`.
*
* @returns The stored value or default if one is defined.
*/
get(token) {
if (!this.map.has(token)) {
this.map.set(token, token.defaultValue());
}
return this.map.get(token);
}
/**
* Delete the value associated with the given token.
*
* @param token The reference to an instance of `HttpContextToken`.
*
* @returns A reference to itself for easy chaining.
*/
delete(token) {
this.map.delete(token);
return this;
}
/**
* Checks for existence of a given token.
*
* @param token The reference to an instance of `HttpContextToken`.
*
* @returns True if the token exists, false otherwise.
*/
has(token) {
return this.map.has(token);
}
/**
* @returns a list of tokens currently stored in the context.
*/
keys() {
return this.map.keys();
}
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Determine whether the given HTTP method may include a body.
*/
function mightHaveBody(method) {
switch (method) {
case 'DELETE':
case 'GET':
case 'HEAD':
case 'OPTIONS':
case 'JSONP':
return false;
default:
return true;
}
}
/**
* Safely assert whether the given value is an ArrayBuffer.
*
* In some execution environments ArrayBuffer is not defined.
*/
function isArrayBuffer(value) {
return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;
}
/**
* Safely assert whether the given value is a Blob.
*
* In some execution environments Blob is not defined.
*/
function isBlob(value) {
return typeof Blob !== 'undefined' && value instanceof Blob;
}
/**
* Safely assert whether the given value is a FormData instance.
*
* In some execution environments FormData is not defined.
*/
function isFormData(value) {
return typeof FormData !== 'undefined' && value instanceof FormData;
}
/**
* Safely assert whether the given value is a URLSearchParams instance.
*
* In some execution environments URLSearchParams is not defined.
*/
function isUrlSearchParams(value) {
return typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams;
}
/**
* An outgoing HTTP request with an optional typed body.
*
* `HttpRequest` represents an outgoing request, including URL, method,
* headers, body, and other request configuration options. Instances should be
* assumed to be immutable. To modify a `HttpRequest`, the `clone`
* method should be used.
*
* @publicApi
*/
class HttpRequest {
constructor(method, url, third, fourth) {
this.url = url;
/**
* The request body, or `null` if one isn't set.
*
* Bodies are not enforced to be immutable, as they can include a reference to any
* user-defined data type. However, interceptors should take care to preserve
* idempotence by treating them as such.
*/
this.body = null;
/**
* Whether this request should be made in a way that exposes progress events.
*
* Progress events are expensive (change detection runs on each event) and so
* they should only be requested if the consumer intends to monitor them.
*/
this.reportProgress = false;
/**
* Whether this request should be sent with outgoing credentials (cookies).
*/
this.withCredentials = false;
/**
* The expected response type of the server.
*
* This is used to parse the response appropriately before returning it to
* the requestee.
*/
this.responseType = 'json';
this.method = method.toUpperCase(); // Next, need to figure out which argument holds the HttpRequestInit
// options, if any.
let options; // Check whether a body argument is expected. The only valid way to omit
// the body argument is to use a known no-body method like GET.
if (mightHaveBody(this.method) || !!fourth) {
// Body is the third argument, options are the fourth.
this.body = third !== undefined ? third : null;
options = fourth;
} else {
// No body required, options are the third argument. The body stays null.
options = third;
} // If options have been passed, interpret them.
if (options) {
// Normalize reportProgress and withCredentials.
this.reportProgress = !!options.reportProgress;
this.withCredentials = !!options.withCredentials; // Override default response type of 'json' if one is provided.
if (!!options.responseType) {
this.responseType = options.responseType;
} // Override headers if they're provided.
if (!!options.headers) {
this.headers = options.headers;
}
if (!!options.context) {
this.context = options.context;
}
if (!!options.params) {
this.params = options.params;
}
} // If no headers have been passed in, construct a new HttpHeaders instance.
if (!this.headers) {
this.headers = new HttpHeaders();
} // If no context have been passed in, construct a new HttpContext instance.
if (!this.context) {
this.context = new HttpContext();
} // If no parameters have been passed in, construct a new HttpUrlEncodedParams instance.
if (!this.params) {
this.params = new HttpParams();
this.urlWithParams = url;
} else {
// Encode the parameters to a string in preparation for inclusion in the URL.
const params = this.params.toString();
if (params.length === 0) {
// No parameters, the visible URL is just the URL given at creation time.
this.urlWithParams = url;
} else {
// Does the URL already have query parameters? Look for '?'.
const qIdx = url.indexOf('?'); // There are 3 cases to handle:
// 1) No existing parameters -> append '?' followed by params.
// 2) '?' exists and is followed by existing query string ->
// append '&' followed by params.
// 3) '?' exists at the end of the url -> append params directly.
// This basically amounts to determining the character, if any, with
// which to join the URL and parameters.
const sep = qIdx === -1 ? '?' : qIdx < url.length - 1 ? '&' : '';
this.urlWithParams = url + sep + params;
}
}
}
/**
* Transform the free-form body into a serialized format suitable for
* transmission to the server.
*/
serializeBody() {
// If no body is present, no need to serialize it.
if (this.body === null) {
return null;
} // Check whether the body is already in a serialized form. If so,
// it can just be returned directly.
if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) || isUrlSearchParams(this.body) || typeof this.body === 'string') {
return this.body;
} // Check whether the body is an instance of HttpUrlEncodedParams.
if (this.body instanceof HttpParams) {
return this.body.toString();
} // Check whether the body is an object or array, and serialize with JSON if so.
if (typeof this.body === 'object' || typeof this.body === 'boolean' || Array.isArray(this.body)) {
return JSON.stringify(this.body);
} // Fall back on toString() for everything else.
return this.body.toString();
}
/**
* Examine the body and attempt to infer an appropriate MIME type
* for it.
*
* If no such type can be inferred, this method will return `null`.
*/
detectContentTypeHeader() {
// An empty body has no content type.
if (this.body === null) {
return null;
} // FormData bodies rely on the browser's content type assignment.
if (isFormData(this.body)) {
return null;
} // Blobs usually have their own content type. If it doesn't, then
// no type can be inferred.
if (isBlob(this.body)) {
return this.body.type || null;
} // Array buffers have unknown contents and thus no type can be inferred.
if (isArrayBuffer(this.body)) {
return null;
} // Technically, strings could be a form of JSON data, but it's safe enough
// to assume they're plain strings.
if (typeof this.body === 'string') {
return 'text/plain';
} // `HttpUrlEncodedParams` has its own content-type.
if (this.body instanceof HttpParams) {
return 'application/x-www-form-urlencoded;charset=UTF-8';
} // Arrays, objects, boolean and numbers will be encoded as JSON.
if (typeof this.body === 'object' || typeof this.body === 'number' || typeof this.body === 'boolean') {
return 'application/json';
} // No type could be inferred.
return null;
}
clone(update = {}) {
var _a; // For method, url, and responseType, take the current value unless
// it is overridden in the update hash.
const method = update.method || this.method;
const url = update.url || this.url;
const responseType = update.responseType || this.responseType; // The body is somewhat special - a `null` value in update.body means
// whatever current body is present is being overridden with an empty
// body, whereas an `undefined` value in update.body implies no
// override.
const body = update.body !== undefined ? update.body : this.body; // Carefully handle the boolean options to differentiate between
// `false` and `undefined` in the update args.
const withCredentials = update.withCredentials !== undefined ? update.withCredentials : this.withCredentials;
const reportProgress = update.reportProgress !== undefined ? update.reportProgress : this.reportProgress; // Headers and params may be appended to if `setHeaders` or
// `setParams` are used.
let headers = update.headers || this.headers;
let params = update.params || this.params; // Pass on context if needed
const context = (_a = update.context) !== null && _a !== void 0 ? _a : this.context; // Check whether the caller has asked to add headers.
if (update.setHeaders !== undefined) {
// Set every requested header.
headers = Object.keys(update.setHeaders).reduce((headers, name) => headers.set(name, update.setHeaders[name]), headers);
} // Check whether the caller has asked to set params.
if (update.setParams) {
// Set every requested param.
params = Object.keys(update.setParams).reduce((params, param) => params.set(param, update.setParams[param]), params);
} // Finally, construct the new HttpRequest using the pieces from above.
return new HttpRequest(method, url, body, {
params,
headers,
context,
reportProgress,
responseType,
withCredentials
});
}
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Type enumeration for the different kinds of `HttpEvent`.
*
* @publicApi
*/
var HttpEventType;
(function (HttpEventType) {
/**
* The request was sent out over the wire.
*/
HttpEventType[HttpEventType["Sent"] = 0] = "Sent";
/**
* An upload progress event was received.
*/
HttpEventType[HttpEventType["UploadProgress"] = 1] = "UploadProgress";
/**
* The response status code and headers were received.
*/
HttpEventType[HttpEventType["ResponseHeader"] = 2] = "ResponseHeader";
/**
* A download progress event was received.
*/
HttpEventType[HttpEventType["DownloadProgress"] = 3] = "DownloadProgress";
/**
* The full response including the body was received.
*/
HttpEventType[HttpEventType["Response"] = 4] = "Response";
/**
* A custom event from an interceptor or a backend.
*/
HttpEventType[HttpEventType["User"] = 5] = "User";
})(HttpEventType || (HttpEventType = {}));
/**
* Base class for both `HttpResponse` and `HttpHeaderResponse`.
*
* @publicApi
*/
class HttpResponseBase {
/**
* Super-constructor for all responses.
*
* The single parameter accepted is an initialization hash. Any properties
* of the response passed there will override the default values.
*/
constructor(init, defaultStatus = 200
/* HttpStatusCode.Ok */
, defaultStatusText = 'OK') {
// If the hash has values passed, use them to initialize the response.
// Otherwise use the default values.
this.headers = init.headers || new HttpHeaders();
this.status = init.status !== undefined ? init.status : defaultStatus;
this.statusText = init.statusText || defaultStatusText;
this.url = init.url || null; // Cache the ok value to avoid defining a getter.
this.ok = this.status >= 200 && this.status < 300;
}
}
/**
* A partial HTTP response which only includes the status and header data,
* but no response body.
*
* `HttpHeaderResponse` is a `HttpEvent` available on the response
* event stream, only when progress events are requested.
*
* @publicApi
*/
class HttpHeaderResponse extends HttpResponseBase {
/**
* Create a new `HttpHeaderResponse` with the given parameters.
*/
constructor(init = {}) {
super(init);
this.type = HttpEventType.ResponseHeader;
}
/**
* Copy this `HttpHeaderResponse`, overriding its contents with the
* given parameter hash.
*/
clone(update = {}) {
// Perform a straightforward initialization of the new HttpHeaderResponse,
// overriding the current parameters with new ones if given.
return new HttpHeaderResponse({
headers: update.headers || this.headers,
status: update.status !== undefined ? update.status : this.status,
statusText: update.statusText || this.statusText,
url: update.url || this.url || undefined
});
}
}
/**
* A full HTTP response, including a typed response body (which may be `null`
* if one was not returned).
*
* `HttpResponse` is a `HttpEvent` available on the response event
* stream.
*
* @publicApi
*/
class HttpResponse extends HttpResponseBase {
/**
* Construct a new `HttpResponse`.
*/
constructor(init = {}) {
super(init);
this.type = HttpEventType.Response;
this.body = init.body !== undefined ? init.body : null;
}
clone(update = {}) {
return new HttpResponse({
body: update.body !== undefined ? update.body : this.body,
headers: update.headers || this.headers,
status: update.status !== undefined ? update.status : this.status,
statusText: update.statusText || this.statusText,
url: update.url || this.url || undefined
});
}
}
/**
* A response that represents an error or failure, either from a
* non-successful HTTP status, an error while executing the request,
* or some other failure which occurred during the parsing of the response.
*
* Any error returned on the `Observable` response stream will be
* wrapped in an `HttpErrorResponse` to provide additional context about
* the state of the HTTP layer when the error occurred. The error property
* will contain either a wrapped Error object or the error response returned
* from the server.
*
* @publicApi
*/
class HttpErrorResponse extends HttpResponseBase {
constructor(init) {
// Initialize with a default status of 0 / Unknown Error.
super(init, 0, 'Unknown Error');
this.name = 'HttpErrorResponse';
/**
* Errors are never okay, even when the status code is in the 2xx success range.
*/
this.ok = false; // If the response was successful, then this was a parse error. Otherwise, it was
// a protocol-level failure of some sort. Either the request failed in transit
// or the server returned an unsuccessful status code.
if (this.status >= 200 && this.status < 300) {
this.message = `Http failure during parsing for ${init.url || '(unknown url)'}`;
} else {
this.message = `Http failure response for ${init.url || '(unknown url)'}: ${init.status} ${init.statusText}`;
}
this.error = init.error || null;
}
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Constructs an instance of `HttpRequestOptions` from a source `HttpMethodOptions` and
* the given `body`. This function clones the object and adds the body.
*
* Note that the `responseType` *options* value is a String that identifies the
* single data type of the response.
* A single overload version of the method handles each response type.
* The value of `responseType` cannot be a union, as the combined signature could imply.
*
*/
function addBody(options, body) {
return {
body,
headers: options.headers,
context: options.context,
observe: options.observe,
params: options.params,
reportProgress: options.reportProgress,
responseType: options.responseType,
withCredentials: options.withCredentials
};
}
/**
* Performs HTTP requests.
* This service is available as an injectable class, with methods to perform HTTP requests.
* Each request method has multiple signatures, and the return type varies based on
* the signature that is called (mainly the values of `observe` and `responseType`).
*
* Note that the `responseType` *options* value is a String that identifies the
* single data type of the response.
* A single overload version of the method handles each response type.
* The value of `responseType` cannot be a union, as the combined signature could imply.
*
* @usageNotes
* Sample HTTP requests for the [Tour of Heroes](/tutorial/toh-pt0) application.
*
* ### HTTP Request Example
*
* ```
* // GET heroes whose name contains search term
* searchHeroes(term: string): observable{
*
* const params = new HttpParams({fromString: 'name=term'});
* return this.httpClient.request('GET', this.heroesUrl, {responseType:'json', params});
* }
* ```
*
* Alternatively, the parameter string can be used without invoking HttpParams
* by directly joining to the URL.
* ```
* this.httpClient.request('GET', this.heroesUrl + '?' + 'name=term', {responseType:'json'});
* ```
*
*
* ### JSONP Example
* ```
* requestJsonp(url, callback = 'callback') {
* return this.httpClient.jsonp(this.heroesURL, callback);
* }
* ```
*
* ### PATCH Example
* ```
* // PATCH one of the heroes' name
* patchHero (id: number, heroName: string): Observable<{}> {
* const url = `${this.heroesUrl}/${id}`; // PATCH api/heroes/42
* return this.httpClient.patch(url, {name: heroName}, httpOptions)
* .pipe(catchError(this.handleError('patchHero')));
* }
* ```
*
* @see [HTTP Guide](guide/http)
* @see [HTTP Request](api/common/http/HttpRequest)
*
* @publicApi
*/
class HttpClient {
constructor(handler) {
this.handler = handler;
}
/**
* Constructs an observable for a generic HTTP request that, when subscribed,
* fires the request through the chain of registered interceptors and on to the
* server.
*
* You can pass an `HttpRequest` directly as the only parameter. In this case,
* the call returns an observable of the raw `HttpEvent` stream.
*
* Alternatively you can pass an HTTP method as the first parameter,
* a URL string as the second, and an options hash containing the request body as the third.
* See `addBody()`. In this case, the specified `responseType` and `observe` options determine the
* type of returned observable.
* * The `responseType` value determines how a successful response body is parsed.
* * If `responseType` is the default `json`, you can pass a type interface for the resulting
* object as a type parameter to the call.
*
* The `observe` value determines the return type, according to what you are interested in
* observing.
* * An `observe` value of events returns an observable of the raw `HttpEvent` stream, including
* progress events by default.
* * An `observe` value of response returns an observable of `HttpResponse`,
* where the `T` parameter depends on the `responseType` and any optionally provided type
* parameter.
* * An `observe` value of body returns an observable of `` with the same `T` body type.
*
*/
request(first, url, options = {}) {
let req; // First, check whether the primary argument is an instance of `HttpRequest`.
if (first instanceof HttpRequest) {
// It is. The other arguments must be undefined (per the signatures) and can be
// ignored.
req = first;
} else {
// It's a string, so it represents a URL. Construct a request based on it,
// and incorporate the remaining arguments (assuming `GET` unless a method is
// provided.
// Figure out the headers.
let headers = undefined;
if (options.headers instanceof HttpHeaders) {
headers = options.headers;
} else {
headers = new HttpHeaders(options.headers);
} // Sort out parameters.
let params = undefined;
if (!!options.params) {
if (options.params instanceof HttpParams) {
params = options.params;
} else {
params = new HttpParams({
fromObject: options.params
});
}
} // Construct the request.
req = new HttpRequest(first, url, options.body !== undefined ? options.body : null, {
headers,
context: options.context,
params,
reportProgress: options.reportProgress,
// By default, JSON is assumed to be returned for all calls.
responseType: options.responseType || 'json',
withCredentials: options.withCredentials
});
} // Start with an Observable.of() the initial request, and run the handler (which
// includes all interceptors) inside a concatMap(). This way, the handler runs
// inside an Observable chain, which causes interceptors to be re-run on every
// subscription (this also makes retries re-run the handler, including interceptors).
const events$ = (0,rxjs__WEBPACK_IMPORTED_MODULE_0__.of)(req).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_1__.concatMap)(req => this.handler.handle(req))); // If coming via the API signature which accepts a previously constructed HttpRequest,
// the only option is to get the event stream. Otherwise, return the event stream if
// that is what was requested.
if (first instanceof HttpRequest || options.observe === 'events') {
return events$;
} // The requested stream contains either the full response or the body. In either
// case, the first step is to filter the event stream to extract a stream of
// responses(s).
const res$ = events$.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.filter)(event => event instanceof HttpResponse)); // Decide which stream to return.
switch (options.observe || 'body') {
case 'body':
// The requested stream is the body. Map the response stream to the response
// body. This could be done more simply, but a misbehaving interceptor might
// transform the response body into a different format and ignore the requested
// responseType. Guard against this by validating that the response is of the
// requested type.
switch (req.responseType) {
case 'arraybuffer':
return res$.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.map)(res => {
// Validate that the body is an ArrayBuffer.
if (res.body !== null && !(res.body instanceof ArrayBuffer)) {
throw new Error('Response is not an ArrayBuffer.');
}
return res.body;
}));
case 'blob':
return res$.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.map)(res => {
// Validate that the body is a Blob.
if (res.body !== null && !(res.body instanceof Blob)) {
throw new Error('Response is not a Blob.');
}
return res.body;
}));
case 'text':
return res$.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.map)(res => {
// Validate that the body is a string.
if (res.body !== null && typeof res.body !== 'string') {
throw new Error('Response is not a string.');
}
return res.body;
}));
case 'json':
default:
// No validation needed for JSON responses, as they can be of any type.
return res$.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.map)(res => res.body));
}
case 'response':
// The response stream was requested directly, so return it.
return res$;
default:
// Guard against new future observe types being added.
throw new Error(`Unreachable: unhandled observe type ${options.observe}}`);
}
}
/**
* Constructs an observable that, when subscribed, causes the configured
* `DELETE` request to execute on the server. See the individual overloads for
* details on the return type.
*
* @param url The endpoint URL.
* @param options The HTTP options to send with the request.
*
*/
delete(url, options = {}) {
return this.request('DELETE', url, options);
}
/**
* Constructs an observable that, when subscribed, causes the configured
* `GET` request to execute on the server. See the individual overloads for
* details on the return type.
*/
get(url, options = {}) {
return this.request('GET', url, options);
}
/**
* Constructs an observable that, when subscribed, causes the configured
* `HEAD` request to execute on the server. The `HEAD` method returns
* meta information about the resource without transferring the
* resource itself. See the individual overloads for
* details on the return type.
*/
head(url, options = {}) {
return this.request('HEAD', url, options);
}
/**
* Constructs an `Observable` that, when subscribed, causes a request with the special method
* `JSONP` to be dispatched via the interceptor pipeline.
* The [JSONP pattern](https://en.wikipedia.org/wiki/JSONP) works around limitations of certain
* API endpoints that don't support newer,
* and preferable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) protocol.
* JSONP treats the endpoint API as a JavaScript file and tricks the browser to process the
* requests even if the API endpoint is not located on the same domain (origin) as the client-side
* application making the request.
* The endpoint API must support JSONP callback for JSONP requests to work.
* The resource API returns the JSON response wrapped in a callback function.
* You can pass the callback function name as one of the query parameters.
* Note that JSONP requests can only be used with `GET` requests.
*
* @param url The resource URL.
* @param callbackParam The callback function name.
*
*/
jsonp(url, callbackParam) {
return this.request('JSONP', url, {
params: new HttpParams().append(callbackParam, 'JSONP_CALLBACK'),
observe: 'body',
responseType: 'json'
});
}
/**
* Constructs an `Observable` that, when subscribed, causes the configured
* `OPTIONS` request to execute on the server. This method allows the client
* to determine the supported HTTP methods and other capabilities of an endpoint,
* without implying a resource action. See the individual overloads for
* details on the return type.
*/
options(url, options = {}) {
return this.request('OPTIONS', url, options);
}
/**
* Constructs an observable that, when subscribed, causes the configured
* `PATCH` request to execute on the server. See the individual overloads for
* details on the return type.
*/
patch(url, body, options = {}) {
return this.request('PATCH', url, addBody(options, body));
}
/**
* Constructs an observable that, when subscribed, causes the configured
* `POST` request to execute on the server. The server responds with the location of
* the replaced resource. See the individual overloads for
* details on the return type.
*/
post(url, body, options = {}) {
return this.request('POST', url, addBody(options, body));
}
/**
* Constructs an observable that, when subscribed, causes the configured
* `PUT` request to execute on the server. The `PUT` method replaces an existing resource
* with a new set of values.
* See the individual overloads for details on the return type.
*/
put(url, body, options = {}) {
return this.request('PUT', url, addBody(options, body));
}
}
HttpClient.ɵfac = function HttpClient_Factory(t) {
return new (t || HttpClient)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](HttpHandler));
};
HttpClient.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({
token: HttpClient,
factory: HttpClient.ɵfac
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](HttpClient, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Injectable
}], function () {
return [{
type: HttpHandler
}];
}, null);
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`.
*
*
*/
class HttpInterceptorHandler {
constructor(next, interceptor) {
this.next = next;
this.interceptor = interceptor;
}
handle(req) {
return this.interceptor.intercept(req, this.next);
}
}
/**
* A multi-provider token that represents the array of registered
* `HttpInterceptor` objects.
*
* @publicApi
*/
const HTTP_INTERCEPTORS = new _angular_core__WEBPACK_IMPORTED_MODULE_4__.InjectionToken('HTTP_INTERCEPTORS');
class NoopInterceptor {
intercept(req, next) {
return next.handle(req);
}
}
NoopInterceptor.ɵfac = function NoopInterceptor_Factory(t) {
return new (t || NoopInterceptor)();
};
NoopInterceptor.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({
token: NoopInterceptor,
factory: NoopInterceptor.ɵfac
});
(function () {
(typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](NoopInterceptor, [{
type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Injectable
}], null, null);
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// Every request made through JSONP needs a callback name that's unique across the
// whole page. Each request is assigned an id and the callback name is constructed
// from that. The next id to be assigned is tracked in a global variable here that
// is shared among all applications on the page.
let nextRequestId = 0;
/**
* When a pending