@lmvz-ds/components 0.16.0 → 0.17.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/cjs/{icons-BOM23oli.js → Effect-DdYOHaR4.js} +153 -889
- package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -3
- package/dist/cjs/aria-loader-BRxRUIyi.js +121 -0
- package/dist/cjs/{assets-XY-cBmal.js → assets-OvQ-WUwR.js} +2 -5
- package/dist/cjs/component-Csg9MtNK.js +140 -0
- package/dist/cjs/element-activation-controller-DC_6T0Rt.js +31 -0
- package/dist/cjs/icons-EHBLbidD.js +653 -0
- package/dist/cjs/{index-ww_DCXU7.js → index-BBqtydE-.js} +426 -431
- package/dist/cjs/index-Bp6Dd2i1.js +94 -0
- package/dist/cjs/{index-B1Puzu82.js → index-CH-YLRgg.js} +650 -10
- package/dist/cjs/index.cjs.js +12 -13
- package/dist/cjs/lmvz-action.cjs.entry.js +2 -5
- package/dist/cjs/lmvz-button.cjs.entry.js +73 -0
- package/dist/cjs/lmvz-card.cjs.entry.js +3 -6
- package/dist/cjs/lmvz-chip.cjs.entry.js +2 -5
- package/dist/cjs/lmvz-components.cjs.js +2 -5
- package/dist/cjs/lmvz-header_2.cjs.entry.js +153 -0
- package/dist/cjs/lmvz-icon.cjs.entry.js +87 -0
- package/dist/cjs/lmvz-input.cjs.entry.js +183 -0
- package/dist/cjs/lmvz-menuitem.cjs.entry.js +36 -0
- package/dist/cjs/lmvz-select.cjs.entry.js +71 -0
- package/dist/cjs/loader.cjs.js +2 -5
- package/dist/cjs/reactive-controller-host-vy1TIIXv.js +189 -0
- package/dist/collection/api/ds.constants.js +0 -1
- package/dist/collection/api/index.js +0 -1
- package/dist/collection/collection-manifest.json +13 -1
- package/dist/collection/components/lmvz-action/lmvz-action.js +1 -2
- package/dist/collection/components/lmvz-button/lmvz-button.css +2 -24
- package/dist/collection/components/lmvz-button/lmvz-button.js +1 -2
- package/dist/collection/components/lmvz-card/lmvz-card.css +2 -24
- package/dist/collection/components/lmvz-card/lmvz-card.js +1 -2
- package/dist/collection/components/lmvz-chip/lmvz-chip.js +1 -2
- package/dist/collection/components/lmvz-header/lmvz-header.js +1 -2
- package/dist/collection/components/lmvz-icon/icons.js +0 -1
- package/dist/collection/components/lmvz-icon/lmvz-icon.js +1 -2
- package/dist/collection/components/lmvz-icon/public.js +0 -1
- package/dist/collection/components/lmvz-icon/test/icons.unit.js +0 -1
- package/dist/collection/components/lmvz-input/lmvz-input.css +2 -24
- package/dist/collection/components/lmvz-input/lmvz-input.js +2 -3
- package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.css +2 -24
- package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.js +1 -2
- package/dist/collection/components/lmvz-select/lmvz-select.css +2 -24
- package/dist/collection/components/lmvz-select/lmvz-select.js +1 -2
- package/dist/collection/index.js +0 -1
- package/dist/collection/integration/header-integration.js +1 -2
- package/dist/collection/utils/aria/aria-validation-controller.js +0 -1
- package/dist/collection/utils/aria/element-activation-controller.js +0 -1
- package/dist/collection/utils/aria/list-keyboard-controller.js +0 -1
- package/dist/collection/utils/assets.js +0 -1
- package/dist/collection/utils/component.js +0 -1
- package/dist/collection/utils/effect.js +0 -1
- package/dist/collection/utils/environment.js +0 -1
- package/dist/collection/utils/http.js +0 -1
- package/dist/collection/utils/http.unit.js +0 -1
- package/dist/collection/utils/public.js +0 -1
- package/dist/collection/utils/reactive-controller-host.js +0 -1
- package/dist/collection/utils/validation/svg.js +0 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.js +1 -2
- package/dist/components/lmvz-action.js +1 -2
- package/dist/components/lmvz-button.js +1 -2
- package/dist/components/lmvz-card.js +1 -2
- package/dist/components/lmvz-chip.js +1 -2
- package/dist/components/lmvz-header.js +1 -2
- package/dist/components/lmvz-icon.js +1 -2
- package/dist/components/lmvz-input.js +1 -2
- package/dist/components/lmvz-menuitem.js +1 -2
- package/dist/components/lmvz-select.js +1 -2
- package/dist/components/p-BfTCfPZ1.js +2 -3
- package/dist/components/p-BsHYIl56.js +1 -2
- package/dist/components/p-CKtksB0G.js +1 -0
- package/dist/components/p-CN0JX9-m.js +1 -2
- package/dist/components/p-CahBdGGN.js +1 -0
- package/dist/components/p-DQEkWkMh.js +1 -2
- package/dist/components/p-GKEnURpp.js +1 -0
- package/dist/components/p-vIq2biqy.js +2 -3
- package/dist/esm/{icons-D1lxdRXP.js → Effect-9SROYpxM.js} +91 -854
- package/dist/esm/app-globals-DQuL1Twl.js +0 -3
- package/dist/esm/aria-loader-JxXwTAe5.js +114 -0
- package/dist/esm/{assets-BD98wsl7.js → assets-CNHv_WMG.js} +1 -4
- package/dist/esm/component-DIrAQ4IB.js +134 -0
- package/dist/esm/element-activation-controller-CN0JX9-m.js +29 -0
- package/dist/esm/icons-B255FOe4.js +649 -0
- package/dist/esm/{index-DoNkkDv1.js → index-BW1YMEA3.js} +1 -6
- package/dist/esm/index-BfTCfPZ1.js +92 -0
- package/dist/esm/{index-WeqgWisK.js → index-CQb-mBBB.js} +650 -10
- package/dist/esm/index.js +5 -7
- package/dist/esm/lmvz-action.entry.js +2 -5
- package/dist/esm/lmvz-button.entry.js +71 -0
- package/dist/esm/lmvz-card.entry.js +3 -6
- package/dist/esm/lmvz-chip.entry.js +2 -5
- package/dist/esm/lmvz-components.js +3 -6
- package/dist/esm/lmvz-header_2.entry.js +150 -0
- package/dist/esm/lmvz-icon.entry.js +85 -0
- package/dist/esm/lmvz-input.entry.js +181 -0
- package/dist/esm/lmvz-menuitem.entry.js +34 -0
- package/dist/esm/lmvz-select.entry.js +69 -0
- package/dist/esm/loader.js +3 -6
- package/dist/esm/reactive-controller-host-OhKYwMvP.js +186 -0
- package/dist/lmvz-components/index.esm.js +1 -2
- package/dist/lmvz-components/lmvz-components.esm.js +1 -2
- package/dist/lmvz-components/p-150ecfb6.entry.js +1 -0
- package/dist/lmvz-components/p-22f67eff.entry.js +1 -0
- package/dist/lmvz-components/p-4530f088.entry.js +1 -0
- package/dist/lmvz-components/p-47d7ed0e.entry.js +1 -0
- package/dist/lmvz-components/p-5c3f1404.entry.js +1 -0
- package/dist/lmvz-components/p-8d51e396.entry.js +1 -0
- package/dist/lmvz-components/p-9SROYpxM.js +1 -0
- package/dist/lmvz-components/p-BfTCfPZ1.js +6 -0
- package/dist/lmvz-components/p-Bx29-tJt.js +1 -0
- package/dist/lmvz-components/p-CN0JX9-m.js +1 -0
- package/dist/lmvz-components/p-CQb-mBBB.js +2 -0
- package/dist/lmvz-components/p-Cp76bcGb.js +1 -0
- package/dist/lmvz-components/p-Cp7cp10e.js +12 -0
- package/dist/lmvz-components/p-DIrAQ4IB.js +1 -0
- package/dist/lmvz-components/p-DQuL1Twl.js +1 -2
- package/dist/lmvz-components/p-DyO6wO4l.js +1 -0
- package/dist/lmvz-components/p-b8926640.entry.js +1 -0
- package/dist/lmvz-components/p-b9d1953f.entry.js +1 -0
- package/dist/lmvz-components/p-d9c3f542.entry.js +1 -0
- package/dist/lmvz-components/p-i2508Ct1.js +1 -0
- package/dist/manifest.json +11 -47
- package/dist/stencil.config.base.js +0 -1
- package/dist/stencil.config.dev.js +0 -1
- package/dist/stencil.config.integration.js +0 -1
- package/dist/stencil.config.js +0 -1
- package/dist/stencil.config.prod.js +0 -1
- package/dist/types/components.d.ts +0 -18
- package/hydrate/index.js +11 -11
- package/hydrate/index.mjs +11 -11
- package/package.json +4 -4
- package/readme.md +1 -1
- package/dist/cjs/app-globals-V2Kpy_OQ.js.map +0 -1
- package/dist/cjs/assets-XY-cBmal.js.map +0 -1
- package/dist/cjs/header-integration_7.cjs.entry.js +0 -1024
- package/dist/cjs/header-integration_7.cjs.entry.js.map +0 -1
- package/dist/cjs/icons-BOM23oli.js.map +0 -1
- package/dist/cjs/index-B1Puzu82.js.map +0 -1
- package/dist/cjs/index-ww_DCXU7.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/lmvz-action.cjs.entry.js.map +0 -1
- package/dist/cjs/lmvz-card.cjs.entry.js.map +0 -1
- package/dist/cjs/lmvz-chip.cjs.entry.js.map +0 -1
- package/dist/cjs/lmvz-components.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/collection/api/ds.constants.js.map +0 -1
- package/dist/collection/api/index.js.map +0 -1
- package/dist/collection/components/lmvz-action/lmvz-action.js.map +0 -1
- package/dist/collection/components/lmvz-button/lmvz-button.js.map +0 -1
- package/dist/collection/components/lmvz-card/lmvz-card.js.map +0 -1
- package/dist/collection/components/lmvz-chip/lmvz-chip.js.map +0 -1
- package/dist/collection/components/lmvz-header/lmvz-header.js.map +0 -1
- package/dist/collection/components/lmvz-icon/icons.js.map +0 -1
- package/dist/collection/components/lmvz-icon/lmvz-icon.js.map +0 -1
- package/dist/collection/components/lmvz-icon/public.js.map +0 -1
- package/dist/collection/components/lmvz-icon/test/icons.unit.js.map +0 -1
- package/dist/collection/components/lmvz-input/lmvz-input.js.map +0 -1
- package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.js.map +0 -1
- package/dist/collection/components/lmvz-select/lmvz-select.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/integration/header-integration.js.map +0 -1
- package/dist/collection/utils/aria/aria-validation-controller.js.map +0 -1
- package/dist/collection/utils/aria/element-activation-controller.js.map +0 -1
- package/dist/collection/utils/aria/list-keyboard-controller.js.map +0 -1
- package/dist/collection/utils/assets.js.map +0 -1
- package/dist/collection/utils/component.js.map +0 -1
- package/dist/collection/utils/effect.js.map +0 -1
- package/dist/collection/utils/environment.js.map +0 -1
- package/dist/collection/utils/http.js.map +0 -1
- package/dist/collection/utils/http.unit.js.map +0 -1
- package/dist/collection/utils/public.js.map +0 -1
- package/dist/collection/utils/reactive-controller-host.js.map +0 -1
- package/dist/collection/utils/validation/svg.js.map +0 -1
- package/dist/components/header-integration.d.ts +0 -11
- package/dist/components/header-integration.js +0 -2
- package/dist/components/header-integration.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/lmvz-action.js.map +0 -1
- package/dist/components/lmvz-button.js.map +0 -1
- package/dist/components/lmvz-card.js.map +0 -1
- package/dist/components/lmvz-chip.js.map +0 -1
- package/dist/components/lmvz-header.js.map +0 -1
- package/dist/components/lmvz-icon.js.map +0 -1
- package/dist/components/lmvz-input.js.map +0 -1
- package/dist/components/lmvz-menuitem.js.map +0 -1
- package/dist/components/lmvz-select.js.map +0 -1
- package/dist/components/p-B2g3aN-E.js +0 -2
- package/dist/components/p-B2g3aN-E.js.map +0 -1
- package/dist/components/p-BXdOuZTp.js +0 -2
- package/dist/components/p-BXdOuZTp.js.map +0 -1
- package/dist/components/p-BfTCfPZ1.js.map +0 -1
- package/dist/components/p-BpCjj39Z.js +0 -2
- package/dist/components/p-BpCjj39Z.js.map +0 -1
- package/dist/components/p-BsHYIl56.js.map +0 -1
- package/dist/components/p-C5rqq3bf.js +0 -2
- package/dist/components/p-C5rqq3bf.js.map +0 -1
- package/dist/components/p-CI0tffvo.js +0 -2
- package/dist/components/p-CI0tffvo.js.map +0 -1
- package/dist/components/p-CN0JX9-m.js.map +0 -1
- package/dist/components/p-ClmDNIy4.js +0 -2
- package/dist/components/p-ClmDNIy4.js.map +0 -1
- package/dist/components/p-DQEkWkMh.js.map +0 -1
- package/dist/components/p-X5fEFT9T.js +0 -2
- package/dist/components/p-X5fEFT9T.js.map +0 -1
- package/dist/components/p-vIq2biqy.js.map +0 -1
- package/dist/esm/app-globals-DQuL1Twl.js.map +0 -1
- package/dist/esm/assets-BD98wsl7.js.map +0 -1
- package/dist/esm/header-integration_7.entry.js +0 -1016
- package/dist/esm/header-integration_7.entry.js.map +0 -1
- package/dist/esm/icons-D1lxdRXP.js.map +0 -1
- package/dist/esm/index-DoNkkDv1.js.map +0 -1
- package/dist/esm/index-WeqgWisK.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/lmvz-action.entry.js.map +0 -1
- package/dist/esm/lmvz-card.entry.js.map +0 -1
- package/dist/esm/lmvz-chip.entry.js.map +0 -1
- package/dist/esm/lmvz-components.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/lmvz-components/index.esm.js.map +0 -1
- package/dist/lmvz-components/lmvz-components.esm.js.map +0 -1
- package/dist/lmvz-components/p-33485219.entry.js +0 -2
- package/dist/lmvz-components/p-33485219.entry.js.map +0 -1
- package/dist/lmvz-components/p-76032c32.entry.js +0 -2
- package/dist/lmvz-components/p-76032c32.entry.js.map +0 -1
- package/dist/lmvz-components/p-7aeec9a8.entry.js +0 -7
- package/dist/lmvz-components/p-7aeec9a8.entry.js.map +0 -1
- package/dist/lmvz-components/p-84e0a9dd.entry.js +0 -2
- package/dist/lmvz-components/p-84e0a9dd.entry.js.map +0 -1
- package/dist/lmvz-components/p-CkJb8WVZ.js +0 -2
- package/dist/lmvz-components/p-CkJb8WVZ.js.map +0 -1
- package/dist/lmvz-components/p-DQuL1Twl.js.map +0 -1
- package/dist/lmvz-components/p-WeqgWisK.js +0 -3
- package/dist/lmvz-components/p-WeqgWisK.js.map +0 -1
- package/dist/lmvz-components/p-Z9X0_ik0.js +0 -2
- package/dist/lmvz-components/p-Z9X0_ik0.js.map +0 -1
- package/dist/lmvz-components/p-eP0oxQ44.js +0 -13
- package/dist/lmvz-components/p-eP0oxQ44.js.map +0 -1
- package/dist/stencil.config.base.js.map +0 -1
- package/dist/stencil.config.dev.js.map +0 -1
- package/dist/stencil.config.integration.js.map +0 -1
- package/dist/stencil.config.js.map +0 -1
- package/dist/stencil.config.prod.js.map +0 -1
- package/dist/types/integration/header-integration.d.ts +0 -5
- /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.base.d.ts +0 -0
- /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.d.ts +0 -0
- /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.dev.d.ts +0 -0
- /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.integration.d.ts +0 -0
- /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.prod.d.ts +0 -0
|
@@ -1,118 +1,3 @@
|
|
|
1
|
-
import { c as createAssetUrlSafely } from './assets-BD98wsl7.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Verify whether a value is a Promise by duck-testing for a 'then' function
|
|
5
|
-
*/
|
|
6
|
-
function isPromise(value) {
|
|
7
|
-
if (!value)
|
|
8
|
-
return false;
|
|
9
|
-
return typeof value === 'object' && typeof value.then === 'function';
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Resolve the result of a function that may be async or not, as a Promise.
|
|
14
|
-
*/
|
|
15
|
-
function resolvePossiblyAsyncFunction(func, args = []) {
|
|
16
|
-
const res = func(...args);
|
|
17
|
-
if (isPromise(res)) {
|
|
18
|
-
return res;
|
|
19
|
-
}
|
|
20
|
-
return Promise.resolve(res);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const GLOBAL_STATE_KEY = Symbol('__lmvzAriaValidationRuntimeState');
|
|
24
|
-
const ARIA_VALIDATION_RUNTIME_CHANGED_EVENT = 'lmvz:aria-validation-runtime-changed';
|
|
25
|
-
function getRuntimeState() {
|
|
26
|
-
const globalState = globalThis;
|
|
27
|
-
if (!globalState[GLOBAL_STATE_KEY]) {
|
|
28
|
-
globalState[GLOBAL_STATE_KEY] = {
|
|
29
|
-
enabled: false,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
return globalState[GLOBAL_STATE_KEY];
|
|
33
|
-
}
|
|
34
|
-
function notifyRuntimeChange() {
|
|
35
|
-
if (typeof window === 'undefined')
|
|
36
|
-
return;
|
|
37
|
-
window.dispatchEvent(new CustomEvent(ARIA_VALIDATION_RUNTIME_CHANGED_EVENT));
|
|
38
|
-
}
|
|
39
|
-
async function fetchRuntime() {
|
|
40
|
-
const state = getRuntimeState();
|
|
41
|
-
if (!state.enabled)
|
|
42
|
-
return null;
|
|
43
|
-
if (state.runtime)
|
|
44
|
-
return state.runtime;
|
|
45
|
-
if (!state.loadPromise) {
|
|
46
|
-
state.loadPromise = import('./index-DoNkkDv1.js').catch(() => null);
|
|
47
|
-
}
|
|
48
|
-
const runtime = await state.loadPromise;
|
|
49
|
-
if (runtime) {
|
|
50
|
-
state.runtime = runtime;
|
|
51
|
-
}
|
|
52
|
-
return runtime;
|
|
53
|
-
}
|
|
54
|
-
async function initializeValidation(...args) {
|
|
55
|
-
const runtime = await fetchRuntime();
|
|
56
|
-
const s = getRuntimeState();
|
|
57
|
-
if (!s.enabled)
|
|
58
|
-
return;
|
|
59
|
-
if (!runtime) {
|
|
60
|
-
console.warn('Failed to load aria validation runtime');
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
runtime.initializeValidationStream(...args);
|
|
64
|
-
}
|
|
65
|
-
const isAriaValidationEnabled = () => getRuntimeState().enabled;
|
|
66
|
-
const useVerboseLogging = () => getRuntimeState().verboseLogging ?? false;
|
|
67
|
-
const enableAriaValidation = (options = {}) => {
|
|
68
|
-
const state = getRuntimeState();
|
|
69
|
-
if (state.enabled)
|
|
70
|
-
return;
|
|
71
|
-
Object.assign(state, options);
|
|
72
|
-
state.enabled = true;
|
|
73
|
-
initializeValidation().then(() => {
|
|
74
|
-
notifyRuntimeChange();
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
const disableAriaValidation = () => {
|
|
78
|
-
const state = getRuntimeState();
|
|
79
|
-
if (!state.enabled)
|
|
80
|
-
return;
|
|
81
|
-
state.enabled = false;
|
|
82
|
-
notifyRuntimeChange();
|
|
83
|
-
};
|
|
84
|
-
function queueValidation(...args) {
|
|
85
|
-
const { enabled, runtime, loadPromise, lazyCondition } = getRuntimeState();
|
|
86
|
-
if (!enabled)
|
|
87
|
-
return;
|
|
88
|
-
if (!lazyCondition)
|
|
89
|
-
return q();
|
|
90
|
-
resolvePossiblyAsyncFunction(lazyCondition).then((shouldEnqueue) => {
|
|
91
|
-
if (!shouldEnqueue)
|
|
92
|
-
return;
|
|
93
|
-
q();
|
|
94
|
-
});
|
|
95
|
-
function q() {
|
|
96
|
-
if (runtime)
|
|
97
|
-
return runtime.enqueueValidation(...args);
|
|
98
|
-
if (!loadPromise) {
|
|
99
|
-
console.warn('neither runtime nor load promise found for aria validation. This should not happen, as enabling aria validation should have triggered the loading of the runtime.');
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
loadPromise
|
|
103
|
-
.then((loadedRuntime) => {
|
|
104
|
-
if (!loadedRuntime?.enqueueValidation) {
|
|
105
|
-
console.error('Failed to load aria validation runtime');
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
loadedRuntime.enqueueValidation(...args);
|
|
109
|
-
})
|
|
110
|
-
.catch(() => {
|
|
111
|
-
console.error('Failed to enqueue validation due to an error while loading the runtime');
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
1
|
/**
|
|
117
2
|
* Tests if a value is a `function`.
|
|
118
3
|
*
|
|
@@ -388,19 +273,19 @@ function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) {
|
|
|
388
273
|
* @category constructors
|
|
389
274
|
* @since 2.0.0
|
|
390
275
|
*/
|
|
391
|
-
const make$
|
|
276
|
+
const make$u = isEquivalent => (self, that) => self === that || isEquivalent(self, that);
|
|
392
277
|
/**
|
|
393
278
|
* @category mapping
|
|
394
279
|
* @since 2.0.0
|
|
395
280
|
*/
|
|
396
|
-
const mapInput$1 = /*#__PURE__*/dual(2, (self, f) => make$
|
|
281
|
+
const mapInput$1 = /*#__PURE__*/dual(2, (self, f) => make$u((x, y) => self(f(x), f(y))));
|
|
397
282
|
/**
|
|
398
283
|
* Creates a new `Equivalence` for an array of values based on a given `Equivalence` for the elements of the array.
|
|
399
284
|
*
|
|
400
285
|
* @category combinators
|
|
401
286
|
* @since 2.0.0
|
|
402
287
|
*/
|
|
403
|
-
const array$1 = item => make$
|
|
288
|
+
const array$1 = item => make$u((self, that) => {
|
|
404
289
|
if (self.length !== that.length) {
|
|
405
290
|
return false;
|
|
406
291
|
}
|
|
@@ -1718,17 +1603,17 @@ const isNonEmptyArray$1 = self => self.length > 0;
|
|
|
1718
1603
|
* @category constructors
|
|
1719
1604
|
* @since 2.0.0
|
|
1720
1605
|
*/
|
|
1721
|
-
const make$
|
|
1606
|
+
const make$t = compare => (self, that) => self === that ? 0 : compare(self, that);
|
|
1722
1607
|
/**
|
|
1723
1608
|
* @category instances
|
|
1724
1609
|
* @since 2.0.0
|
|
1725
1610
|
*/
|
|
1726
|
-
const number = /*#__PURE__*/make$
|
|
1611
|
+
const number = /*#__PURE__*/make$t((self, that) => self < that ? -1 : 1);
|
|
1727
1612
|
/**
|
|
1728
1613
|
* @category mapping
|
|
1729
1614
|
* @since 2.0.0
|
|
1730
1615
|
*/
|
|
1731
|
-
const mapInput = /*#__PURE__*/dual(2, (self, f) => make$
|
|
1616
|
+
const mapInput = /*#__PURE__*/dual(2, (self, f) => make$t((b1, b2) => self(f(b1), f(b2))));
|
|
1732
1617
|
/**
|
|
1733
1618
|
* Test whether one value is _strictly greater than_ another.
|
|
1734
1619
|
*
|
|
@@ -2210,7 +2095,7 @@ const mergeWith = f => (o1, o2) => {
|
|
|
2210
2095
|
* @category constructors
|
|
2211
2096
|
* @since 2.0.0
|
|
2212
2097
|
*/
|
|
2213
|
-
const make$
|
|
2098
|
+
const make$s = (...elements) => elements;
|
|
2214
2099
|
|
|
2215
2100
|
/**
|
|
2216
2101
|
* This module provides utility functions for working with arrays in TypeScript.
|
|
@@ -2574,7 +2459,7 @@ const sort = /*#__PURE__*/dual(2, (self, O) => {
|
|
|
2574
2459
|
* @category zipping
|
|
2575
2460
|
* @since 2.0.0
|
|
2576
2461
|
*/
|
|
2577
|
-
const zip$3 = /*#__PURE__*/dual(2, (self, that) => zipWith$2(self, that, make$
|
|
2462
|
+
const zip$3 = /*#__PURE__*/dual(2, (self, that) => zipWith$2(self, that, make$s));
|
|
2578
2463
|
/**
|
|
2579
2464
|
* Apply a function to pairs of elements at the same index in two `Iterable`s, collecting the results in a new `Array`. If one
|
|
2580
2465
|
* input `Iterable` is short, excess elements of the longer `Iterable` are discarded.
|
|
@@ -3029,54 +2914,6 @@ const Order$1 = number;
|
|
|
3029
2914
|
*/
|
|
3030
2915
|
const escape = string => string.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
3031
2916
|
|
|
3032
|
-
/**
|
|
3033
|
-
* This module provides types and utility functions to create and work with branded types,
|
|
3034
|
-
* which are TypeScript types with an added type tag to prevent accidental usage of a value in the wrong context.
|
|
3035
|
-
*
|
|
3036
|
-
* The `refined` and `nominal` functions are both used to create branded types in TypeScript.
|
|
3037
|
-
* The main difference between them is that `refined` allows for validation of the data, while `nominal` does not.
|
|
3038
|
-
*
|
|
3039
|
-
* The `nominal` function is used to create a new branded type that has the same underlying type as the input, but with a different name.
|
|
3040
|
-
* This is useful when you want to distinguish between two values of the same type that have different meanings.
|
|
3041
|
-
* The `nominal` function does not perform any validation of the input data.
|
|
3042
|
-
*
|
|
3043
|
-
* On the other hand, the `refined` function is used to create a new branded type that has the same underlying type as the input,
|
|
3044
|
-
* but with a different name, and it also allows for validation of the input data.
|
|
3045
|
-
* The `refined` function takes a predicate that is used to validate the input data.
|
|
3046
|
-
* If the input data fails the validation, a `BrandErrors` is returned, which provides information about the specific validation failure.
|
|
3047
|
-
*
|
|
3048
|
-
* @since 2.0.0
|
|
3049
|
-
*/
|
|
3050
|
-
/**
|
|
3051
|
-
* @since 2.0.0
|
|
3052
|
-
* @category symbols
|
|
3053
|
-
*/
|
|
3054
|
-
const RefinedConstructorsTypeId = /*#__PURE__*/Symbol.for("effect/Brand/Refined");
|
|
3055
|
-
/**
|
|
3056
|
-
* Returns a `BrandErrors` that contains a single `RefinementError`.
|
|
3057
|
-
*
|
|
3058
|
-
* @since 2.0.0
|
|
3059
|
-
* @category constructors
|
|
3060
|
-
*/
|
|
3061
|
-
const error = (message, meta) => [{
|
|
3062
|
-
message,
|
|
3063
|
-
meta
|
|
3064
|
-
}];
|
|
3065
|
-
function refined(...args) {
|
|
3066
|
-
const either = args.length === 2 ? unbranded => args[0](unbranded) ? right(unbranded) : left(args[1](unbranded)) : unbranded => {
|
|
3067
|
-
return match$6(args[0](unbranded), {
|
|
3068
|
-
onNone: () => right(unbranded),
|
|
3069
|
-
onSome: left
|
|
3070
|
-
});
|
|
3071
|
-
};
|
|
3072
|
-
return Object.assign(unbranded => getOrThrowWith(either(unbranded), identity), {
|
|
3073
|
-
[RefinedConstructorsTypeId]: RefinedConstructorsTypeId,
|
|
3074
|
-
option: args => getRight(either(args)),
|
|
3075
|
-
either,
|
|
3076
|
-
is: args => isRight(either(args))
|
|
3077
|
-
});
|
|
3078
|
-
}
|
|
3079
|
-
|
|
3080
2917
|
/** @internal */
|
|
3081
2918
|
const TagTypeId = /*#__PURE__*/Symbol.for("effect/Context/Tag");
|
|
3082
2919
|
/** @internal */
|
|
@@ -3111,7 +2948,7 @@ const TagProto = {
|
|
|
3111
2948
|
return self;
|
|
3112
2949
|
},
|
|
3113
2950
|
context(self) {
|
|
3114
|
-
return make$
|
|
2951
|
+
return make$r(this, self);
|
|
3115
2952
|
}
|
|
3116
2953
|
};
|
|
3117
2954
|
const ReferenceProto = {
|
|
@@ -3221,7 +3058,7 @@ const _empty$6 = /*#__PURE__*/makeContext(/*#__PURE__*/new Map());
|
|
|
3221
3058
|
/** @internal */
|
|
3222
3059
|
const empty$l = () => _empty$6;
|
|
3223
3060
|
/** @internal */
|
|
3224
|
-
const make$
|
|
3061
|
+
const make$r = (tag, service) => makeContext(new Map([[tag.key, service]]));
|
|
3225
3062
|
/** @internal */
|
|
3226
3063
|
const add$3 = /*#__PURE__*/dual(3, (self, tag, service) => {
|
|
3227
3064
|
const map = new Map(self.unsafeMap);
|
|
@@ -3340,7 +3177,7 @@ const empty$k = empty$l;
|
|
|
3340
3177
|
* @since 2.0.0
|
|
3341
3178
|
* @category constructors
|
|
3342
3179
|
*/
|
|
3343
|
-
const make$
|
|
3180
|
+
const make$q = make$r;
|
|
3344
3181
|
/**
|
|
3345
3182
|
* Adds a service to a given `Context`.
|
|
3346
3183
|
*
|
|
@@ -3559,7 +3396,7 @@ const emptyArray = [];
|
|
|
3559
3396
|
* @category equivalence
|
|
3560
3397
|
* @since 2.0.0
|
|
3561
3398
|
*/
|
|
3562
|
-
const getEquivalence$1 = isEquivalent => make$
|
|
3399
|
+
const getEquivalence$1 = isEquivalent => make$u((self, that) => self.length === that.length && toReadonlyArray(self).every((value, i) => isEquivalent(value, unsafeGet(that, i))));
|
|
3563
3400
|
const _equivalence$1 = /*#__PURE__*/getEquivalence$1(equals$1);
|
|
3564
3401
|
const ChunkProto = {
|
|
3565
3402
|
[TypeId$a]: {
|
|
@@ -3671,7 +3508,7 @@ const empty$j = () => _empty$5;
|
|
|
3671
3508
|
* @category constructors
|
|
3672
3509
|
* @since 2.0.0
|
|
3673
3510
|
*/
|
|
3674
|
-
const make$
|
|
3511
|
+
const make$p = (...as) => unsafeFromNonEmptyArray(as);
|
|
3675
3512
|
/**
|
|
3676
3513
|
* Builds a `NonEmptyChunk` from a single element.
|
|
3677
3514
|
*
|
|
@@ -4280,7 +4117,7 @@ const DurationProto = {
|
|
|
4280
4117
|
return pipeArguments(this, arguments);
|
|
4281
4118
|
}
|
|
4282
4119
|
};
|
|
4283
|
-
const make$
|
|
4120
|
+
const make$o = input => {
|
|
4284
4121
|
const duration = Object.create(DurationProto);
|
|
4285
4122
|
if (isNumber(input)) {
|
|
4286
4123
|
if (isNaN(input) || input <= 0) {
|
|
@@ -4337,52 +4174,52 @@ const isZero = self => {
|
|
|
4337
4174
|
* @since 2.0.0
|
|
4338
4175
|
* @category constructors
|
|
4339
4176
|
*/
|
|
4340
|
-
const zero = /*#__PURE__*/make$
|
|
4177
|
+
const zero = /*#__PURE__*/make$o(0);
|
|
4341
4178
|
/**
|
|
4342
4179
|
* @since 2.0.0
|
|
4343
4180
|
* @category constructors
|
|
4344
4181
|
*/
|
|
4345
|
-
const infinity = /*#__PURE__*/make$
|
|
4182
|
+
const infinity = /*#__PURE__*/make$o(Infinity);
|
|
4346
4183
|
/**
|
|
4347
4184
|
* @since 2.0.0
|
|
4348
4185
|
* @category constructors
|
|
4349
4186
|
*/
|
|
4350
|
-
const nanos = nanos => make$
|
|
4187
|
+
const nanos = nanos => make$o(nanos);
|
|
4351
4188
|
/**
|
|
4352
4189
|
* @since 2.0.0
|
|
4353
4190
|
* @category constructors
|
|
4354
4191
|
*/
|
|
4355
|
-
const micros = micros => make$
|
|
4192
|
+
const micros = micros => make$o(micros * bigint1e3);
|
|
4356
4193
|
/**
|
|
4357
4194
|
* @since 2.0.0
|
|
4358
4195
|
* @category constructors
|
|
4359
4196
|
*/
|
|
4360
|
-
const millis = millis => make$
|
|
4197
|
+
const millis = millis => make$o(millis);
|
|
4361
4198
|
/**
|
|
4362
4199
|
* @since 2.0.0
|
|
4363
4200
|
* @category constructors
|
|
4364
4201
|
*/
|
|
4365
|
-
const seconds = seconds => make$
|
|
4202
|
+
const seconds = seconds => make$o(seconds * 1000);
|
|
4366
4203
|
/**
|
|
4367
4204
|
* @since 2.0.0
|
|
4368
4205
|
* @category constructors
|
|
4369
4206
|
*/
|
|
4370
|
-
const minutes = minutes => make$
|
|
4207
|
+
const minutes = minutes => make$o(minutes * 60_000);
|
|
4371
4208
|
/**
|
|
4372
4209
|
* @since 2.0.0
|
|
4373
4210
|
* @category constructors
|
|
4374
4211
|
*/
|
|
4375
|
-
const hours = hours => make$
|
|
4212
|
+
const hours = hours => make$o(hours * 3_600_000);
|
|
4376
4213
|
/**
|
|
4377
4214
|
* @since 2.0.0
|
|
4378
4215
|
* @category constructors
|
|
4379
4216
|
*/
|
|
4380
|
-
const days = days => make$
|
|
4217
|
+
const days = days => make$o(days * 86_400_000);
|
|
4381
4218
|
/**
|
|
4382
4219
|
* @since 2.0.0
|
|
4383
4220
|
* @category constructors
|
|
4384
4221
|
*/
|
|
4385
|
-
const weeks = weeks => make$
|
|
4222
|
+
const weeks = weeks => make$o(weeks * 604_800_000);
|
|
4386
4223
|
/**
|
|
4387
4224
|
* @since 2.0.0
|
|
4388
4225
|
* @category getters
|
|
@@ -4601,7 +4438,7 @@ function fromBitmap(bitmap, bit) {
|
|
|
4601
4438
|
return popcount(bitmap & bit - 1);
|
|
4602
4439
|
}
|
|
4603
4440
|
|
|
4604
|
-
const make$
|
|
4441
|
+
const make$n = (value, previous) => ({
|
|
4605
4442
|
value,
|
|
4606
4443
|
previous
|
|
4607
4444
|
});
|
|
@@ -4887,7 +4724,7 @@ function mergeLeaves(edit, shift, h1, n1, h2, n2) {
|
|
|
4887
4724
|
while (true) {
|
|
4888
4725
|
const res = mergeLeavesInner(edit, currentShift, h1, n1, h2, n2);
|
|
4889
4726
|
if (typeof res === "function") {
|
|
4890
|
-
stack = make$
|
|
4727
|
+
stack = make$n(res, stack);
|
|
4891
4728
|
currentShift = currentShift + SIZE;
|
|
4892
4729
|
} else {
|
|
4893
4730
|
let final = res;
|
|
@@ -5211,7 +5048,7 @@ const fromIterable$3 = elements => {
|
|
|
5211
5048
|
return endMutation(set);
|
|
5212
5049
|
};
|
|
5213
5050
|
/** @internal */
|
|
5214
|
-
const make$
|
|
5051
|
+
const make$m = (...elements) => {
|
|
5215
5052
|
const set = beginMutation(empty$h());
|
|
5216
5053
|
for (const value of elements) {
|
|
5217
5054
|
add$1(set, value);
|
|
@@ -5719,7 +5556,7 @@ const fromIterable$2 = fromIterable$3;
|
|
|
5719
5556
|
*
|
|
5720
5557
|
* @see Other `HashSet` constructors are {@link module:HashSet.fromIterable} {@link module:HashSet.empty}
|
|
5721
5558
|
*/
|
|
5722
|
-
const make$
|
|
5559
|
+
const make$l = make$m;
|
|
5723
5560
|
/**
|
|
5724
5561
|
* Checks if the specified value exists in the `HashSet`.
|
|
5725
5562
|
*
|
|
@@ -5948,7 +5785,7 @@ const MutableRefProto = {
|
|
|
5948
5785
|
* @since 2.0.0
|
|
5949
5786
|
* @category constructors
|
|
5950
5787
|
*/
|
|
5951
|
-
const make$
|
|
5788
|
+
const make$k = value => {
|
|
5952
5789
|
const ref = Object.create(MutableRefProto);
|
|
5953
5790
|
ref.current = value;
|
|
5954
5791
|
return ref;
|
|
@@ -6104,7 +5941,7 @@ const ids = self => {
|
|
|
6104
5941
|
}
|
|
6105
5942
|
case OP_RUNTIME:
|
|
6106
5943
|
{
|
|
6107
|
-
return make$
|
|
5944
|
+
return make$l(self.id);
|
|
6108
5945
|
}
|
|
6109
5946
|
case OP_COMPOSITE:
|
|
6110
5947
|
{
|
|
@@ -6112,7 +5949,7 @@ const ids = self => {
|
|
|
6112
5949
|
}
|
|
6113
5950
|
}
|
|
6114
5951
|
};
|
|
6115
|
-
const _fiberCounter = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/Fiber/Id/_fiberCounter"), () => make$
|
|
5952
|
+
const _fiberCounter = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/Fiber/Id/_fiberCounter"), () => make$k(0));
|
|
6116
5953
|
/** @internal */
|
|
6117
5954
|
const threadName$1 = self => {
|
|
6118
5955
|
const identifiers = Array.from(ids(self)).map(n => `#${n}`).join(",");
|
|
@@ -6903,7 +6740,7 @@ const DifferProto = {
|
|
|
6903
6740
|
}
|
|
6904
6741
|
};
|
|
6905
6742
|
/** @internal */
|
|
6906
|
-
const make$
|
|
6743
|
+
const make$j = params => {
|
|
6907
6744
|
const differ = Object.create(DifferProto);
|
|
6908
6745
|
differ.empty = params.empty;
|
|
6909
6746
|
differ.diff = params.diff;
|
|
@@ -6912,21 +6749,21 @@ const make$l = params => {
|
|
|
6912
6749
|
return differ;
|
|
6913
6750
|
};
|
|
6914
6751
|
/** @internal */
|
|
6915
|
-
const environment = () => make$
|
|
6752
|
+
const environment = () => make$j({
|
|
6916
6753
|
empty: empty$d(),
|
|
6917
6754
|
combine: (first, second) => combine$4(second)(first),
|
|
6918
6755
|
diff: (oldValue, newValue) => diff$6(oldValue, newValue),
|
|
6919
6756
|
patch: (patch, oldValue) => patch$7(oldValue)(patch)
|
|
6920
6757
|
});
|
|
6921
6758
|
/** @internal */
|
|
6922
|
-
const hashSet = () => make$
|
|
6759
|
+
const hashSet = () => make$j({
|
|
6923
6760
|
empty: empty$c(),
|
|
6924
6761
|
combine: (first, second) => combine$3(second)(first),
|
|
6925
6762
|
diff: (oldValue, newValue) => diff$5(oldValue, newValue),
|
|
6926
6763
|
patch: (patch, oldValue) => patch$6(oldValue)(patch)
|
|
6927
6764
|
});
|
|
6928
6765
|
/** @internal */
|
|
6929
|
-
const readonlyArray = differ => make$
|
|
6766
|
+
const readonlyArray = differ => make$j({
|
|
6930
6767
|
empty: empty$b(),
|
|
6931
6768
|
combine: (first, second) => combine$2(first, second),
|
|
6932
6769
|
diff: (oldValue, newValue) => diff$4({
|
|
@@ -6939,7 +6776,7 @@ const readonlyArray = differ => make$l({
|
|
|
6939
6776
|
/** @internal */
|
|
6940
6777
|
const update$2 = () => updateWith((_, a) => a);
|
|
6941
6778
|
/** @internal */
|
|
6942
|
-
const updateWith = f => make$
|
|
6779
|
+
const updateWith = f => make$j({
|
|
6943
6780
|
empty: identity,
|
|
6944
6781
|
combine: (first, second) => {
|
|
6945
6782
|
if (first === identity) {
|
|
@@ -6968,15 +6805,15 @@ const active = patch => patch & BIT_MASK;
|
|
|
6968
6805
|
/** @internal */
|
|
6969
6806
|
const enabled = patch => patch >> BIT_SHIFT & BIT_MASK;
|
|
6970
6807
|
/** @internal */
|
|
6971
|
-
const make$
|
|
6808
|
+
const make$i = (active, enabled) => (active & BIT_MASK) + ((enabled & active & BIT_MASK) << BIT_SHIFT);
|
|
6972
6809
|
/** @internal */
|
|
6973
|
-
const empty$a = /*#__PURE__*/make$
|
|
6810
|
+
const empty$a = /*#__PURE__*/make$i(0, 0);
|
|
6974
6811
|
/** @internal */
|
|
6975
|
-
const enable$2 = flag => make$
|
|
6812
|
+
const enable$2 = flag => make$i(flag, flag);
|
|
6976
6813
|
/** @internal */
|
|
6977
|
-
const disable$1 = flag => make$
|
|
6814
|
+
const disable$1 = flag => make$i(flag, 0);
|
|
6978
6815
|
/** @internal */
|
|
6979
|
-
const exclude$1 = /*#__PURE__*/dual(2, (self, flag) => make$
|
|
6816
|
+
const exclude$1 = /*#__PURE__*/dual(2, (self, flag) => make$i(active(self) & ~flag, enabled(self)));
|
|
6980
6817
|
/** @internal */
|
|
6981
6818
|
const andThen = /*#__PURE__*/dual(2, (self, that) => self | that);
|
|
6982
6819
|
/** @internal */
|
|
@@ -7005,18 +6842,18 @@ const interruption = self => isEnabled(self, Interruption);
|
|
|
7005
6842
|
/** @internal */
|
|
7006
6843
|
const isEnabled = /*#__PURE__*/dual(2, (self, flag) => (self & flag) !== 0);
|
|
7007
6844
|
/** @internal */
|
|
7008
|
-
const make$
|
|
6845
|
+
const make$h = (...flags) => flags.reduce((a, b) => a | b, 0);
|
|
7009
6846
|
/** @internal */
|
|
7010
|
-
const none$1 = /*#__PURE__*/make$
|
|
6847
|
+
const none$1 = /*#__PURE__*/make$h(None$1);
|
|
7011
6848
|
/** @internal */
|
|
7012
6849
|
const runtimeMetrics = self => isEnabled(self, RuntimeMetrics);
|
|
7013
6850
|
const windDown = self => isEnabled(self, WindDown);
|
|
7014
6851
|
/** @internal */
|
|
7015
|
-
const diff$3 = /*#__PURE__*/dual(2, (self, that) => make$
|
|
6852
|
+
const diff$3 = /*#__PURE__*/dual(2, (self, that) => make$i(self ^ that, that));
|
|
7016
6853
|
/** @internal */
|
|
7017
6854
|
const patch$4 = /*#__PURE__*/dual(2, (self, patch) => self & (invert(active(patch)) | enabled(patch)) | active(patch) & enabled(patch));
|
|
7018
6855
|
/** @internal */
|
|
7019
|
-
const differ$1 = /*#__PURE__*/make$
|
|
6856
|
+
const differ$1 = /*#__PURE__*/make$j({
|
|
7020
6857
|
empty: empty$a,
|
|
7021
6858
|
diff: (oldValue, newValue) => diff$3(oldValue, newValue),
|
|
7022
6859
|
combine: (first, second) => andThen(second)(first),
|
|
@@ -7583,7 +7420,7 @@ const evaluateCause = self => {
|
|
|
7583
7420
|
}
|
|
7584
7421
|
case OP_FAIL$1:
|
|
7585
7422
|
{
|
|
7586
|
-
_parallel = add(_parallel, make$
|
|
7423
|
+
_parallel = add(_parallel, make$p(cause._tag, cause.error));
|
|
7587
7424
|
if (stack.length === 0) {
|
|
7588
7425
|
return [_parallel, _sequential];
|
|
7589
7426
|
}
|
|
@@ -7592,7 +7429,7 @@ const evaluateCause = self => {
|
|
|
7592
7429
|
}
|
|
7593
7430
|
case OP_DIE:
|
|
7594
7431
|
{
|
|
7595
|
-
_parallel = add(_parallel, make$
|
|
7432
|
+
_parallel = add(_parallel, make$p(cause._tag, cause.defect));
|
|
7596
7433
|
if (stack.length === 0) {
|
|
7597
7434
|
return [_parallel, _sequential];
|
|
7598
7435
|
}
|
|
@@ -7601,7 +7438,7 @@ const evaluateCause = self => {
|
|
|
7601
7438
|
}
|
|
7602
7439
|
case OP_INTERRUPT:
|
|
7603
7440
|
{
|
|
7604
|
-
_parallel = add(_parallel, make$
|
|
7441
|
+
_parallel = add(_parallel, make$p(cause._tag, cause.fiberId));
|
|
7605
7442
|
if (stack.length === 0) {
|
|
7606
7443
|
return [_parallel, _sequential];
|
|
7607
7444
|
}
|
|
@@ -7960,7 +7797,7 @@ const deferredVariance = {
|
|
|
7960
7797
|
_A: _ => _
|
|
7961
7798
|
};
|
|
7962
7799
|
/** @internal */
|
|
7963
|
-
const pending
|
|
7800
|
+
const pending = joiners => {
|
|
7964
7801
|
return {
|
|
7965
7802
|
_tag: OP_STATE_PENDING,
|
|
7966
7803
|
joiners
|
|
@@ -9011,7 +8848,7 @@ const deferredUnsafeMake = fiberId => {
|
|
|
9011
8848
|
const _deferred = {
|
|
9012
8849
|
...CommitPrototype,
|
|
9013
8850
|
[DeferredTypeId]: deferredVariance,
|
|
9014
|
-
state: make$
|
|
8851
|
+
state: make$k(pending([])),
|
|
9015
8852
|
commit() {
|
|
9016
8853
|
return deferredAwait(this);
|
|
9017
8854
|
},
|
|
@@ -9118,7 +8955,7 @@ const currentSpanFromFiber = fiber => {
|
|
|
9118
8955
|
* @since 2.0.0
|
|
9119
8956
|
* @category constructors
|
|
9120
8957
|
*/
|
|
9121
|
-
const make$
|
|
8958
|
+
const make$g = deferredMake;
|
|
9122
8959
|
const _await$1 = deferredAwait;
|
|
9123
8960
|
/**
|
|
9124
8961
|
* Exits the `Deferred` with the specified `Exit` value, which will be
|
|
@@ -9590,7 +9427,7 @@ const MutableQueueProto = {
|
|
|
9590
9427
|
return pipeArguments(this, arguments);
|
|
9591
9428
|
}
|
|
9592
9429
|
};
|
|
9593
|
-
const make$
|
|
9430
|
+
const make$f = capacity => {
|
|
9594
9431
|
const queue = Object.create(MutableQueueProto);
|
|
9595
9432
|
queue.queue = empty$7();
|
|
9596
9433
|
queue.capacity = capacity;
|
|
@@ -9602,14 +9439,14 @@ const make$h = capacity => {
|
|
|
9602
9439
|
* @since 2.0.0
|
|
9603
9440
|
* @category constructors
|
|
9604
9441
|
*/
|
|
9605
|
-
const bounded = capacity => make$
|
|
9442
|
+
const bounded = capacity => make$f(capacity);
|
|
9606
9443
|
/**
|
|
9607
9444
|
* Creates a new unbounded `MutableQueue`.
|
|
9608
9445
|
*
|
|
9609
9446
|
* @since 2.0.0
|
|
9610
9447
|
* @category constructors
|
|
9611
9448
|
*/
|
|
9612
|
-
const unbounded = () => make$
|
|
9449
|
+
const unbounded = () => make$f(undefined);
|
|
9613
9450
|
/**
|
|
9614
9451
|
* Returns the current number of elements in the queue.
|
|
9615
9452
|
*
|
|
@@ -9778,7 +9615,7 @@ class ClockImpl {
|
|
|
9778
9615
|
}
|
|
9779
9616
|
}
|
|
9780
9617
|
/** @internal */
|
|
9781
|
-
const make$
|
|
9618
|
+
const make$e = () => new ClockImpl();
|
|
9782
9619
|
|
|
9783
9620
|
/** @internal */
|
|
9784
9621
|
const OP_AND = "And";
|
|
@@ -10025,7 +9862,7 @@ const FlatConfigProviderSymbolKey = "effect/ConfigProviderFlat";
|
|
|
10025
9862
|
/** @internal */
|
|
10026
9863
|
const FlatConfigProviderTypeId = /*#__PURE__*/Symbol.for(FlatConfigProviderSymbolKey);
|
|
10027
9864
|
/** @internal */
|
|
10028
|
-
const make$
|
|
9865
|
+
const make$d = options => ({
|
|
10029
9866
|
[ConfigProviderTypeId]: ConfigProviderTypeId,
|
|
10030
9867
|
pipe() {
|
|
10031
9868
|
return pipeArguments(this, arguments);
|
|
@@ -10040,7 +9877,7 @@ const makeFlat = options => ({
|
|
|
10040
9877
|
enumerateChildren: options.enumerateChildren
|
|
10041
9878
|
});
|
|
10042
9879
|
/** @internal */
|
|
10043
|
-
const fromFlat = flat => make$
|
|
9880
|
+
const fromFlat = flat => make$d({
|
|
10044
9881
|
load: config => flatMap$2(fromFlatLoop(flat, empty$m(), config, false), chunk => match$6(head$1(chunk), {
|
|
10045
9882
|
onNone: () => fail$3(MissingData(empty$m(), `Expected a single value having structure: ${config}`)),
|
|
10046
9883
|
onSome: succeed$4
|
|
@@ -10375,7 +10212,7 @@ const swap = (buffer, index1, index2) => {
|
|
|
10375
10212
|
buffer[index2] = tmp;
|
|
10376
10213
|
return buffer;
|
|
10377
10214
|
};
|
|
10378
|
-
const make$
|
|
10215
|
+
const make$c = seed => new RandomImpl(hash(seed));
|
|
10379
10216
|
|
|
10380
10217
|
/**
|
|
10381
10218
|
* @since 2.0.0
|
|
@@ -10383,7 +10220,7 @@ const make$e = seed => new RandomImpl(hash(seed));
|
|
|
10383
10220
|
/** @internal */
|
|
10384
10221
|
const TracerTypeId = /*#__PURE__*/Symbol.for("effect/Tracer");
|
|
10385
10222
|
/** @internal */
|
|
10386
|
-
const make$
|
|
10223
|
+
const make$b = options => ({
|
|
10387
10224
|
[TracerTypeId]: TracerTypeId,
|
|
10388
10225
|
...options
|
|
10389
10226
|
});
|
|
@@ -10452,7 +10289,7 @@ class NativeSpan {
|
|
|
10452
10289
|
}
|
|
10453
10290
|
}
|
|
10454
10291
|
/** @internal */
|
|
10455
|
-
const nativeTracer = /*#__PURE__*/make$
|
|
10292
|
+
const nativeTracer = /*#__PURE__*/make$b({
|
|
10456
10293
|
span: (name, parent, context, links, startTime, kind) => new NativeSpan(name, parent, context, links, startTime, kind),
|
|
10457
10294
|
context: f => f()
|
|
10458
10295
|
});
|
|
@@ -10462,7 +10299,7 @@ const DisablePropagation = /*#__PURE__*/Reference()("effect/Tracer/DisablePropag
|
|
|
10462
10299
|
});
|
|
10463
10300
|
|
|
10464
10301
|
/** @internal */
|
|
10465
|
-
const liveServices = /*#__PURE__*/pipe(/*#__PURE__*/empty$k(), /*#__PURE__*/add$2(clockTag, /*#__PURE__*/make$
|
|
10302
|
+
const liveServices = /*#__PURE__*/pipe(/*#__PURE__*/empty$k(), /*#__PURE__*/add$2(clockTag, /*#__PURE__*/make$e()), /*#__PURE__*/add$2(consoleTag, defaultConsole), /*#__PURE__*/add$2(randomTag, /*#__PURE__*/make$c(/*#__PURE__*/Math.random())), /*#__PURE__*/add$2(configProviderTag, /*#__PURE__*/fromEnv()), /*#__PURE__*/add$2(tracerTag, nativeTracer));
|
|
10466
10303
|
/**
|
|
10467
10304
|
* The `FiberRef` holding the default `Effect` services.
|
|
10468
10305
|
*
|
|
@@ -10714,7 +10551,7 @@ const Fatal = logLevelFatal;
|
|
|
10714
10551
|
* @since 2.0.0
|
|
10715
10552
|
* @category constructors
|
|
10716
10553
|
*/
|
|
10717
|
-
const Error$
|
|
10554
|
+
const Error$1 = logLevelError;
|
|
10718
10555
|
/**
|
|
10719
10556
|
* @since 2.0.0
|
|
10720
10557
|
* @category constructors
|
|
@@ -10761,7 +10598,7 @@ const fromLiteral = literal => {
|
|
|
10761
10598
|
case "Debug":
|
|
10762
10599
|
return Debug;
|
|
10763
10600
|
case "Error":
|
|
10764
|
-
return Error$
|
|
10601
|
+
return Error$1;
|
|
10765
10602
|
case "Fatal":
|
|
10766
10603
|
return Fatal;
|
|
10767
10604
|
case "Info":
|
|
@@ -10838,9 +10675,9 @@ class RefImpl extends Class {
|
|
|
10838
10675
|
}
|
|
10839
10676
|
}
|
|
10840
10677
|
/** @internal */
|
|
10841
|
-
const unsafeMake$2 = value => new RefImpl(make$
|
|
10678
|
+
const unsafeMake$2 = value => new RefImpl(make$k(value));
|
|
10842
10679
|
/** @internal */
|
|
10843
|
-
const make$
|
|
10680
|
+
const make$a = value => sync$1(() => unsafeMake$2(value));
|
|
10844
10681
|
/** @internal */
|
|
10845
10682
|
const get = self => self.get;
|
|
10846
10683
|
/** @internal */
|
|
@@ -10979,7 +10816,7 @@ class MetricLabelImpl {
|
|
|
10979
10816
|
}
|
|
10980
10817
|
}
|
|
10981
10818
|
/** @internal */
|
|
10982
|
-
const make$
|
|
10819
|
+
const make$9 = (key, value) => {
|
|
10983
10820
|
return new MetricLabelImpl(key, value);
|
|
10984
10821
|
};
|
|
10985
10822
|
/** @internal */
|
|
@@ -11052,7 +10889,7 @@ const logWithLevel = level => (...message) => {
|
|
|
11052
10889
|
/** @internal */
|
|
11053
10890
|
const logWarning$1 = /*#__PURE__*/logWithLevel(Warning);
|
|
11054
10891
|
/** @internal */
|
|
11055
|
-
const logError$1 = /*#__PURE__*/logWithLevel(Error$
|
|
10892
|
+
const logError$1 = /*#__PURE__*/logWithLevel(Error$1);
|
|
11056
10893
|
/* @internal */
|
|
11057
10894
|
const mapErrorCause = /*#__PURE__*/dual(2, (self, f) => matchCauseEffect$2(self, {
|
|
11058
10895
|
onFailure: c => failCauseSync(() => f(c)),
|
|
@@ -12708,7 +12545,7 @@ const metricHookVariance = {
|
|
|
12708
12545
|
_Out: _ => _
|
|
12709
12546
|
};
|
|
12710
12547
|
/** @internal */
|
|
12711
|
-
const make$
|
|
12548
|
+
const make$8 = options => ({
|
|
12712
12549
|
[MetricHookTypeId]: metricHookVariance,
|
|
12713
12550
|
pipe() {
|
|
12714
12551
|
return pipeArguments(this, arguments);
|
|
@@ -12725,7 +12562,7 @@ const counter$1 = key => {
|
|
|
12725
12562
|
sum = sum + value;
|
|
12726
12563
|
}
|
|
12727
12564
|
};
|
|
12728
|
-
return make$
|
|
12565
|
+
return make$8({
|
|
12729
12566
|
get: () => counter$2(sum),
|
|
12730
12567
|
update,
|
|
12731
12568
|
modify: update
|
|
@@ -12741,7 +12578,7 @@ const frequency = key => {
|
|
|
12741
12578
|
const slotCount = values.get(word) ?? 0;
|
|
12742
12579
|
values.set(word, slotCount + 1);
|
|
12743
12580
|
};
|
|
12744
|
-
return make$
|
|
12581
|
+
return make$8({
|
|
12745
12582
|
get: () => frequency$1(values),
|
|
12746
12583
|
update,
|
|
12747
12584
|
modify: update
|
|
@@ -12750,7 +12587,7 @@ const frequency = key => {
|
|
|
12750
12587
|
/** @internal */
|
|
12751
12588
|
const gauge = (_key, startAt) => {
|
|
12752
12589
|
let value = startAt;
|
|
12753
|
-
return make$
|
|
12590
|
+
return make$8({
|
|
12754
12591
|
get: () => gauge$1(value),
|
|
12755
12592
|
update: v => {
|
|
12756
12593
|
value = v;
|
|
@@ -12820,7 +12657,7 @@ const histogram$1 = key => {
|
|
|
12820
12657
|
}
|
|
12821
12658
|
return builder;
|
|
12822
12659
|
};
|
|
12823
|
-
return make$
|
|
12660
|
+
return make$8({
|
|
12824
12661
|
get: () => histogram$2({
|
|
12825
12662
|
buckets: getBuckets(),
|
|
12826
12663
|
count,
|
|
@@ -12887,7 +12724,7 @@ const summary = key => {
|
|
|
12887
12724
|
count = count + 1;
|
|
12888
12725
|
sum = sum + value;
|
|
12889
12726
|
};
|
|
12890
|
-
return make$
|
|
12727
|
+
return make$8({
|
|
12891
12728
|
get: () => summary$1({
|
|
12892
12729
|
error,
|
|
12893
12730
|
quantiles: snapshot(Date.now()),
|
|
@@ -13154,7 +12991,7 @@ class MetricRegistryImpl {
|
|
|
13154
12991
|
}
|
|
13155
12992
|
}
|
|
13156
12993
|
/** @internal */
|
|
13157
|
-
const make$
|
|
12994
|
+
const make$7 = () => {
|
|
13158
12995
|
return new MetricRegistryImpl();
|
|
13159
12996
|
};
|
|
13160
12997
|
|
|
@@ -13171,9 +13008,9 @@ const metricVariance = {
|
|
|
13171
13008
|
_Out: _ => _
|
|
13172
13009
|
};
|
|
13173
13010
|
/** @internal */
|
|
13174
|
-
const globalMetricRegistry = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/Metric/globalMetricRegistry"), () => make$
|
|
13011
|
+
const globalMetricRegistry = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/Metric/globalMetricRegistry"), () => make$7());
|
|
13175
13012
|
/** @internal */
|
|
13176
|
-
const make$
|
|
13013
|
+
const make$6 = function (keyType, unsafeUpdate, unsafeValue, unsafeModify) {
|
|
13177
13014
|
const metric = Object.assign(effect => tap$1(effect, a => update(metric, a)), {
|
|
13178
13015
|
[MetricTypeId]: metricVariance,
|
|
13179
13016
|
keyType,
|
|
@@ -13212,21 +13049,21 @@ const fromMetricKey = key => {
|
|
|
13212
13049
|
hookCache.set(extraTags, hook);
|
|
13213
13050
|
return hook;
|
|
13214
13051
|
};
|
|
13215
|
-
return make$
|
|
13052
|
+
return make$6(key.keyType, (input, extraTags) => hook(extraTags).update(input), extraTags => hook(extraTags).get(), (input, extraTags) => hook(extraTags).modify(input));
|
|
13216
13053
|
};
|
|
13217
13054
|
/** @internal */
|
|
13218
13055
|
const histogram = (name, boundaries, description) => fromMetricKey(histogram$3(name, boundaries, description));
|
|
13219
13056
|
/** @internal */
|
|
13220
|
-
const tagged = /*#__PURE__*/dual(3, (self, key, value) => taggedWithLabels(self, [make$
|
|
13057
|
+
const tagged = /*#__PURE__*/dual(3, (self, key, value) => taggedWithLabels(self, [make$9(key, value)]));
|
|
13221
13058
|
/** @internal */
|
|
13222
13059
|
const taggedWithLabels = /*#__PURE__*/dual(2, (self, extraTags) => {
|
|
13223
|
-
return make$
|
|
13060
|
+
return make$6(self.keyType, (input, extraTags1) => self.unsafeUpdate(input, union$2(extraTags, extraTags1)), extraTags1 => self.unsafeValue(union$2(extraTags, extraTags1)), (input, extraTags1) => self.unsafeModify(input, union$2(extraTags, extraTags1)));
|
|
13224
13061
|
});
|
|
13225
13062
|
/* @internal */
|
|
13226
13063
|
const update = /*#__PURE__*/dual(2, (self, input) => fiberRefGetWith(currentMetricLabels, tags => sync$1(() => self.unsafeUpdate(input, tags))));
|
|
13227
13064
|
|
|
13228
13065
|
/** @internal */
|
|
13229
|
-
const complete
|
|
13066
|
+
const complete = /*#__PURE__*/dual(2, (self, result) => fiberRefGetWith(currentRequestMap, map => sync$1(() => {
|
|
13230
13067
|
if (map.has(self)) {
|
|
13231
13068
|
const entry = map.get(self);
|
|
13232
13069
|
if (!entry.state.completed) {
|
|
@@ -13369,7 +13206,7 @@ const none = /*#__PURE__*/globalValue("effect/Supervisor/none", () => fromEffect
|
|
|
13369
13206
|
* @since 2.0.0
|
|
13370
13207
|
* @category constructors
|
|
13371
13208
|
*/
|
|
13372
|
-
const make$
|
|
13209
|
+
const make$5 = make$j;
|
|
13373
13210
|
|
|
13374
13211
|
/** @internal */
|
|
13375
13212
|
const OP_EMPTY = "Empty";
|
|
@@ -13461,7 +13298,7 @@ const toSet = self => {
|
|
|
13461
13298
|
if (isZip(self)) {
|
|
13462
13299
|
return pipe(toSet(self.left), union(toSet(self.right)));
|
|
13463
13300
|
} else {
|
|
13464
|
-
return make$
|
|
13301
|
+
return make$l(self);
|
|
13465
13302
|
}
|
|
13466
13303
|
}
|
|
13467
13304
|
};
|
|
@@ -13483,7 +13320,7 @@ const diff = (oldValue, newValue) => {
|
|
|
13483
13320
|
return combine(added, removed);
|
|
13484
13321
|
};
|
|
13485
13322
|
/** @internal */
|
|
13486
|
-
const differ = /*#__PURE__*/make$
|
|
13323
|
+
const differ = /*#__PURE__*/make$5({
|
|
13487
13324
|
empty: empty$2,
|
|
13488
13325
|
patch,
|
|
13489
13326
|
combine,
|
|
@@ -14650,7 +14487,7 @@ const tracerLogger = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/Lo
|
|
|
14650
14487
|
span.value.event(toStringUnknown(Array.isArray(message) && message.length === 1 ? message[0] : message), clockService.unsafeCurrentTimeNanos(), attributes);
|
|
14651
14488
|
}));
|
|
14652
14489
|
/** @internal */
|
|
14653
|
-
const currentLoggers = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/FiberRef/currentLoggers"), () => fiberRefUnsafeMakeHashSet(make$
|
|
14490
|
+
const currentLoggers = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/FiberRef/currentLoggers"), () => fiberRefUnsafeMakeHashSet(make$l(defaultLogger, tracerLogger)));
|
|
14654
14491
|
// === all
|
|
14655
14492
|
const allResolveInput = input => {
|
|
14656
14493
|
if (Array.isArray(input) || isIterable(input)) {
|
|
@@ -15092,7 +14929,7 @@ const scopeMake = (strategy = sequential$1) => sync$1(() => scopeUnsafeMake(stra
|
|
|
15092
14929
|
/* @internal */
|
|
15093
14930
|
const scopeExtend = /*#__PURE__*/dual(2, (effect, scope) => mapInputContext(effect,
|
|
15094
14931
|
// @ts-expect-error
|
|
15095
|
-
merge$1(make$
|
|
14932
|
+
merge$1(make$q(scopeTag, scope))));
|
|
15096
14933
|
// circular with Supervisor
|
|
15097
14934
|
/** @internal */
|
|
15098
14935
|
const fiberRefUnsafeMakeSupervisor = initial => fiberRefUnsafeMakePatch(initial, {
|
|
@@ -15147,7 +14984,7 @@ const race$1 = /*#__PURE__*/dual(2, (self, that) => fiberIdWith$1(parentFiberId
|
|
|
15147
14984
|
/** @internal */
|
|
15148
14985
|
const raceFibersWith = /*#__PURE__*/dual(3, (self, other, options) => withFiberRuntime$1((parentFiber, parentStatus) => {
|
|
15149
14986
|
const parentRuntimeFlags = parentStatus.runtimeFlags;
|
|
15150
|
-
const raceIndicator = make$
|
|
14987
|
+
const raceIndicator = make$k(true);
|
|
15151
14988
|
const leftFiber = unsafeMakeChildFiber(self, parentFiber, parentRuntimeFlags, options.selfScope);
|
|
15152
14989
|
const rightFiber = unsafeMakeChildFiber(other, parentFiber, parentRuntimeFlags, options.otherScope);
|
|
15153
14990
|
return async_(cb => {
|
|
@@ -15213,478 +15050,9 @@ const invokeWithInterrupt = (self, entries, onInterrupt) => fiberIdWith$1(id =>
|
|
|
15213
15050
|
}
|
|
15214
15051
|
return [];
|
|
15215
15052
|
});
|
|
15216
|
-
return forEachSequentialDiscard(residual, entry => complete
|
|
15053
|
+
return forEachSequentialDiscard(residual, entry => complete(entry.request, exitInterrupt$1(id)));
|
|
15217
15054
|
})));
|
|
15218
15055
|
|
|
15219
|
-
/** @internal */
|
|
15220
|
-
const complete = (key, exit, entryStats, timeToLiveMillis) => struct({
|
|
15221
|
-
_tag: "Complete",
|
|
15222
|
-
key,
|
|
15223
|
-
exit,
|
|
15224
|
-
entryStats,
|
|
15225
|
-
timeToLiveMillis
|
|
15226
|
-
});
|
|
15227
|
-
/** @internal */
|
|
15228
|
-
const pending = (key, deferred) => struct({
|
|
15229
|
-
_tag: "Pending",
|
|
15230
|
-
key,
|
|
15231
|
-
deferred
|
|
15232
|
-
});
|
|
15233
|
-
/** @internal */
|
|
15234
|
-
const refreshing = (deferred, complete) => struct({
|
|
15235
|
-
_tag: "Refreshing",
|
|
15236
|
-
deferred,
|
|
15237
|
-
complete
|
|
15238
|
-
});
|
|
15239
|
-
/** @internal */
|
|
15240
|
-
const MapKeyTypeId = /*#__PURE__*/Symbol.for("effect/Cache/MapKey");
|
|
15241
|
-
class MapKeyImpl {
|
|
15242
|
-
current;
|
|
15243
|
-
[MapKeyTypeId] = MapKeyTypeId;
|
|
15244
|
-
previous = undefined;
|
|
15245
|
-
next = undefined;
|
|
15246
|
-
constructor(current) {
|
|
15247
|
-
this.current = current;
|
|
15248
|
-
}
|
|
15249
|
-
[symbol$1]() {
|
|
15250
|
-
return pipe(hash(this.current), combine$7(hash(this.previous)), combine$7(hash(this.next)), cached(this));
|
|
15251
|
-
}
|
|
15252
|
-
[symbol](that) {
|
|
15253
|
-
if (this === that) {
|
|
15254
|
-
return true;
|
|
15255
|
-
}
|
|
15256
|
-
return isMapKey(that) && equals$1(this.current, that.current) && equals$1(this.previous, that.previous) && equals$1(this.next, that.next);
|
|
15257
|
-
}
|
|
15258
|
-
}
|
|
15259
|
-
/** @internal */
|
|
15260
|
-
const makeMapKey = current => new MapKeyImpl(current);
|
|
15261
|
-
/** @internal */
|
|
15262
|
-
const isMapKey = u => hasProperty(u, MapKeyTypeId);
|
|
15263
|
-
class KeySetImpl {
|
|
15264
|
-
head = undefined;
|
|
15265
|
-
tail = undefined;
|
|
15266
|
-
add(key) {
|
|
15267
|
-
if (key !== this.tail) {
|
|
15268
|
-
if (this.tail === undefined) {
|
|
15269
|
-
this.head = key;
|
|
15270
|
-
this.tail = key;
|
|
15271
|
-
} else {
|
|
15272
|
-
const previous = key.previous;
|
|
15273
|
-
const next = key.next;
|
|
15274
|
-
if (next !== undefined) {
|
|
15275
|
-
key.next = undefined;
|
|
15276
|
-
if (previous !== undefined) {
|
|
15277
|
-
previous.next = next;
|
|
15278
|
-
next.previous = previous;
|
|
15279
|
-
} else {
|
|
15280
|
-
this.head = next;
|
|
15281
|
-
this.head.previous = undefined;
|
|
15282
|
-
}
|
|
15283
|
-
}
|
|
15284
|
-
this.tail.next = key;
|
|
15285
|
-
key.previous = this.tail;
|
|
15286
|
-
this.tail = key;
|
|
15287
|
-
}
|
|
15288
|
-
}
|
|
15289
|
-
}
|
|
15290
|
-
remove() {
|
|
15291
|
-
const key = this.head;
|
|
15292
|
-
if (key !== undefined) {
|
|
15293
|
-
const next = key.next;
|
|
15294
|
-
if (next !== undefined) {
|
|
15295
|
-
key.next = undefined;
|
|
15296
|
-
this.head = next;
|
|
15297
|
-
this.head.previous = undefined;
|
|
15298
|
-
} else {
|
|
15299
|
-
this.head = undefined;
|
|
15300
|
-
this.tail = undefined;
|
|
15301
|
-
}
|
|
15302
|
-
}
|
|
15303
|
-
return key;
|
|
15304
|
-
}
|
|
15305
|
-
}
|
|
15306
|
-
/** @internal */
|
|
15307
|
-
const makeKeySet = () => new KeySetImpl();
|
|
15308
|
-
/**
|
|
15309
|
-
* Constructs a new `CacheState` from the specified values.
|
|
15310
|
-
*
|
|
15311
|
-
* @internal
|
|
15312
|
-
*/
|
|
15313
|
-
const makeCacheState = (map, keys, accesses, updating, hits, misses) => ({
|
|
15314
|
-
map,
|
|
15315
|
-
keys,
|
|
15316
|
-
accesses,
|
|
15317
|
-
updating,
|
|
15318
|
-
hits,
|
|
15319
|
-
misses
|
|
15320
|
-
});
|
|
15321
|
-
/**
|
|
15322
|
-
* Constructs an initial cache state.
|
|
15323
|
-
*
|
|
15324
|
-
* @internal
|
|
15325
|
-
*/
|
|
15326
|
-
const initialCacheState = () => makeCacheState(empty$8(), makeKeySet(), unbounded(), make$m(false), 0, 0);
|
|
15327
|
-
/** @internal */
|
|
15328
|
-
const CacheSymbolKey = "effect/Cache";
|
|
15329
|
-
/** @internal */
|
|
15330
|
-
const CacheTypeId = /*#__PURE__*/Symbol.for(CacheSymbolKey);
|
|
15331
|
-
const cacheVariance = {
|
|
15332
|
-
/* c8 ignore next */
|
|
15333
|
-
_Key: _ => _,
|
|
15334
|
-
/* c8 ignore next */
|
|
15335
|
-
_Error: _ => _,
|
|
15336
|
-
/* c8 ignore next */
|
|
15337
|
-
_Value: _ => _
|
|
15338
|
-
};
|
|
15339
|
-
/** @internal */
|
|
15340
|
-
const ConsumerCacheSymbolKey = "effect/ConsumerCache";
|
|
15341
|
-
/** @internal */
|
|
15342
|
-
const ConsumerCacheTypeId = /*#__PURE__*/Symbol.for(ConsumerCacheSymbolKey);
|
|
15343
|
-
const consumerCacheVariance = {
|
|
15344
|
-
/* c8 ignore next */
|
|
15345
|
-
_Key: _ => _,
|
|
15346
|
-
/* c8 ignore next */
|
|
15347
|
-
_Error: _ => _,
|
|
15348
|
-
/* c8 ignore next */
|
|
15349
|
-
_Value: _ => _
|
|
15350
|
-
};
|
|
15351
|
-
/** @internal */
|
|
15352
|
-
const makeCacheStats = options => options;
|
|
15353
|
-
/** @internal */
|
|
15354
|
-
const makeEntryStats = loadedMillis => ({
|
|
15355
|
-
loadedMillis
|
|
15356
|
-
});
|
|
15357
|
-
class CacheImpl {
|
|
15358
|
-
capacity;
|
|
15359
|
-
context;
|
|
15360
|
-
fiberId;
|
|
15361
|
-
lookup;
|
|
15362
|
-
timeToLive;
|
|
15363
|
-
[CacheTypeId] = cacheVariance;
|
|
15364
|
-
[ConsumerCacheTypeId] = consumerCacheVariance;
|
|
15365
|
-
cacheState;
|
|
15366
|
-
constructor(capacity, context, fiberId, lookup, timeToLive) {
|
|
15367
|
-
this.capacity = capacity;
|
|
15368
|
-
this.context = context;
|
|
15369
|
-
this.fiberId = fiberId;
|
|
15370
|
-
this.lookup = lookup;
|
|
15371
|
-
this.timeToLive = timeToLive;
|
|
15372
|
-
this.cacheState = initialCacheState();
|
|
15373
|
-
}
|
|
15374
|
-
get(key) {
|
|
15375
|
-
return map$3(this.getEither(key), merge$3);
|
|
15376
|
-
}
|
|
15377
|
-
get cacheStats() {
|
|
15378
|
-
return sync$1(() => makeCacheStats({
|
|
15379
|
-
hits: this.cacheState.hits,
|
|
15380
|
-
misses: this.cacheState.misses,
|
|
15381
|
-
size: size(this.cacheState.map)
|
|
15382
|
-
}));
|
|
15383
|
-
}
|
|
15384
|
-
getOption(key) {
|
|
15385
|
-
return suspend$2(() => match$6(get$2(this.cacheState.map, key), {
|
|
15386
|
-
onNone: () => {
|
|
15387
|
-
const mapKey = makeMapKey(key);
|
|
15388
|
-
this.trackAccess(mapKey);
|
|
15389
|
-
this.trackMiss();
|
|
15390
|
-
return succeed$4(none$4());
|
|
15391
|
-
},
|
|
15392
|
-
onSome: value => this.resolveMapValue(value)
|
|
15393
|
-
}));
|
|
15394
|
-
}
|
|
15395
|
-
getOptionComplete(key) {
|
|
15396
|
-
return suspend$2(() => match$6(get$2(this.cacheState.map, key), {
|
|
15397
|
-
onNone: () => {
|
|
15398
|
-
const mapKey = makeMapKey(key);
|
|
15399
|
-
this.trackAccess(mapKey);
|
|
15400
|
-
this.trackMiss();
|
|
15401
|
-
return succeed$4(none$4());
|
|
15402
|
-
},
|
|
15403
|
-
onSome: value => this.resolveMapValue(value, true)
|
|
15404
|
-
}));
|
|
15405
|
-
}
|
|
15406
|
-
contains(key) {
|
|
15407
|
-
return sync$1(() => has(this.cacheState.map, key));
|
|
15408
|
-
}
|
|
15409
|
-
entryStats(key) {
|
|
15410
|
-
return sync$1(() => {
|
|
15411
|
-
const option = get$2(this.cacheState.map, key);
|
|
15412
|
-
if (isSome(option)) {
|
|
15413
|
-
switch (option.value._tag) {
|
|
15414
|
-
case "Complete":
|
|
15415
|
-
{
|
|
15416
|
-
const loaded = option.value.entryStats.loadedMillis;
|
|
15417
|
-
return some(makeEntryStats(loaded));
|
|
15418
|
-
}
|
|
15419
|
-
case "Pending":
|
|
15420
|
-
{
|
|
15421
|
-
return none$4();
|
|
15422
|
-
}
|
|
15423
|
-
case "Refreshing":
|
|
15424
|
-
{
|
|
15425
|
-
const loaded = option.value.complete.entryStats.loadedMillis;
|
|
15426
|
-
return some(makeEntryStats(loaded));
|
|
15427
|
-
}
|
|
15428
|
-
}
|
|
15429
|
-
}
|
|
15430
|
-
return none$4();
|
|
15431
|
-
});
|
|
15432
|
-
}
|
|
15433
|
-
getEither(key) {
|
|
15434
|
-
return suspend$2(() => {
|
|
15435
|
-
const k = key;
|
|
15436
|
-
let mapKey = undefined;
|
|
15437
|
-
let deferred = undefined;
|
|
15438
|
-
let value = getOrUndefined(get$2(this.cacheState.map, k));
|
|
15439
|
-
if (value === undefined) {
|
|
15440
|
-
deferred = unsafeMake$4(this.fiberId);
|
|
15441
|
-
mapKey = makeMapKey(k);
|
|
15442
|
-
if (has(this.cacheState.map, k)) {
|
|
15443
|
-
value = getOrUndefined(get$2(this.cacheState.map, k));
|
|
15444
|
-
} else {
|
|
15445
|
-
set$1(this.cacheState.map, k, pending(mapKey, deferred));
|
|
15446
|
-
}
|
|
15447
|
-
}
|
|
15448
|
-
if (value === undefined) {
|
|
15449
|
-
this.trackAccess(mapKey);
|
|
15450
|
-
this.trackMiss();
|
|
15451
|
-
return map$3(this.lookupValueOf(key, deferred), right);
|
|
15452
|
-
} else {
|
|
15453
|
-
return flatMap$2(this.resolveMapValue(value), match$6({
|
|
15454
|
-
onNone: () => this.getEither(key),
|
|
15455
|
-
onSome: value => succeed$4(left(value))
|
|
15456
|
-
}));
|
|
15457
|
-
}
|
|
15458
|
-
});
|
|
15459
|
-
}
|
|
15460
|
-
invalidate(key) {
|
|
15461
|
-
return sync$1(() => {
|
|
15462
|
-
remove$1(this.cacheState.map, key);
|
|
15463
|
-
});
|
|
15464
|
-
}
|
|
15465
|
-
invalidateWhen(key, when) {
|
|
15466
|
-
return sync$1(() => {
|
|
15467
|
-
const value = get$2(this.cacheState.map, key);
|
|
15468
|
-
if (isSome(value) && value.value._tag === "Complete") {
|
|
15469
|
-
if (value.value.exit._tag === "Success") {
|
|
15470
|
-
if (when(value.value.exit.value)) {
|
|
15471
|
-
remove$1(this.cacheState.map, key);
|
|
15472
|
-
}
|
|
15473
|
-
}
|
|
15474
|
-
}
|
|
15475
|
-
});
|
|
15476
|
-
}
|
|
15477
|
-
get invalidateAll() {
|
|
15478
|
-
return sync$1(() => {
|
|
15479
|
-
this.cacheState.map = empty$8();
|
|
15480
|
-
});
|
|
15481
|
-
}
|
|
15482
|
-
refresh(key) {
|
|
15483
|
-
return clockWith(clock => suspend$2(() => {
|
|
15484
|
-
const k = key;
|
|
15485
|
-
const deferred = unsafeMake$4(this.fiberId);
|
|
15486
|
-
let value = getOrUndefined(get$2(this.cacheState.map, k));
|
|
15487
|
-
if (value === undefined) {
|
|
15488
|
-
if (has(this.cacheState.map, k)) {
|
|
15489
|
-
value = getOrUndefined(get$2(this.cacheState.map, k));
|
|
15490
|
-
} else {
|
|
15491
|
-
set$1(this.cacheState.map, k, pending(makeMapKey(k), deferred));
|
|
15492
|
-
}
|
|
15493
|
-
}
|
|
15494
|
-
if (value === undefined) {
|
|
15495
|
-
return asVoid$1(this.lookupValueOf(key, deferred));
|
|
15496
|
-
} else {
|
|
15497
|
-
switch (value._tag) {
|
|
15498
|
-
case "Complete":
|
|
15499
|
-
{
|
|
15500
|
-
if (this.hasExpired(clock, value.timeToLiveMillis)) {
|
|
15501
|
-
const found = getOrUndefined(get$2(this.cacheState.map, k));
|
|
15502
|
-
if (equals$1(found, value)) {
|
|
15503
|
-
remove$1(this.cacheState.map, k);
|
|
15504
|
-
}
|
|
15505
|
-
return asVoid$1(this.get(key));
|
|
15506
|
-
}
|
|
15507
|
-
// Only trigger the lookup if we're still the current value, `completedResult`
|
|
15508
|
-
return pipe(this.lookupValueOf(key, deferred), when$1(() => {
|
|
15509
|
-
const current = getOrUndefined(get$2(this.cacheState.map, k));
|
|
15510
|
-
if (equals$1(current, value)) {
|
|
15511
|
-
const mapValue = refreshing(deferred, value);
|
|
15512
|
-
set$1(this.cacheState.map, k, mapValue);
|
|
15513
|
-
return true;
|
|
15514
|
-
}
|
|
15515
|
-
return false;
|
|
15516
|
-
}), asVoid$1);
|
|
15517
|
-
}
|
|
15518
|
-
case "Pending":
|
|
15519
|
-
{
|
|
15520
|
-
return _await$1(value.deferred);
|
|
15521
|
-
}
|
|
15522
|
-
case "Refreshing":
|
|
15523
|
-
{
|
|
15524
|
-
return _await$1(value.deferred);
|
|
15525
|
-
}
|
|
15526
|
-
}
|
|
15527
|
-
}
|
|
15528
|
-
}));
|
|
15529
|
-
}
|
|
15530
|
-
set(key, value) {
|
|
15531
|
-
return clockWith(clock => sync$1(() => {
|
|
15532
|
-
const now = clock.unsafeCurrentTimeMillis();
|
|
15533
|
-
const k = key;
|
|
15534
|
-
const lookupResult = succeed$2(value);
|
|
15535
|
-
const mapValue = complete(makeMapKey(k), lookupResult, makeEntryStats(now), now + toMillis(decode(this.timeToLive(lookupResult))));
|
|
15536
|
-
set$1(this.cacheState.map, k, mapValue);
|
|
15537
|
-
}));
|
|
15538
|
-
}
|
|
15539
|
-
get size() {
|
|
15540
|
-
return sync$1(() => {
|
|
15541
|
-
return size(this.cacheState.map);
|
|
15542
|
-
});
|
|
15543
|
-
}
|
|
15544
|
-
get values() {
|
|
15545
|
-
return sync$1(() => {
|
|
15546
|
-
const values = [];
|
|
15547
|
-
for (const entry of this.cacheState.map) {
|
|
15548
|
-
if (entry[1]._tag === "Complete" && entry[1].exit._tag === "Success") {
|
|
15549
|
-
values.push(entry[1].exit.value);
|
|
15550
|
-
}
|
|
15551
|
-
}
|
|
15552
|
-
return values;
|
|
15553
|
-
});
|
|
15554
|
-
}
|
|
15555
|
-
get entries() {
|
|
15556
|
-
return sync$1(() => {
|
|
15557
|
-
const values = [];
|
|
15558
|
-
for (const entry of this.cacheState.map) {
|
|
15559
|
-
if (entry[1]._tag === "Complete" && entry[1].exit._tag === "Success") {
|
|
15560
|
-
values.push([entry[0], entry[1].exit.value]);
|
|
15561
|
-
}
|
|
15562
|
-
}
|
|
15563
|
-
return values;
|
|
15564
|
-
});
|
|
15565
|
-
}
|
|
15566
|
-
get keys() {
|
|
15567
|
-
return sync$1(() => {
|
|
15568
|
-
const keys = [];
|
|
15569
|
-
for (const entry of this.cacheState.map) {
|
|
15570
|
-
if (entry[1]._tag === "Complete" && entry[1].exit._tag === "Success") {
|
|
15571
|
-
keys.push(entry[0]);
|
|
15572
|
-
}
|
|
15573
|
-
}
|
|
15574
|
-
return keys;
|
|
15575
|
-
});
|
|
15576
|
-
}
|
|
15577
|
-
resolveMapValue(value, ignorePending = false) {
|
|
15578
|
-
return clockWith(clock => {
|
|
15579
|
-
switch (value._tag) {
|
|
15580
|
-
case "Complete":
|
|
15581
|
-
{
|
|
15582
|
-
this.trackAccess(value.key);
|
|
15583
|
-
if (this.hasExpired(clock, value.timeToLiveMillis)) {
|
|
15584
|
-
remove$1(this.cacheState.map, value.key.current);
|
|
15585
|
-
return succeed$4(none$4());
|
|
15586
|
-
}
|
|
15587
|
-
this.trackHit();
|
|
15588
|
-
return map$3(value.exit, some);
|
|
15589
|
-
}
|
|
15590
|
-
case "Pending":
|
|
15591
|
-
{
|
|
15592
|
-
this.trackAccess(value.key);
|
|
15593
|
-
this.trackHit();
|
|
15594
|
-
if (ignorePending) {
|
|
15595
|
-
return succeed$4(none$4());
|
|
15596
|
-
}
|
|
15597
|
-
return map$3(_await$1(value.deferred), some);
|
|
15598
|
-
}
|
|
15599
|
-
case "Refreshing":
|
|
15600
|
-
{
|
|
15601
|
-
this.trackAccess(value.complete.key);
|
|
15602
|
-
this.trackHit();
|
|
15603
|
-
if (this.hasExpired(clock, value.complete.timeToLiveMillis)) {
|
|
15604
|
-
if (ignorePending) {
|
|
15605
|
-
return succeed$4(none$4());
|
|
15606
|
-
}
|
|
15607
|
-
return map$3(_await$1(value.deferred), some);
|
|
15608
|
-
}
|
|
15609
|
-
return map$3(value.complete.exit, some);
|
|
15610
|
-
}
|
|
15611
|
-
}
|
|
15612
|
-
});
|
|
15613
|
-
}
|
|
15614
|
-
trackHit() {
|
|
15615
|
-
this.cacheState.hits = this.cacheState.hits + 1;
|
|
15616
|
-
}
|
|
15617
|
-
trackMiss() {
|
|
15618
|
-
this.cacheState.misses = this.cacheState.misses + 1;
|
|
15619
|
-
}
|
|
15620
|
-
trackAccess(key) {
|
|
15621
|
-
offer(this.cacheState.accesses, key);
|
|
15622
|
-
if (compareAndSet(this.cacheState.updating, false, true)) {
|
|
15623
|
-
let loop = true;
|
|
15624
|
-
while (loop) {
|
|
15625
|
-
const key = poll(this.cacheState.accesses, EmptyMutableQueue);
|
|
15626
|
-
if (key === EmptyMutableQueue) {
|
|
15627
|
-
loop = false;
|
|
15628
|
-
} else {
|
|
15629
|
-
this.cacheState.keys.add(key);
|
|
15630
|
-
}
|
|
15631
|
-
}
|
|
15632
|
-
let size$1 = size(this.cacheState.map);
|
|
15633
|
-
loop = size$1 > this.capacity;
|
|
15634
|
-
while (loop) {
|
|
15635
|
-
const key = this.cacheState.keys.remove();
|
|
15636
|
-
if (key !== undefined) {
|
|
15637
|
-
if (has(this.cacheState.map, key.current)) {
|
|
15638
|
-
remove$1(this.cacheState.map, key.current);
|
|
15639
|
-
size$1 = size$1 - 1;
|
|
15640
|
-
loop = size$1 > this.capacity;
|
|
15641
|
-
}
|
|
15642
|
-
} else {
|
|
15643
|
-
loop = false;
|
|
15644
|
-
}
|
|
15645
|
-
}
|
|
15646
|
-
set$3(this.cacheState.updating, false);
|
|
15647
|
-
}
|
|
15648
|
-
}
|
|
15649
|
-
hasExpired(clock, timeToLiveMillis) {
|
|
15650
|
-
return clock.unsafeCurrentTimeMillis() > timeToLiveMillis;
|
|
15651
|
-
}
|
|
15652
|
-
lookupValueOf(input, deferred) {
|
|
15653
|
-
return clockWith(clock => suspend$2(() => {
|
|
15654
|
-
const key = input;
|
|
15655
|
-
return pipe(this.lookup(input), provideContext$1(this.context), exit$1, flatMap$2(exit => {
|
|
15656
|
-
const now = clock.unsafeCurrentTimeMillis();
|
|
15657
|
-
const stats = makeEntryStats(now);
|
|
15658
|
-
const value = complete(makeMapKey(key), exit, stats, now + toMillis(decode(this.timeToLive(exit))));
|
|
15659
|
-
set$1(this.cacheState.map, key, value);
|
|
15660
|
-
return zipRight$2(done$4(deferred, exit), exit);
|
|
15661
|
-
}), onInterrupt(() => zipRight$2(interrupt$1(deferred), sync$1(() => {
|
|
15662
|
-
remove$1(this.cacheState.map, key);
|
|
15663
|
-
}))));
|
|
15664
|
-
}));
|
|
15665
|
-
}
|
|
15666
|
-
}
|
|
15667
|
-
/** @internal */
|
|
15668
|
-
const make$6 = options => {
|
|
15669
|
-
const timeToLive = decode(options.timeToLive);
|
|
15670
|
-
return makeWith({
|
|
15671
|
-
capacity: options.capacity,
|
|
15672
|
-
lookup: options.lookup,
|
|
15673
|
-
timeToLive: () => timeToLive
|
|
15674
|
-
});
|
|
15675
|
-
};
|
|
15676
|
-
/** @internal */
|
|
15677
|
-
const makeWith = options => map$3(all$1([context(), fiberId]), ([context, fiberId]) => new CacheImpl(options.capacity, context, fiberId, options.lookup, exit => decode(options.timeToLive(exit))));
|
|
15678
|
-
|
|
15679
|
-
/**
|
|
15680
|
-
* Constructs a new cache with the specified capacity, time to live, and
|
|
15681
|
-
* lookup function.
|
|
15682
|
-
*
|
|
15683
|
-
* @since 2.0.0
|
|
15684
|
-
* @category constructors
|
|
15685
|
-
*/
|
|
15686
|
-
const make$5 = make$6;
|
|
15687
|
-
|
|
15688
15056
|
/** @internal */
|
|
15689
15057
|
const IntervalSymbolKey = "effect/ScheduleInterval";
|
|
15690
15058
|
/** @internal */
|
|
@@ -16284,7 +15652,7 @@ const make = options => new RuntimeImpl(options.context, options.runtimeFlags, o
|
|
|
16284
15652
|
/** @internal */
|
|
16285
15653
|
const runtime$1 = () => withFiberRuntime$1((state, status) => succeed$4(new RuntimeImpl(state.getFiberRef(currentContext), status.runtimeFlags, state.getFiberRefs())));
|
|
16286
15654
|
/** @internal */
|
|
16287
|
-
const defaultRuntimeFlags = /*#__PURE__*/make$
|
|
15655
|
+
const defaultRuntimeFlags = /*#__PURE__*/make$h(Interruption, CooperativeYielding, RuntimeMetrics);
|
|
16288
15656
|
/** @internal */
|
|
16289
15657
|
const defaultRuntime = /*#__PURE__*/make({
|
|
16290
15658
|
context: /*#__PURE__*/empty$k(),
|
|
@@ -16359,7 +15727,7 @@ class MemoMapImpl {
|
|
|
16359
15727
|
})));
|
|
16360
15728
|
return succeed$4([cached, map]);
|
|
16361
15729
|
}
|
|
16362
|
-
return pipe(make$
|
|
15730
|
+
return pipe(make$a(0), flatMap$2(observers => pipe(deferredMake(), flatMap$2(deferred => pipe(make$a(() => void_$2), map$3(finalizerRef => {
|
|
16363
15731
|
const resource = uninterruptibleMask$2(restore => pipe(scopeMake(), flatMap$2(innerScope => pipe(restore(flatMap$2(makeBuilder(layer, innerScope, true), f => diffFiberRefs(f(this)))), exit$1, flatMap$2(exit => {
|
|
16364
15732
|
switch (exit._tag) {
|
|
16365
15733
|
case OP_FAILURE:
|
|
@@ -16501,53 +15869,6 @@ const effect_provide = /*#__PURE__*/dual(2, (self, source) => {
|
|
|
16501
15869
|
}
|
|
16502
15870
|
});
|
|
16503
15871
|
|
|
16504
|
-
/**
|
|
16505
|
-
* Provides a constructor for a Case Class.
|
|
16506
|
-
*
|
|
16507
|
-
* @since 2.0.0
|
|
16508
|
-
* @category constructors
|
|
16509
|
-
*/
|
|
16510
|
-
const Error$1 = /*#__PURE__*/function () {
|
|
16511
|
-
const plainArgsSymbol = /*#__PURE__*/Symbol.for("effect/Data/Error/plainArgs");
|
|
16512
|
-
const O = {
|
|
16513
|
-
BaseEffectError: class extends YieldableError {
|
|
16514
|
-
constructor(args) {
|
|
16515
|
-
super(args?.message, args?.cause ? {
|
|
16516
|
-
cause: args.cause
|
|
16517
|
-
} : undefined);
|
|
16518
|
-
if (args) {
|
|
16519
|
-
Object.assign(this, args);
|
|
16520
|
-
// @effect-diagnostics-next-line floatingEffect:off
|
|
16521
|
-
Object.defineProperty(this, plainArgsSymbol, {
|
|
16522
|
-
value: args,
|
|
16523
|
-
enumerable: false
|
|
16524
|
-
});
|
|
16525
|
-
}
|
|
16526
|
-
}
|
|
16527
|
-
toJSON() {
|
|
16528
|
-
return {
|
|
16529
|
-
...this[plainArgsSymbol],
|
|
16530
|
-
...this
|
|
16531
|
-
};
|
|
16532
|
-
}
|
|
16533
|
-
}
|
|
16534
|
-
};
|
|
16535
|
-
return O.BaseEffectError;
|
|
16536
|
-
}();
|
|
16537
|
-
/**
|
|
16538
|
-
* @since 2.0.0
|
|
16539
|
-
* @category constructors
|
|
16540
|
-
*/
|
|
16541
|
-
const TaggedError = tag => {
|
|
16542
|
-
const O = {
|
|
16543
|
-
BaseEffectError: class extends Error$1 {
|
|
16544
|
-
_tag = tag;
|
|
16545
|
-
}
|
|
16546
|
-
};
|
|
16547
|
-
O.BaseEffectError.prototype.name = tag;
|
|
16548
|
-
return O.BaseEffectError;
|
|
16549
|
-
};
|
|
16550
|
-
|
|
16551
15872
|
/** @internal */
|
|
16552
15873
|
const ScheduleSymbolKey = "effect/Schedule";
|
|
16553
15874
|
/** @internal */
|
|
@@ -16676,7 +15997,7 @@ const checkEffect = /*#__PURE__*/dual(2, (self, test) => makeWithState(self.init
|
|
|
16676
15997
|
return map$3(test(input, out), cont => cont ? [state, out, decision] : [state, out, done]);
|
|
16677
15998
|
})));
|
|
16678
15999
|
/** @internal */
|
|
16679
|
-
const driver = self => pipe(make$
|
|
16000
|
+
const driver = self => pipe(make$a([none$4(), self.initial]), map$3(ref => new ScheduleDriverImpl(self, ref)));
|
|
16680
16001
|
/** @internal */
|
|
16681
16002
|
const intersect = /*#__PURE__*/dual(2, (self, that) => intersectWith(self, that, intersect$1));
|
|
16682
16003
|
/** @internal */
|
|
@@ -19504,88 +18825,4 @@ const zipRight = zipRightOptions;
|
|
|
19504
18825
|
*/
|
|
19505
18826
|
const zipWith = zipWithOptions;
|
|
19506
18827
|
|
|
19507
|
-
|
|
19508
|
-
}
|
|
19509
|
-
class NotFoundError extends TaggedError('NotFoundError') {
|
|
19510
|
-
}
|
|
19511
|
-
const httpClient = (input, init) => gen$1(function* () {
|
|
19512
|
-
const response = yield* tryPromise({
|
|
19513
|
-
try: () => fetch(input, init),
|
|
19514
|
-
catch: error => new FetchError({ cause: error }),
|
|
19515
|
-
});
|
|
19516
|
-
if (response.status === 404) {
|
|
19517
|
-
return yield* fail$1(new NotFoundError({ url: response.url }));
|
|
19518
|
-
}
|
|
19519
|
-
return response;
|
|
19520
|
-
});
|
|
19521
|
-
class ResponseTextError extends TaggedError('ResponseTextError') {
|
|
19522
|
-
constructor(error) {
|
|
19523
|
-
super(new Error(`Failed to read response text`, { cause: error }));
|
|
19524
|
-
}
|
|
19525
|
-
}
|
|
19526
|
-
const responseAsText = (res) => tryPromise({
|
|
19527
|
-
try: () => res.text(),
|
|
19528
|
-
catch: error => new ResponseTextError(error),
|
|
19529
|
-
});
|
|
19530
|
-
|
|
19531
|
-
const SVGString = refined(isValidSVG, () => error('SVG data is malformed'));
|
|
19532
|
-
class BrandValidationError extends TaggedError('BrandValidationError') {
|
|
19533
|
-
constructor(error, type) {
|
|
19534
|
-
super(new Error(`Brand validation failed for type ${type}.`, { cause: error }));
|
|
19535
|
-
}
|
|
19536
|
-
}
|
|
19537
|
-
const createValidSVGString = (svg) => try_({
|
|
19538
|
-
try: () => SVGString(svg),
|
|
19539
|
-
catch: error => new BrandValidationError(error, 'SVGString'),
|
|
19540
|
-
});
|
|
19541
|
-
function isValidSVG(svg) {
|
|
19542
|
-
if (typeof svg !== 'string') {
|
|
19543
|
-
return false;
|
|
19544
|
-
}
|
|
19545
|
-
try {
|
|
19546
|
-
const parser = new DOMParser();
|
|
19547
|
-
const doc = parser.parseFromString(svg, 'image/svg+xml');
|
|
19548
|
-
return doc.documentElement.nodeName === 'svg';
|
|
19549
|
-
}
|
|
19550
|
-
catch {
|
|
19551
|
-
return false;
|
|
19552
|
-
}
|
|
19553
|
-
}
|
|
19554
|
-
|
|
19555
|
-
const emptyDefaultSvg = () => SVGString(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"></svg>`);
|
|
19556
|
-
const createIconCache = () => make$5({
|
|
19557
|
-
capacity: 200,
|
|
19558
|
-
timeToLive: infinity,
|
|
19559
|
-
lookup: (key) => gen(function* () {
|
|
19560
|
-
const name = key;
|
|
19561
|
-
const assetPath = createAssetUrlSafely(`${name}.svg`, 'icons');
|
|
19562
|
-
const res = yield* httpClient(assetPath);
|
|
19563
|
-
const responseString = yield* responseAsText(res);
|
|
19564
|
-
return yield* createValidSVGString(responseString);
|
|
19565
|
-
}),
|
|
19566
|
-
});
|
|
19567
|
-
let cacheInstance = null;
|
|
19568
|
-
function fetchIconSvg(name) {
|
|
19569
|
-
const key = name;
|
|
19570
|
-
return gen(function* () {
|
|
19571
|
-
if (!cacheInstance) {
|
|
19572
|
-
cacheInstance = yield* createIconCache();
|
|
19573
|
-
}
|
|
19574
|
-
return yield* cacheInstance.get(key);
|
|
19575
|
-
});
|
|
19576
|
-
}
|
|
19577
|
-
function clearIconCache() {
|
|
19578
|
-
return gen(function* () {
|
|
19579
|
-
if (cacheInstance) {
|
|
19580
|
-
yield* cacheInstance.invalidateAll;
|
|
19581
|
-
}
|
|
19582
|
-
else {
|
|
19583
|
-
logWarning('Attempted to clear icon cache before it was initialized');
|
|
19584
|
-
}
|
|
19585
|
-
});
|
|
19586
|
-
}
|
|
19587
|
-
|
|
19588
|
-
export { asVoid$1 as $, ARIA_VALIDATION_RUNTIME_CHANGED_EVENT as A, isInterruptedOnly as B, join as C, interruptFiber as D, inheritAll as E, interruptAsFiber as F, pipe as G, flatMap$2 as H, sync$1 as I, dual as J, map$3 as K, make$m as L, unbounded as M, deferredMake as N, Class as O, pipeArguments as P, suspend$2 as Q, catchAll$1 as R, interrupt$2 as S, get$4 as T, none$4 as U, some as V, length as W, uninterruptible$1 as X, withFiberRuntime$1 as Y, set$3 as Z, _await as _, catchAll as a, map$2 as a$, whenEffect as a0, deferredSucceed as a1, zipRight$2 as a2, forEachConcurrentDiscard as a3, deferredAwait as a4, poll as a5, EmptyMutableQueue as a6, succeed$4 as a7, fromIterable$6 as a8, empty$m as a9, ignore as aA, zipWith as aB, exit as aC, zipRight$1 as aD, sync as aE, provide as aF, matchCauseEffect as aG, zipRight as aH, flatMap as aI, forkDaemon as aJ, interruptible as aK, suspend as aL, ensuring as aM, uninterruptible as aN, map as aO, zip as aP, succeed$2 as aQ, failCause$2 as aR, match$3 as aS, forEach as aT, isSome as aU, all$2 as aV, getOrElse as aW, void_$1 as aX, dieMessage as aY, catchAllCause as aZ, die as a_, splitAt$1 as aa, isEmpty$7 as ab, deferredUnsafeMake as ac, onInterrupt as ad, offer as ae, fromIterable$5 as af, pollUpTo as ag, deferredUnsafeDone as ah, prepend$1 as ai, isEmpty$2 as aj, filter as ak, appendAll$1 as al, append$1 as am, offerAll as an, deferredInterruptWith as ao, empty$j as ap, bounded as aq, capacity as ar, void_$2 as as, fiberId as at, isFailure as au, hasProperty as av, isEffect as aw, identity as ax, match$7 as ay, _void as az, emptyDefaultSvg as b, uninterruptibleMask as b0, all as b1, fork as b2, make$i as b3, sequential as b4, acquireUseRelease as b5, forkIn as b6, isDone$4 as b7, succeed$3 as b8, size$1 as b9, tap as bA, addFinalizerExit as bB, makeSemaphore as bC, when as bD, race as bE, as as bF, match$6 as bG, repeat as bH, asVoid as bI, equals$1 as bJ, zip$1 as bK, raceFirst as bL, forever as bM, of$1 as bN, fail as bO, mapError as bP, reduce$6 as bQ, map$7 as bR, match as bS, splitWhere as bT, isSuccess as bU, head as bV, filterMap as bW, catchSomeCause as bX, unsafeFromArray as bY, async as bZ, runFork as b_, combineAll as ba, _await$1 as bb, intoDeferred as bc, zipLeft as bd, tapErrorCause as be, addFinalizer as bf, failCause as bg, flatten as bh, fiberIdWith as bi, interrupt as bj, left as bk, right as bl, failCause$3 as bm, fail$2 as bn, matchCause as bo, scopedWith as bp, unsafeGet as bq, constVoid as br, scope as bs, gen as bt, withFiberRuntime as bu, make$1 as bv, extend as bw, close as bx, raceWith as by, runtime as bz, clearIconCache as c, disableAriaValidation as d, enableAriaValidation as e, fetchIconSvg as f, modify as g, get as h, isAriaValidationEnabled as i, update$1 as j, isInterrupted as k, logError as l, make$c as m, fail$4 as n, failureOrCause as o, flipCauseOption as p, queueValidation as q, runPromise as r, succeed as s, tapError as t, useVerboseLogging as u, interrupt$3 as v, map$4 as w, die$2 as x, isDieType as y, interruptors as z };
|
|
19589
|
-
//# sourceMappingURL=icons-D1lxdRXP.js.map
|
|
19590
|
-
|
|
19591
|
-
//# sourceMappingURL=icons-D1lxdRXP.js.map
|
|
18828
|
+
export { onInterrupt as $, flatMap$2 as A, clockWith as B, offer as C, compareAndSet as D, poll as E, EmptyMutableQueue as F, remove$1 as G, set$3 as H, size as I, isSome as J, some as K, empty$8 as L, make$k as M, unbounded as N, symbol$1 as O, pipe as P, cached as Q, combine$7 as R, hash as S, symbol as T, hasProperty as U, equals$1 as V, asVoid$1 as W, when$1 as X, succeed$2 as Y, toMillis as Z, _await$1 as _, right as a, empty$j as a$, zipRight$2 as a0, interrupt$1 as a1, done$4 as a2, exit$1 as a3, provideContext$1 as a4, context as a5, fiberId as a6, YieldableError as a7, gen$1 as a8, tryPromise as a9, Class as aA, pipeArguments as aB, catchAll$1 as aC, interrupt$2 as aD, get$4 as aE, length as aF, uninterruptible$1 as aG, withFiberRuntime$1 as aH, whenEffect as aI, deferredSucceed as aJ, forEachConcurrentDiscard as aK, deferredAwait as aL, fromIterable$6 as aM, empty$m as aN, splitAt$1 as aO, isEmpty$7 as aP, deferredUnsafeMake as aQ, fromIterable$5 as aR, pollUpTo as aS, deferredUnsafeDone as aT, prepend$1 as aU, isEmpty$2 as aV, filter as aW, appendAll$1 as aX, append$1 as aY, offerAll as aZ, deferredInterruptWith as a_, fail$1 as aa, try_ as ab, gen as ac, infinity as ad, logWarning as ae, make$a as af, modify as ag, get as ah, update$1 as ai, isInterrupted as aj, fail$4 as ak, failureOrCause as al, flipCauseOption as am, interrupt$3 as an, map$4 as ao, die$2 as ap, isDieType as aq, interruptors as ar, isInterruptedOnly as as, join as at, interruptFiber as au, _await as av, inheritAll as aw, interruptAsFiber as ax, dual as ay, deferredMake as az, left as b, raceWith as b$, bounded as b0, capacity as b1, void_$2 as b2, isFailure as b3, isEffect as b4, match$7 as b5, _void as b6, ignore as b7, zipWith as b8, exit as b9, make$g as bA, sequential as bB, acquireUseRelease as bC, forkIn as bD, isDone$4 as bE, succeed$3 as bF, size$1 as bG, combineAll as bH, intoDeferred as bI, zipLeft as bJ, tapErrorCause as bK, addFinalizer as bL, failCause as bM, flatten as bN, fiberIdWith as bO, interrupt as bP, failCause$3 as bQ, fail$2 as bR, matchCause as bS, scopedWith as bT, unsafeGet as bU, constVoid as bV, scope as bW, withFiberRuntime as bX, make$1 as bY, extend as bZ, close as b_, zipRight$1 as ba, sync as bb, provide as bc, matchCauseEffect as bd, zipRight as be, flatMap as bf, forkDaemon as bg, interruptible as bh, suspend as bi, ensuring as bj, uninterruptible as bk, map as bl, zip as bm, failCause$2 as bn, match$3 as bo, forEach as bp, all$2 as bq, getOrElse as br, void_$1 as bs, dieMessage as bt, catchAllCause as bu, die as bv, map$2 as bw, uninterruptibleMask as bx, all as by, fork as bz, catchAll as c, runtime as c0, tap as c1, addFinalizerExit as c2, makeSemaphore as c3, when as c4, race as c5, as as c6, repeat as c7, asVoid as c8, zip$1 as c9, raceFirst as ca, forever as cb, of$1 as cc, fail as cd, mapError as ce, reduce$6 as cf, map$7 as cg, match as ch, splitWhere as ci, isSuccess as cj, head as ck, filterMap as cl, catchSomeCause as cm, unsafeFromArray as cn, async as co, runFork as cp, isRight as d, getRight as e, decode as f, getOrThrowWith as g, map$3 as h, identity as i, all$1 as j, merge$3 as k, logError as l, match$6 as m, sync$1 as n, suspend$2 as o, get$2 as p, succeed$4 as q, runPromise as r, succeed as s, tapError as t, none$4 as u, getOrUndefined as v, unsafeMake$4 as w, has as x, set$1 as y, struct as z };
|