@haiilo/catalyst 0.2.1 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalyst/catalyst.css +1 -1
- package/dist/catalyst/catalyst.esm.js +2 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -0
- package/dist/catalyst/index.esm.js +2 -0
- package/dist/catalyst/index.esm.js.map +1 -0
- package/dist/catalyst/p-31b500c7.entry.js +10 -0
- package/dist/catalyst/p-31b500c7.entry.js.map +1 -0
- package/dist/catalyst/p-ed826597.js +2 -0
- package/dist/catalyst/p-ed826597.js.map +1 -0
- package/dist/catalyst/p-ef0a8ae9.js +2 -0
- package/dist/catalyst/p-ef0a8ae9.js.map +1 -0
- package/dist/catalyst/p-f151cb13.js +2 -0
- package/dist/catalyst/p-f151cb13.js.map +1 -0
- package/dist/cjs/{app-globals-814f34aa.js → app-globals-7f2b1f8e.js} +39 -1
- package/dist/cjs/app-globals-7f2b1f8e.js.map +1 -0
- package/dist/cjs/{cat-alert_7.cjs.entry.js → cat-alert_8.cjs.entry.js} +1370 -35
- package/dist/cjs/cat-alert_8.cjs.entry.js.map +1 -0
- package/dist/cjs/cat-icon-registry-850c538c.js +47 -0
- package/dist/cjs/cat-icon-registry-850c538c.js.map +1 -0
- package/dist/cjs/catalyst.cjs.js +7 -4
- package/dist/cjs/catalyst.cjs.js.map +1 -0
- package/dist/cjs/{cat-icon-registry-909e38e7.js → index-c0881ae0.js} +6 -43
- package/dist/cjs/index-c0881ae0.js.map +1 -0
- package/dist/cjs/index.cjs.js +9 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +7 -4
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/cat-alert/cat-alert.js +1 -0
- package/dist/collection/components/cat-alert/cat-alert.js.map +1 -0
- package/dist/collection/components/cat-badge/cat-badge.css +4 -4
- package/dist/collection/components/cat-badge/cat-badge.js +1 -0
- package/dist/collection/components/cat-badge/cat-badge.js.map +1 -0
- package/dist/collection/components/cat-button/cat-button.css +12 -8
- package/dist/collection/components/cat-button/cat-button.js +1 -0
- package/dist/collection/components/cat-button/cat-button.js.map +1 -0
- package/dist/collection/components/cat-icon/cat-icon-registry.js +1 -0
- package/dist/collection/components/cat-icon/cat-icon-registry.js.map +1 -0
- package/dist/collection/components/cat-icon/cat-icon.js +1 -0
- package/dist/collection/components/cat-icon/cat-icon.js.map +1 -0
- package/dist/collection/components/cat-menu/cat-menu.js +1 -0
- package/dist/collection/components/cat-menu/cat-menu.js.map +1 -0
- package/dist/collection/components/cat-scrollable/cat-scrollable.css +69 -0
- package/dist/collection/components/cat-scrollable/cat-scrollable.js +309 -0
- package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -0
- package/dist/collection/components/cat-skeleton/cat-skeleton.js +1 -0
- package/dist/collection/components/cat-skeleton/cat-skeleton.js.map +1 -0
- package/dist/collection/components/cat-spinner/cat-spinner.js +1 -0
- package/dist/collection/components/cat-spinner/cat-spinner.js.map +1 -0
- package/dist/collection/index.js +2 -1
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/init.js +1 -0
- package/dist/collection/init.js.map +1 -0
- package/dist/collection/utils/breakpoints.js +1 -0
- package/dist/collection/utils/breakpoints.js.map +1 -0
- package/dist/collection/utils/media-matcher.js +1 -0
- package/dist/collection/utils/media-matcher.js.map +1 -0
- package/dist/collection/utils/platform.js +1 -0
- package/dist/collection/utils/platform.js.map +1 -0
- package/dist/collection/utils/utils.js +1 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/components/cat-alert.js +2 -0
- package/dist/components/cat-alert.js.map +1 -0
- package/dist/components/cat-badge.js +3 -1
- package/dist/components/cat-badge.js.map +1 -0
- package/dist/components/cat-button.js +3 -1
- package/dist/components/cat-button.js.map +1 -0
- package/dist/components/cat-icon-registry.js +2 -0
- package/dist/components/cat-icon-registry.js.map +1 -0
- package/dist/components/cat-icon.js +2 -0
- package/dist/components/cat-icon.js.map +1 -0
- package/dist/components/cat-icon2.js +2 -0
- package/dist/components/cat-icon2.js.map +1 -0
- package/dist/components/cat-menu.js +6 -5
- package/dist/components/cat-menu.js.map +1 -0
- package/dist/components/cat-scrollable.d.ts +11 -0
- package/dist/components/cat-scrollable.js +1363 -0
- package/dist/components/cat-scrollable.js.map +1 -0
- package/dist/components/cat-skeleton.js +2 -0
- package/dist/components/cat-skeleton.js.map +1 -0
- package/dist/components/cat-spinner.js +2 -0
- package/dist/components/cat-spinner.js.map +1 -0
- package/dist/components/cat-spinner2.js +2 -0
- package/dist/components/cat-spinner2.js.map +1 -0
- package/dist/components/index.js +39 -0
- package/dist/components/index.js.map +1 -0
- package/dist/esm/{app-globals-e1679c2d.js → app-globals-8af9b2cf.js} +39 -1
- package/dist/esm/app-globals-8af9b2cf.js.map +1 -0
- package/dist/esm/{cat-alert_7.entry.js → cat-alert_8.entry.js} +1343 -9
- package/dist/esm/cat-alert_8.entry.js.map +1 -0
- package/dist/esm/cat-icon-registry-59da2e37.js +45 -0
- package/dist/esm/cat-icon-registry-59da2e37.js.map +1 -0
- package/dist/esm/catalyst.js +6 -3
- package/dist/esm/catalyst.js.map +1 -0
- package/dist/esm/{cat-icon-registry-4d02ee6c.js → index-0ff35bca.js} +5 -42
- package/dist/esm/index-0ff35bca.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +6 -3
- package/dist/esm/loader.js.map +1 -0
- package/dist/types/components/cat-scrollable/cat-scrollable.d.ts +50 -0
- package/dist/types/components.d.ts +85 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +12 -16
- package/dist/catalyst/p-22fac0fb.js +0 -1
- package/dist/catalyst/p-2dc28db3.entry.js +0 -11
- package/dist/catalyst/p-e08f13c7.js +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, c as createEvent,
|
|
1
|
+
import { r as registerInstance, h, c as createEvent, H as Host, g as getElement } from './index-0ff35bca.js';
|
|
2
|
+
import { C as CatIconRegistry } from './cat-icon-registry-59da2e37.js';
|
|
2
3
|
|
|
3
4
|
const catAlertCss = ":host{display:block;margin-bottom:1rem}:host([hidden]){display:none}.cat-alert{font:inherit;color:rgb(var(--text));background-color:rgba(var(--bg), 0.1);box-shadow:inset 0 0 0 1px rgba(var(--border), 0.2);border-radius:0.25rem;padding:0.75rem 1rem;width:100%}::slotted(:last-child){margin-bottom:0 !important}.cat-alert-primary{--bg:var(--cat-primary-bg, 32, 127, 138);--text:var(--cat-primary-text, 32, 127, 138);--border:var(--cat-primary-text, 32, 127, 138)}.cat-alert-secondary{--bg:105, 118, 135;--text:0, 0, 0;--border:105, 118, 135}.cat-alert-success{--bg:0, 132, 88;--text:0, 132, 88;--border:0, 132, 88}.cat-alert-warning{--bg:255, 206, 128;--text:159, 97, 0;--border:159, 97, 0}.cat-alert-danger{--bg:217, 52, 13;--text:217, 52, 13;--border:217, 52, 13}";
|
|
4
5
|
|
|
@@ -19,7 +20,7 @@ const CatAlert = class {
|
|
|
19
20
|
};
|
|
20
21
|
CatAlert.style = catAlertCss;
|
|
21
22
|
|
|
22
|
-
const catBadgeCss = ":host{display:inline-flex;max-width:100%;vertical-align:baseline}:host([hidden]){display:none}.cat-badge{font:inherit;flex:1 1 auto;display:inline-flex;align-items:center;justify-content:center;border-radius:0.125rem;text-decoration:none;width:100%;box-sizing:border-box;line-height:1;white-space:nowrap}.cat-badge slot{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-badge-round{border-radius:10rem}.cat-badge-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-badge-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--border), 0.2);color:rgb(var(--text))}.cat-badge-primary{--bg:var(--cat-primary-bg, 32, 127, 138);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 32, 127, 138);--border:var(--cat-primary-text, 32, 127, 138)}.cat-badge-secondary{--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0;--border:105, 118, 135}.cat-badge-success{--bg:0, 132, 88;--fill:255, 255, 255;--text:0, 132, 88;--border:0, 132, 88}.cat-badge-warning{--bg:255, 206, 128;--fill:0, 0, 0;--text:159, 97, 0;--border:159, 97, 0}.cat-badge-danger{--bg:217, 52, 13;--fill:255, 255, 255;--text:217, 52, 13;--border:217, 52, 13}.cat-badge-xs{height:0.75rem;min-width:0.75rem;font-size:0.75rem;padding:0 0.1875rem}.cat-badge-s{height:1rem;min-width:1rem;font-size:0.75rem;padding:0 0.25rem}.cat-badge-m{height:1.25rem;min-width:1.25rem;font-size:0.75rem;padding:0 0.3125rem}.cat-badge-l{height:1.5rem;min-width:1.5rem;font-size:0.875rem;padding:0 0.375rem}.cat-badge-xl{height:1.75rem;min-width:1.75rem;font-size:0.9375rem;padding:0 0.4375rem}.cat-badge-pulse.cat-badge-filled{animation:1.5s ease 0s infinite normal none running pulse}.cat-badge-pulse.cat-badge-outlined{animation:1.5s ease 0s infinite normal none running pulse-outlined}@keyframes pulse{0%{box-shadow:0 0 0 0 rgb(var(--bg))}70%{box-shadow:transparent
|
|
23
|
+
const catBadgeCss = ":host{display:inline-flex;max-width:100%;vertical-align:baseline}:host([hidden]){display:none}.cat-badge{font:inherit;flex:1 1 auto;display:inline-flex;align-items:center;justify-content:center;border-radius:0.125rem;text-decoration:none;width:100%;box-sizing:border-box;line-height:1;white-space:nowrap}.cat-badge slot{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-badge-round{border-radius:10rem}.cat-badge-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-badge-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--border), 0.2);color:rgb(var(--text))}.cat-badge-primary{--bg:var(--cat-primary-bg, 32, 127, 138);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 32, 127, 138);--border:var(--cat-primary-text, 32, 127, 138)}.cat-badge-secondary{--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0;--border:105, 118, 135}.cat-badge-success{--bg:0, 132, 88;--fill:255, 255, 255;--text:0, 132, 88;--border:0, 132, 88}.cat-badge-warning{--bg:255, 206, 128;--fill:0, 0, 0;--text:159, 97, 0;--border:159, 97, 0}.cat-badge-danger{--bg:217, 52, 13;--fill:255, 255, 255;--text:217, 52, 13;--border:217, 52, 13}.cat-badge-xs{height:0.75rem;min-width:0.75rem;font-size:0.75rem;padding:0 0.1875rem}.cat-badge-s{height:1rem;min-width:1rem;font-size:0.75rem;padding:0 0.25rem}.cat-badge-m{height:1.25rem;min-width:1.25rem;font-size:0.75rem;padding:0 0.3125rem}.cat-badge-l{height:1.5rem;min-width:1.5rem;font-size:0.875rem;padding:0 0.375rem}.cat-badge-xl{height:1.75rem;min-width:1.75rem;font-size:0.9375rem;padding:0 0.4375rem}.cat-badge-pulse.cat-badge-filled{animation:1.5s ease 0s infinite normal none running pulse}.cat-badge-pulse.cat-badge-outlined{animation:1.5s ease 0s infinite normal none running pulse-outlined}@keyframes pulse{0%{box-shadow:0 0 0 0 rgb(var(--bg))}70%{box-shadow:transparent 0 0 0 0.5rem}100%{box-shadow:transparent 0 0 0 0}}@keyframes pulse-outlined{0%{box-shadow:0 0 0 0 rgb(var(--bg)), inset 0 0 0 1px rgba(var(--border), 0.2)}70%{box-shadow:transparent 0 0 0 0.5rem, inset 0 0 0 1px rgba(var(--border), 0.2)}100%{box-shadow:transparent 0 0 0 0, inset 0 0 0 1px rgba(var(--border), 0.2)}}";
|
|
23
24
|
|
|
24
25
|
const CatBadge = class {
|
|
25
26
|
constructor(hostRef) {
|
|
@@ -485,7 +486,7 @@ function createEmptyStyleRule(query) {
|
|
|
485
486
|
}
|
|
486
487
|
}
|
|
487
488
|
|
|
488
|
-
const catButtonCss = ":host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}
|
|
489
|
+
const catButtonCss = ":host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.cat-button{font:inherit;display:flex;align-items:center;justify-content:center;border:none;border-radius:0.25rem;text-decoration:none;width:100%;box-sizing:border-box;cursor:pointer;transition:color 0.13s linear, border-color 0.13s linear, background-color 0.13s linear, box-shadow 0.13s linear}.cat-button:focus-visible{outline:2px solid #0071ff;outline-offset:1px}.cat-button-ellipsed .cat-button-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed;opacity:0.65;filter:grayscale(100%)}.cat-button-round{border-radius:10rem}.cat-button-loading{cursor:default}.cat-button-loading cat-spinner{position:absolute}.cat-button-loading>*:not(cat-spinner){visibility:hidden}.cat-button-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-button-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--base), 0.2);color:rgb(var(--text))}.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.05)}.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text{background-color:transparent;color:rgb(var(--text));text-decoration:none}.cat-button-text:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:underline}.cat-button-primary{--bg:var(--cat-primary-bg, 32, 127, 138);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 32, 127, 138);--base:var(--cat-primary-text, 32, 127, 138)}.cat-button-primary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-hover, 28, 112, 122);--fill:var(--cat-primary-fill-hover, 255, 255, 255);--text:var(--cat-primary-text-hover, 28, 112, 122)}.cat-button-primary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-active, 25, 101, 110);--fill:var(--cat-primary-fill-active, 255, 255, 255);--text:var(--cat-primary-text-active, 25, 101, 110)}.cat-button-secondary{--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0;--base:105, 118, 135}.cat-button-secondary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0}.cat-button-secondary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0}.cat-button-success{--bg:0, 132, 88;--fill:255, 255, 255;--text:0, 132, 88;--base:0, 132, 88}.cat-button-success:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:0, 117, 78;--fill:255, 255, 255;--text:0, 117, 78}.cat-button-success:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:0, 105, 70;--fill:255, 255, 255;--text:0, 105, 70}.cat-button-warning{--bg:255, 206, 128;--fill:0, 0, 0;--text:159, 97, 0;--base:159, 97, 0}.cat-button-warning:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:255, 214, 148;--fill:0, 0, 0;--text:159, 97, 0}.cat-button-warning:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:255, 222, 168;--fill:0, 0, 0;--text:159, 97, 0}.cat-button-danger{--bg:217, 52, 13;--fill:255, 255, 255;--text:217, 52, 13;--base:217, 52, 13}.cat-button-danger:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:194, 46, 11;--fill:255, 255, 255;--text:194, 46, 11}.cat-button-danger:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:174, 42, 10;--fill:255, 255, 255;--text:174, 42, 10}.cat-button-xs{min-width:1.5rem;padding:0.25rem 0.25rem;font-size:0.875rem;line-height:1rem}.cat-button-xs .cat-button-prefix{margin-right:0.25rem}.cat-button-xs .cat-button-suffix{margin-left:0.25rem}.cat-button-xs.cat-button-icon{width:1.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-xs{padding-left:1rem;padding-right:1rem}.cat-button-s{min-width:2rem;padding:0.375rem 0.5rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-s .cat-button-prefix{margin-right:0.25rem}.cat-button-s .cat-button-suffix{margin-left:0.25rem}.cat-button-s cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-s.cat-button-icon{width:2rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-s{padding-left:1rem;padding-right:1rem}.cat-button-m{min-width:2.5rem;padding:0.625rem 0.75rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-m .cat-button-prefix{margin-right:0.25rem}.cat-button-m .cat-button-suffix{margin-left:0.25rem}.cat-button-m cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-m.cat-button-icon{width:2.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-m{padding-left:1rem;padding-right:1rem}.cat-button-l{min-width:3rem;padding:0.875rem 1rem;font-size:0.9375rem;line-height:1.25rem}.cat-button-l .cat-button-prefix{margin-right:0.25rem}.cat-button-l .cat-button-suffix{margin-left:0.25rem}.cat-button-l cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-l.cat-button-icon{width:3rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-l{padding-left:1rem;padding-right:1rem}.cat-button-xl{min-width:3.5rem;padding:1rem 1.25rem;font-size:1.125rem;line-height:1.5rem}.cat-button-xl .cat-button-prefix{margin-right:0.25rem}.cat-button-xl .cat-button-suffix{margin-left:0.25rem}.cat-button-xl.cat-button-icon{width:3.5rem;padding-left:0;padding-right:0}:host-context(nav) .cat-button-xl{padding-left:1rem;padding-right:1rem}:host-context(nav){width:100%}:host-context(nav) .cat-button{box-shadow:none;border-radius:0}:host-context(nav) .cat-button:focus-visible{outline-offset:-2px}:host-context(nav) .cat-button-content{text-align:left}:host([hidden]){display:none}:host(.cat-text-left) .cat-button{justify-content:left}:host(.cat-text-right) .cat-button{justify-content:right}";
|
|
489
490
|
|
|
490
491
|
const CatButton = class {
|
|
491
492
|
constructor(hostRef) {
|
|
@@ -1065,9 +1066,9 @@ const flip = function (options) {
|
|
|
1065
1066
|
switch (fallbackStrategy) {
|
|
1066
1067
|
case 'bestFit':
|
|
1067
1068
|
{
|
|
1068
|
-
var _overflowsData$
|
|
1069
|
+
var _overflowsData$map$so;
|
|
1069
1070
|
|
|
1070
|
-
const placement = (_overflowsData$
|
|
1071
|
+
const placement = (_overflowsData$map$so = overflowsData.map(d => [d, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0].placement;
|
|
1071
1072
|
|
|
1072
1073
|
if (placement) {
|
|
1073
1074
|
resetPlacement = placement;
|
|
@@ -1108,14 +1109,13 @@ function convertValueToCoords(placement, rects, value, rtl) {
|
|
|
1108
1109
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
1109
1110
|
const rawValue = typeof value === 'function' ? value({ ...rects,
|
|
1110
1111
|
placement
|
|
1111
|
-
}) : value;
|
|
1112
|
-
const isNumber = typeof rawValue === 'number'; // eslint-disable-next-line prefer-const
|
|
1112
|
+
}) : value; // eslint-disable-next-line prefer-const
|
|
1113
1113
|
|
|
1114
1114
|
let {
|
|
1115
1115
|
mainAxis,
|
|
1116
1116
|
crossAxis,
|
|
1117
1117
|
alignmentAxis
|
|
1118
|
-
} =
|
|
1118
|
+
} = typeof rawValue === 'number' ? {
|
|
1119
1119
|
mainAxis: rawValue,
|
|
1120
1120
|
crossAxis: 0,
|
|
1121
1121
|
alignmentAxis: null
|
|
@@ -3034,6 +3034,1338 @@ const CatMenu = class {
|
|
|
3034
3034
|
CatMenu.OFFSET = 4;
|
|
3035
3035
|
CatMenu.style = catMenuCss;
|
|
3036
3036
|
|
|
3037
|
+
function isFunction(value) {
|
|
3038
|
+
return typeof value === 'function';
|
|
3039
|
+
}
|
|
3040
|
+
|
|
3041
|
+
function createErrorClass(createImpl) {
|
|
3042
|
+
const _super = (instance) => {
|
|
3043
|
+
Error.call(instance);
|
|
3044
|
+
instance.stack = new Error().stack;
|
|
3045
|
+
};
|
|
3046
|
+
const ctorFunc = createImpl(_super);
|
|
3047
|
+
ctorFunc.prototype = Object.create(Error.prototype);
|
|
3048
|
+
ctorFunc.prototype.constructor = ctorFunc;
|
|
3049
|
+
return ctorFunc;
|
|
3050
|
+
}
|
|
3051
|
+
|
|
3052
|
+
const UnsubscriptionError = createErrorClass((_super) => function UnsubscriptionErrorImpl(errors) {
|
|
3053
|
+
_super(this);
|
|
3054
|
+
this.message = errors
|
|
3055
|
+
? `${errors.length} errors occurred during unsubscription:
|
|
3056
|
+
${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\n ')}`
|
|
3057
|
+
: '';
|
|
3058
|
+
this.name = 'UnsubscriptionError';
|
|
3059
|
+
this.errors = errors;
|
|
3060
|
+
});
|
|
3061
|
+
|
|
3062
|
+
function arrRemove(arr, item) {
|
|
3063
|
+
if (arr) {
|
|
3064
|
+
const index = arr.indexOf(item);
|
|
3065
|
+
0 <= index && arr.splice(index, 1);
|
|
3066
|
+
}
|
|
3067
|
+
}
|
|
3068
|
+
|
|
3069
|
+
class Subscription {
|
|
3070
|
+
constructor(initialTeardown) {
|
|
3071
|
+
this.initialTeardown = initialTeardown;
|
|
3072
|
+
this.closed = false;
|
|
3073
|
+
this._parentage = null;
|
|
3074
|
+
this._finalizers = null;
|
|
3075
|
+
}
|
|
3076
|
+
unsubscribe() {
|
|
3077
|
+
let errors;
|
|
3078
|
+
if (!this.closed) {
|
|
3079
|
+
this.closed = true;
|
|
3080
|
+
const { _parentage } = this;
|
|
3081
|
+
if (_parentage) {
|
|
3082
|
+
this._parentage = null;
|
|
3083
|
+
if (Array.isArray(_parentage)) {
|
|
3084
|
+
for (const parent of _parentage) {
|
|
3085
|
+
parent.remove(this);
|
|
3086
|
+
}
|
|
3087
|
+
}
|
|
3088
|
+
else {
|
|
3089
|
+
_parentage.remove(this);
|
|
3090
|
+
}
|
|
3091
|
+
}
|
|
3092
|
+
const { initialTeardown: initialFinalizer } = this;
|
|
3093
|
+
if (isFunction(initialFinalizer)) {
|
|
3094
|
+
try {
|
|
3095
|
+
initialFinalizer();
|
|
3096
|
+
}
|
|
3097
|
+
catch (e) {
|
|
3098
|
+
errors = e instanceof UnsubscriptionError ? e.errors : [e];
|
|
3099
|
+
}
|
|
3100
|
+
}
|
|
3101
|
+
const { _finalizers } = this;
|
|
3102
|
+
if (_finalizers) {
|
|
3103
|
+
this._finalizers = null;
|
|
3104
|
+
for (const finalizer of _finalizers) {
|
|
3105
|
+
try {
|
|
3106
|
+
execFinalizer(finalizer);
|
|
3107
|
+
}
|
|
3108
|
+
catch (err) {
|
|
3109
|
+
errors = errors !== null && errors !== void 0 ? errors : [];
|
|
3110
|
+
if (err instanceof UnsubscriptionError) {
|
|
3111
|
+
errors = [...errors, ...err.errors];
|
|
3112
|
+
}
|
|
3113
|
+
else {
|
|
3114
|
+
errors.push(err);
|
|
3115
|
+
}
|
|
3116
|
+
}
|
|
3117
|
+
}
|
|
3118
|
+
}
|
|
3119
|
+
if (errors) {
|
|
3120
|
+
throw new UnsubscriptionError(errors);
|
|
3121
|
+
}
|
|
3122
|
+
}
|
|
3123
|
+
}
|
|
3124
|
+
add(teardown) {
|
|
3125
|
+
var _a;
|
|
3126
|
+
if (teardown && teardown !== this) {
|
|
3127
|
+
if (this.closed) {
|
|
3128
|
+
execFinalizer(teardown);
|
|
3129
|
+
}
|
|
3130
|
+
else {
|
|
3131
|
+
if (teardown instanceof Subscription) {
|
|
3132
|
+
if (teardown.closed || teardown._hasParent(this)) {
|
|
3133
|
+
return;
|
|
3134
|
+
}
|
|
3135
|
+
teardown._addParent(this);
|
|
3136
|
+
}
|
|
3137
|
+
(this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
}
|
|
3141
|
+
_hasParent(parent) {
|
|
3142
|
+
const { _parentage } = this;
|
|
3143
|
+
return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));
|
|
3144
|
+
}
|
|
3145
|
+
_addParent(parent) {
|
|
3146
|
+
const { _parentage } = this;
|
|
3147
|
+
this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
|
|
3148
|
+
}
|
|
3149
|
+
_removeParent(parent) {
|
|
3150
|
+
const { _parentage } = this;
|
|
3151
|
+
if (_parentage === parent) {
|
|
3152
|
+
this._parentage = null;
|
|
3153
|
+
}
|
|
3154
|
+
else if (Array.isArray(_parentage)) {
|
|
3155
|
+
arrRemove(_parentage, parent);
|
|
3156
|
+
}
|
|
3157
|
+
}
|
|
3158
|
+
remove(teardown) {
|
|
3159
|
+
const { _finalizers } = this;
|
|
3160
|
+
_finalizers && arrRemove(_finalizers, teardown);
|
|
3161
|
+
if (teardown instanceof Subscription) {
|
|
3162
|
+
teardown._removeParent(this);
|
|
3163
|
+
}
|
|
3164
|
+
}
|
|
3165
|
+
}
|
|
3166
|
+
Subscription.EMPTY = (() => {
|
|
3167
|
+
const empty = new Subscription();
|
|
3168
|
+
empty.closed = true;
|
|
3169
|
+
return empty;
|
|
3170
|
+
})();
|
|
3171
|
+
const EMPTY_SUBSCRIPTION = Subscription.EMPTY;
|
|
3172
|
+
function isSubscription(value) {
|
|
3173
|
+
return (value instanceof Subscription ||
|
|
3174
|
+
(value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));
|
|
3175
|
+
}
|
|
3176
|
+
function execFinalizer(finalizer) {
|
|
3177
|
+
if (isFunction(finalizer)) {
|
|
3178
|
+
finalizer();
|
|
3179
|
+
}
|
|
3180
|
+
else {
|
|
3181
|
+
finalizer.unsubscribe();
|
|
3182
|
+
}
|
|
3183
|
+
}
|
|
3184
|
+
|
|
3185
|
+
const config = {
|
|
3186
|
+
onUnhandledError: null,
|
|
3187
|
+
onStoppedNotification: null,
|
|
3188
|
+
Promise: undefined,
|
|
3189
|
+
useDeprecatedSynchronousErrorHandling: false,
|
|
3190
|
+
useDeprecatedNextContext: false,
|
|
3191
|
+
};
|
|
3192
|
+
|
|
3193
|
+
const timeoutProvider = {
|
|
3194
|
+
setTimeout(handler, timeout, ...args) {
|
|
3195
|
+
const { delegate } = timeoutProvider;
|
|
3196
|
+
if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {
|
|
3197
|
+
return delegate.setTimeout(handler, timeout, ...args);
|
|
3198
|
+
}
|
|
3199
|
+
return setTimeout(handler, timeout, ...args);
|
|
3200
|
+
},
|
|
3201
|
+
clearTimeout(handle) {
|
|
3202
|
+
const { delegate } = timeoutProvider;
|
|
3203
|
+
return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);
|
|
3204
|
+
},
|
|
3205
|
+
delegate: undefined,
|
|
3206
|
+
};
|
|
3207
|
+
|
|
3208
|
+
function reportUnhandledError(err) {
|
|
3209
|
+
timeoutProvider.setTimeout(() => {
|
|
3210
|
+
const { onUnhandledError } = config;
|
|
3211
|
+
if (onUnhandledError) {
|
|
3212
|
+
onUnhandledError(err);
|
|
3213
|
+
}
|
|
3214
|
+
else {
|
|
3215
|
+
throw err;
|
|
3216
|
+
}
|
|
3217
|
+
});
|
|
3218
|
+
}
|
|
3219
|
+
|
|
3220
|
+
function noop() { }
|
|
3221
|
+
|
|
3222
|
+
const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined))();
|
|
3223
|
+
function errorNotification(error) {
|
|
3224
|
+
return createNotification('E', undefined, error);
|
|
3225
|
+
}
|
|
3226
|
+
function nextNotification(value) {
|
|
3227
|
+
return createNotification('N', value, undefined);
|
|
3228
|
+
}
|
|
3229
|
+
function createNotification(kind, value, error) {
|
|
3230
|
+
return {
|
|
3231
|
+
kind,
|
|
3232
|
+
value,
|
|
3233
|
+
error,
|
|
3234
|
+
};
|
|
3235
|
+
}
|
|
3236
|
+
|
|
3237
|
+
function errorContext(cb) {
|
|
3238
|
+
{
|
|
3239
|
+
cb();
|
|
3240
|
+
}
|
|
3241
|
+
}
|
|
3242
|
+
|
|
3243
|
+
class Subscriber extends Subscription {
|
|
3244
|
+
constructor(destination) {
|
|
3245
|
+
super();
|
|
3246
|
+
this.isStopped = false;
|
|
3247
|
+
if (destination) {
|
|
3248
|
+
this.destination = destination;
|
|
3249
|
+
if (isSubscription(destination)) {
|
|
3250
|
+
destination.add(this);
|
|
3251
|
+
}
|
|
3252
|
+
}
|
|
3253
|
+
else {
|
|
3254
|
+
this.destination = EMPTY_OBSERVER;
|
|
3255
|
+
}
|
|
3256
|
+
}
|
|
3257
|
+
static create(next, error, complete) {
|
|
3258
|
+
return new SafeSubscriber(next, error, complete);
|
|
3259
|
+
}
|
|
3260
|
+
next(value) {
|
|
3261
|
+
if (this.isStopped) {
|
|
3262
|
+
handleStoppedNotification(nextNotification(value), this);
|
|
3263
|
+
}
|
|
3264
|
+
else {
|
|
3265
|
+
this._next(value);
|
|
3266
|
+
}
|
|
3267
|
+
}
|
|
3268
|
+
error(err) {
|
|
3269
|
+
if (this.isStopped) {
|
|
3270
|
+
handleStoppedNotification(errorNotification(err), this);
|
|
3271
|
+
}
|
|
3272
|
+
else {
|
|
3273
|
+
this.isStopped = true;
|
|
3274
|
+
this._error(err);
|
|
3275
|
+
}
|
|
3276
|
+
}
|
|
3277
|
+
complete() {
|
|
3278
|
+
if (this.isStopped) {
|
|
3279
|
+
handleStoppedNotification(COMPLETE_NOTIFICATION, this);
|
|
3280
|
+
}
|
|
3281
|
+
else {
|
|
3282
|
+
this.isStopped = true;
|
|
3283
|
+
this._complete();
|
|
3284
|
+
}
|
|
3285
|
+
}
|
|
3286
|
+
unsubscribe() {
|
|
3287
|
+
if (!this.closed) {
|
|
3288
|
+
this.isStopped = true;
|
|
3289
|
+
super.unsubscribe();
|
|
3290
|
+
this.destination = null;
|
|
3291
|
+
}
|
|
3292
|
+
}
|
|
3293
|
+
_next(value) {
|
|
3294
|
+
this.destination.next(value);
|
|
3295
|
+
}
|
|
3296
|
+
_error(err) {
|
|
3297
|
+
try {
|
|
3298
|
+
this.destination.error(err);
|
|
3299
|
+
}
|
|
3300
|
+
finally {
|
|
3301
|
+
this.unsubscribe();
|
|
3302
|
+
}
|
|
3303
|
+
}
|
|
3304
|
+
_complete() {
|
|
3305
|
+
try {
|
|
3306
|
+
this.destination.complete();
|
|
3307
|
+
}
|
|
3308
|
+
finally {
|
|
3309
|
+
this.unsubscribe();
|
|
3310
|
+
}
|
|
3311
|
+
}
|
|
3312
|
+
}
|
|
3313
|
+
const _bind = Function.prototype.bind;
|
|
3314
|
+
function bind(fn, thisArg) {
|
|
3315
|
+
return _bind.call(fn, thisArg);
|
|
3316
|
+
}
|
|
3317
|
+
class ConsumerObserver {
|
|
3318
|
+
constructor(partialObserver) {
|
|
3319
|
+
this.partialObserver = partialObserver;
|
|
3320
|
+
}
|
|
3321
|
+
next(value) {
|
|
3322
|
+
const { partialObserver } = this;
|
|
3323
|
+
if (partialObserver.next) {
|
|
3324
|
+
try {
|
|
3325
|
+
partialObserver.next(value);
|
|
3326
|
+
}
|
|
3327
|
+
catch (error) {
|
|
3328
|
+
handleUnhandledError(error);
|
|
3329
|
+
}
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
error(err) {
|
|
3333
|
+
const { partialObserver } = this;
|
|
3334
|
+
if (partialObserver.error) {
|
|
3335
|
+
try {
|
|
3336
|
+
partialObserver.error(err);
|
|
3337
|
+
}
|
|
3338
|
+
catch (error) {
|
|
3339
|
+
handleUnhandledError(error);
|
|
3340
|
+
}
|
|
3341
|
+
}
|
|
3342
|
+
else {
|
|
3343
|
+
handleUnhandledError(err);
|
|
3344
|
+
}
|
|
3345
|
+
}
|
|
3346
|
+
complete() {
|
|
3347
|
+
const { partialObserver } = this;
|
|
3348
|
+
if (partialObserver.complete) {
|
|
3349
|
+
try {
|
|
3350
|
+
partialObserver.complete();
|
|
3351
|
+
}
|
|
3352
|
+
catch (error) {
|
|
3353
|
+
handleUnhandledError(error);
|
|
3354
|
+
}
|
|
3355
|
+
}
|
|
3356
|
+
}
|
|
3357
|
+
}
|
|
3358
|
+
class SafeSubscriber extends Subscriber {
|
|
3359
|
+
constructor(observerOrNext, error, complete) {
|
|
3360
|
+
super();
|
|
3361
|
+
let partialObserver;
|
|
3362
|
+
if (isFunction(observerOrNext) || !observerOrNext) {
|
|
3363
|
+
partialObserver = {
|
|
3364
|
+
next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined,
|
|
3365
|
+
error: error !== null && error !== void 0 ? error : undefined,
|
|
3366
|
+
complete: complete !== null && complete !== void 0 ? complete : undefined,
|
|
3367
|
+
};
|
|
3368
|
+
}
|
|
3369
|
+
else {
|
|
3370
|
+
let context;
|
|
3371
|
+
if (this && config.useDeprecatedNextContext) {
|
|
3372
|
+
context = Object.create(observerOrNext);
|
|
3373
|
+
context.unsubscribe = () => this.unsubscribe();
|
|
3374
|
+
partialObserver = {
|
|
3375
|
+
next: observerOrNext.next && bind(observerOrNext.next, context),
|
|
3376
|
+
error: observerOrNext.error && bind(observerOrNext.error, context),
|
|
3377
|
+
complete: observerOrNext.complete && bind(observerOrNext.complete, context),
|
|
3378
|
+
};
|
|
3379
|
+
}
|
|
3380
|
+
else {
|
|
3381
|
+
partialObserver = observerOrNext;
|
|
3382
|
+
}
|
|
3383
|
+
}
|
|
3384
|
+
this.destination = new ConsumerObserver(partialObserver);
|
|
3385
|
+
}
|
|
3386
|
+
}
|
|
3387
|
+
function handleUnhandledError(error) {
|
|
3388
|
+
{
|
|
3389
|
+
reportUnhandledError(error);
|
|
3390
|
+
}
|
|
3391
|
+
}
|
|
3392
|
+
function defaultErrorHandler(err) {
|
|
3393
|
+
throw err;
|
|
3394
|
+
}
|
|
3395
|
+
function handleStoppedNotification(notification, subscriber) {
|
|
3396
|
+
const { onStoppedNotification } = config;
|
|
3397
|
+
onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));
|
|
3398
|
+
}
|
|
3399
|
+
const EMPTY_OBSERVER = {
|
|
3400
|
+
closed: true,
|
|
3401
|
+
next: noop,
|
|
3402
|
+
error: defaultErrorHandler,
|
|
3403
|
+
complete: noop,
|
|
3404
|
+
};
|
|
3405
|
+
|
|
3406
|
+
const observable = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();
|
|
3407
|
+
|
|
3408
|
+
function identity(x) {
|
|
3409
|
+
return x;
|
|
3410
|
+
}
|
|
3411
|
+
|
|
3412
|
+
function pipeFromArray(fns) {
|
|
3413
|
+
if (fns.length === 0) {
|
|
3414
|
+
return identity;
|
|
3415
|
+
}
|
|
3416
|
+
if (fns.length === 1) {
|
|
3417
|
+
return fns[0];
|
|
3418
|
+
}
|
|
3419
|
+
return function piped(input) {
|
|
3420
|
+
return fns.reduce((prev, fn) => fn(prev), input);
|
|
3421
|
+
};
|
|
3422
|
+
}
|
|
3423
|
+
|
|
3424
|
+
class Observable {
|
|
3425
|
+
constructor(subscribe) {
|
|
3426
|
+
if (subscribe) {
|
|
3427
|
+
this._subscribe = subscribe;
|
|
3428
|
+
}
|
|
3429
|
+
}
|
|
3430
|
+
lift(operator) {
|
|
3431
|
+
const observable = new Observable();
|
|
3432
|
+
observable.source = this;
|
|
3433
|
+
observable.operator = operator;
|
|
3434
|
+
return observable;
|
|
3435
|
+
}
|
|
3436
|
+
subscribe(observerOrNext, error, complete) {
|
|
3437
|
+
const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);
|
|
3438
|
+
errorContext(() => {
|
|
3439
|
+
const { operator, source } = this;
|
|
3440
|
+
subscriber.add(operator
|
|
3441
|
+
?
|
|
3442
|
+
operator.call(subscriber, source)
|
|
3443
|
+
: source
|
|
3444
|
+
?
|
|
3445
|
+
this._subscribe(subscriber)
|
|
3446
|
+
:
|
|
3447
|
+
this._trySubscribe(subscriber));
|
|
3448
|
+
});
|
|
3449
|
+
return subscriber;
|
|
3450
|
+
}
|
|
3451
|
+
_trySubscribe(sink) {
|
|
3452
|
+
try {
|
|
3453
|
+
return this._subscribe(sink);
|
|
3454
|
+
}
|
|
3455
|
+
catch (err) {
|
|
3456
|
+
sink.error(err);
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
3459
|
+
forEach(next, promiseCtor) {
|
|
3460
|
+
promiseCtor = getPromiseCtor(promiseCtor);
|
|
3461
|
+
return new promiseCtor((resolve, reject) => {
|
|
3462
|
+
const subscriber = new SafeSubscriber({
|
|
3463
|
+
next: (value) => {
|
|
3464
|
+
try {
|
|
3465
|
+
next(value);
|
|
3466
|
+
}
|
|
3467
|
+
catch (err) {
|
|
3468
|
+
reject(err);
|
|
3469
|
+
subscriber.unsubscribe();
|
|
3470
|
+
}
|
|
3471
|
+
},
|
|
3472
|
+
error: reject,
|
|
3473
|
+
complete: resolve,
|
|
3474
|
+
});
|
|
3475
|
+
this.subscribe(subscriber);
|
|
3476
|
+
});
|
|
3477
|
+
}
|
|
3478
|
+
_subscribe(subscriber) {
|
|
3479
|
+
var _a;
|
|
3480
|
+
return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);
|
|
3481
|
+
}
|
|
3482
|
+
[observable]() {
|
|
3483
|
+
return this;
|
|
3484
|
+
}
|
|
3485
|
+
pipe(...operations) {
|
|
3486
|
+
return pipeFromArray(operations)(this);
|
|
3487
|
+
}
|
|
3488
|
+
toPromise(promiseCtor) {
|
|
3489
|
+
promiseCtor = getPromiseCtor(promiseCtor);
|
|
3490
|
+
return new promiseCtor((resolve, reject) => {
|
|
3491
|
+
let value;
|
|
3492
|
+
this.subscribe((x) => (value = x), (err) => reject(err), () => resolve(value));
|
|
3493
|
+
});
|
|
3494
|
+
}
|
|
3495
|
+
}
|
|
3496
|
+
Observable.create = (subscribe) => {
|
|
3497
|
+
return new Observable(subscribe);
|
|
3498
|
+
};
|
|
3499
|
+
function getPromiseCtor(promiseCtor) {
|
|
3500
|
+
var _a;
|
|
3501
|
+
return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
|
|
3502
|
+
}
|
|
3503
|
+
function isObserver(value) {
|
|
3504
|
+
return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);
|
|
3505
|
+
}
|
|
3506
|
+
function isSubscriber(value) {
|
|
3507
|
+
return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));
|
|
3508
|
+
}
|
|
3509
|
+
|
|
3510
|
+
function hasLift(source) {
|
|
3511
|
+
return isFunction(source === null || source === void 0 ? void 0 : source.lift);
|
|
3512
|
+
}
|
|
3513
|
+
function operate(init) {
|
|
3514
|
+
return (source) => {
|
|
3515
|
+
if (hasLift(source)) {
|
|
3516
|
+
return source.lift(function (liftedSource) {
|
|
3517
|
+
try {
|
|
3518
|
+
return init(liftedSource, this);
|
|
3519
|
+
}
|
|
3520
|
+
catch (err) {
|
|
3521
|
+
this.error(err);
|
|
3522
|
+
}
|
|
3523
|
+
});
|
|
3524
|
+
}
|
|
3525
|
+
throw new TypeError('Unable to lift unknown Observable type');
|
|
3526
|
+
};
|
|
3527
|
+
}
|
|
3528
|
+
|
|
3529
|
+
function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {
|
|
3530
|
+
return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);
|
|
3531
|
+
}
|
|
3532
|
+
class OperatorSubscriber extends Subscriber {
|
|
3533
|
+
constructor(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {
|
|
3534
|
+
super(destination);
|
|
3535
|
+
this.onFinalize = onFinalize;
|
|
3536
|
+
this.shouldUnsubscribe = shouldUnsubscribe;
|
|
3537
|
+
this._next = onNext
|
|
3538
|
+
? function (value) {
|
|
3539
|
+
try {
|
|
3540
|
+
onNext(value);
|
|
3541
|
+
}
|
|
3542
|
+
catch (err) {
|
|
3543
|
+
destination.error(err);
|
|
3544
|
+
}
|
|
3545
|
+
}
|
|
3546
|
+
: super._next;
|
|
3547
|
+
this._error = onError
|
|
3548
|
+
? function (err) {
|
|
3549
|
+
try {
|
|
3550
|
+
onError(err);
|
|
3551
|
+
}
|
|
3552
|
+
catch (err) {
|
|
3553
|
+
destination.error(err);
|
|
3554
|
+
}
|
|
3555
|
+
finally {
|
|
3556
|
+
this.unsubscribe();
|
|
3557
|
+
}
|
|
3558
|
+
}
|
|
3559
|
+
: super._error;
|
|
3560
|
+
this._complete = onComplete
|
|
3561
|
+
? function () {
|
|
3562
|
+
try {
|
|
3563
|
+
onComplete();
|
|
3564
|
+
}
|
|
3565
|
+
catch (err) {
|
|
3566
|
+
destination.error(err);
|
|
3567
|
+
}
|
|
3568
|
+
finally {
|
|
3569
|
+
this.unsubscribe();
|
|
3570
|
+
}
|
|
3571
|
+
}
|
|
3572
|
+
: super._complete;
|
|
3573
|
+
}
|
|
3574
|
+
unsubscribe() {
|
|
3575
|
+
var _a;
|
|
3576
|
+
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
|
3577
|
+
const { closed } = this;
|
|
3578
|
+
super.unsubscribe();
|
|
3579
|
+
!closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));
|
|
3580
|
+
}
|
|
3581
|
+
}
|
|
3582
|
+
}
|
|
3583
|
+
|
|
3584
|
+
const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {
|
|
3585
|
+
_super(this);
|
|
3586
|
+
this.name = 'ObjectUnsubscribedError';
|
|
3587
|
+
this.message = 'object unsubscribed';
|
|
3588
|
+
});
|
|
3589
|
+
|
|
3590
|
+
class Subject extends Observable {
|
|
3591
|
+
constructor() {
|
|
3592
|
+
super();
|
|
3593
|
+
this.closed = false;
|
|
3594
|
+
this.currentObservers = null;
|
|
3595
|
+
this.observers = [];
|
|
3596
|
+
this.isStopped = false;
|
|
3597
|
+
this.hasError = false;
|
|
3598
|
+
this.thrownError = null;
|
|
3599
|
+
}
|
|
3600
|
+
lift(operator) {
|
|
3601
|
+
const subject = new AnonymousSubject(this, this);
|
|
3602
|
+
subject.operator = operator;
|
|
3603
|
+
return subject;
|
|
3604
|
+
}
|
|
3605
|
+
_throwIfClosed() {
|
|
3606
|
+
if (this.closed) {
|
|
3607
|
+
throw new ObjectUnsubscribedError();
|
|
3608
|
+
}
|
|
3609
|
+
}
|
|
3610
|
+
next(value) {
|
|
3611
|
+
errorContext(() => {
|
|
3612
|
+
this._throwIfClosed();
|
|
3613
|
+
if (!this.isStopped) {
|
|
3614
|
+
if (!this.currentObservers) {
|
|
3615
|
+
this.currentObservers = Array.from(this.observers);
|
|
3616
|
+
}
|
|
3617
|
+
for (const observer of this.currentObservers) {
|
|
3618
|
+
observer.next(value);
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
});
|
|
3622
|
+
}
|
|
3623
|
+
error(err) {
|
|
3624
|
+
errorContext(() => {
|
|
3625
|
+
this._throwIfClosed();
|
|
3626
|
+
if (!this.isStopped) {
|
|
3627
|
+
this.hasError = this.isStopped = true;
|
|
3628
|
+
this.thrownError = err;
|
|
3629
|
+
const { observers } = this;
|
|
3630
|
+
while (observers.length) {
|
|
3631
|
+
observers.shift().error(err);
|
|
3632
|
+
}
|
|
3633
|
+
}
|
|
3634
|
+
});
|
|
3635
|
+
}
|
|
3636
|
+
complete() {
|
|
3637
|
+
errorContext(() => {
|
|
3638
|
+
this._throwIfClosed();
|
|
3639
|
+
if (!this.isStopped) {
|
|
3640
|
+
this.isStopped = true;
|
|
3641
|
+
const { observers } = this;
|
|
3642
|
+
while (observers.length) {
|
|
3643
|
+
observers.shift().complete();
|
|
3644
|
+
}
|
|
3645
|
+
}
|
|
3646
|
+
});
|
|
3647
|
+
}
|
|
3648
|
+
unsubscribe() {
|
|
3649
|
+
this.isStopped = this.closed = true;
|
|
3650
|
+
this.observers = this.currentObservers = null;
|
|
3651
|
+
}
|
|
3652
|
+
get observed() {
|
|
3653
|
+
var _a;
|
|
3654
|
+
return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
3655
|
+
}
|
|
3656
|
+
_trySubscribe(subscriber) {
|
|
3657
|
+
this._throwIfClosed();
|
|
3658
|
+
return super._trySubscribe(subscriber);
|
|
3659
|
+
}
|
|
3660
|
+
_subscribe(subscriber) {
|
|
3661
|
+
this._throwIfClosed();
|
|
3662
|
+
this._checkFinalizedStatuses(subscriber);
|
|
3663
|
+
return this._innerSubscribe(subscriber);
|
|
3664
|
+
}
|
|
3665
|
+
_innerSubscribe(subscriber) {
|
|
3666
|
+
const { hasError, isStopped, observers } = this;
|
|
3667
|
+
if (hasError || isStopped) {
|
|
3668
|
+
return EMPTY_SUBSCRIPTION;
|
|
3669
|
+
}
|
|
3670
|
+
this.currentObservers = null;
|
|
3671
|
+
observers.push(subscriber);
|
|
3672
|
+
return new Subscription(() => {
|
|
3673
|
+
this.currentObservers = null;
|
|
3674
|
+
arrRemove(observers, subscriber);
|
|
3675
|
+
});
|
|
3676
|
+
}
|
|
3677
|
+
_checkFinalizedStatuses(subscriber) {
|
|
3678
|
+
const { hasError, thrownError, isStopped } = this;
|
|
3679
|
+
if (hasError) {
|
|
3680
|
+
subscriber.error(thrownError);
|
|
3681
|
+
}
|
|
3682
|
+
else if (isStopped) {
|
|
3683
|
+
subscriber.complete();
|
|
3684
|
+
}
|
|
3685
|
+
}
|
|
3686
|
+
asObservable() {
|
|
3687
|
+
const observable = new Observable();
|
|
3688
|
+
observable.source = this;
|
|
3689
|
+
return observable;
|
|
3690
|
+
}
|
|
3691
|
+
}
|
|
3692
|
+
Subject.create = (destination, source) => {
|
|
3693
|
+
return new AnonymousSubject(destination, source);
|
|
3694
|
+
};
|
|
3695
|
+
class AnonymousSubject extends Subject {
|
|
3696
|
+
constructor(destination, source) {
|
|
3697
|
+
super();
|
|
3698
|
+
this.destination = destination;
|
|
3699
|
+
this.source = source;
|
|
3700
|
+
}
|
|
3701
|
+
next(value) {
|
|
3702
|
+
var _a, _b;
|
|
3703
|
+
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);
|
|
3704
|
+
}
|
|
3705
|
+
error(err) {
|
|
3706
|
+
var _a, _b;
|
|
3707
|
+
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);
|
|
3708
|
+
}
|
|
3709
|
+
complete() {
|
|
3710
|
+
var _a, _b;
|
|
3711
|
+
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
3712
|
+
}
|
|
3713
|
+
_subscribe(subscriber) {
|
|
3714
|
+
var _a, _b;
|
|
3715
|
+
return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;
|
|
3716
|
+
}
|
|
3717
|
+
}
|
|
3718
|
+
|
|
3719
|
+
const EMPTY = new Observable((subscriber) => subscriber.complete());
|
|
3720
|
+
|
|
3721
|
+
function isScheduler(value) {
|
|
3722
|
+
return value && isFunction(value.schedule);
|
|
3723
|
+
}
|
|
3724
|
+
|
|
3725
|
+
function last(arr) {
|
|
3726
|
+
return arr[arr.length - 1];
|
|
3727
|
+
}
|
|
3728
|
+
function popScheduler(args) {
|
|
3729
|
+
return isScheduler(last(args)) ? args.pop() : undefined;
|
|
3730
|
+
}
|
|
3731
|
+
function popNumber(args, defaultValue) {
|
|
3732
|
+
return typeof last(args) === 'number' ? args.pop() : defaultValue;
|
|
3733
|
+
}
|
|
3734
|
+
|
|
3735
|
+
/******************************************************************************
|
|
3736
|
+
Copyright (c) Microsoft Corporation.
|
|
3737
|
+
|
|
3738
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
3739
|
+
purpose with or without fee is hereby granted.
|
|
3740
|
+
|
|
3741
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
3742
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
3743
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
3744
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
3745
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
3746
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
3747
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
3748
|
+
***************************************************************************** */
|
|
3749
|
+
|
|
3750
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
3751
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3752
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3753
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
3754
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
3755
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
3756
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
3757
|
+
});
|
|
3758
|
+
}
|
|
3759
|
+
|
|
3760
|
+
function __values(o) {
|
|
3761
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
3762
|
+
if (m) return m.call(o);
|
|
3763
|
+
if (o && typeof o.length === "number") return {
|
|
3764
|
+
next: function () {
|
|
3765
|
+
if (o && i >= o.length) o = void 0;
|
|
3766
|
+
return { value: o && o[i++], done: !o };
|
|
3767
|
+
}
|
|
3768
|
+
};
|
|
3769
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
3770
|
+
}
|
|
3771
|
+
|
|
3772
|
+
function __await(v) {
|
|
3773
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
3774
|
+
}
|
|
3775
|
+
|
|
3776
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
3777
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
3778
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
3779
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
3780
|
+
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); }); }; }
|
|
3781
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
3782
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
3783
|
+
function fulfill(value) { resume("next", value); }
|
|
3784
|
+
function reject(value) { resume("throw", value); }
|
|
3785
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
3786
|
+
}
|
|
3787
|
+
|
|
3788
|
+
function __asyncValues(o) {
|
|
3789
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
3790
|
+
var m = o[Symbol.asyncIterator], i;
|
|
3791
|
+
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);
|
|
3792
|
+
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); }); }; }
|
|
3793
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
3794
|
+
}
|
|
3795
|
+
|
|
3796
|
+
const isArrayLike = ((x) => x && typeof x.length === 'number' && typeof x !== 'function');
|
|
3797
|
+
|
|
3798
|
+
function isPromise(value) {
|
|
3799
|
+
return isFunction(value === null || value === void 0 ? void 0 : value.then);
|
|
3800
|
+
}
|
|
3801
|
+
|
|
3802
|
+
function isInteropObservable(input) {
|
|
3803
|
+
return isFunction(input[observable]);
|
|
3804
|
+
}
|
|
3805
|
+
|
|
3806
|
+
function isAsyncIterable(obj) {
|
|
3807
|
+
return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);
|
|
3808
|
+
}
|
|
3809
|
+
|
|
3810
|
+
function createInvalidObservableTypeError(input) {
|
|
3811
|
+
return new TypeError(`You provided ${input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`);
|
|
3812
|
+
}
|
|
3813
|
+
|
|
3814
|
+
function getSymbolIterator() {
|
|
3815
|
+
if (typeof Symbol !== 'function' || !Symbol.iterator) {
|
|
3816
|
+
return '@@iterator';
|
|
3817
|
+
}
|
|
3818
|
+
return Symbol.iterator;
|
|
3819
|
+
}
|
|
3820
|
+
const iterator = getSymbolIterator();
|
|
3821
|
+
|
|
3822
|
+
function isIterable(input) {
|
|
3823
|
+
return isFunction(input === null || input === void 0 ? void 0 : input[iterator]);
|
|
3824
|
+
}
|
|
3825
|
+
|
|
3826
|
+
function readableStreamLikeToAsyncGenerator(readableStream) {
|
|
3827
|
+
return __asyncGenerator(this, arguments, function* readableStreamLikeToAsyncGenerator_1() {
|
|
3828
|
+
const reader = readableStream.getReader();
|
|
3829
|
+
try {
|
|
3830
|
+
while (true) {
|
|
3831
|
+
const { value, done } = yield __await(reader.read());
|
|
3832
|
+
if (done) {
|
|
3833
|
+
return yield __await(void 0);
|
|
3834
|
+
}
|
|
3835
|
+
yield yield __await(value);
|
|
3836
|
+
}
|
|
3837
|
+
}
|
|
3838
|
+
finally {
|
|
3839
|
+
reader.releaseLock();
|
|
3840
|
+
}
|
|
3841
|
+
});
|
|
3842
|
+
}
|
|
3843
|
+
function isReadableStreamLike(obj) {
|
|
3844
|
+
return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);
|
|
3845
|
+
}
|
|
3846
|
+
|
|
3847
|
+
function innerFrom(input) {
|
|
3848
|
+
if (input instanceof Observable) {
|
|
3849
|
+
return input;
|
|
3850
|
+
}
|
|
3851
|
+
if (input != null) {
|
|
3852
|
+
if (isInteropObservable(input)) {
|
|
3853
|
+
return fromInteropObservable(input);
|
|
3854
|
+
}
|
|
3855
|
+
if (isArrayLike(input)) {
|
|
3856
|
+
return fromArrayLike(input);
|
|
3857
|
+
}
|
|
3858
|
+
if (isPromise(input)) {
|
|
3859
|
+
return fromPromise(input);
|
|
3860
|
+
}
|
|
3861
|
+
if (isAsyncIterable(input)) {
|
|
3862
|
+
return fromAsyncIterable(input);
|
|
3863
|
+
}
|
|
3864
|
+
if (isIterable(input)) {
|
|
3865
|
+
return fromIterable(input);
|
|
3866
|
+
}
|
|
3867
|
+
if (isReadableStreamLike(input)) {
|
|
3868
|
+
return fromReadableStreamLike(input);
|
|
3869
|
+
}
|
|
3870
|
+
}
|
|
3871
|
+
throw createInvalidObservableTypeError(input);
|
|
3872
|
+
}
|
|
3873
|
+
function fromInteropObservable(obj) {
|
|
3874
|
+
return new Observable((subscriber) => {
|
|
3875
|
+
const obs = obj[observable]();
|
|
3876
|
+
if (isFunction(obs.subscribe)) {
|
|
3877
|
+
return obs.subscribe(subscriber);
|
|
3878
|
+
}
|
|
3879
|
+
throw new TypeError('Provided object does not correctly implement Symbol.observable');
|
|
3880
|
+
});
|
|
3881
|
+
}
|
|
3882
|
+
function fromArrayLike(array) {
|
|
3883
|
+
return new Observable((subscriber) => {
|
|
3884
|
+
for (let i = 0; i < array.length && !subscriber.closed; i++) {
|
|
3885
|
+
subscriber.next(array[i]);
|
|
3886
|
+
}
|
|
3887
|
+
subscriber.complete();
|
|
3888
|
+
});
|
|
3889
|
+
}
|
|
3890
|
+
function fromPromise(promise) {
|
|
3891
|
+
return new Observable((subscriber) => {
|
|
3892
|
+
promise
|
|
3893
|
+
.then((value) => {
|
|
3894
|
+
if (!subscriber.closed) {
|
|
3895
|
+
subscriber.next(value);
|
|
3896
|
+
subscriber.complete();
|
|
3897
|
+
}
|
|
3898
|
+
}, (err) => subscriber.error(err))
|
|
3899
|
+
.then(null, reportUnhandledError);
|
|
3900
|
+
});
|
|
3901
|
+
}
|
|
3902
|
+
function fromIterable(iterable) {
|
|
3903
|
+
return new Observable((subscriber) => {
|
|
3904
|
+
for (const value of iterable) {
|
|
3905
|
+
subscriber.next(value);
|
|
3906
|
+
if (subscriber.closed) {
|
|
3907
|
+
return;
|
|
3908
|
+
}
|
|
3909
|
+
}
|
|
3910
|
+
subscriber.complete();
|
|
3911
|
+
});
|
|
3912
|
+
}
|
|
3913
|
+
function fromAsyncIterable(asyncIterable) {
|
|
3914
|
+
return new Observable((subscriber) => {
|
|
3915
|
+
process(asyncIterable, subscriber).catch((err) => subscriber.error(err));
|
|
3916
|
+
});
|
|
3917
|
+
}
|
|
3918
|
+
function fromReadableStreamLike(readableStream) {
|
|
3919
|
+
return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));
|
|
3920
|
+
}
|
|
3921
|
+
function process(asyncIterable, subscriber) {
|
|
3922
|
+
var asyncIterable_1, asyncIterable_1_1;
|
|
3923
|
+
var e_1, _a;
|
|
3924
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3925
|
+
try {
|
|
3926
|
+
for (asyncIterable_1 = __asyncValues(asyncIterable); asyncIterable_1_1 = yield asyncIterable_1.next(), !asyncIterable_1_1.done;) {
|
|
3927
|
+
const value = asyncIterable_1_1.value;
|
|
3928
|
+
subscriber.next(value);
|
|
3929
|
+
if (subscriber.closed) {
|
|
3930
|
+
return;
|
|
3931
|
+
}
|
|
3932
|
+
}
|
|
3933
|
+
}
|
|
3934
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3935
|
+
finally {
|
|
3936
|
+
try {
|
|
3937
|
+
if (asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return)) yield _a.call(asyncIterable_1);
|
|
3938
|
+
}
|
|
3939
|
+
finally { if (e_1) throw e_1.error; }
|
|
3940
|
+
}
|
|
3941
|
+
subscriber.complete();
|
|
3942
|
+
});
|
|
3943
|
+
}
|
|
3944
|
+
|
|
3945
|
+
function executeSchedule(parentSubscription, scheduler, work, delay = 0, repeat = false) {
|
|
3946
|
+
const scheduleSubscription = scheduler.schedule(function () {
|
|
3947
|
+
work();
|
|
3948
|
+
if (repeat) {
|
|
3949
|
+
parentSubscription.add(this.schedule(null, delay));
|
|
3950
|
+
}
|
|
3951
|
+
else {
|
|
3952
|
+
this.unsubscribe();
|
|
3953
|
+
}
|
|
3954
|
+
}, delay);
|
|
3955
|
+
parentSubscription.add(scheduleSubscription);
|
|
3956
|
+
if (!repeat) {
|
|
3957
|
+
return scheduleSubscription;
|
|
3958
|
+
}
|
|
3959
|
+
}
|
|
3960
|
+
|
|
3961
|
+
function observeOn(scheduler, delay = 0) {
|
|
3962
|
+
return operate((source, subscriber) => {
|
|
3963
|
+
source.subscribe(createOperatorSubscriber(subscriber, (value) => executeSchedule(subscriber, scheduler, () => subscriber.next(value), delay), () => executeSchedule(subscriber, scheduler, () => subscriber.complete(), delay), (err) => executeSchedule(subscriber, scheduler, () => subscriber.error(err), delay)));
|
|
3964
|
+
});
|
|
3965
|
+
}
|
|
3966
|
+
|
|
3967
|
+
function subscribeOn(scheduler, delay = 0) {
|
|
3968
|
+
return operate((source, subscriber) => {
|
|
3969
|
+
subscriber.add(scheduler.schedule(() => source.subscribe(subscriber), delay));
|
|
3970
|
+
});
|
|
3971
|
+
}
|
|
3972
|
+
|
|
3973
|
+
function scheduleObservable(input, scheduler) {
|
|
3974
|
+
return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
|
|
3975
|
+
}
|
|
3976
|
+
|
|
3977
|
+
function schedulePromise(input, scheduler) {
|
|
3978
|
+
return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
|
|
3979
|
+
}
|
|
3980
|
+
|
|
3981
|
+
function scheduleArray(input, scheduler) {
|
|
3982
|
+
return new Observable((subscriber) => {
|
|
3983
|
+
let i = 0;
|
|
3984
|
+
return scheduler.schedule(function () {
|
|
3985
|
+
if (i === input.length) {
|
|
3986
|
+
subscriber.complete();
|
|
3987
|
+
}
|
|
3988
|
+
else {
|
|
3989
|
+
subscriber.next(input[i++]);
|
|
3990
|
+
if (!subscriber.closed) {
|
|
3991
|
+
this.schedule();
|
|
3992
|
+
}
|
|
3993
|
+
}
|
|
3994
|
+
});
|
|
3995
|
+
});
|
|
3996
|
+
}
|
|
3997
|
+
|
|
3998
|
+
function scheduleIterable(input, scheduler) {
|
|
3999
|
+
return new Observable((subscriber) => {
|
|
4000
|
+
let iterator$1;
|
|
4001
|
+
executeSchedule(subscriber, scheduler, () => {
|
|
4002
|
+
iterator$1 = input[iterator]();
|
|
4003
|
+
executeSchedule(subscriber, scheduler, () => {
|
|
4004
|
+
let value;
|
|
4005
|
+
let done;
|
|
4006
|
+
try {
|
|
4007
|
+
({ value, done } = iterator$1.next());
|
|
4008
|
+
}
|
|
4009
|
+
catch (err) {
|
|
4010
|
+
subscriber.error(err);
|
|
4011
|
+
return;
|
|
4012
|
+
}
|
|
4013
|
+
if (done) {
|
|
4014
|
+
subscriber.complete();
|
|
4015
|
+
}
|
|
4016
|
+
else {
|
|
4017
|
+
subscriber.next(value);
|
|
4018
|
+
}
|
|
4019
|
+
}, 0, true);
|
|
4020
|
+
});
|
|
4021
|
+
return () => isFunction(iterator$1 === null || iterator$1 === void 0 ? void 0 : iterator$1.return) && iterator$1.return();
|
|
4022
|
+
});
|
|
4023
|
+
}
|
|
4024
|
+
|
|
4025
|
+
function scheduleAsyncIterable(input, scheduler) {
|
|
4026
|
+
if (!input) {
|
|
4027
|
+
throw new Error('Iterable cannot be null');
|
|
4028
|
+
}
|
|
4029
|
+
return new Observable((subscriber) => {
|
|
4030
|
+
executeSchedule(subscriber, scheduler, () => {
|
|
4031
|
+
const iterator = input[Symbol.asyncIterator]();
|
|
4032
|
+
executeSchedule(subscriber, scheduler, () => {
|
|
4033
|
+
iterator.next().then((result) => {
|
|
4034
|
+
if (result.done) {
|
|
4035
|
+
subscriber.complete();
|
|
4036
|
+
}
|
|
4037
|
+
else {
|
|
4038
|
+
subscriber.next(result.value);
|
|
4039
|
+
}
|
|
4040
|
+
});
|
|
4041
|
+
}, 0, true);
|
|
4042
|
+
});
|
|
4043
|
+
});
|
|
4044
|
+
}
|
|
4045
|
+
|
|
4046
|
+
function scheduleReadableStreamLike(input, scheduler) {
|
|
4047
|
+
return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);
|
|
4048
|
+
}
|
|
4049
|
+
|
|
4050
|
+
function scheduled(input, scheduler) {
|
|
4051
|
+
if (input != null) {
|
|
4052
|
+
if (isInteropObservable(input)) {
|
|
4053
|
+
return scheduleObservable(input, scheduler);
|
|
4054
|
+
}
|
|
4055
|
+
if (isArrayLike(input)) {
|
|
4056
|
+
return scheduleArray(input, scheduler);
|
|
4057
|
+
}
|
|
4058
|
+
if (isPromise(input)) {
|
|
4059
|
+
return schedulePromise(input, scheduler);
|
|
4060
|
+
}
|
|
4061
|
+
if (isAsyncIterable(input)) {
|
|
4062
|
+
return scheduleAsyncIterable(input, scheduler);
|
|
4063
|
+
}
|
|
4064
|
+
if (isIterable(input)) {
|
|
4065
|
+
return scheduleIterable(input, scheduler);
|
|
4066
|
+
}
|
|
4067
|
+
if (isReadableStreamLike(input)) {
|
|
4068
|
+
return scheduleReadableStreamLike(input, scheduler);
|
|
4069
|
+
}
|
|
4070
|
+
}
|
|
4071
|
+
throw createInvalidObservableTypeError(input);
|
|
4072
|
+
}
|
|
4073
|
+
|
|
4074
|
+
function from(input, scheduler) {
|
|
4075
|
+
return scheduler ? scheduled(input, scheduler) : innerFrom(input);
|
|
4076
|
+
}
|
|
4077
|
+
|
|
4078
|
+
function map(project, thisArg) {
|
|
4079
|
+
return operate((source, subscriber) => {
|
|
4080
|
+
let index = 0;
|
|
4081
|
+
source.subscribe(createOperatorSubscriber(subscriber, (value) => {
|
|
4082
|
+
subscriber.next(project.call(thisArg, value, index++));
|
|
4083
|
+
}));
|
|
4084
|
+
});
|
|
4085
|
+
}
|
|
4086
|
+
|
|
4087
|
+
const { isArray } = Array;
|
|
4088
|
+
function callOrApply(fn, args) {
|
|
4089
|
+
return isArray(args) ? fn(...args) : fn(args);
|
|
4090
|
+
}
|
|
4091
|
+
function mapOneOrManyArgs(fn) {
|
|
4092
|
+
return map(args => callOrApply(fn, args));
|
|
4093
|
+
}
|
|
4094
|
+
|
|
4095
|
+
function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {
|
|
4096
|
+
const buffer = [];
|
|
4097
|
+
let active = 0;
|
|
4098
|
+
let index = 0;
|
|
4099
|
+
let isComplete = false;
|
|
4100
|
+
const checkComplete = () => {
|
|
4101
|
+
if (isComplete && !buffer.length && !active) {
|
|
4102
|
+
subscriber.complete();
|
|
4103
|
+
}
|
|
4104
|
+
};
|
|
4105
|
+
const outerNext = (value) => (active < concurrent ? doInnerSub(value) : buffer.push(value));
|
|
4106
|
+
const doInnerSub = (value) => {
|
|
4107
|
+
expand && subscriber.next(value);
|
|
4108
|
+
active++;
|
|
4109
|
+
let innerComplete = false;
|
|
4110
|
+
innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, (innerValue) => {
|
|
4111
|
+
onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);
|
|
4112
|
+
if (expand) {
|
|
4113
|
+
outerNext(innerValue);
|
|
4114
|
+
}
|
|
4115
|
+
else {
|
|
4116
|
+
subscriber.next(innerValue);
|
|
4117
|
+
}
|
|
4118
|
+
}, () => {
|
|
4119
|
+
innerComplete = true;
|
|
4120
|
+
}, undefined, () => {
|
|
4121
|
+
if (innerComplete) {
|
|
4122
|
+
try {
|
|
4123
|
+
active--;
|
|
4124
|
+
while (buffer.length && active < concurrent) {
|
|
4125
|
+
const bufferedValue = buffer.shift();
|
|
4126
|
+
if (innerSubScheduler) {
|
|
4127
|
+
executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));
|
|
4128
|
+
}
|
|
4129
|
+
else {
|
|
4130
|
+
doInnerSub(bufferedValue);
|
|
4131
|
+
}
|
|
4132
|
+
}
|
|
4133
|
+
checkComplete();
|
|
4134
|
+
}
|
|
4135
|
+
catch (err) {
|
|
4136
|
+
subscriber.error(err);
|
|
4137
|
+
}
|
|
4138
|
+
}
|
|
4139
|
+
}));
|
|
4140
|
+
};
|
|
4141
|
+
source.subscribe(createOperatorSubscriber(subscriber, outerNext, () => {
|
|
4142
|
+
isComplete = true;
|
|
4143
|
+
checkComplete();
|
|
4144
|
+
}));
|
|
4145
|
+
return () => {
|
|
4146
|
+
additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();
|
|
4147
|
+
};
|
|
4148
|
+
}
|
|
4149
|
+
|
|
4150
|
+
function mergeMap(project, resultSelector, concurrent = Infinity) {
|
|
4151
|
+
if (isFunction(resultSelector)) {
|
|
4152
|
+
return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);
|
|
4153
|
+
}
|
|
4154
|
+
else if (typeof resultSelector === 'number') {
|
|
4155
|
+
concurrent = resultSelector;
|
|
4156
|
+
}
|
|
4157
|
+
return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));
|
|
4158
|
+
}
|
|
4159
|
+
|
|
4160
|
+
function mergeAll(concurrent = Infinity) {
|
|
4161
|
+
return mergeMap(identity, concurrent);
|
|
4162
|
+
}
|
|
4163
|
+
|
|
4164
|
+
const nodeEventEmitterMethods = ['addListener', 'removeListener'];
|
|
4165
|
+
const eventTargetMethods = ['addEventListener', 'removeEventListener'];
|
|
4166
|
+
const jqueryMethods = ['on', 'off'];
|
|
4167
|
+
function fromEvent(target, eventName, options, resultSelector) {
|
|
4168
|
+
if (isFunction(options)) {
|
|
4169
|
+
resultSelector = options;
|
|
4170
|
+
options = undefined;
|
|
4171
|
+
}
|
|
4172
|
+
if (resultSelector) {
|
|
4173
|
+
return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector));
|
|
4174
|
+
}
|
|
4175
|
+
const [add, remove] = isEventTarget(target)
|
|
4176
|
+
? eventTargetMethods.map((methodName) => (handler) => target[methodName](eventName, handler, options))
|
|
4177
|
+
:
|
|
4178
|
+
isNodeStyleEventEmitter(target)
|
|
4179
|
+
? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))
|
|
4180
|
+
: isJQueryStyleEventEmitter(target)
|
|
4181
|
+
? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))
|
|
4182
|
+
: [];
|
|
4183
|
+
if (!add) {
|
|
4184
|
+
if (isArrayLike(target)) {
|
|
4185
|
+
return mergeMap((subTarget) => fromEvent(subTarget, eventName, options))(innerFrom(target));
|
|
4186
|
+
}
|
|
4187
|
+
}
|
|
4188
|
+
if (!add) {
|
|
4189
|
+
throw new TypeError('Invalid event target');
|
|
4190
|
+
}
|
|
4191
|
+
return new Observable((subscriber) => {
|
|
4192
|
+
const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]);
|
|
4193
|
+
add(handler);
|
|
4194
|
+
return () => remove(handler);
|
|
4195
|
+
});
|
|
4196
|
+
}
|
|
4197
|
+
function toCommonHandlerRegistry(target, eventName) {
|
|
4198
|
+
return (methodName) => (handler) => target[methodName](eventName, handler);
|
|
4199
|
+
}
|
|
4200
|
+
function isNodeStyleEventEmitter(target) {
|
|
4201
|
+
return isFunction(target.addListener) && isFunction(target.removeListener);
|
|
4202
|
+
}
|
|
4203
|
+
function isJQueryStyleEventEmitter(target) {
|
|
4204
|
+
return isFunction(target.on) && isFunction(target.off);
|
|
4205
|
+
}
|
|
4206
|
+
function isEventTarget(target) {
|
|
4207
|
+
return isFunction(target.addEventListener) && isFunction(target.removeEventListener);
|
|
4208
|
+
}
|
|
4209
|
+
|
|
4210
|
+
function merge(...args) {
|
|
4211
|
+
const scheduler = popScheduler(args);
|
|
4212
|
+
const concurrent = popNumber(args, Infinity);
|
|
4213
|
+
const sources = args;
|
|
4214
|
+
return !sources.length
|
|
4215
|
+
?
|
|
4216
|
+
EMPTY
|
|
4217
|
+
: sources.length === 1
|
|
4218
|
+
?
|
|
4219
|
+
innerFrom(sources[0])
|
|
4220
|
+
:
|
|
4221
|
+
mergeAll(concurrent)(from(sources, scheduler));
|
|
4222
|
+
}
|
|
4223
|
+
|
|
4224
|
+
function filter(predicate, thisArg) {
|
|
4225
|
+
return operate((source, subscriber) => {
|
|
4226
|
+
let index = 0;
|
|
4227
|
+
source.subscribe(createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value)));
|
|
4228
|
+
});
|
|
4229
|
+
}
|
|
4230
|
+
|
|
4231
|
+
function distinctUntilChanged(comparator, keySelector = identity) {
|
|
4232
|
+
comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;
|
|
4233
|
+
return operate((source, subscriber) => {
|
|
4234
|
+
let previousKey;
|
|
4235
|
+
let first = true;
|
|
4236
|
+
source.subscribe(createOperatorSubscriber(subscriber, (value) => {
|
|
4237
|
+
const currentKey = keySelector(value);
|
|
4238
|
+
if (first || !comparator(previousKey, currentKey)) {
|
|
4239
|
+
first = false;
|
|
4240
|
+
previousKey = currentKey;
|
|
4241
|
+
subscriber.next(value);
|
|
4242
|
+
}
|
|
4243
|
+
}));
|
|
4244
|
+
});
|
|
4245
|
+
}
|
|
4246
|
+
function defaultCompare(a, b) {
|
|
4247
|
+
return a === b;
|
|
4248
|
+
}
|
|
4249
|
+
|
|
4250
|
+
function takeUntil(notifier) {
|
|
4251
|
+
return operate((source, subscriber) => {
|
|
4252
|
+
innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));
|
|
4253
|
+
!subscriber.closed && source.subscribe(subscriber);
|
|
4254
|
+
});
|
|
4255
|
+
}
|
|
4256
|
+
|
|
4257
|
+
const catScrollableCss = ":host{overflow:hidden;position:relative;display:flex}:host([hidden]){display:none}.shadow-bottom,.shadow-right,.shadow-left,.shadow-top{position:absolute;transition:box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1)}.shadow-top{z-index:2;width:100%;top:0}.shadow-left{z-index:4;height:100%;left:0}.shadow-right{z-index:4;height:100%;right:0}.shadow-bottom{z-index:2;width:100%;bottom:0}.scrollable-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none}.scrollable-wrapper.cat-scrollable-top .shadow-top,.scrollable-wrapper.cat-scrollable-bottom .shadow-bottom,.scrollable-wrapper.cat-scrollable-left .shadow-left,.scrollable-wrapper.cat-scrollable-right .shadow-right{box-shadow:0 0 4px 1px rgba(16, 29, 48, 0.2)}.scrollable-content{overflow:hidden;white-space:nowrap}.scrollable-content.scroll-x{overflow-x:auto}.scrollable-content.scroll-y{overflow-y:auto}.scrollable-content.no-overscroll{overscroll-behavior:contain}";
|
|
4258
|
+
|
|
4259
|
+
const CatScrollable = class {
|
|
4260
|
+
constructor(hostRef) {
|
|
4261
|
+
registerInstance(this, hostRef);
|
|
4262
|
+
this.scrolledTop = createEvent(this, "scrolledTop", 7);
|
|
4263
|
+
this.scrolledLeft = createEvent(this, "scrolledLeft", 7);
|
|
4264
|
+
this.scrolledRight = createEvent(this, "scrolledRight", 7);
|
|
4265
|
+
this.scrolledBottom = createEvent(this, "scrolledBottom", 7);
|
|
4266
|
+
this.init = new Subject();
|
|
4267
|
+
this.destroyed = new Subject();
|
|
4268
|
+
/** Flags to enable/disable scroll shadowX. */
|
|
4269
|
+
this.shadowX = true;
|
|
4270
|
+
/** Flags to enable/disable scroll shadowY. */
|
|
4271
|
+
this.shadowY = true;
|
|
4272
|
+
/** Flags to enable/disable overflowX. */
|
|
4273
|
+
this.overflowX = true;
|
|
4274
|
+
/** Flags to enable/disable overflowY. */
|
|
4275
|
+
this.overflowY = true;
|
|
4276
|
+
/** Flag to enable/disable overscroll behavior. */
|
|
4277
|
+
this.overscroll = true;
|
|
4278
|
+
/**
|
|
4279
|
+
* Flag to fire an initial event after content initialization.
|
|
4280
|
+
*/
|
|
4281
|
+
this.scrolledInit = true;
|
|
4282
|
+
/**
|
|
4283
|
+
* Buffer to be used to calculate the scroll distance.
|
|
4284
|
+
*/
|
|
4285
|
+
this.scrolledBuffer = 0;
|
|
4286
|
+
}
|
|
4287
|
+
componentDidRender() {
|
|
4288
|
+
if (this.scrollElement) {
|
|
4289
|
+
this.scrolled = fromEvent(this.scrollElement, 'scroll').pipe(takeUntil(this.destroyed));
|
|
4290
|
+
}
|
|
4291
|
+
this.attachEmitter('left', this.scrolledLeft, this.scrolledBuffer);
|
|
4292
|
+
this.attachEmitter('right', this.scrolledRight, this.scrolledBuffer);
|
|
4293
|
+
this.attachEmitter('bottom', this.scrolledBottom, this.scrolledBuffer);
|
|
4294
|
+
this.attachEmitter('top', this.scrolledTop, this.scrolledBuffer);
|
|
4295
|
+
merge(this.init, this.scrolled)
|
|
4296
|
+
.pipe(map(() => ({
|
|
4297
|
+
top: this.getScrollOffset('top') > 0,
|
|
4298
|
+
left: this.getScrollOffset('left') > 0,
|
|
4299
|
+
right: this.getScrollOffset('right') > 0,
|
|
4300
|
+
bottom: this.getScrollOffset('bottom') > 0
|
|
4301
|
+
})), distinctUntilChanged(), takeUntil(this.destroyed))
|
|
4302
|
+
.subscribe(({ top, left, right, bottom }) => {
|
|
4303
|
+
this.toggleClass('cat-scrollable-top', top);
|
|
4304
|
+
this.toggleClass('cat-scrollable-left', left);
|
|
4305
|
+
this.toggleClass('cat-scrollable-right', right);
|
|
4306
|
+
this.toggleClass('cat-scrollable-bottom', bottom);
|
|
4307
|
+
});
|
|
4308
|
+
}
|
|
4309
|
+
componentDidLoad() {
|
|
4310
|
+
if (this.scrolledInit) {
|
|
4311
|
+
this.init.next();
|
|
4312
|
+
}
|
|
4313
|
+
}
|
|
4314
|
+
disconnectedCallback() {
|
|
4315
|
+
this.init.complete();
|
|
4316
|
+
this.destroyed.next();
|
|
4317
|
+
this.destroyed.complete();
|
|
4318
|
+
}
|
|
4319
|
+
render() {
|
|
4320
|
+
return [
|
|
4321
|
+
h("div", { class: "scrollable-wrapper", ref: el => (this.scrollWrapperElement = el) }, this.shadowY && h("div", { class: "shadow-top" }), this.shadowX && h("div", { class: "shadow-left" }), this.shadowX && h("div", { class: "shadow-right" }), this.shadowY && h("div", { class: "shadow-bottom" })),
|
|
4322
|
+
h("div", { ref: el => (this.scrollElement = el), class: {
|
|
4323
|
+
'scrollable-content': true,
|
|
4324
|
+
'scroll-x': this.overflowX,
|
|
4325
|
+
'scroll-y': this.overflowY,
|
|
4326
|
+
'no-overscroll': !this.overscroll
|
|
4327
|
+
} }, h("slot", null))
|
|
4328
|
+
];
|
|
4329
|
+
}
|
|
4330
|
+
attachEmitter(from, emitter, buffer) {
|
|
4331
|
+
merge(this.init, this.scrolled)
|
|
4332
|
+
.pipe(map(() => this.getScrollOffset(from)))
|
|
4333
|
+
.pipe(map(offset => offset <= buffer))
|
|
4334
|
+
.pipe(distinctUntilChanged())
|
|
4335
|
+
.pipe(filter(isLower => isLower))
|
|
4336
|
+
.pipe(takeUntil(this.destroyed))
|
|
4337
|
+
.subscribe(() => emitter.emit());
|
|
4338
|
+
}
|
|
4339
|
+
getScrollOffset(from) {
|
|
4340
|
+
if (this.scrollElement) {
|
|
4341
|
+
switch (from) {
|
|
4342
|
+
case 'top':
|
|
4343
|
+
return this.scrollElement.scrollTop;
|
|
4344
|
+
case 'left':
|
|
4345
|
+
return this.scrollElement.scrollLeft;
|
|
4346
|
+
case 'right':
|
|
4347
|
+
return this.scrollElement.scrollWidth - this.scrollElement.clientWidth - this.scrollElement.scrollLeft;
|
|
4348
|
+
case 'bottom':
|
|
4349
|
+
return this.scrollElement.scrollHeight - this.scrollElement.clientHeight - this.scrollElement.scrollTop;
|
|
4350
|
+
default:
|
|
4351
|
+
return 0;
|
|
4352
|
+
}
|
|
4353
|
+
}
|
|
4354
|
+
return 0;
|
|
4355
|
+
}
|
|
4356
|
+
toggleClass(name, value) {
|
|
4357
|
+
var _a, _b;
|
|
4358
|
+
if (value) {
|
|
4359
|
+
(_a = this.scrollWrapperElement) === null || _a === void 0 ? void 0 : _a.classList.add(name);
|
|
4360
|
+
}
|
|
4361
|
+
else {
|
|
4362
|
+
(_b = this.scrollWrapperElement) === null || _b === void 0 ? void 0 : _b.classList.remove(name);
|
|
4363
|
+
}
|
|
4364
|
+
}
|
|
4365
|
+
get el() { return getElement(this); }
|
|
4366
|
+
};
|
|
4367
|
+
CatScrollable.style = catScrollableCss;
|
|
4368
|
+
|
|
3037
4369
|
const catSkeletonCss = ":host{display:flex;flex-direction:column;position:relative;--background:#ebecf0;--highlight:#d7dbe0;--speed:2s}:host([variant=square]),:host([variant=circle]){display:inline-flex}:host([hidden]){display:none}:host([variant=head]){margin-bottom:0.5rem}:host([variant=body]){margin-bottom:1rem}.cat-skeleton{display:block;border-radius:0.25rem;background:var(--background)}.cat-skeleton-circle{border-radius:10rem}.cat-skeleton-xs.cat-skeleton-rectangle{width:var(--width, 100%);height:var(--height, 1.5rem)}.cat-skeleton-xs.cat-skeleton-square,.cat-skeleton-xs.cat-skeleton-circle{width:var(--width, 1.5rem);height:var(--height, 1.5rem)}.cat-skeleton-xs.cat-skeleton-head,.cat-skeleton-xs.cat-skeleton-body{width:var(--width, var(--line-width, 100%))}.cat-skeleton-xs.cat-skeleton-head{height:calc(0.9375rem - 4px);margin:calc((1.25rem - 0.9375rem + 4px) * 0.5) 0}.cat-skeleton-xs.cat-skeleton-body{height:calc(0.75rem - 4px);margin:calc((1rem - 0.75rem + 4px) * 0.5) 0}.cat-skeleton-s.cat-skeleton-rectangle{width:var(--width, 100%);height:var(--height, 2rem)}.cat-skeleton-s.cat-skeleton-square,.cat-skeleton-s.cat-skeleton-circle{width:var(--width, 2rem);height:var(--height, 2rem)}.cat-skeleton-s.cat-skeleton-head,.cat-skeleton-s.cat-skeleton-body{width:var(--width, var(--line-width, 100%))}.cat-skeleton-s.cat-skeleton-head{height:calc(1.125rem - 4px);margin:calc((1.5rem - 1.125rem + 4px) * 0.5) 0}.cat-skeleton-s.cat-skeleton-body{height:calc(0.875rem - 4px);margin:calc((1rem - 0.875rem + 4px) * 0.5) 0}.cat-skeleton-m.cat-skeleton-rectangle{width:var(--width, 100%);height:var(--height, 2.5rem)}.cat-skeleton-m.cat-skeleton-square,.cat-skeleton-m.cat-skeleton-circle{width:var(--width, 2.5rem);height:var(--height, 2.5rem)}.cat-skeleton-m.cat-skeleton-head,.cat-skeleton-m.cat-skeleton-body{width:var(--width, var(--line-width, 100%))}.cat-skeleton-m.cat-skeleton-head{height:calc(1.25rem - 4px);margin:calc((1.5rem - 1.25rem + 4px) * 0.5) 0}.cat-skeleton-m.cat-skeleton-body{height:calc(0.9375rem - 4px);margin:calc((1.25rem - 0.9375rem + 4px) * 0.5) 0}.cat-skeleton-l.cat-skeleton-rectangle{width:var(--width, 100%);height:var(--height, 3rem)}.cat-skeleton-l.cat-skeleton-square,.cat-skeleton-l.cat-skeleton-circle{width:var(--width, 3rem);height:var(--height, 3rem)}.cat-skeleton-l.cat-skeleton-head,.cat-skeleton-l.cat-skeleton-body{width:var(--width, var(--line-width, 100%))}.cat-skeleton-l.cat-skeleton-head{height:calc(1.5rem - 4px);margin:calc((1.75rem - 1.5rem + 4px) * 0.5) 0}.cat-skeleton-l.cat-skeleton-body{height:calc(1.125rem - 4px);margin:calc((1.5rem - 1.125rem + 4px) * 0.5) 0}.cat-skeleton-xl.cat-skeleton-rectangle{width:var(--width, 100%);height:var(--height, 3.5rem)}.cat-skeleton-xl.cat-skeleton-square,.cat-skeleton-xl.cat-skeleton-circle{width:var(--width, 3.5rem);height:var(--height, 3.5rem)}.cat-skeleton-xl.cat-skeleton-head,.cat-skeleton-xl.cat-skeleton-body{width:var(--width, var(--line-width, 100%))}.cat-skeleton-xl.cat-skeleton-head{height:calc(1.75rem - 4px);margin:calc((2rem - 1.75rem + 4px) * 0.5) 0}.cat-skeleton-xl.cat-skeleton-body{height:calc(1.25rem - 4px);margin:calc((1.5rem - 1.25rem + 4px) * 0.5) 0}.cat-skeleton-sheen{background:linear-gradient(90deg, var(--background) 33%, var(--highlight) 50%, var(--background) 66%) var(--background);background-size:300% 100%;animation:sheen var(--speed) ease-in-out infinite}.cat-skeleton-pulse{position:relative;overflow:hidden}.cat-skeleton-pulse::before{content:\"\";display:block;position:absolute;width:100%;height:100%;background-color:var(--highlight);animation:var(--speed) ease-in-out 0.5s infinite normal none running pulse;opacity:0}@keyframes sheen{0%{background-position:right}}@keyframes pulse{50%{opacity:1}}";
|
|
3038
4370
|
|
|
3039
4371
|
const CatSkeleton = class {
|
|
@@ -3102,4 +4434,6 @@ const CatSpinner = class {
|
|
|
3102
4434
|
};
|
|
3103
4435
|
CatSpinner.style = catSpinnerCss;
|
|
3104
4436
|
|
|
3105
|
-
export { CatAlert as cat_alert, CatBadge as cat_badge, CatButton as cat_button, CatIcon as cat_icon, CatMenu as cat_menu, CatSkeleton as cat_skeleton, CatSpinner as cat_spinner };
|
|
4437
|
+
export { CatAlert as cat_alert, CatBadge as cat_badge, CatButton as cat_button, CatIcon as cat_icon, CatMenu as cat_menu, CatScrollable as cat_scrollable, CatSkeleton as cat_skeleton, CatSpinner as cat_spinner };
|
|
4438
|
+
|
|
4439
|
+
//# sourceMappingURL=cat-alert_8.entry.js.map
|