@usebridge/sdk-react 0.1.1 → 0.1.12
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/index.cjs +2201 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +172 -0
- package/dist/index.d.ts +172 -0
- package/dist/index.js +2175 -0
- package/dist/index.js.map +1 -0
- package/package.json +2 -2
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2201 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
};
|
|
11
|
+
var __export = (target, all) => {
|
|
12
|
+
for (var name in all)
|
|
13
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from))
|
|
18
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
19
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
25
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
26
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
27
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
28
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
29
|
+
mod
|
|
30
|
+
));
|
|
31
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
|
+
|
|
33
|
+
// ../../node_modules/lodash.debounce/index.js
|
|
34
|
+
var require_lodash = __commonJS({
|
|
35
|
+
"../../node_modules/lodash.debounce/index.js"(exports2, module2) {
|
|
36
|
+
"use strict";
|
|
37
|
+
var FUNC_ERROR_TEXT2 = "Expected a function";
|
|
38
|
+
var NAN = 0 / 0;
|
|
39
|
+
var symbolTag4 = "[object Symbol]";
|
|
40
|
+
var reTrim = /^\s+|\s+$/g;
|
|
41
|
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
42
|
+
var reIsBinary = /^0b[01]+$/i;
|
|
43
|
+
var reIsOctal = /^0o[0-7]+$/i;
|
|
44
|
+
var freeParseInt = parseInt;
|
|
45
|
+
var freeGlobal2 = typeof global == "object" && global && global.Object === Object && global;
|
|
46
|
+
var freeSelf2 = typeof self == "object" && self && self.Object === Object && self;
|
|
47
|
+
var root2 = freeGlobal2 || freeSelf2 || Function("return this")();
|
|
48
|
+
var objectProto15 = Object.prototype;
|
|
49
|
+
var objectToString2 = objectProto15.toString;
|
|
50
|
+
var nativeMax2 = Math.max;
|
|
51
|
+
var nativeMin = Math.min;
|
|
52
|
+
var now = function() {
|
|
53
|
+
return root2.Date.now();
|
|
54
|
+
};
|
|
55
|
+
function debounce2(func, wait, options) {
|
|
56
|
+
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
57
|
+
if (typeof func != "function") {
|
|
58
|
+
throw new TypeError(FUNC_ERROR_TEXT2);
|
|
59
|
+
}
|
|
60
|
+
wait = toNumber(wait) || 0;
|
|
61
|
+
if (isObject2(options)) {
|
|
62
|
+
leading = !!options.leading;
|
|
63
|
+
maxing = "maxWait" in options;
|
|
64
|
+
maxWait = maxing ? nativeMax2(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
65
|
+
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
66
|
+
}
|
|
67
|
+
function invokeFunc(time) {
|
|
68
|
+
var args = lastArgs, thisArg = lastThis;
|
|
69
|
+
lastArgs = lastThis = void 0;
|
|
70
|
+
lastInvokeTime = time;
|
|
71
|
+
result = func.apply(thisArg, args);
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
74
|
+
function leadingEdge(time) {
|
|
75
|
+
lastInvokeTime = time;
|
|
76
|
+
timerId = setTimeout(timerExpired, wait);
|
|
77
|
+
return leading ? invokeFunc(time) : result;
|
|
78
|
+
}
|
|
79
|
+
function remainingWait(time) {
|
|
80
|
+
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, result2 = wait - timeSinceLastCall;
|
|
81
|
+
return maxing ? nativeMin(result2, maxWait - timeSinceLastInvoke) : result2;
|
|
82
|
+
}
|
|
83
|
+
function shouldInvoke(time) {
|
|
84
|
+
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
|
85
|
+
return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
86
|
+
}
|
|
87
|
+
function timerExpired() {
|
|
88
|
+
var time = now();
|
|
89
|
+
if (shouldInvoke(time)) {
|
|
90
|
+
return trailingEdge(time);
|
|
91
|
+
}
|
|
92
|
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
93
|
+
}
|
|
94
|
+
function trailingEdge(time) {
|
|
95
|
+
timerId = void 0;
|
|
96
|
+
if (trailing && lastArgs) {
|
|
97
|
+
return invokeFunc(time);
|
|
98
|
+
}
|
|
99
|
+
lastArgs = lastThis = void 0;
|
|
100
|
+
return result;
|
|
101
|
+
}
|
|
102
|
+
function cancel() {
|
|
103
|
+
if (timerId !== void 0) {
|
|
104
|
+
clearTimeout(timerId);
|
|
105
|
+
}
|
|
106
|
+
lastInvokeTime = 0;
|
|
107
|
+
lastArgs = lastCallTime = lastThis = timerId = void 0;
|
|
108
|
+
}
|
|
109
|
+
function flush() {
|
|
110
|
+
return timerId === void 0 ? result : trailingEdge(now());
|
|
111
|
+
}
|
|
112
|
+
function debounced() {
|
|
113
|
+
var time = now(), isInvoking = shouldInvoke(time);
|
|
114
|
+
lastArgs = arguments;
|
|
115
|
+
lastThis = this;
|
|
116
|
+
lastCallTime = time;
|
|
117
|
+
if (isInvoking) {
|
|
118
|
+
if (timerId === void 0) {
|
|
119
|
+
return leadingEdge(lastCallTime);
|
|
120
|
+
}
|
|
121
|
+
if (maxing) {
|
|
122
|
+
timerId = setTimeout(timerExpired, wait);
|
|
123
|
+
return invokeFunc(lastCallTime);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (timerId === void 0) {
|
|
127
|
+
timerId = setTimeout(timerExpired, wait);
|
|
128
|
+
}
|
|
129
|
+
return result;
|
|
130
|
+
}
|
|
131
|
+
debounced.cancel = cancel;
|
|
132
|
+
debounced.flush = flush;
|
|
133
|
+
return debounced;
|
|
134
|
+
}
|
|
135
|
+
function isObject2(value) {
|
|
136
|
+
var type = typeof value;
|
|
137
|
+
return !!value && (type == "object" || type == "function");
|
|
138
|
+
}
|
|
139
|
+
function isObjectLike2(value) {
|
|
140
|
+
return !!value && typeof value == "object";
|
|
141
|
+
}
|
|
142
|
+
function isSymbol2(value) {
|
|
143
|
+
return typeof value == "symbol" || isObjectLike2(value) && objectToString2.call(value) == symbolTag4;
|
|
144
|
+
}
|
|
145
|
+
function toNumber(value) {
|
|
146
|
+
if (typeof value == "number") {
|
|
147
|
+
return value;
|
|
148
|
+
}
|
|
149
|
+
if (isSymbol2(value)) {
|
|
150
|
+
return NAN;
|
|
151
|
+
}
|
|
152
|
+
if (isObject2(value)) {
|
|
153
|
+
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
154
|
+
value = isObject2(other) ? other + "" : other;
|
|
155
|
+
}
|
|
156
|
+
if (typeof value != "string") {
|
|
157
|
+
return value === 0 ? value : +value;
|
|
158
|
+
}
|
|
159
|
+
value = value.replace(reTrim, "");
|
|
160
|
+
var isBinary = reIsBinary.test(value);
|
|
161
|
+
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
162
|
+
}
|
|
163
|
+
module2.exports = debounce2;
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
// src/index.ts
|
|
168
|
+
var index_exports = {};
|
|
169
|
+
__export(index_exports, {
|
|
170
|
+
BridgeSdkProvider: () => BridgeSdkProvider,
|
|
171
|
+
EligibilityInputContext: () => EligibilityInputContext,
|
|
172
|
+
HardEligibilityContext: () => HardEligibilityContext,
|
|
173
|
+
HardEligibilityProvider: () => HardEligibilityProvider,
|
|
174
|
+
SoftEligibilityProvider: () => SoftEligibilityProvider,
|
|
175
|
+
useBridgeSdk: () => useBridgeSdk,
|
|
176
|
+
useCreateHardEligibilitySession: () => useCreateHardEligibilitySession,
|
|
177
|
+
useCreateSoftEligibilitySession: () => useCreateSoftEligibilitySession,
|
|
178
|
+
useEligibilityInputField: () => useEligibilityInputField,
|
|
179
|
+
useEligibilityInputIsValid: () => useEligibilityInputIsValid,
|
|
180
|
+
useHardEligibilityState: () => useHardEligibilityState,
|
|
181
|
+
useHardEligibilitySubmit: () => useHardEligibilitySubmit,
|
|
182
|
+
usePayerAutocomplete: () => usePayerAutocomplete,
|
|
183
|
+
usePayerSearch: () => usePayerSearch,
|
|
184
|
+
useSoftEligibilityState: () => useSoftEligibilityState,
|
|
185
|
+
useSoftEligibilitySubmit: () => useSoftEligibilitySubmit
|
|
186
|
+
});
|
|
187
|
+
module.exports = __toCommonJS(index_exports);
|
|
188
|
+
|
|
189
|
+
// src/sdk/index.tsx
|
|
190
|
+
var import_react2 = require("react");
|
|
191
|
+
var import_sdk_core2 = require("@usebridge/sdk-core");
|
|
192
|
+
|
|
193
|
+
// src/sdk/use-prefetch-payers.ts
|
|
194
|
+
var import_sdk_core = require("@usebridge/sdk-core");
|
|
195
|
+
var import_react = require("react");
|
|
196
|
+
function usePrefetchPayers(bridgeSdk, enabled) {
|
|
197
|
+
(0, import_react.useEffect)(() => {
|
|
198
|
+
if (enabled) {
|
|
199
|
+
void Promise.all(
|
|
200
|
+
["", "b", "u", "a"].map((query) => bridgeSdk.payerSearch({ query, limit: 10 }))
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
}, [bridgeSdk, enabled]);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// src/sdk/index.tsx
|
|
207
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
208
|
+
var BridgeSdkContext = (0, import_react2.createContext)(null);
|
|
209
|
+
var BridgeSdkProvider = ({
|
|
210
|
+
config,
|
|
211
|
+
prefetchPayers = true,
|
|
212
|
+
children
|
|
213
|
+
}) => {
|
|
214
|
+
const { current } = (0, import_react2.useRef)(new import_sdk_core2.BridgeSdk(config));
|
|
215
|
+
usePrefetchPayers(current, prefetchPayers);
|
|
216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(BridgeSdkContext.Provider, { value: current, children: [
|
|
217
|
+
" ",
|
|
218
|
+
children,
|
|
219
|
+
" "
|
|
220
|
+
] });
|
|
221
|
+
};
|
|
222
|
+
function useBridgeSdk() {
|
|
223
|
+
const context = (0, import_react2.useContext)(BridgeSdkContext);
|
|
224
|
+
if (!context) throw new Error("useBridgeSdk must be used within a BridgeSdkProvider");
|
|
225
|
+
return context;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// src/payer-search/use-payer-autocomplete.ts
|
|
229
|
+
var import_react5 = require("react");
|
|
230
|
+
|
|
231
|
+
// ../../node_modules/usehooks-ts/dist/index.js
|
|
232
|
+
var import_react3 = require("react");
|
|
233
|
+
var import_lodash = __toESM(require_lodash(), 1);
|
|
234
|
+
function useIsMounted() {
|
|
235
|
+
const isMounted = (0, import_react3.useRef)(false);
|
|
236
|
+
(0, import_react3.useEffect)(() => {
|
|
237
|
+
isMounted.current = true;
|
|
238
|
+
return () => {
|
|
239
|
+
isMounted.current = false;
|
|
240
|
+
};
|
|
241
|
+
}, []);
|
|
242
|
+
return (0, import_react3.useCallback)(() => isMounted.current, []);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// src/lib/retry-loop.ts
|
|
246
|
+
var RetryLoopCancelledError = class extends Error {
|
|
247
|
+
constructor() {
|
|
248
|
+
super("Retry loop cancelled");
|
|
249
|
+
this.name = "RetryLoopCancelledError";
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
async function retryLoop(fn, shouldRetry, delayMs = 500) {
|
|
253
|
+
let cancelled = false;
|
|
254
|
+
while (!cancelled) {
|
|
255
|
+
try {
|
|
256
|
+
return await fn();
|
|
257
|
+
} catch (err) {
|
|
258
|
+
if (!shouldRetry()) {
|
|
259
|
+
cancelled = true;
|
|
260
|
+
} else {
|
|
261
|
+
await new Promise((r) => setTimeout(r, delayMs));
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
throw new RetryLoopCancelledError();
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// src/payer-search/use-payer-search.ts
|
|
269
|
+
var import_react4 = require("react");
|
|
270
|
+
function usePayerSearch() {
|
|
271
|
+
const sdk = useBridgeSdk();
|
|
272
|
+
return (0, import_react4.useCallback)(
|
|
273
|
+
(...args) => sdk.payerSearch(...args),
|
|
274
|
+
[sdk]
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// ../../node_modules/lodash-es/_freeGlobal.js
|
|
279
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
280
|
+
var freeGlobal_default = freeGlobal;
|
|
281
|
+
|
|
282
|
+
// ../../node_modules/lodash-es/_root.js
|
|
283
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
284
|
+
var root = freeGlobal_default || freeSelf || Function("return this")();
|
|
285
|
+
var root_default = root;
|
|
286
|
+
|
|
287
|
+
// ../../node_modules/lodash-es/_Symbol.js
|
|
288
|
+
var Symbol2 = root_default.Symbol;
|
|
289
|
+
var Symbol_default = Symbol2;
|
|
290
|
+
|
|
291
|
+
// ../../node_modules/lodash-es/_getRawTag.js
|
|
292
|
+
var objectProto = Object.prototype;
|
|
293
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
294
|
+
var nativeObjectToString = objectProto.toString;
|
|
295
|
+
var symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0;
|
|
296
|
+
function getRawTag(value) {
|
|
297
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
|
298
|
+
try {
|
|
299
|
+
value[symToStringTag] = void 0;
|
|
300
|
+
var unmasked = true;
|
|
301
|
+
} catch (e) {
|
|
302
|
+
}
|
|
303
|
+
var result = nativeObjectToString.call(value);
|
|
304
|
+
if (unmasked) {
|
|
305
|
+
if (isOwn) {
|
|
306
|
+
value[symToStringTag] = tag;
|
|
307
|
+
} else {
|
|
308
|
+
delete value[symToStringTag];
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
return result;
|
|
312
|
+
}
|
|
313
|
+
var getRawTag_default = getRawTag;
|
|
314
|
+
|
|
315
|
+
// ../../node_modules/lodash-es/_objectToString.js
|
|
316
|
+
var objectProto2 = Object.prototype;
|
|
317
|
+
var nativeObjectToString2 = objectProto2.toString;
|
|
318
|
+
function objectToString(value) {
|
|
319
|
+
return nativeObjectToString2.call(value);
|
|
320
|
+
}
|
|
321
|
+
var objectToString_default = objectToString;
|
|
322
|
+
|
|
323
|
+
// ../../node_modules/lodash-es/_baseGetTag.js
|
|
324
|
+
var nullTag = "[object Null]";
|
|
325
|
+
var undefinedTag = "[object Undefined]";
|
|
326
|
+
var symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0;
|
|
327
|
+
function baseGetTag(value) {
|
|
328
|
+
if (value == null) {
|
|
329
|
+
return value === void 0 ? undefinedTag : nullTag;
|
|
330
|
+
}
|
|
331
|
+
return symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value);
|
|
332
|
+
}
|
|
333
|
+
var baseGetTag_default = baseGetTag;
|
|
334
|
+
|
|
335
|
+
// ../../node_modules/lodash-es/isObjectLike.js
|
|
336
|
+
function isObjectLike(value) {
|
|
337
|
+
return value != null && typeof value == "object";
|
|
338
|
+
}
|
|
339
|
+
var isObjectLike_default = isObjectLike;
|
|
340
|
+
|
|
341
|
+
// ../../node_modules/lodash-es/isSymbol.js
|
|
342
|
+
var symbolTag = "[object Symbol]";
|
|
343
|
+
function isSymbol(value) {
|
|
344
|
+
return typeof value == "symbol" || isObjectLike_default(value) && baseGetTag_default(value) == symbolTag;
|
|
345
|
+
}
|
|
346
|
+
var isSymbol_default = isSymbol;
|
|
347
|
+
|
|
348
|
+
// ../../node_modules/lodash-es/_arrayMap.js
|
|
349
|
+
function arrayMap(array, iteratee) {
|
|
350
|
+
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
351
|
+
while (++index < length) {
|
|
352
|
+
result[index] = iteratee(array[index], index, array);
|
|
353
|
+
}
|
|
354
|
+
return result;
|
|
355
|
+
}
|
|
356
|
+
var arrayMap_default = arrayMap;
|
|
357
|
+
|
|
358
|
+
// ../../node_modules/lodash-es/isArray.js
|
|
359
|
+
var isArray = Array.isArray;
|
|
360
|
+
var isArray_default = isArray;
|
|
361
|
+
|
|
362
|
+
// ../../node_modules/lodash-es/_baseToString.js
|
|
363
|
+
var INFINITY = 1 / 0;
|
|
364
|
+
var symbolProto = Symbol_default ? Symbol_default.prototype : void 0;
|
|
365
|
+
var symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
366
|
+
function baseToString(value) {
|
|
367
|
+
if (typeof value == "string") {
|
|
368
|
+
return value;
|
|
369
|
+
}
|
|
370
|
+
if (isArray_default(value)) {
|
|
371
|
+
return arrayMap_default(value, baseToString) + "";
|
|
372
|
+
}
|
|
373
|
+
if (isSymbol_default(value)) {
|
|
374
|
+
return symbolToString ? symbolToString.call(value) : "";
|
|
375
|
+
}
|
|
376
|
+
var result = value + "";
|
|
377
|
+
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
378
|
+
}
|
|
379
|
+
var baseToString_default = baseToString;
|
|
380
|
+
|
|
381
|
+
// ../../node_modules/lodash-es/isObject.js
|
|
382
|
+
function isObject(value) {
|
|
383
|
+
var type = typeof value;
|
|
384
|
+
return value != null && (type == "object" || type == "function");
|
|
385
|
+
}
|
|
386
|
+
var isObject_default = isObject;
|
|
387
|
+
|
|
388
|
+
// ../../node_modules/lodash-es/identity.js
|
|
389
|
+
function identity(value) {
|
|
390
|
+
return value;
|
|
391
|
+
}
|
|
392
|
+
var identity_default = identity;
|
|
393
|
+
|
|
394
|
+
// ../../node_modules/lodash-es/isFunction.js
|
|
395
|
+
var asyncTag = "[object AsyncFunction]";
|
|
396
|
+
var funcTag = "[object Function]";
|
|
397
|
+
var genTag = "[object GeneratorFunction]";
|
|
398
|
+
var proxyTag = "[object Proxy]";
|
|
399
|
+
function isFunction(value) {
|
|
400
|
+
if (!isObject_default(value)) {
|
|
401
|
+
return false;
|
|
402
|
+
}
|
|
403
|
+
var tag = baseGetTag_default(value);
|
|
404
|
+
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
405
|
+
}
|
|
406
|
+
var isFunction_default = isFunction;
|
|
407
|
+
|
|
408
|
+
// ../../node_modules/lodash-es/_coreJsData.js
|
|
409
|
+
var coreJsData = root_default["__core-js_shared__"];
|
|
410
|
+
var coreJsData_default = coreJsData;
|
|
411
|
+
|
|
412
|
+
// ../../node_modules/lodash-es/_isMasked.js
|
|
413
|
+
var maskSrcKey = (function() {
|
|
414
|
+
var uid = /[^.]+$/.exec(coreJsData_default && coreJsData_default.keys && coreJsData_default.keys.IE_PROTO || "");
|
|
415
|
+
return uid ? "Symbol(src)_1." + uid : "";
|
|
416
|
+
})();
|
|
417
|
+
function isMasked(func) {
|
|
418
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
419
|
+
}
|
|
420
|
+
var isMasked_default = isMasked;
|
|
421
|
+
|
|
422
|
+
// ../../node_modules/lodash-es/_toSource.js
|
|
423
|
+
var funcProto = Function.prototype;
|
|
424
|
+
var funcToString = funcProto.toString;
|
|
425
|
+
function toSource(func) {
|
|
426
|
+
if (func != null) {
|
|
427
|
+
try {
|
|
428
|
+
return funcToString.call(func);
|
|
429
|
+
} catch (e) {
|
|
430
|
+
}
|
|
431
|
+
try {
|
|
432
|
+
return func + "";
|
|
433
|
+
} catch (e) {
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
return "";
|
|
437
|
+
}
|
|
438
|
+
var toSource_default = toSource;
|
|
439
|
+
|
|
440
|
+
// ../../node_modules/lodash-es/_baseIsNative.js
|
|
441
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
442
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
443
|
+
var funcProto2 = Function.prototype;
|
|
444
|
+
var objectProto3 = Object.prototype;
|
|
445
|
+
var funcToString2 = funcProto2.toString;
|
|
446
|
+
var hasOwnProperty2 = objectProto3.hasOwnProperty;
|
|
447
|
+
var reIsNative = RegExp(
|
|
448
|
+
"^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
449
|
+
);
|
|
450
|
+
function baseIsNative(value) {
|
|
451
|
+
if (!isObject_default(value) || isMasked_default(value)) {
|
|
452
|
+
return false;
|
|
453
|
+
}
|
|
454
|
+
var pattern = isFunction_default(value) ? reIsNative : reIsHostCtor;
|
|
455
|
+
return pattern.test(toSource_default(value));
|
|
456
|
+
}
|
|
457
|
+
var baseIsNative_default = baseIsNative;
|
|
458
|
+
|
|
459
|
+
// ../../node_modules/lodash-es/_getValue.js
|
|
460
|
+
function getValue(object, key) {
|
|
461
|
+
return object == null ? void 0 : object[key];
|
|
462
|
+
}
|
|
463
|
+
var getValue_default = getValue;
|
|
464
|
+
|
|
465
|
+
// ../../node_modules/lodash-es/_getNative.js
|
|
466
|
+
function getNative(object, key) {
|
|
467
|
+
var value = getValue_default(object, key);
|
|
468
|
+
return baseIsNative_default(value) ? value : void 0;
|
|
469
|
+
}
|
|
470
|
+
var getNative_default = getNative;
|
|
471
|
+
|
|
472
|
+
// ../../node_modules/lodash-es/_WeakMap.js
|
|
473
|
+
var WeakMap = getNative_default(root_default, "WeakMap");
|
|
474
|
+
var WeakMap_default = WeakMap;
|
|
475
|
+
|
|
476
|
+
// ../../node_modules/lodash-es/_baseCreate.js
|
|
477
|
+
var objectCreate = Object.create;
|
|
478
|
+
var baseCreate = /* @__PURE__ */ (function() {
|
|
479
|
+
function object() {
|
|
480
|
+
}
|
|
481
|
+
return function(proto) {
|
|
482
|
+
if (!isObject_default(proto)) {
|
|
483
|
+
return {};
|
|
484
|
+
}
|
|
485
|
+
if (objectCreate) {
|
|
486
|
+
return objectCreate(proto);
|
|
487
|
+
}
|
|
488
|
+
object.prototype = proto;
|
|
489
|
+
var result = new object();
|
|
490
|
+
object.prototype = void 0;
|
|
491
|
+
return result;
|
|
492
|
+
};
|
|
493
|
+
})();
|
|
494
|
+
var baseCreate_default = baseCreate;
|
|
495
|
+
|
|
496
|
+
// ../../node_modules/lodash-es/_apply.js
|
|
497
|
+
function apply(func, thisArg, args) {
|
|
498
|
+
switch (args.length) {
|
|
499
|
+
case 0:
|
|
500
|
+
return func.call(thisArg);
|
|
501
|
+
case 1:
|
|
502
|
+
return func.call(thisArg, args[0]);
|
|
503
|
+
case 2:
|
|
504
|
+
return func.call(thisArg, args[0], args[1]);
|
|
505
|
+
case 3:
|
|
506
|
+
return func.call(thisArg, args[0], args[1], args[2]);
|
|
507
|
+
}
|
|
508
|
+
return func.apply(thisArg, args);
|
|
509
|
+
}
|
|
510
|
+
var apply_default = apply;
|
|
511
|
+
|
|
512
|
+
// ../../node_modules/lodash-es/_copyArray.js
|
|
513
|
+
function copyArray(source, array) {
|
|
514
|
+
var index = -1, length = source.length;
|
|
515
|
+
array || (array = Array(length));
|
|
516
|
+
while (++index < length) {
|
|
517
|
+
array[index] = source[index];
|
|
518
|
+
}
|
|
519
|
+
return array;
|
|
520
|
+
}
|
|
521
|
+
var copyArray_default = copyArray;
|
|
522
|
+
|
|
523
|
+
// ../../node_modules/lodash-es/_shortOut.js
|
|
524
|
+
var HOT_COUNT = 800;
|
|
525
|
+
var HOT_SPAN = 16;
|
|
526
|
+
var nativeNow = Date.now;
|
|
527
|
+
function shortOut(func) {
|
|
528
|
+
var count = 0, lastCalled = 0;
|
|
529
|
+
return function() {
|
|
530
|
+
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
|
|
531
|
+
lastCalled = stamp;
|
|
532
|
+
if (remaining > 0) {
|
|
533
|
+
if (++count >= HOT_COUNT) {
|
|
534
|
+
return arguments[0];
|
|
535
|
+
}
|
|
536
|
+
} else {
|
|
537
|
+
count = 0;
|
|
538
|
+
}
|
|
539
|
+
return func.apply(void 0, arguments);
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
var shortOut_default = shortOut;
|
|
543
|
+
|
|
544
|
+
// ../../node_modules/lodash-es/constant.js
|
|
545
|
+
function constant(value) {
|
|
546
|
+
return function() {
|
|
547
|
+
return value;
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
var constant_default = constant;
|
|
551
|
+
|
|
552
|
+
// ../../node_modules/lodash-es/_defineProperty.js
|
|
553
|
+
var defineProperty = (function() {
|
|
554
|
+
try {
|
|
555
|
+
var func = getNative_default(Object, "defineProperty");
|
|
556
|
+
func({}, "", {});
|
|
557
|
+
return func;
|
|
558
|
+
} catch (e) {
|
|
559
|
+
}
|
|
560
|
+
})();
|
|
561
|
+
var defineProperty_default = defineProperty;
|
|
562
|
+
|
|
563
|
+
// ../../node_modules/lodash-es/_baseSetToString.js
|
|
564
|
+
var baseSetToString = !defineProperty_default ? identity_default : function(func, string) {
|
|
565
|
+
return defineProperty_default(func, "toString", {
|
|
566
|
+
"configurable": true,
|
|
567
|
+
"enumerable": false,
|
|
568
|
+
"value": constant_default(string),
|
|
569
|
+
"writable": true
|
|
570
|
+
});
|
|
571
|
+
};
|
|
572
|
+
var baseSetToString_default = baseSetToString;
|
|
573
|
+
|
|
574
|
+
// ../../node_modules/lodash-es/_setToString.js
|
|
575
|
+
var setToString = shortOut_default(baseSetToString_default);
|
|
576
|
+
var setToString_default = setToString;
|
|
577
|
+
|
|
578
|
+
// ../../node_modules/lodash-es/_arrayEach.js
|
|
579
|
+
function arrayEach(array, iteratee) {
|
|
580
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
581
|
+
while (++index < length) {
|
|
582
|
+
if (iteratee(array[index], index, array) === false) {
|
|
583
|
+
break;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
return array;
|
|
587
|
+
}
|
|
588
|
+
var arrayEach_default = arrayEach;
|
|
589
|
+
|
|
590
|
+
// ../../node_modules/lodash-es/_isIndex.js
|
|
591
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
592
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
593
|
+
function isIndex(value, length) {
|
|
594
|
+
var type = typeof value;
|
|
595
|
+
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
596
|
+
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
597
|
+
}
|
|
598
|
+
var isIndex_default = isIndex;
|
|
599
|
+
|
|
600
|
+
// ../../node_modules/lodash-es/_baseAssignValue.js
|
|
601
|
+
function baseAssignValue(object, key, value) {
|
|
602
|
+
if (key == "__proto__" && defineProperty_default) {
|
|
603
|
+
defineProperty_default(object, key, {
|
|
604
|
+
"configurable": true,
|
|
605
|
+
"enumerable": true,
|
|
606
|
+
"value": value,
|
|
607
|
+
"writable": true
|
|
608
|
+
});
|
|
609
|
+
} else {
|
|
610
|
+
object[key] = value;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
var baseAssignValue_default = baseAssignValue;
|
|
614
|
+
|
|
615
|
+
// ../../node_modules/lodash-es/eq.js
|
|
616
|
+
function eq(value, other) {
|
|
617
|
+
return value === other || value !== value && other !== other;
|
|
618
|
+
}
|
|
619
|
+
var eq_default = eq;
|
|
620
|
+
|
|
621
|
+
// ../../node_modules/lodash-es/_assignValue.js
|
|
622
|
+
var objectProto4 = Object.prototype;
|
|
623
|
+
var hasOwnProperty3 = objectProto4.hasOwnProperty;
|
|
624
|
+
function assignValue(object, key, value) {
|
|
625
|
+
var objValue = object[key];
|
|
626
|
+
if (!(hasOwnProperty3.call(object, key) && eq_default(objValue, value)) || value === void 0 && !(key in object)) {
|
|
627
|
+
baseAssignValue_default(object, key, value);
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
var assignValue_default = assignValue;
|
|
631
|
+
|
|
632
|
+
// ../../node_modules/lodash-es/_copyObject.js
|
|
633
|
+
function copyObject(source, props, object, customizer) {
|
|
634
|
+
var isNew = !object;
|
|
635
|
+
object || (object = {});
|
|
636
|
+
var index = -1, length = props.length;
|
|
637
|
+
while (++index < length) {
|
|
638
|
+
var key = props[index];
|
|
639
|
+
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
|
|
640
|
+
if (newValue === void 0) {
|
|
641
|
+
newValue = source[key];
|
|
642
|
+
}
|
|
643
|
+
if (isNew) {
|
|
644
|
+
baseAssignValue_default(object, key, newValue);
|
|
645
|
+
} else {
|
|
646
|
+
assignValue_default(object, key, newValue);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
return object;
|
|
650
|
+
}
|
|
651
|
+
var copyObject_default = copyObject;
|
|
652
|
+
|
|
653
|
+
// ../../node_modules/lodash-es/_overRest.js
|
|
654
|
+
var nativeMax = Math.max;
|
|
655
|
+
function overRest(func, start, transform) {
|
|
656
|
+
start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
|
|
657
|
+
return function() {
|
|
658
|
+
var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
|
|
659
|
+
while (++index < length) {
|
|
660
|
+
array[index] = args[start + index];
|
|
661
|
+
}
|
|
662
|
+
index = -1;
|
|
663
|
+
var otherArgs = Array(start + 1);
|
|
664
|
+
while (++index < start) {
|
|
665
|
+
otherArgs[index] = args[index];
|
|
666
|
+
}
|
|
667
|
+
otherArgs[start] = transform(array);
|
|
668
|
+
return apply_default(func, this, otherArgs);
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
var overRest_default = overRest;
|
|
672
|
+
|
|
673
|
+
// ../../node_modules/lodash-es/isLength.js
|
|
674
|
+
var MAX_SAFE_INTEGER2 = 9007199254740991;
|
|
675
|
+
function isLength(value) {
|
|
676
|
+
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER2;
|
|
677
|
+
}
|
|
678
|
+
var isLength_default = isLength;
|
|
679
|
+
|
|
680
|
+
// ../../node_modules/lodash-es/isArrayLike.js
|
|
681
|
+
function isArrayLike(value) {
|
|
682
|
+
return value != null && isLength_default(value.length) && !isFunction_default(value);
|
|
683
|
+
}
|
|
684
|
+
var isArrayLike_default = isArrayLike;
|
|
685
|
+
|
|
686
|
+
// ../../node_modules/lodash-es/_isPrototype.js
|
|
687
|
+
var objectProto5 = Object.prototype;
|
|
688
|
+
function isPrototype(value) {
|
|
689
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto5;
|
|
690
|
+
return value === proto;
|
|
691
|
+
}
|
|
692
|
+
var isPrototype_default = isPrototype;
|
|
693
|
+
|
|
694
|
+
// ../../node_modules/lodash-es/_baseTimes.js
|
|
695
|
+
function baseTimes(n, iteratee) {
|
|
696
|
+
var index = -1, result = Array(n);
|
|
697
|
+
while (++index < n) {
|
|
698
|
+
result[index] = iteratee(index);
|
|
699
|
+
}
|
|
700
|
+
return result;
|
|
701
|
+
}
|
|
702
|
+
var baseTimes_default = baseTimes;
|
|
703
|
+
|
|
704
|
+
// ../../node_modules/lodash-es/_baseIsArguments.js
|
|
705
|
+
var argsTag = "[object Arguments]";
|
|
706
|
+
function baseIsArguments(value) {
|
|
707
|
+
return isObjectLike_default(value) && baseGetTag_default(value) == argsTag;
|
|
708
|
+
}
|
|
709
|
+
var baseIsArguments_default = baseIsArguments;
|
|
710
|
+
|
|
711
|
+
// ../../node_modules/lodash-es/isArguments.js
|
|
712
|
+
var objectProto6 = Object.prototype;
|
|
713
|
+
var hasOwnProperty4 = objectProto6.hasOwnProperty;
|
|
714
|
+
var propertyIsEnumerable = objectProto6.propertyIsEnumerable;
|
|
715
|
+
var isArguments = baseIsArguments_default(/* @__PURE__ */ (function() {
|
|
716
|
+
return arguments;
|
|
717
|
+
})()) ? baseIsArguments_default : function(value) {
|
|
718
|
+
return isObjectLike_default(value) && hasOwnProperty4.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
|
719
|
+
};
|
|
720
|
+
var isArguments_default = isArguments;
|
|
721
|
+
|
|
722
|
+
// ../../node_modules/lodash-es/stubFalse.js
|
|
723
|
+
function stubFalse() {
|
|
724
|
+
return false;
|
|
725
|
+
}
|
|
726
|
+
var stubFalse_default = stubFalse;
|
|
727
|
+
|
|
728
|
+
// ../../node_modules/lodash-es/isBuffer.js
|
|
729
|
+
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
730
|
+
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
731
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
732
|
+
var Buffer2 = moduleExports ? root_default.Buffer : void 0;
|
|
733
|
+
var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
|
|
734
|
+
var isBuffer = nativeIsBuffer || stubFalse_default;
|
|
735
|
+
var isBuffer_default = isBuffer;
|
|
736
|
+
|
|
737
|
+
// ../../node_modules/lodash-es/_baseIsTypedArray.js
|
|
738
|
+
var argsTag2 = "[object Arguments]";
|
|
739
|
+
var arrayTag = "[object Array]";
|
|
740
|
+
var boolTag = "[object Boolean]";
|
|
741
|
+
var dateTag = "[object Date]";
|
|
742
|
+
var errorTag = "[object Error]";
|
|
743
|
+
var funcTag2 = "[object Function]";
|
|
744
|
+
var mapTag = "[object Map]";
|
|
745
|
+
var numberTag = "[object Number]";
|
|
746
|
+
var objectTag = "[object Object]";
|
|
747
|
+
var regexpTag = "[object RegExp]";
|
|
748
|
+
var setTag = "[object Set]";
|
|
749
|
+
var stringTag = "[object String]";
|
|
750
|
+
var weakMapTag = "[object WeakMap]";
|
|
751
|
+
var arrayBufferTag = "[object ArrayBuffer]";
|
|
752
|
+
var dataViewTag = "[object DataView]";
|
|
753
|
+
var float32Tag = "[object Float32Array]";
|
|
754
|
+
var float64Tag = "[object Float64Array]";
|
|
755
|
+
var int8Tag = "[object Int8Array]";
|
|
756
|
+
var int16Tag = "[object Int16Array]";
|
|
757
|
+
var int32Tag = "[object Int32Array]";
|
|
758
|
+
var uint8Tag = "[object Uint8Array]";
|
|
759
|
+
var uint8ClampedTag = "[object Uint8ClampedArray]";
|
|
760
|
+
var uint16Tag = "[object Uint16Array]";
|
|
761
|
+
var uint32Tag = "[object Uint32Array]";
|
|
762
|
+
var typedArrayTags = {};
|
|
763
|
+
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
764
|
+
typedArrayTags[argsTag2] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag2] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
|
|
765
|
+
function baseIsTypedArray(value) {
|
|
766
|
+
return isObjectLike_default(value) && isLength_default(value.length) && !!typedArrayTags[baseGetTag_default(value)];
|
|
767
|
+
}
|
|
768
|
+
var baseIsTypedArray_default = baseIsTypedArray;
|
|
769
|
+
|
|
770
|
+
// ../../node_modules/lodash-es/_baseUnary.js
|
|
771
|
+
function baseUnary(func) {
|
|
772
|
+
return function(value) {
|
|
773
|
+
return func(value);
|
|
774
|
+
};
|
|
775
|
+
}
|
|
776
|
+
var baseUnary_default = baseUnary;
|
|
777
|
+
|
|
778
|
+
// ../../node_modules/lodash-es/_nodeUtil.js
|
|
779
|
+
var freeExports2 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
780
|
+
var freeModule2 = freeExports2 && typeof module == "object" && module && !module.nodeType && module;
|
|
781
|
+
var moduleExports2 = freeModule2 && freeModule2.exports === freeExports2;
|
|
782
|
+
var freeProcess = moduleExports2 && freeGlobal_default.process;
|
|
783
|
+
var nodeUtil = (function() {
|
|
784
|
+
try {
|
|
785
|
+
var types = freeModule2 && freeModule2.require && freeModule2.require("util").types;
|
|
786
|
+
if (types) {
|
|
787
|
+
return types;
|
|
788
|
+
}
|
|
789
|
+
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
790
|
+
} catch (e) {
|
|
791
|
+
}
|
|
792
|
+
})();
|
|
793
|
+
var nodeUtil_default = nodeUtil;
|
|
794
|
+
|
|
795
|
+
// ../../node_modules/lodash-es/isTypedArray.js
|
|
796
|
+
var nodeIsTypedArray = nodeUtil_default && nodeUtil_default.isTypedArray;
|
|
797
|
+
var isTypedArray = nodeIsTypedArray ? baseUnary_default(nodeIsTypedArray) : baseIsTypedArray_default;
|
|
798
|
+
var isTypedArray_default = isTypedArray;
|
|
799
|
+
|
|
800
|
+
// ../../node_modules/lodash-es/_arrayLikeKeys.js
|
|
801
|
+
var objectProto7 = Object.prototype;
|
|
802
|
+
var hasOwnProperty5 = objectProto7.hasOwnProperty;
|
|
803
|
+
function arrayLikeKeys(value, inherited) {
|
|
804
|
+
var isArr = isArray_default(value), isArg = !isArr && isArguments_default(value), isBuff = !isArr && !isArg && isBuffer_default(value), isType = !isArr && !isArg && !isBuff && isTypedArray_default(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes_default(value.length, String) : [], length = result.length;
|
|
805
|
+
for (var key in value) {
|
|
806
|
+
if ((inherited || hasOwnProperty5.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
807
|
+
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
808
|
+
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
809
|
+
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
810
|
+
isIndex_default(key, length)))) {
|
|
811
|
+
result.push(key);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
return result;
|
|
815
|
+
}
|
|
816
|
+
var arrayLikeKeys_default = arrayLikeKeys;
|
|
817
|
+
|
|
818
|
+
// ../../node_modules/lodash-es/_overArg.js
|
|
819
|
+
function overArg(func, transform) {
|
|
820
|
+
return function(arg) {
|
|
821
|
+
return func(transform(arg));
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
var overArg_default = overArg;
|
|
825
|
+
|
|
826
|
+
// ../../node_modules/lodash-es/_nativeKeys.js
|
|
827
|
+
var nativeKeys = overArg_default(Object.keys, Object);
|
|
828
|
+
var nativeKeys_default = nativeKeys;
|
|
829
|
+
|
|
830
|
+
// ../../node_modules/lodash-es/_baseKeys.js
|
|
831
|
+
var objectProto8 = Object.prototype;
|
|
832
|
+
var hasOwnProperty6 = objectProto8.hasOwnProperty;
|
|
833
|
+
function baseKeys(object) {
|
|
834
|
+
if (!isPrototype_default(object)) {
|
|
835
|
+
return nativeKeys_default(object);
|
|
836
|
+
}
|
|
837
|
+
var result = [];
|
|
838
|
+
for (var key in Object(object)) {
|
|
839
|
+
if (hasOwnProperty6.call(object, key) && key != "constructor") {
|
|
840
|
+
result.push(key);
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
return result;
|
|
844
|
+
}
|
|
845
|
+
var baseKeys_default = baseKeys;
|
|
846
|
+
|
|
847
|
+
// ../../node_modules/lodash-es/keys.js
|
|
848
|
+
function keys(object) {
|
|
849
|
+
return isArrayLike_default(object) ? arrayLikeKeys_default(object) : baseKeys_default(object);
|
|
850
|
+
}
|
|
851
|
+
var keys_default = keys;
|
|
852
|
+
|
|
853
|
+
// ../../node_modules/lodash-es/_nativeKeysIn.js
|
|
854
|
+
function nativeKeysIn(object) {
|
|
855
|
+
var result = [];
|
|
856
|
+
if (object != null) {
|
|
857
|
+
for (var key in Object(object)) {
|
|
858
|
+
result.push(key);
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
return result;
|
|
862
|
+
}
|
|
863
|
+
var nativeKeysIn_default = nativeKeysIn;
|
|
864
|
+
|
|
865
|
+
// ../../node_modules/lodash-es/_baseKeysIn.js
|
|
866
|
+
var objectProto9 = Object.prototype;
|
|
867
|
+
var hasOwnProperty7 = objectProto9.hasOwnProperty;
|
|
868
|
+
function baseKeysIn(object) {
|
|
869
|
+
if (!isObject_default(object)) {
|
|
870
|
+
return nativeKeysIn_default(object);
|
|
871
|
+
}
|
|
872
|
+
var isProto = isPrototype_default(object), result = [];
|
|
873
|
+
for (var key in object) {
|
|
874
|
+
if (!(key == "constructor" && (isProto || !hasOwnProperty7.call(object, key)))) {
|
|
875
|
+
result.push(key);
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
return result;
|
|
879
|
+
}
|
|
880
|
+
var baseKeysIn_default = baseKeysIn;
|
|
881
|
+
|
|
882
|
+
// ../../node_modules/lodash-es/keysIn.js
|
|
883
|
+
function keysIn(object) {
|
|
884
|
+
return isArrayLike_default(object) ? arrayLikeKeys_default(object, true) : baseKeysIn_default(object);
|
|
885
|
+
}
|
|
886
|
+
var keysIn_default = keysIn;
|
|
887
|
+
|
|
888
|
+
// ../../node_modules/lodash-es/_isKey.js
|
|
889
|
+
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
|
|
890
|
+
var reIsPlainProp = /^\w*$/;
|
|
891
|
+
function isKey(value, object) {
|
|
892
|
+
if (isArray_default(value)) {
|
|
893
|
+
return false;
|
|
894
|
+
}
|
|
895
|
+
var type = typeof value;
|
|
896
|
+
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol_default(value)) {
|
|
897
|
+
return true;
|
|
898
|
+
}
|
|
899
|
+
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
900
|
+
}
|
|
901
|
+
var isKey_default = isKey;
|
|
902
|
+
|
|
903
|
+
// ../../node_modules/lodash-es/_nativeCreate.js
|
|
904
|
+
var nativeCreate = getNative_default(Object, "create");
|
|
905
|
+
var nativeCreate_default = nativeCreate;
|
|
906
|
+
|
|
907
|
+
// ../../node_modules/lodash-es/_hashClear.js
|
|
908
|
+
function hashClear() {
|
|
909
|
+
this.__data__ = nativeCreate_default ? nativeCreate_default(null) : {};
|
|
910
|
+
this.size = 0;
|
|
911
|
+
}
|
|
912
|
+
var hashClear_default = hashClear;
|
|
913
|
+
|
|
914
|
+
// ../../node_modules/lodash-es/_hashDelete.js
|
|
915
|
+
function hashDelete(key) {
|
|
916
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
917
|
+
this.size -= result ? 1 : 0;
|
|
918
|
+
return result;
|
|
919
|
+
}
|
|
920
|
+
var hashDelete_default = hashDelete;
|
|
921
|
+
|
|
922
|
+
// ../../node_modules/lodash-es/_hashGet.js
|
|
923
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
924
|
+
var objectProto10 = Object.prototype;
|
|
925
|
+
var hasOwnProperty8 = objectProto10.hasOwnProperty;
|
|
926
|
+
function hashGet(key) {
|
|
927
|
+
var data = this.__data__;
|
|
928
|
+
if (nativeCreate_default) {
|
|
929
|
+
var result = data[key];
|
|
930
|
+
return result === HASH_UNDEFINED ? void 0 : result;
|
|
931
|
+
}
|
|
932
|
+
return hasOwnProperty8.call(data, key) ? data[key] : void 0;
|
|
933
|
+
}
|
|
934
|
+
var hashGet_default = hashGet;
|
|
935
|
+
|
|
936
|
+
// ../../node_modules/lodash-es/_hashHas.js
|
|
937
|
+
var objectProto11 = Object.prototype;
|
|
938
|
+
var hasOwnProperty9 = objectProto11.hasOwnProperty;
|
|
939
|
+
function hashHas(key) {
|
|
940
|
+
var data = this.__data__;
|
|
941
|
+
return nativeCreate_default ? data[key] !== void 0 : hasOwnProperty9.call(data, key);
|
|
942
|
+
}
|
|
943
|
+
var hashHas_default = hashHas;
|
|
944
|
+
|
|
945
|
+
// ../../node_modules/lodash-es/_hashSet.js
|
|
946
|
+
var HASH_UNDEFINED2 = "__lodash_hash_undefined__";
|
|
947
|
+
function hashSet(key, value) {
|
|
948
|
+
var data = this.__data__;
|
|
949
|
+
this.size += this.has(key) ? 0 : 1;
|
|
950
|
+
data[key] = nativeCreate_default && value === void 0 ? HASH_UNDEFINED2 : value;
|
|
951
|
+
return this;
|
|
952
|
+
}
|
|
953
|
+
var hashSet_default = hashSet;
|
|
954
|
+
|
|
955
|
+
// ../../node_modules/lodash-es/_Hash.js
|
|
956
|
+
function Hash(entries) {
|
|
957
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
958
|
+
this.clear();
|
|
959
|
+
while (++index < length) {
|
|
960
|
+
var entry = entries[index];
|
|
961
|
+
this.set(entry[0], entry[1]);
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
Hash.prototype.clear = hashClear_default;
|
|
965
|
+
Hash.prototype["delete"] = hashDelete_default;
|
|
966
|
+
Hash.prototype.get = hashGet_default;
|
|
967
|
+
Hash.prototype.has = hashHas_default;
|
|
968
|
+
Hash.prototype.set = hashSet_default;
|
|
969
|
+
var Hash_default = Hash;
|
|
970
|
+
|
|
971
|
+
// ../../node_modules/lodash-es/_listCacheClear.js
|
|
972
|
+
function listCacheClear() {
|
|
973
|
+
this.__data__ = [];
|
|
974
|
+
this.size = 0;
|
|
975
|
+
}
|
|
976
|
+
var listCacheClear_default = listCacheClear;
|
|
977
|
+
|
|
978
|
+
// ../../node_modules/lodash-es/_assocIndexOf.js
|
|
979
|
+
function assocIndexOf(array, key) {
|
|
980
|
+
var length = array.length;
|
|
981
|
+
while (length--) {
|
|
982
|
+
if (eq_default(array[length][0], key)) {
|
|
983
|
+
return length;
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
return -1;
|
|
987
|
+
}
|
|
988
|
+
var assocIndexOf_default = assocIndexOf;
|
|
989
|
+
|
|
990
|
+
// ../../node_modules/lodash-es/_listCacheDelete.js
|
|
991
|
+
var arrayProto = Array.prototype;
|
|
992
|
+
var splice = arrayProto.splice;
|
|
993
|
+
function listCacheDelete(key) {
|
|
994
|
+
var data = this.__data__, index = assocIndexOf_default(data, key);
|
|
995
|
+
if (index < 0) {
|
|
996
|
+
return false;
|
|
997
|
+
}
|
|
998
|
+
var lastIndex = data.length - 1;
|
|
999
|
+
if (index == lastIndex) {
|
|
1000
|
+
data.pop();
|
|
1001
|
+
} else {
|
|
1002
|
+
splice.call(data, index, 1);
|
|
1003
|
+
}
|
|
1004
|
+
--this.size;
|
|
1005
|
+
return true;
|
|
1006
|
+
}
|
|
1007
|
+
var listCacheDelete_default = listCacheDelete;
|
|
1008
|
+
|
|
1009
|
+
// ../../node_modules/lodash-es/_listCacheGet.js
|
|
1010
|
+
function listCacheGet(key) {
|
|
1011
|
+
var data = this.__data__, index = assocIndexOf_default(data, key);
|
|
1012
|
+
return index < 0 ? void 0 : data[index][1];
|
|
1013
|
+
}
|
|
1014
|
+
var listCacheGet_default = listCacheGet;
|
|
1015
|
+
|
|
1016
|
+
// ../../node_modules/lodash-es/_listCacheHas.js
|
|
1017
|
+
function listCacheHas(key) {
|
|
1018
|
+
return assocIndexOf_default(this.__data__, key) > -1;
|
|
1019
|
+
}
|
|
1020
|
+
var listCacheHas_default = listCacheHas;
|
|
1021
|
+
|
|
1022
|
+
// ../../node_modules/lodash-es/_listCacheSet.js
|
|
1023
|
+
function listCacheSet(key, value) {
|
|
1024
|
+
var data = this.__data__, index = assocIndexOf_default(data, key);
|
|
1025
|
+
if (index < 0) {
|
|
1026
|
+
++this.size;
|
|
1027
|
+
data.push([key, value]);
|
|
1028
|
+
} else {
|
|
1029
|
+
data[index][1] = value;
|
|
1030
|
+
}
|
|
1031
|
+
return this;
|
|
1032
|
+
}
|
|
1033
|
+
var listCacheSet_default = listCacheSet;
|
|
1034
|
+
|
|
1035
|
+
// ../../node_modules/lodash-es/_ListCache.js
|
|
1036
|
+
function ListCache(entries) {
|
|
1037
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
1038
|
+
this.clear();
|
|
1039
|
+
while (++index < length) {
|
|
1040
|
+
var entry = entries[index];
|
|
1041
|
+
this.set(entry[0], entry[1]);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
ListCache.prototype.clear = listCacheClear_default;
|
|
1045
|
+
ListCache.prototype["delete"] = listCacheDelete_default;
|
|
1046
|
+
ListCache.prototype.get = listCacheGet_default;
|
|
1047
|
+
ListCache.prototype.has = listCacheHas_default;
|
|
1048
|
+
ListCache.prototype.set = listCacheSet_default;
|
|
1049
|
+
var ListCache_default = ListCache;
|
|
1050
|
+
|
|
1051
|
+
// ../../node_modules/lodash-es/_Map.js
|
|
1052
|
+
var Map2 = getNative_default(root_default, "Map");
|
|
1053
|
+
var Map_default = Map2;
|
|
1054
|
+
|
|
1055
|
+
// ../../node_modules/lodash-es/_mapCacheClear.js
|
|
1056
|
+
function mapCacheClear() {
|
|
1057
|
+
this.size = 0;
|
|
1058
|
+
this.__data__ = {
|
|
1059
|
+
"hash": new Hash_default(),
|
|
1060
|
+
"map": new (Map_default || ListCache_default)(),
|
|
1061
|
+
"string": new Hash_default()
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1064
|
+
var mapCacheClear_default = mapCacheClear;
|
|
1065
|
+
|
|
1066
|
+
// ../../node_modules/lodash-es/_isKeyable.js
|
|
1067
|
+
function isKeyable(value) {
|
|
1068
|
+
var type = typeof value;
|
|
1069
|
+
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
1070
|
+
}
|
|
1071
|
+
var isKeyable_default = isKeyable;
|
|
1072
|
+
|
|
1073
|
+
// ../../node_modules/lodash-es/_getMapData.js
|
|
1074
|
+
function getMapData(map, key) {
|
|
1075
|
+
var data = map.__data__;
|
|
1076
|
+
return isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
1077
|
+
}
|
|
1078
|
+
var getMapData_default = getMapData;
|
|
1079
|
+
|
|
1080
|
+
// ../../node_modules/lodash-es/_mapCacheDelete.js
|
|
1081
|
+
function mapCacheDelete(key) {
|
|
1082
|
+
var result = getMapData_default(this, key)["delete"](key);
|
|
1083
|
+
this.size -= result ? 1 : 0;
|
|
1084
|
+
return result;
|
|
1085
|
+
}
|
|
1086
|
+
var mapCacheDelete_default = mapCacheDelete;
|
|
1087
|
+
|
|
1088
|
+
// ../../node_modules/lodash-es/_mapCacheGet.js
|
|
1089
|
+
function mapCacheGet(key) {
|
|
1090
|
+
return getMapData_default(this, key).get(key);
|
|
1091
|
+
}
|
|
1092
|
+
var mapCacheGet_default = mapCacheGet;
|
|
1093
|
+
|
|
1094
|
+
// ../../node_modules/lodash-es/_mapCacheHas.js
|
|
1095
|
+
function mapCacheHas(key) {
|
|
1096
|
+
return getMapData_default(this, key).has(key);
|
|
1097
|
+
}
|
|
1098
|
+
var mapCacheHas_default = mapCacheHas;
|
|
1099
|
+
|
|
1100
|
+
// ../../node_modules/lodash-es/_mapCacheSet.js
|
|
1101
|
+
function mapCacheSet(key, value) {
|
|
1102
|
+
var data = getMapData_default(this, key), size = data.size;
|
|
1103
|
+
data.set(key, value);
|
|
1104
|
+
this.size += data.size == size ? 0 : 1;
|
|
1105
|
+
return this;
|
|
1106
|
+
}
|
|
1107
|
+
var mapCacheSet_default = mapCacheSet;
|
|
1108
|
+
|
|
1109
|
+
// ../../node_modules/lodash-es/_MapCache.js
|
|
1110
|
+
function MapCache(entries) {
|
|
1111
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
1112
|
+
this.clear();
|
|
1113
|
+
while (++index < length) {
|
|
1114
|
+
var entry = entries[index];
|
|
1115
|
+
this.set(entry[0], entry[1]);
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
MapCache.prototype.clear = mapCacheClear_default;
|
|
1119
|
+
MapCache.prototype["delete"] = mapCacheDelete_default;
|
|
1120
|
+
MapCache.prototype.get = mapCacheGet_default;
|
|
1121
|
+
MapCache.prototype.has = mapCacheHas_default;
|
|
1122
|
+
MapCache.prototype.set = mapCacheSet_default;
|
|
1123
|
+
var MapCache_default = MapCache;
|
|
1124
|
+
|
|
1125
|
+
// ../../node_modules/lodash-es/memoize.js
|
|
1126
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
1127
|
+
function memoize(func, resolver) {
|
|
1128
|
+
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
|
|
1129
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1130
|
+
}
|
|
1131
|
+
var memoized = function() {
|
|
1132
|
+
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
1133
|
+
if (cache.has(key)) {
|
|
1134
|
+
return cache.get(key);
|
|
1135
|
+
}
|
|
1136
|
+
var result = func.apply(this, args);
|
|
1137
|
+
memoized.cache = cache.set(key, result) || cache;
|
|
1138
|
+
return result;
|
|
1139
|
+
};
|
|
1140
|
+
memoized.cache = new (memoize.Cache || MapCache_default)();
|
|
1141
|
+
return memoized;
|
|
1142
|
+
}
|
|
1143
|
+
memoize.Cache = MapCache_default;
|
|
1144
|
+
var memoize_default = memoize;
|
|
1145
|
+
|
|
1146
|
+
// ../../node_modules/lodash-es/_memoizeCapped.js
|
|
1147
|
+
var MAX_MEMOIZE_SIZE = 500;
|
|
1148
|
+
function memoizeCapped(func) {
|
|
1149
|
+
var result = memoize_default(func, function(key) {
|
|
1150
|
+
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
1151
|
+
cache.clear();
|
|
1152
|
+
}
|
|
1153
|
+
return key;
|
|
1154
|
+
});
|
|
1155
|
+
var cache = result.cache;
|
|
1156
|
+
return result;
|
|
1157
|
+
}
|
|
1158
|
+
var memoizeCapped_default = memoizeCapped;
|
|
1159
|
+
|
|
1160
|
+
// ../../node_modules/lodash-es/_stringToPath.js
|
|
1161
|
+
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
1162
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
1163
|
+
var stringToPath = memoizeCapped_default(function(string) {
|
|
1164
|
+
var result = [];
|
|
1165
|
+
if (string.charCodeAt(0) === 46) {
|
|
1166
|
+
result.push("");
|
|
1167
|
+
}
|
|
1168
|
+
string.replace(rePropName, function(match, number, quote, subString) {
|
|
1169
|
+
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
|
|
1170
|
+
});
|
|
1171
|
+
return result;
|
|
1172
|
+
});
|
|
1173
|
+
var stringToPath_default = stringToPath;
|
|
1174
|
+
|
|
1175
|
+
// ../../node_modules/lodash-es/toString.js
|
|
1176
|
+
function toString(value) {
|
|
1177
|
+
return value == null ? "" : baseToString_default(value);
|
|
1178
|
+
}
|
|
1179
|
+
var toString_default = toString;
|
|
1180
|
+
|
|
1181
|
+
// ../../node_modules/lodash-es/_castPath.js
|
|
1182
|
+
function castPath(value, object) {
|
|
1183
|
+
if (isArray_default(value)) {
|
|
1184
|
+
return value;
|
|
1185
|
+
}
|
|
1186
|
+
return isKey_default(value, object) ? [value] : stringToPath_default(toString_default(value));
|
|
1187
|
+
}
|
|
1188
|
+
var castPath_default = castPath;
|
|
1189
|
+
|
|
1190
|
+
// ../../node_modules/lodash-es/_toKey.js
|
|
1191
|
+
var INFINITY2 = 1 / 0;
|
|
1192
|
+
function toKey(value) {
|
|
1193
|
+
if (typeof value == "string" || isSymbol_default(value)) {
|
|
1194
|
+
return value;
|
|
1195
|
+
}
|
|
1196
|
+
var result = value + "";
|
|
1197
|
+
return result == "0" && 1 / value == -INFINITY2 ? "-0" : result;
|
|
1198
|
+
}
|
|
1199
|
+
var toKey_default = toKey;
|
|
1200
|
+
|
|
1201
|
+
// ../../node_modules/lodash-es/_baseGet.js
|
|
1202
|
+
function baseGet(object, path) {
|
|
1203
|
+
path = castPath_default(path, object);
|
|
1204
|
+
var index = 0, length = path.length;
|
|
1205
|
+
while (object != null && index < length) {
|
|
1206
|
+
object = object[toKey_default(path[index++])];
|
|
1207
|
+
}
|
|
1208
|
+
return index && index == length ? object : void 0;
|
|
1209
|
+
}
|
|
1210
|
+
var baseGet_default = baseGet;
|
|
1211
|
+
|
|
1212
|
+
// ../../node_modules/lodash-es/_arrayPush.js
|
|
1213
|
+
function arrayPush(array, values) {
|
|
1214
|
+
var index = -1, length = values.length, offset = array.length;
|
|
1215
|
+
while (++index < length) {
|
|
1216
|
+
array[offset + index] = values[index];
|
|
1217
|
+
}
|
|
1218
|
+
return array;
|
|
1219
|
+
}
|
|
1220
|
+
var arrayPush_default = arrayPush;
|
|
1221
|
+
|
|
1222
|
+
// ../../node_modules/lodash-es/_isFlattenable.js
|
|
1223
|
+
var spreadableSymbol = Symbol_default ? Symbol_default.isConcatSpreadable : void 0;
|
|
1224
|
+
function isFlattenable(value) {
|
|
1225
|
+
return isArray_default(value) || isArguments_default(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
|
|
1226
|
+
}
|
|
1227
|
+
var isFlattenable_default = isFlattenable;
|
|
1228
|
+
|
|
1229
|
+
// ../../node_modules/lodash-es/_baseFlatten.js
|
|
1230
|
+
function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
1231
|
+
var index = -1, length = array.length;
|
|
1232
|
+
predicate || (predicate = isFlattenable_default);
|
|
1233
|
+
result || (result = []);
|
|
1234
|
+
while (++index < length) {
|
|
1235
|
+
var value = array[index];
|
|
1236
|
+
if (depth > 0 && predicate(value)) {
|
|
1237
|
+
if (depth > 1) {
|
|
1238
|
+
baseFlatten(value, depth - 1, predicate, isStrict, result);
|
|
1239
|
+
} else {
|
|
1240
|
+
arrayPush_default(result, value);
|
|
1241
|
+
}
|
|
1242
|
+
} else if (!isStrict) {
|
|
1243
|
+
result[result.length] = value;
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
return result;
|
|
1247
|
+
}
|
|
1248
|
+
var baseFlatten_default = baseFlatten;
|
|
1249
|
+
|
|
1250
|
+
// ../../node_modules/lodash-es/flatten.js
|
|
1251
|
+
function flatten(array) {
|
|
1252
|
+
var length = array == null ? 0 : array.length;
|
|
1253
|
+
return length ? baseFlatten_default(array, 1) : [];
|
|
1254
|
+
}
|
|
1255
|
+
var flatten_default = flatten;
|
|
1256
|
+
|
|
1257
|
+
// ../../node_modules/lodash-es/_flatRest.js
|
|
1258
|
+
function flatRest(func) {
|
|
1259
|
+
return setToString_default(overRest_default(func, void 0, flatten_default), func + "");
|
|
1260
|
+
}
|
|
1261
|
+
var flatRest_default = flatRest;
|
|
1262
|
+
|
|
1263
|
+
// ../../node_modules/lodash-es/_getPrototype.js
|
|
1264
|
+
var getPrototype = overArg_default(Object.getPrototypeOf, Object);
|
|
1265
|
+
var getPrototype_default = getPrototype;
|
|
1266
|
+
|
|
1267
|
+
// ../../node_modules/lodash-es/isPlainObject.js
|
|
1268
|
+
var objectTag2 = "[object Object]";
|
|
1269
|
+
var funcProto3 = Function.prototype;
|
|
1270
|
+
var objectProto12 = Object.prototype;
|
|
1271
|
+
var funcToString3 = funcProto3.toString;
|
|
1272
|
+
var hasOwnProperty10 = objectProto12.hasOwnProperty;
|
|
1273
|
+
var objectCtorString = funcToString3.call(Object);
|
|
1274
|
+
function isPlainObject(value) {
|
|
1275
|
+
if (!isObjectLike_default(value) || baseGetTag_default(value) != objectTag2) {
|
|
1276
|
+
return false;
|
|
1277
|
+
}
|
|
1278
|
+
var proto = getPrototype_default(value);
|
|
1279
|
+
if (proto === null) {
|
|
1280
|
+
return true;
|
|
1281
|
+
}
|
|
1282
|
+
var Ctor = hasOwnProperty10.call(proto, "constructor") && proto.constructor;
|
|
1283
|
+
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString3.call(Ctor) == objectCtorString;
|
|
1284
|
+
}
|
|
1285
|
+
var isPlainObject_default = isPlainObject;
|
|
1286
|
+
|
|
1287
|
+
// ../../node_modules/lodash-es/_baseSlice.js
|
|
1288
|
+
function baseSlice(array, start, end) {
|
|
1289
|
+
var index = -1, length = array.length;
|
|
1290
|
+
if (start < 0) {
|
|
1291
|
+
start = -start > length ? 0 : length + start;
|
|
1292
|
+
}
|
|
1293
|
+
end = end > length ? length : end;
|
|
1294
|
+
if (end < 0) {
|
|
1295
|
+
end += length;
|
|
1296
|
+
}
|
|
1297
|
+
length = start > end ? 0 : end - start >>> 0;
|
|
1298
|
+
start >>>= 0;
|
|
1299
|
+
var result = Array(length);
|
|
1300
|
+
while (++index < length) {
|
|
1301
|
+
result[index] = array[index + start];
|
|
1302
|
+
}
|
|
1303
|
+
return result;
|
|
1304
|
+
}
|
|
1305
|
+
var baseSlice_default = baseSlice;
|
|
1306
|
+
|
|
1307
|
+
// ../../node_modules/lodash-es/_stackClear.js
|
|
1308
|
+
function stackClear() {
|
|
1309
|
+
this.__data__ = new ListCache_default();
|
|
1310
|
+
this.size = 0;
|
|
1311
|
+
}
|
|
1312
|
+
var stackClear_default = stackClear;
|
|
1313
|
+
|
|
1314
|
+
// ../../node_modules/lodash-es/_stackDelete.js
|
|
1315
|
+
function stackDelete(key) {
|
|
1316
|
+
var data = this.__data__, result = data["delete"](key);
|
|
1317
|
+
this.size = data.size;
|
|
1318
|
+
return result;
|
|
1319
|
+
}
|
|
1320
|
+
var stackDelete_default = stackDelete;
|
|
1321
|
+
|
|
1322
|
+
// ../../node_modules/lodash-es/_stackGet.js
|
|
1323
|
+
function stackGet(key) {
|
|
1324
|
+
return this.__data__.get(key);
|
|
1325
|
+
}
|
|
1326
|
+
var stackGet_default = stackGet;
|
|
1327
|
+
|
|
1328
|
+
// ../../node_modules/lodash-es/_stackHas.js
|
|
1329
|
+
function stackHas(key) {
|
|
1330
|
+
return this.__data__.has(key);
|
|
1331
|
+
}
|
|
1332
|
+
var stackHas_default = stackHas;
|
|
1333
|
+
|
|
1334
|
+
// ../../node_modules/lodash-es/_stackSet.js
|
|
1335
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
1336
|
+
function stackSet(key, value) {
|
|
1337
|
+
var data = this.__data__;
|
|
1338
|
+
if (data instanceof ListCache_default) {
|
|
1339
|
+
var pairs = data.__data__;
|
|
1340
|
+
if (!Map_default || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
1341
|
+
pairs.push([key, value]);
|
|
1342
|
+
this.size = ++data.size;
|
|
1343
|
+
return this;
|
|
1344
|
+
}
|
|
1345
|
+
data = this.__data__ = new MapCache_default(pairs);
|
|
1346
|
+
}
|
|
1347
|
+
data.set(key, value);
|
|
1348
|
+
this.size = data.size;
|
|
1349
|
+
return this;
|
|
1350
|
+
}
|
|
1351
|
+
var stackSet_default = stackSet;
|
|
1352
|
+
|
|
1353
|
+
// ../../node_modules/lodash-es/_Stack.js
|
|
1354
|
+
function Stack(entries) {
|
|
1355
|
+
var data = this.__data__ = new ListCache_default(entries);
|
|
1356
|
+
this.size = data.size;
|
|
1357
|
+
}
|
|
1358
|
+
Stack.prototype.clear = stackClear_default;
|
|
1359
|
+
Stack.prototype["delete"] = stackDelete_default;
|
|
1360
|
+
Stack.prototype.get = stackGet_default;
|
|
1361
|
+
Stack.prototype.has = stackHas_default;
|
|
1362
|
+
Stack.prototype.set = stackSet_default;
|
|
1363
|
+
var Stack_default = Stack;
|
|
1364
|
+
|
|
1365
|
+
// ../../node_modules/lodash-es/_baseAssign.js
|
|
1366
|
+
function baseAssign(object, source) {
|
|
1367
|
+
return object && copyObject_default(source, keys_default(source), object);
|
|
1368
|
+
}
|
|
1369
|
+
var baseAssign_default = baseAssign;
|
|
1370
|
+
|
|
1371
|
+
// ../../node_modules/lodash-es/_baseAssignIn.js
|
|
1372
|
+
function baseAssignIn(object, source) {
|
|
1373
|
+
return object && copyObject_default(source, keysIn_default(source), object);
|
|
1374
|
+
}
|
|
1375
|
+
var baseAssignIn_default = baseAssignIn;
|
|
1376
|
+
|
|
1377
|
+
// ../../node_modules/lodash-es/_cloneBuffer.js
|
|
1378
|
+
var freeExports3 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
1379
|
+
var freeModule3 = freeExports3 && typeof module == "object" && module && !module.nodeType && module;
|
|
1380
|
+
var moduleExports3 = freeModule3 && freeModule3.exports === freeExports3;
|
|
1381
|
+
var Buffer3 = moduleExports3 ? root_default.Buffer : void 0;
|
|
1382
|
+
var allocUnsafe = Buffer3 ? Buffer3.allocUnsafe : void 0;
|
|
1383
|
+
function cloneBuffer(buffer, isDeep) {
|
|
1384
|
+
if (isDeep) {
|
|
1385
|
+
return buffer.slice();
|
|
1386
|
+
}
|
|
1387
|
+
var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
1388
|
+
buffer.copy(result);
|
|
1389
|
+
return result;
|
|
1390
|
+
}
|
|
1391
|
+
var cloneBuffer_default = cloneBuffer;
|
|
1392
|
+
|
|
1393
|
+
// ../../node_modules/lodash-es/_arrayFilter.js
|
|
1394
|
+
function arrayFilter(array, predicate) {
|
|
1395
|
+
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
1396
|
+
while (++index < length) {
|
|
1397
|
+
var value = array[index];
|
|
1398
|
+
if (predicate(value, index, array)) {
|
|
1399
|
+
result[resIndex++] = value;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
return result;
|
|
1403
|
+
}
|
|
1404
|
+
var arrayFilter_default = arrayFilter;
|
|
1405
|
+
|
|
1406
|
+
// ../../node_modules/lodash-es/stubArray.js
|
|
1407
|
+
function stubArray() {
|
|
1408
|
+
return [];
|
|
1409
|
+
}
|
|
1410
|
+
var stubArray_default = stubArray;
|
|
1411
|
+
|
|
1412
|
+
// ../../node_modules/lodash-es/_getSymbols.js
|
|
1413
|
+
var objectProto13 = Object.prototype;
|
|
1414
|
+
var propertyIsEnumerable2 = objectProto13.propertyIsEnumerable;
|
|
1415
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
1416
|
+
var getSymbols = !nativeGetSymbols ? stubArray_default : function(object) {
|
|
1417
|
+
if (object == null) {
|
|
1418
|
+
return [];
|
|
1419
|
+
}
|
|
1420
|
+
object = Object(object);
|
|
1421
|
+
return arrayFilter_default(nativeGetSymbols(object), function(symbol) {
|
|
1422
|
+
return propertyIsEnumerable2.call(object, symbol);
|
|
1423
|
+
});
|
|
1424
|
+
};
|
|
1425
|
+
var getSymbols_default = getSymbols;
|
|
1426
|
+
|
|
1427
|
+
// ../../node_modules/lodash-es/_copySymbols.js
|
|
1428
|
+
function copySymbols(source, object) {
|
|
1429
|
+
return copyObject_default(source, getSymbols_default(source), object);
|
|
1430
|
+
}
|
|
1431
|
+
var copySymbols_default = copySymbols;
|
|
1432
|
+
|
|
1433
|
+
// ../../node_modules/lodash-es/_getSymbolsIn.js
|
|
1434
|
+
var nativeGetSymbols2 = Object.getOwnPropertySymbols;
|
|
1435
|
+
var getSymbolsIn = !nativeGetSymbols2 ? stubArray_default : function(object) {
|
|
1436
|
+
var result = [];
|
|
1437
|
+
while (object) {
|
|
1438
|
+
arrayPush_default(result, getSymbols_default(object));
|
|
1439
|
+
object = getPrototype_default(object);
|
|
1440
|
+
}
|
|
1441
|
+
return result;
|
|
1442
|
+
};
|
|
1443
|
+
var getSymbolsIn_default = getSymbolsIn;
|
|
1444
|
+
|
|
1445
|
+
// ../../node_modules/lodash-es/_copySymbolsIn.js
|
|
1446
|
+
function copySymbolsIn(source, object) {
|
|
1447
|
+
return copyObject_default(source, getSymbolsIn_default(source), object);
|
|
1448
|
+
}
|
|
1449
|
+
var copySymbolsIn_default = copySymbolsIn;
|
|
1450
|
+
|
|
1451
|
+
// ../../node_modules/lodash-es/_baseGetAllKeys.js
|
|
1452
|
+
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
1453
|
+
var result = keysFunc(object);
|
|
1454
|
+
return isArray_default(object) ? result : arrayPush_default(result, symbolsFunc(object));
|
|
1455
|
+
}
|
|
1456
|
+
var baseGetAllKeys_default = baseGetAllKeys;
|
|
1457
|
+
|
|
1458
|
+
// ../../node_modules/lodash-es/_getAllKeys.js
|
|
1459
|
+
function getAllKeys(object) {
|
|
1460
|
+
return baseGetAllKeys_default(object, keys_default, getSymbols_default);
|
|
1461
|
+
}
|
|
1462
|
+
var getAllKeys_default = getAllKeys;
|
|
1463
|
+
|
|
1464
|
+
// ../../node_modules/lodash-es/_getAllKeysIn.js
|
|
1465
|
+
function getAllKeysIn(object) {
|
|
1466
|
+
return baseGetAllKeys_default(object, keysIn_default, getSymbolsIn_default);
|
|
1467
|
+
}
|
|
1468
|
+
var getAllKeysIn_default = getAllKeysIn;
|
|
1469
|
+
|
|
1470
|
+
// ../../node_modules/lodash-es/_DataView.js
|
|
1471
|
+
var DataView = getNative_default(root_default, "DataView");
|
|
1472
|
+
var DataView_default = DataView;
|
|
1473
|
+
|
|
1474
|
+
// ../../node_modules/lodash-es/_Promise.js
|
|
1475
|
+
var Promise2 = getNative_default(root_default, "Promise");
|
|
1476
|
+
var Promise_default = Promise2;
|
|
1477
|
+
|
|
1478
|
+
// ../../node_modules/lodash-es/_Set.js
|
|
1479
|
+
var Set = getNative_default(root_default, "Set");
|
|
1480
|
+
var Set_default = Set;
|
|
1481
|
+
|
|
1482
|
+
// ../../node_modules/lodash-es/_getTag.js
|
|
1483
|
+
var mapTag2 = "[object Map]";
|
|
1484
|
+
var objectTag3 = "[object Object]";
|
|
1485
|
+
var promiseTag = "[object Promise]";
|
|
1486
|
+
var setTag2 = "[object Set]";
|
|
1487
|
+
var weakMapTag2 = "[object WeakMap]";
|
|
1488
|
+
var dataViewTag2 = "[object DataView]";
|
|
1489
|
+
var dataViewCtorString = toSource_default(DataView_default);
|
|
1490
|
+
var mapCtorString = toSource_default(Map_default);
|
|
1491
|
+
var promiseCtorString = toSource_default(Promise_default);
|
|
1492
|
+
var setCtorString = toSource_default(Set_default);
|
|
1493
|
+
var weakMapCtorString = toSource_default(WeakMap_default);
|
|
1494
|
+
var getTag = baseGetTag_default;
|
|
1495
|
+
if (DataView_default && getTag(new DataView_default(new ArrayBuffer(1))) != dataViewTag2 || Map_default && getTag(new Map_default()) != mapTag2 || Promise_default && getTag(Promise_default.resolve()) != promiseTag || Set_default && getTag(new Set_default()) != setTag2 || WeakMap_default && getTag(new WeakMap_default()) != weakMapTag2) {
|
|
1496
|
+
getTag = function(value) {
|
|
1497
|
+
var result = baseGetTag_default(value), Ctor = result == objectTag3 ? value.constructor : void 0, ctorString = Ctor ? toSource_default(Ctor) : "";
|
|
1498
|
+
if (ctorString) {
|
|
1499
|
+
switch (ctorString) {
|
|
1500
|
+
case dataViewCtorString:
|
|
1501
|
+
return dataViewTag2;
|
|
1502
|
+
case mapCtorString:
|
|
1503
|
+
return mapTag2;
|
|
1504
|
+
case promiseCtorString:
|
|
1505
|
+
return promiseTag;
|
|
1506
|
+
case setCtorString:
|
|
1507
|
+
return setTag2;
|
|
1508
|
+
case weakMapCtorString:
|
|
1509
|
+
return weakMapTag2;
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
return result;
|
|
1513
|
+
};
|
|
1514
|
+
}
|
|
1515
|
+
var getTag_default = getTag;
|
|
1516
|
+
|
|
1517
|
+
// ../../node_modules/lodash-es/_initCloneArray.js
|
|
1518
|
+
var objectProto14 = Object.prototype;
|
|
1519
|
+
var hasOwnProperty11 = objectProto14.hasOwnProperty;
|
|
1520
|
+
function initCloneArray(array) {
|
|
1521
|
+
var length = array.length, result = new array.constructor(length);
|
|
1522
|
+
if (length && typeof array[0] == "string" && hasOwnProperty11.call(array, "index")) {
|
|
1523
|
+
result.index = array.index;
|
|
1524
|
+
result.input = array.input;
|
|
1525
|
+
}
|
|
1526
|
+
return result;
|
|
1527
|
+
}
|
|
1528
|
+
var initCloneArray_default = initCloneArray;
|
|
1529
|
+
|
|
1530
|
+
// ../../node_modules/lodash-es/_Uint8Array.js
|
|
1531
|
+
var Uint8Array2 = root_default.Uint8Array;
|
|
1532
|
+
var Uint8Array_default = Uint8Array2;
|
|
1533
|
+
|
|
1534
|
+
// ../../node_modules/lodash-es/_cloneArrayBuffer.js
|
|
1535
|
+
function cloneArrayBuffer(arrayBuffer) {
|
|
1536
|
+
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
1537
|
+
new Uint8Array_default(result).set(new Uint8Array_default(arrayBuffer));
|
|
1538
|
+
return result;
|
|
1539
|
+
}
|
|
1540
|
+
var cloneArrayBuffer_default = cloneArrayBuffer;
|
|
1541
|
+
|
|
1542
|
+
// ../../node_modules/lodash-es/_cloneDataView.js
|
|
1543
|
+
function cloneDataView(dataView, isDeep) {
|
|
1544
|
+
var buffer = isDeep ? cloneArrayBuffer_default(dataView.buffer) : dataView.buffer;
|
|
1545
|
+
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
1546
|
+
}
|
|
1547
|
+
var cloneDataView_default = cloneDataView;
|
|
1548
|
+
|
|
1549
|
+
// ../../node_modules/lodash-es/_cloneRegExp.js
|
|
1550
|
+
var reFlags = /\w*$/;
|
|
1551
|
+
function cloneRegExp(regexp) {
|
|
1552
|
+
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
1553
|
+
result.lastIndex = regexp.lastIndex;
|
|
1554
|
+
return result;
|
|
1555
|
+
}
|
|
1556
|
+
var cloneRegExp_default = cloneRegExp;
|
|
1557
|
+
|
|
1558
|
+
// ../../node_modules/lodash-es/_cloneSymbol.js
|
|
1559
|
+
var symbolProto2 = Symbol_default ? Symbol_default.prototype : void 0;
|
|
1560
|
+
var symbolValueOf = symbolProto2 ? symbolProto2.valueOf : void 0;
|
|
1561
|
+
function cloneSymbol(symbol) {
|
|
1562
|
+
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
|
1563
|
+
}
|
|
1564
|
+
var cloneSymbol_default = cloneSymbol;
|
|
1565
|
+
|
|
1566
|
+
// ../../node_modules/lodash-es/_cloneTypedArray.js
|
|
1567
|
+
function cloneTypedArray(typedArray, isDeep) {
|
|
1568
|
+
var buffer = isDeep ? cloneArrayBuffer_default(typedArray.buffer) : typedArray.buffer;
|
|
1569
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
1570
|
+
}
|
|
1571
|
+
var cloneTypedArray_default = cloneTypedArray;
|
|
1572
|
+
|
|
1573
|
+
// ../../node_modules/lodash-es/_initCloneByTag.js
|
|
1574
|
+
var boolTag2 = "[object Boolean]";
|
|
1575
|
+
var dateTag2 = "[object Date]";
|
|
1576
|
+
var mapTag3 = "[object Map]";
|
|
1577
|
+
var numberTag2 = "[object Number]";
|
|
1578
|
+
var regexpTag2 = "[object RegExp]";
|
|
1579
|
+
var setTag3 = "[object Set]";
|
|
1580
|
+
var stringTag2 = "[object String]";
|
|
1581
|
+
var symbolTag2 = "[object Symbol]";
|
|
1582
|
+
var arrayBufferTag2 = "[object ArrayBuffer]";
|
|
1583
|
+
var dataViewTag3 = "[object DataView]";
|
|
1584
|
+
var float32Tag2 = "[object Float32Array]";
|
|
1585
|
+
var float64Tag2 = "[object Float64Array]";
|
|
1586
|
+
var int8Tag2 = "[object Int8Array]";
|
|
1587
|
+
var int16Tag2 = "[object Int16Array]";
|
|
1588
|
+
var int32Tag2 = "[object Int32Array]";
|
|
1589
|
+
var uint8Tag2 = "[object Uint8Array]";
|
|
1590
|
+
var uint8ClampedTag2 = "[object Uint8ClampedArray]";
|
|
1591
|
+
var uint16Tag2 = "[object Uint16Array]";
|
|
1592
|
+
var uint32Tag2 = "[object Uint32Array]";
|
|
1593
|
+
function initCloneByTag(object, tag, isDeep) {
|
|
1594
|
+
var Ctor = object.constructor;
|
|
1595
|
+
switch (tag) {
|
|
1596
|
+
case arrayBufferTag2:
|
|
1597
|
+
return cloneArrayBuffer_default(object);
|
|
1598
|
+
case boolTag2:
|
|
1599
|
+
case dateTag2:
|
|
1600
|
+
return new Ctor(+object);
|
|
1601
|
+
case dataViewTag3:
|
|
1602
|
+
return cloneDataView_default(object, isDeep);
|
|
1603
|
+
case float32Tag2:
|
|
1604
|
+
case float64Tag2:
|
|
1605
|
+
case int8Tag2:
|
|
1606
|
+
case int16Tag2:
|
|
1607
|
+
case int32Tag2:
|
|
1608
|
+
case uint8Tag2:
|
|
1609
|
+
case uint8ClampedTag2:
|
|
1610
|
+
case uint16Tag2:
|
|
1611
|
+
case uint32Tag2:
|
|
1612
|
+
return cloneTypedArray_default(object, isDeep);
|
|
1613
|
+
case mapTag3:
|
|
1614
|
+
return new Ctor();
|
|
1615
|
+
case numberTag2:
|
|
1616
|
+
case stringTag2:
|
|
1617
|
+
return new Ctor(object);
|
|
1618
|
+
case regexpTag2:
|
|
1619
|
+
return cloneRegExp_default(object);
|
|
1620
|
+
case setTag3:
|
|
1621
|
+
return new Ctor();
|
|
1622
|
+
case symbolTag2:
|
|
1623
|
+
return cloneSymbol_default(object);
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
var initCloneByTag_default = initCloneByTag;
|
|
1627
|
+
|
|
1628
|
+
// ../../node_modules/lodash-es/_initCloneObject.js
|
|
1629
|
+
function initCloneObject(object) {
|
|
1630
|
+
return typeof object.constructor == "function" && !isPrototype_default(object) ? baseCreate_default(getPrototype_default(object)) : {};
|
|
1631
|
+
}
|
|
1632
|
+
var initCloneObject_default = initCloneObject;
|
|
1633
|
+
|
|
1634
|
+
// ../../node_modules/lodash-es/_baseIsMap.js
|
|
1635
|
+
var mapTag4 = "[object Map]";
|
|
1636
|
+
function baseIsMap(value) {
|
|
1637
|
+
return isObjectLike_default(value) && getTag_default(value) == mapTag4;
|
|
1638
|
+
}
|
|
1639
|
+
var baseIsMap_default = baseIsMap;
|
|
1640
|
+
|
|
1641
|
+
// ../../node_modules/lodash-es/isMap.js
|
|
1642
|
+
var nodeIsMap = nodeUtil_default && nodeUtil_default.isMap;
|
|
1643
|
+
var isMap = nodeIsMap ? baseUnary_default(nodeIsMap) : baseIsMap_default;
|
|
1644
|
+
var isMap_default = isMap;
|
|
1645
|
+
|
|
1646
|
+
// ../../node_modules/lodash-es/_baseIsSet.js
|
|
1647
|
+
var setTag4 = "[object Set]";
|
|
1648
|
+
function baseIsSet(value) {
|
|
1649
|
+
return isObjectLike_default(value) && getTag_default(value) == setTag4;
|
|
1650
|
+
}
|
|
1651
|
+
var baseIsSet_default = baseIsSet;
|
|
1652
|
+
|
|
1653
|
+
// ../../node_modules/lodash-es/isSet.js
|
|
1654
|
+
var nodeIsSet = nodeUtil_default && nodeUtil_default.isSet;
|
|
1655
|
+
var isSet = nodeIsSet ? baseUnary_default(nodeIsSet) : baseIsSet_default;
|
|
1656
|
+
var isSet_default = isSet;
|
|
1657
|
+
|
|
1658
|
+
// ../../node_modules/lodash-es/_baseClone.js
|
|
1659
|
+
var CLONE_DEEP_FLAG = 1;
|
|
1660
|
+
var CLONE_FLAT_FLAG = 2;
|
|
1661
|
+
var CLONE_SYMBOLS_FLAG = 4;
|
|
1662
|
+
var argsTag3 = "[object Arguments]";
|
|
1663
|
+
var arrayTag2 = "[object Array]";
|
|
1664
|
+
var boolTag3 = "[object Boolean]";
|
|
1665
|
+
var dateTag3 = "[object Date]";
|
|
1666
|
+
var errorTag2 = "[object Error]";
|
|
1667
|
+
var funcTag3 = "[object Function]";
|
|
1668
|
+
var genTag2 = "[object GeneratorFunction]";
|
|
1669
|
+
var mapTag5 = "[object Map]";
|
|
1670
|
+
var numberTag3 = "[object Number]";
|
|
1671
|
+
var objectTag4 = "[object Object]";
|
|
1672
|
+
var regexpTag3 = "[object RegExp]";
|
|
1673
|
+
var setTag5 = "[object Set]";
|
|
1674
|
+
var stringTag3 = "[object String]";
|
|
1675
|
+
var symbolTag3 = "[object Symbol]";
|
|
1676
|
+
var weakMapTag3 = "[object WeakMap]";
|
|
1677
|
+
var arrayBufferTag3 = "[object ArrayBuffer]";
|
|
1678
|
+
var dataViewTag4 = "[object DataView]";
|
|
1679
|
+
var float32Tag3 = "[object Float32Array]";
|
|
1680
|
+
var float64Tag3 = "[object Float64Array]";
|
|
1681
|
+
var int8Tag3 = "[object Int8Array]";
|
|
1682
|
+
var int16Tag3 = "[object Int16Array]";
|
|
1683
|
+
var int32Tag3 = "[object Int32Array]";
|
|
1684
|
+
var uint8Tag3 = "[object Uint8Array]";
|
|
1685
|
+
var uint8ClampedTag3 = "[object Uint8ClampedArray]";
|
|
1686
|
+
var uint16Tag3 = "[object Uint16Array]";
|
|
1687
|
+
var uint32Tag3 = "[object Uint32Array]";
|
|
1688
|
+
var cloneableTags = {};
|
|
1689
|
+
cloneableTags[argsTag3] = cloneableTags[arrayTag2] = cloneableTags[arrayBufferTag3] = cloneableTags[dataViewTag4] = cloneableTags[boolTag3] = cloneableTags[dateTag3] = cloneableTags[float32Tag3] = cloneableTags[float64Tag3] = cloneableTags[int8Tag3] = cloneableTags[int16Tag3] = cloneableTags[int32Tag3] = cloneableTags[mapTag5] = cloneableTags[numberTag3] = cloneableTags[objectTag4] = cloneableTags[regexpTag3] = cloneableTags[setTag5] = cloneableTags[stringTag3] = cloneableTags[symbolTag3] = cloneableTags[uint8Tag3] = cloneableTags[uint8ClampedTag3] = cloneableTags[uint16Tag3] = cloneableTags[uint32Tag3] = true;
|
|
1690
|
+
cloneableTags[errorTag2] = cloneableTags[funcTag3] = cloneableTags[weakMapTag3] = false;
|
|
1691
|
+
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
1692
|
+
var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
|
|
1693
|
+
if (customizer) {
|
|
1694
|
+
result = object ? customizer(value, key, object, stack) : customizer(value);
|
|
1695
|
+
}
|
|
1696
|
+
if (result !== void 0) {
|
|
1697
|
+
return result;
|
|
1698
|
+
}
|
|
1699
|
+
if (!isObject_default(value)) {
|
|
1700
|
+
return value;
|
|
1701
|
+
}
|
|
1702
|
+
var isArr = isArray_default(value);
|
|
1703
|
+
if (isArr) {
|
|
1704
|
+
result = initCloneArray_default(value);
|
|
1705
|
+
if (!isDeep) {
|
|
1706
|
+
return copyArray_default(value, result);
|
|
1707
|
+
}
|
|
1708
|
+
} else {
|
|
1709
|
+
var tag = getTag_default(value), isFunc = tag == funcTag3 || tag == genTag2;
|
|
1710
|
+
if (isBuffer_default(value)) {
|
|
1711
|
+
return cloneBuffer_default(value, isDeep);
|
|
1712
|
+
}
|
|
1713
|
+
if (tag == objectTag4 || tag == argsTag3 || isFunc && !object) {
|
|
1714
|
+
result = isFlat || isFunc ? {} : initCloneObject_default(value);
|
|
1715
|
+
if (!isDeep) {
|
|
1716
|
+
return isFlat ? copySymbolsIn_default(value, baseAssignIn_default(result, value)) : copySymbols_default(value, baseAssign_default(result, value));
|
|
1717
|
+
}
|
|
1718
|
+
} else {
|
|
1719
|
+
if (!cloneableTags[tag]) {
|
|
1720
|
+
return object ? value : {};
|
|
1721
|
+
}
|
|
1722
|
+
result = initCloneByTag_default(value, tag, isDeep);
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
stack || (stack = new Stack_default());
|
|
1726
|
+
var stacked = stack.get(value);
|
|
1727
|
+
if (stacked) {
|
|
1728
|
+
return stacked;
|
|
1729
|
+
}
|
|
1730
|
+
stack.set(value, result);
|
|
1731
|
+
if (isSet_default(value)) {
|
|
1732
|
+
value.forEach(function(subValue) {
|
|
1733
|
+
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
|
1734
|
+
});
|
|
1735
|
+
} else if (isMap_default(value)) {
|
|
1736
|
+
value.forEach(function(subValue, key2) {
|
|
1737
|
+
result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
|
1738
|
+
});
|
|
1739
|
+
}
|
|
1740
|
+
var keysFunc = isFull ? isFlat ? getAllKeysIn_default : getAllKeys_default : isFlat ? keysIn_default : keys_default;
|
|
1741
|
+
var props = isArr ? void 0 : keysFunc(value);
|
|
1742
|
+
arrayEach_default(props || value, function(subValue, key2) {
|
|
1743
|
+
if (props) {
|
|
1744
|
+
key2 = subValue;
|
|
1745
|
+
subValue = value[key2];
|
|
1746
|
+
}
|
|
1747
|
+
assignValue_default(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
|
1748
|
+
});
|
|
1749
|
+
return result;
|
|
1750
|
+
}
|
|
1751
|
+
var baseClone_default = baseClone;
|
|
1752
|
+
|
|
1753
|
+
// ../../node_modules/lodash-es/last.js
|
|
1754
|
+
function last(array) {
|
|
1755
|
+
var length = array == null ? 0 : array.length;
|
|
1756
|
+
return length ? array[length - 1] : void 0;
|
|
1757
|
+
}
|
|
1758
|
+
var last_default = last;
|
|
1759
|
+
|
|
1760
|
+
// ../../node_modules/lodash-es/_parent.js
|
|
1761
|
+
function parent(object, path) {
|
|
1762
|
+
return path.length < 2 ? object : baseGet_default(object, baseSlice_default(path, 0, -1));
|
|
1763
|
+
}
|
|
1764
|
+
var parent_default = parent;
|
|
1765
|
+
|
|
1766
|
+
// ../../node_modules/lodash-es/_baseUnset.js
|
|
1767
|
+
function baseUnset(object, path) {
|
|
1768
|
+
path = castPath_default(path, object);
|
|
1769
|
+
object = parent_default(object, path);
|
|
1770
|
+
return object == null || delete object[toKey_default(last_default(path))];
|
|
1771
|
+
}
|
|
1772
|
+
var baseUnset_default = baseUnset;
|
|
1773
|
+
|
|
1774
|
+
// ../../node_modules/lodash-es/_customOmitClone.js
|
|
1775
|
+
function customOmitClone(value) {
|
|
1776
|
+
return isPlainObject_default(value) ? void 0 : value;
|
|
1777
|
+
}
|
|
1778
|
+
var customOmitClone_default = customOmitClone;
|
|
1779
|
+
|
|
1780
|
+
// ../../node_modules/lodash-es/omit.js
|
|
1781
|
+
var CLONE_DEEP_FLAG2 = 1;
|
|
1782
|
+
var CLONE_FLAT_FLAG2 = 2;
|
|
1783
|
+
var CLONE_SYMBOLS_FLAG2 = 4;
|
|
1784
|
+
var omit = flatRest_default(function(object, paths) {
|
|
1785
|
+
var result = {};
|
|
1786
|
+
if (object == null) {
|
|
1787
|
+
return result;
|
|
1788
|
+
}
|
|
1789
|
+
var isDeep = false;
|
|
1790
|
+
paths = arrayMap_default(paths, function(path) {
|
|
1791
|
+
path = castPath_default(path, object);
|
|
1792
|
+
isDeep || (isDeep = path.length > 1);
|
|
1793
|
+
return path;
|
|
1794
|
+
});
|
|
1795
|
+
copyObject_default(object, getAllKeysIn_default(object), result);
|
|
1796
|
+
if (isDeep) {
|
|
1797
|
+
result = baseClone_default(result, CLONE_DEEP_FLAG2 | CLONE_FLAT_FLAG2 | CLONE_SYMBOLS_FLAG2, customOmitClone_default);
|
|
1798
|
+
}
|
|
1799
|
+
var length = paths.length;
|
|
1800
|
+
while (length--) {
|
|
1801
|
+
baseUnset_default(result, paths[length]);
|
|
1802
|
+
}
|
|
1803
|
+
return result;
|
|
1804
|
+
});
|
|
1805
|
+
var omit_default = omit;
|
|
1806
|
+
|
|
1807
|
+
// src/payer-search/use-payer-autocomplete.ts
|
|
1808
|
+
var resultCache = /* @__PURE__ */ new Map();
|
|
1809
|
+
function usePayerAutocomplete(query, {
|
|
1810
|
+
limit = 10
|
|
1811
|
+
}) {
|
|
1812
|
+
const payerSearch = usePayerSearch();
|
|
1813
|
+
const [isLoading, setIsLoading] = (0, import_react5.useState)(false);
|
|
1814
|
+
const [results, setResults] = (0, import_react5.useState)([]);
|
|
1815
|
+
const normalizedQuery = query.trim().toLowerCase();
|
|
1816
|
+
const reqId = (0, import_react5.useRef)(0);
|
|
1817
|
+
const isMounted = useIsMounted();
|
|
1818
|
+
(0, import_react5.useEffect)(() => {
|
|
1819
|
+
const thisId = ++reqId.current;
|
|
1820
|
+
const cachedResults = resultCache.get(normalizedQuery);
|
|
1821
|
+
if (cachedResults) {
|
|
1822
|
+
setIsLoading(false);
|
|
1823
|
+
setResults(cachedResults);
|
|
1824
|
+
return;
|
|
1825
|
+
}
|
|
1826
|
+
async function run() {
|
|
1827
|
+
setIsLoading(true);
|
|
1828
|
+
try {
|
|
1829
|
+
const response = await retryLoop(
|
|
1830
|
+
() => payerSearch({ query: normalizedQuery, limit }),
|
|
1831
|
+
() => isMounted() && thisId === reqId.current
|
|
1832
|
+
);
|
|
1833
|
+
if (!isMounted()) return;
|
|
1834
|
+
resultCache.set(normalizedQuery, response.items);
|
|
1835
|
+
if (thisId !== reqId.current) return;
|
|
1836
|
+
setIsLoading(false);
|
|
1837
|
+
setResults(response.items);
|
|
1838
|
+
} catch (err) {
|
|
1839
|
+
if (err instanceof RetryLoopCancelledError) return;
|
|
1840
|
+
throw err;
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
void run();
|
|
1844
|
+
}, [payerSearch, normalizedQuery, limit]);
|
|
1845
|
+
return (0, import_react5.useMemo)(
|
|
1846
|
+
() => ({ isLoading, results: results.map((r) => omit_default(r, "code")) }),
|
|
1847
|
+
[isLoading, results]
|
|
1848
|
+
);
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
// src/soft-eligibility/soft-eligibility-provider.tsx
|
|
1852
|
+
var import_react16 = require("react");
|
|
1853
|
+
var import_sdk_core10 = require("@usebridge/sdk-core");
|
|
1854
|
+
|
|
1855
|
+
// src/soft-eligibility/soft-eligibility-context.ts
|
|
1856
|
+
var import_sdk_core3 = require("@usebridge/sdk-core");
|
|
1857
|
+
var import_react6 = require("react");
|
|
1858
|
+
var SoftEligibilityContext = (0, import_react6.createContext)(null);
|
|
1859
|
+
|
|
1860
|
+
// src/eligibility-input/eligibility-input-provider.tsx
|
|
1861
|
+
var import_react15 = require("react");
|
|
1862
|
+
var import_zustand4 = require("zustand");
|
|
1863
|
+
|
|
1864
|
+
// src/eligibility-input/eligibility-input-store.ts
|
|
1865
|
+
var import_zustand = require("zustand");
|
|
1866
|
+
function createEligibilityInputStore(requirePatient) {
|
|
1867
|
+
return (0, import_zustand.createStore)()((set) => ({
|
|
1868
|
+
requirePatient,
|
|
1869
|
+
payer: {
|
|
1870
|
+
value: null,
|
|
1871
|
+
set: (payer) => set((state) => ({ ...state, payer: { ...state.payer, value: payer } }))
|
|
1872
|
+
},
|
|
1873
|
+
state: {
|
|
1874
|
+
value: null,
|
|
1875
|
+
set: (state) => set((s) => ({ ...s, state: { ...s.state, value: state } }))
|
|
1876
|
+
},
|
|
1877
|
+
firstName: {
|
|
1878
|
+
value: "",
|
|
1879
|
+
set: (firstName) => set((s) => ({ ...s, firstName: { ...s.firstName, value: firstName } }))
|
|
1880
|
+
},
|
|
1881
|
+
lastName: {
|
|
1882
|
+
value: "",
|
|
1883
|
+
set: (lastName) => set((s) => ({ ...s, lastName: { ...s.lastName, value: lastName } }))
|
|
1884
|
+
},
|
|
1885
|
+
dateOfBirth: {
|
|
1886
|
+
value: null,
|
|
1887
|
+
set: (dateOfBirth) => set((s) => ({ ...s, dateOfBirth: { ...s.dateOfBirth, value: dateOfBirth } }))
|
|
1888
|
+
},
|
|
1889
|
+
memberId: {
|
|
1890
|
+
value: "",
|
|
1891
|
+
set: (memberId) => set((s) => ({ ...s, memberId: { ...s.memberId, value: memberId } }))
|
|
1892
|
+
}
|
|
1893
|
+
}));
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
// src/eligibility-input/eligibility-input-context.ts
|
|
1897
|
+
var import_react7 = require("react");
|
|
1898
|
+
var import_zustand2 = require("zustand");
|
|
1899
|
+
var EligibilityInputContext = (0, import_react7.createContext)(null);
|
|
1900
|
+
|
|
1901
|
+
// src/hard-eligibility/use-create-hard-eligibility-session.ts
|
|
1902
|
+
var import_react8 = require("react");
|
|
1903
|
+
function useCreateHardEligibilitySession() {
|
|
1904
|
+
const bridgeSdk = useBridgeSdk();
|
|
1905
|
+
return (0, import_react8.useCallback)(
|
|
1906
|
+
(...args) => bridgeSdk.createHardEligibilitySession(...args),
|
|
1907
|
+
[bridgeSdk]
|
|
1908
|
+
);
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
// src/hard-eligibility/hard-eligibility-context.ts
|
|
1912
|
+
var import_react9 = require("react");
|
|
1913
|
+
var import_sdk_core4 = require("@usebridge/sdk-core");
|
|
1914
|
+
var HardEligibilityContext = (0, import_react9.createContext)(null);
|
|
1915
|
+
|
|
1916
|
+
// src/hard-eligibility/hard-eligibility-provider.tsx
|
|
1917
|
+
var import_sdk_core5 = require("@usebridge/sdk-core");
|
|
1918
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1919
|
+
var HardEligibilityProvider = ({
|
|
1920
|
+
session,
|
|
1921
|
+
children
|
|
1922
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(HardEligibilityContext.Provider, { value: session, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(EligibilityInputProvider, { children }) });
|
|
1923
|
+
|
|
1924
|
+
// src/hard-eligibility/use-hard-eligibility-state.ts
|
|
1925
|
+
var import_react11 = require("react");
|
|
1926
|
+
var import_sdk_core7 = require("@usebridge/sdk-core");
|
|
1927
|
+
|
|
1928
|
+
// src/hard-eligibility/use-hard-eligibility.ts
|
|
1929
|
+
var import_react10 = require("react");
|
|
1930
|
+
var import_sdk_core6 = require("@usebridge/sdk-core");
|
|
1931
|
+
function useHardEligibilitySession() {
|
|
1932
|
+
const session = (0, import_react10.useContext)(HardEligibilityContext);
|
|
1933
|
+
if (!session) throw new Error("useHardEligibilitySession must be within a SoftEligibilityContext");
|
|
1934
|
+
return session;
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
// src/hard-eligibility/use-hard-eligibility-state.ts
|
|
1938
|
+
function useHardEligibilityState() {
|
|
1939
|
+
const session = useHardEligibilitySession();
|
|
1940
|
+
const [state, setState] = (0, import_react11.useState)(session.state);
|
|
1941
|
+
(0, import_react11.useEffect)(() => {
|
|
1942
|
+
session.on("update", setState);
|
|
1943
|
+
return () => {
|
|
1944
|
+
session.removeListener("update", setState);
|
|
1945
|
+
};
|
|
1946
|
+
}, [session]);
|
|
1947
|
+
return state;
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
// src/hard-eligibility/use-hard-eligibility-submit.ts
|
|
1951
|
+
var import_react14 = require("react");
|
|
1952
|
+
|
|
1953
|
+
// src/eligibility-input/use-eligibility-input.ts
|
|
1954
|
+
var import_react12 = require("react");
|
|
1955
|
+
var import_zustand3 = require("zustand");
|
|
1956
|
+
var useEligibilityInput = () => {
|
|
1957
|
+
const store = (0, import_react12.useContext)(EligibilityInputContext);
|
|
1958
|
+
if (!store) throw new Error("useEligibilityInputStore must be within an EligibilityInputProvider");
|
|
1959
|
+
return (0, import_zustand3.useStore)(store);
|
|
1960
|
+
};
|
|
1961
|
+
|
|
1962
|
+
// src/hard-eligibility/use-hard-eligibility-submit.ts
|
|
1963
|
+
var import_sdk_core9 = require("@usebridge/sdk-core");
|
|
1964
|
+
|
|
1965
|
+
// src/eligibility-input/use-eligibility-input-field.ts
|
|
1966
|
+
var import_react13 = require("react");
|
|
1967
|
+
var import_sdk_core8 = require("@usebridge/sdk-core");
|
|
1968
|
+
function useEligibilityInputField(field) {
|
|
1969
|
+
const input = useEligibilityInput();
|
|
1970
|
+
const inputField = input[field];
|
|
1971
|
+
const { requirePatient } = input;
|
|
1972
|
+
const { value, set } = inputField;
|
|
1973
|
+
const hardEligibilityContext = (0, import_react13.useContext)(HardEligibilityContext);
|
|
1974
|
+
let isDisabled = false;
|
|
1975
|
+
const [forceMemberId, setForceMemberId] = (0, import_react13.useState)(false);
|
|
1976
|
+
const errorForceMemberId = hardEligibilityContext?.state.error?.forceMemberId;
|
|
1977
|
+
(0, import_react13.useEffect)(() => {
|
|
1978
|
+
if (errorForceMemberId) setForceMemberId(true);
|
|
1979
|
+
}, [errorForceMemberId]);
|
|
1980
|
+
try {
|
|
1981
|
+
const { status } = useHardEligibilityState();
|
|
1982
|
+
isDisabled = !import_sdk_core8.HardEligibility.canSubmit(status);
|
|
1983
|
+
if (status === "WAITING_FOR_SERVICE_ELIGIBILITY") isDisabled = true;
|
|
1984
|
+
} catch (err) {
|
|
1985
|
+
}
|
|
1986
|
+
try {
|
|
1987
|
+
const { status } = useSoftEligibilityState();
|
|
1988
|
+
isDisabled = !import_sdk_core8.SoftEligibility.canSubmit(status);
|
|
1989
|
+
} catch (err) {
|
|
1990
|
+
}
|
|
1991
|
+
if (requirePatient && !hardEligibilityContext)
|
|
1992
|
+
throw new Error(`useEligibilityInputField("${field}") requires a HardEligibilityContext`);
|
|
1993
|
+
let isVisible, isRequired, isValid;
|
|
1994
|
+
switch (field) {
|
|
1995
|
+
case "payer":
|
|
1996
|
+
case "state":
|
|
1997
|
+
isVisible = true;
|
|
1998
|
+
isRequired = true;
|
|
1999
|
+
isValid = Boolean(input[field].value);
|
|
2000
|
+
break;
|
|
2001
|
+
case "firstName":
|
|
2002
|
+
isVisible = requirePatient;
|
|
2003
|
+
isRequired = requirePatient;
|
|
2004
|
+
isValid = Boolean(input.firstName.value.trim());
|
|
2005
|
+
break;
|
|
2006
|
+
case "lastName":
|
|
2007
|
+
isVisible = requirePatient;
|
|
2008
|
+
isRequired = requirePatient;
|
|
2009
|
+
isValid = Boolean(input.lastName.value.trim());
|
|
2010
|
+
break;
|
|
2011
|
+
case "dateOfBirth":
|
|
2012
|
+
isVisible = requirePatient;
|
|
2013
|
+
isRequired = requirePatient;
|
|
2014
|
+
isValid = Boolean(input.dateOfBirth.value);
|
|
2015
|
+
break;
|
|
2016
|
+
case "memberId": {
|
|
2017
|
+
const memberIdIsRequired = Boolean(
|
|
2018
|
+
// If we're forcing it permanently
|
|
2019
|
+
forceMemberId || // Required if we have a Payer selected that requires a Member ID, we need it
|
|
2020
|
+
requirePatient && input.payer.value?.memberId || // OR, if we have an error that's asking for us to force it
|
|
2021
|
+
hardEligibilityContext?.state.error?.forceMemberId
|
|
2022
|
+
);
|
|
2023
|
+
isVisible = memberIdIsRequired;
|
|
2024
|
+
isRequired = memberIdIsRequired;
|
|
2025
|
+
isValid = Boolean(input.memberId.value.trim()) || !memberIdIsRequired;
|
|
2026
|
+
break;
|
|
2027
|
+
}
|
|
2028
|
+
default:
|
|
2029
|
+
throw new Error(`Unknown field: ${field}`);
|
|
2030
|
+
}
|
|
2031
|
+
return (0, import_react13.useMemo)(
|
|
2032
|
+
() => ({
|
|
2033
|
+
value,
|
|
2034
|
+
setValue: set,
|
|
2035
|
+
isVisible,
|
|
2036
|
+
isValid,
|
|
2037
|
+
isRequired,
|
|
2038
|
+
isDisabled
|
|
2039
|
+
}),
|
|
2040
|
+
[value, set, isVisible, isValid, isRequired, isDisabled]
|
|
2041
|
+
);
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
// src/eligibility-input/use-eligibility-input-is-valid.ts
|
|
2045
|
+
function useEligibilityInputIsValid() {
|
|
2046
|
+
const fields = [
|
|
2047
|
+
useEligibilityInputField("payer"),
|
|
2048
|
+
useEligibilityInputField("state"),
|
|
2049
|
+
useEligibilityInputField("firstName"),
|
|
2050
|
+
useEligibilityInputField("lastName"),
|
|
2051
|
+
useEligibilityInputField("dateOfBirth"),
|
|
2052
|
+
useEligibilityInputField("memberId")
|
|
2053
|
+
];
|
|
2054
|
+
return fields.every(({ isVisible, isValid }) => !isVisible || isVisible && isValid);
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
// src/hard-eligibility/use-hard-eligibility-submit.ts
|
|
2058
|
+
function useHardEligibilitySubmit() {
|
|
2059
|
+
const session = useHardEligibilitySession();
|
|
2060
|
+
const { payer, state, firstName, lastName, memberId, dateOfBirth } = useEligibilityInput();
|
|
2061
|
+
const { isVisible: isMemberIdVisible, isRequired: isMemberIdRequired } = useEligibilityInputField("memberId");
|
|
2062
|
+
const { status } = useHardEligibilityState();
|
|
2063
|
+
const inputIsValid = useEligibilityInputIsValid();
|
|
2064
|
+
const isDisabled = !inputIsValid || !import_sdk_core9.HardEligibility.canSubmit(status);
|
|
2065
|
+
const submit = (0, import_react14.useCallback)(
|
|
2066
|
+
({ clinicalInfo } = {}) => {
|
|
2067
|
+
if (!payer.value) throw new Error("Payer is required");
|
|
2068
|
+
if (!state.value) throw new Error("State is required");
|
|
2069
|
+
if (!firstName.value) throw new Error("First name is required");
|
|
2070
|
+
if (!lastName.value) throw new Error("Last name is required");
|
|
2071
|
+
if (!dateOfBirth.value) throw new Error("Date of birth is required");
|
|
2072
|
+
if (isMemberIdRequired && !memberId.value) throw new Error("Member ID is required");
|
|
2073
|
+
return session.submit({
|
|
2074
|
+
payerId: payer.value.id,
|
|
2075
|
+
state: state.value,
|
|
2076
|
+
firstName: firstName.value,
|
|
2077
|
+
lastName: lastName.value,
|
|
2078
|
+
memberId: isMemberIdVisible ? memberId.value : void 0,
|
|
2079
|
+
dateOfBirth: (0, import_sdk_core9.dateToDateObject)(dateOfBirth.value),
|
|
2080
|
+
clinicalInfo
|
|
2081
|
+
});
|
|
2082
|
+
},
|
|
2083
|
+
[session, payer, state, firstName, lastName, dateOfBirth, memberId]
|
|
2084
|
+
);
|
|
2085
|
+
return (0, import_react14.useMemo)(() => ({ isDisabled, submit }), [isDisabled, submit]);
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
// src/eligibility-input/eligibility-input-provider.tsx
|
|
2089
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
2090
|
+
var EligibilityInputProvider = ({ children }) => {
|
|
2091
|
+
const storeRef = (0, import_react15.useRef)(null);
|
|
2092
|
+
const softEligibilityContext = (0, import_react15.useContext)(SoftEligibilityContext);
|
|
2093
|
+
const hardEligibilityContext = (0, import_react15.useContext)(HardEligibilityContext);
|
|
2094
|
+
if (!storeRef.current) {
|
|
2095
|
+
let requirePatient;
|
|
2096
|
+
if (softEligibilityContext) requirePatient = false;
|
|
2097
|
+
else if (hardEligibilityContext) requirePatient = true;
|
|
2098
|
+
else throw new Error("Missing SoftEligibilityContext or HardEligibilityContext");
|
|
2099
|
+
storeRef.current = createEligibilityInputStore(requirePatient);
|
|
2100
|
+
}
|
|
2101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(EligibilityInputContext.Provider, { value: storeRef.current, children });
|
|
2102
|
+
};
|
|
2103
|
+
|
|
2104
|
+
// src/soft-eligibility/soft-eligibility-provider.tsx
|
|
2105
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
2106
|
+
var SoftEligibilityProvider = ({
|
|
2107
|
+
session,
|
|
2108
|
+
children
|
|
2109
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SoftEligibilityContext.Provider, { value: session, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(EligibilityInputProvider, { children }) });
|
|
2110
|
+
|
|
2111
|
+
// src/soft-eligibility/use-create-soft-eligibility-session.ts
|
|
2112
|
+
var import_react17 = require("react");
|
|
2113
|
+
function useCreateSoftEligibilitySession() {
|
|
2114
|
+
const bridgeSdk = useBridgeSdk();
|
|
2115
|
+
return (0, import_react17.useCallback)(
|
|
2116
|
+
(...args) => bridgeSdk.createSoftEligibilitySession(...args),
|
|
2117
|
+
[bridgeSdk]
|
|
2118
|
+
);
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
// src/soft-eligibility/use-soft-eligibility-state.ts
|
|
2122
|
+
var import_react19 = require("react");
|
|
2123
|
+
var import_sdk_core12 = require("@usebridge/sdk-core");
|
|
2124
|
+
|
|
2125
|
+
// src/soft-eligibility/use-soft-eligibility.ts
|
|
2126
|
+
var import_react18 = require("react");
|
|
2127
|
+
var import_sdk_core11 = require("@usebridge/sdk-core");
|
|
2128
|
+
function useSoftEligibilitySession() {
|
|
2129
|
+
const session = (0, import_react18.useContext)(SoftEligibilityContext);
|
|
2130
|
+
if (!session) throw new Error("useSoftEligibilitySession must be within a SoftEligibilityContext");
|
|
2131
|
+
return session;
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
// src/soft-eligibility/use-soft-eligibility-state.ts
|
|
2135
|
+
function useSoftEligibilityState() {
|
|
2136
|
+
const session = useSoftEligibilitySession();
|
|
2137
|
+
const [state, setState] = (0, import_react19.useState)(session.state);
|
|
2138
|
+
(0, import_react19.useEffect)(() => {
|
|
2139
|
+
session.on("update", setState);
|
|
2140
|
+
return () => {
|
|
2141
|
+
session.removeListener("update", setState);
|
|
2142
|
+
};
|
|
2143
|
+
}, [session]);
|
|
2144
|
+
return state;
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2147
|
+
// src/soft-eligibility/use-soft-eligibility-submit.ts
|
|
2148
|
+
var import_react20 = require("react");
|
|
2149
|
+
var import_sdk_core13 = require("@usebridge/sdk-core");
|
|
2150
|
+
function useSoftEligibilitySubmit() {
|
|
2151
|
+
const session = useSoftEligibilitySession();
|
|
2152
|
+
const { payer, state } = useEligibilityInput();
|
|
2153
|
+
const { status } = useSoftEligibilityState();
|
|
2154
|
+
const inputIsValid = useEligibilityInputIsValid();
|
|
2155
|
+
const isDisabled = !inputIsValid || !import_sdk_core13.SoftEligibility.canSubmit(status);
|
|
2156
|
+
const submit = (0, import_react20.useCallback)(() => {
|
|
2157
|
+
if (!payer.value) throw new Error("Payer is required");
|
|
2158
|
+
if (!state.value) throw new Error("State is required");
|
|
2159
|
+
return session.submit({ payerId: payer.value.id, state: state.value });
|
|
2160
|
+
}, [session, payer, state]);
|
|
2161
|
+
return (0, import_react20.useMemo)(
|
|
2162
|
+
() => ({
|
|
2163
|
+
isDisabled,
|
|
2164
|
+
submit
|
|
2165
|
+
}),
|
|
2166
|
+
[isDisabled, submit]
|
|
2167
|
+
);
|
|
2168
|
+
}
|
|
2169
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
2170
|
+
0 && (module.exports = {
|
|
2171
|
+
BridgeSdkProvider,
|
|
2172
|
+
EligibilityInputContext,
|
|
2173
|
+
HardEligibilityContext,
|
|
2174
|
+
HardEligibilityProvider,
|
|
2175
|
+
SoftEligibilityProvider,
|
|
2176
|
+
useBridgeSdk,
|
|
2177
|
+
useCreateHardEligibilitySession,
|
|
2178
|
+
useCreateSoftEligibilitySession,
|
|
2179
|
+
useEligibilityInputField,
|
|
2180
|
+
useEligibilityInputIsValid,
|
|
2181
|
+
useHardEligibilityState,
|
|
2182
|
+
useHardEligibilitySubmit,
|
|
2183
|
+
usePayerAutocomplete,
|
|
2184
|
+
usePayerSearch,
|
|
2185
|
+
useSoftEligibilityState,
|
|
2186
|
+
useSoftEligibilitySubmit
|
|
2187
|
+
});
|
|
2188
|
+
/*! Bundled license information:
|
|
2189
|
+
|
|
2190
|
+
lodash-es/lodash.js:
|
|
2191
|
+
(**
|
|
2192
|
+
* @license
|
|
2193
|
+
* Lodash (Custom Build) <https://lodash.com/>
|
|
2194
|
+
* Build: `lodash modularize exports="es" -o ./`
|
|
2195
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
2196
|
+
* Released under MIT license <https://lodash.com/license>
|
|
2197
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
2198
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
2199
|
+
*)
|
|
2200
|
+
*/
|
|
2201
|
+
//# sourceMappingURL=index.cjs.map
|