@feedmepos/mf-hrm-portal 2.3.0-dev → 2.3.0-dev.2
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/{ApprovalCodeList-cG0zmQVJ.js → ApprovalCodeList-CJaNPHZC.js} +2 -2
- package/dist/{AuditLogList-BTifJhO1.js → AuditLogList-CHA98ZqW.js} +3 -3
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-qr5TwLTK.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C7rvthEI.js} +2 -2
- package/dist/{EmployeeList-DzcMtxJ3.js → EmployeeList-CVmMKt71.js} +4 -4
- package/dist/{GrantUserList-D5b7tJ8Y.js → GrantUserList-MYjgt5-F.js} +3 -3
- package/dist/{Main-DkLBemi7.js → Main-BgB9lD4K.js} +9 -9
- package/dist/{Main-DFwdAWqn.js → Main-C0cnqQ3B.js} +5 -5
- package/dist/{Main-B2r59IOW.js → Main-hlcHtrsc.js} +2 -2
- package/dist/{PermissionSetList-B80hrfMW.js → PermissionSetList-5f1WIaVa.js} +5 -5
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DjNcJQM9.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CFoTAGIX.js} +823 -823
- package/dist/{RoleList-DHO4JRKF.js → RoleList-DNR4miXr.js} +7 -7
- package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-B4VUyKW3.js +470 -0
- package/dist/{ScheduleGeneralPage-WlBM8bxV.js → ScheduleGeneralPage-Cd5AlY4z.js} +273 -236
- package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-Cf0l2MRg.js +2188 -0
- package/dist/SchedulePage-C8m0-m3l.js +18257 -0
- package/dist/{SchedulePositionPage-C0hrO11d.js → SchedulePositionPage-DyRckyUx.js} +67 -66
- package/dist/{TeamMemberList-CgFWLRBM.js → TeamMemberList-mw5OveZG.js} +6 -6
- package/dist/{TimesheetList-Dp40G-0I.js → TimesheetList-BzXarZbM.js} +5 -5
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-BFjrMhUG.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-Dq5i4poN.js} +2 -2
- package/dist/{app-CmBSTvaI.js → app-DSsdRLHg.js} +657 -577
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-CfL2DQ3d.js → dayjs.min-B6xBXQtU.js} +1 -1
- package/dist/{employee-DQcHjoij.js → employee-hMhzuqk1.js} +28 -27
- package/dist/{iteration-BlavheWG.js → iteration-B34AvpNC.js} +1 -1
- package/dist/{lodash-QerqayrJ.js → lodash-1Vyuy7Mu.js} +1 -1
- package/dist/{role-RM2YLO7n.js → role-DKOrgO6f.js} +1 -1
- package/dist/{rule-DjlvYIuP.js → rule-CBzQ3GeV.js} +2 -2
- package/dist/src/api/schedule/index.d.ts +5 -1
- package/dist/src/components/layout/withScheduleShell.d.ts +10 -0
- package/dist/src/types/employee.d.ts +1 -0
- package/dist/src/types/schedule.d.ts +1 -1
- package/dist/src/views/scheduling/components/ScheduleBoardAreaRows.vue.d.ts +28 -0
- package/dist/src/views/scheduling/components/ScheduleBoardEditOverlays.vue.d.ts +19 -0
- package/dist/src/views/scheduling/components/ScheduleBoardEmployeeRows.vue.d.ts +38 -0
- package/dist/src/views/scheduling/components/ScheduleBoardGridHeader.vue.d.ts +24 -0
- package/dist/src/views/scheduling/components/ScheduleBoardInteractionOverlays.vue.d.ts +38 -0
- package/dist/src/views/scheduling/components/ScheduleBoardOnboardingOverlays.vue.d.ts +25 -0
- package/dist/src/views/scheduling/components/ScheduleBoardRails.vue.d.ts +17 -0
- package/dist/src/views/scheduling/components/ScheduleBoardToolbar.vue.d.ts +39 -0
- package/dist/src/views/scheduling/components/ScheduleBoardUtilityOverlays.vue.d.ts +22 -0
- package/dist/src/views/scheduling/components/{ScheduleOnboardingComplete.vue.d.ts → ScheduleCompletionDialog.vue.d.ts} +8 -3
- package/dist/src/views/scheduling/components/{ScheduleOpenShiftCardMenu.vue.d.ts → ScheduleContextMenu.vue.d.ts} +10 -3
- package/dist/src/views/scheduling/components/{SchedulePdfPreview.vue.d.ts → ScheduleExportPreview.vue.d.ts} +1 -0
- package/dist/src/views/scheduling/components/ScheduleLoadState.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleModal.vue.d.ts +26 -0
- package/dist/src/views/scheduling/components/{ScheduleTourAllSet.vue.d.ts → ScheduleOnboardingClosedDayConfirm.vue.d.ts} +2 -2
- package/dist/src/views/scheduling/components/{ScheduleEmployeeMenu.vue.d.ts → ScheduleOnboardingDemandDays.vue.d.ts} +2 -2
- package/dist/src/views/scheduling/components/{ScheduleExportDoneDialog.vue.d.ts → ScheduleOnboardingDemandFooter.vue.d.ts} +2 -2
- package/dist/src/views/scheduling/components/ScheduleOnboardingDemandHeader.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingHoursProfileNotice.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingPositions.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingReview.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingWizardFooter.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingWizardHeader.vue.d.ts +11 -0
- package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +7 -1
- package/dist/src/views/scheduling/components/ScheduleSetupBanner.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +2 -2
- package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +4 -4
- package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +2 -2
- package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +3 -3
- package/dist/src/views/scheduling/composables/onboarding-types.d.ts +1 -1
- package/dist/src/views/scheduling/composables/remyPrompt.d.ts +13 -0
- package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +1 -1
- package/dist/src/views/scheduling/composables/schedule-breaks.d.ts +7 -1
- package/dist/src/views/scheduling/composables/schedule-calendar.d.ts +7 -0
- package/dist/src/views/scheduling/composables/schedule-cost.d.ts +19 -0
- package/dist/src/views/scheduling/composables/schedule-demand-domain.d.ts +11 -0
- package/dist/src/views/scheduling/composables/schedule-export-matrix.d.ts +14 -0
- package/dist/src/views/scheduling/composables/schedule-time.d.ts +8 -0
- package/dist/src/views/scheduling/composables/schedule-week-cache.d.ts +1 -4
- package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +10 -0
- package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +14 -13
- package/dist/src/views/scheduling/composables/useScheduleAssign.d.ts +3 -1
- package/dist/src/views/scheduling/composables/useScheduleAssignmentMutations.d.ts +13 -0
- package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +18 -2
- package/dist/src/views/scheduling/composables/useScheduleCloneOutletModal.d.ts +3 -1
- package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +6 -1
- package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +4 -19
- package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +13 -2
- package/dist/src/views/scheduling/composables/useScheduleEmployeeAccess.d.ts +11 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeAvailability.d.ts +13 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeCandidates.d.ts +26 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeCompensation.d.ts +7 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeForm.d.ts +22 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +9 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +6 -3
- package/dist/src/views/scheduling/composables/useScheduleEmployeePersistence.d.ts +25 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeValidation.d.ts +18 -0
- package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +19 -11
- package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +3 -6
- package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +58 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingDemand.d.ts +45 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +187 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingHours.d.ts +15 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingNavigation.d.ts +11 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +64 -487
- package/dist/src/views/scheduling/composables/useSchedulePageActions.d.ts +18 -0
- package/dist/src/views/scheduling/composables/useSchedulePageCellActions.d.ts +21 -0
- package/dist/src/views/scheduling/composables/useSchedulePageCellDrop.d.ts +18 -0
- package/dist/src/views/scheduling/composables/useSchedulePageEmployeeActions.d.ts +22 -0
- package/dist/src/views/scheduling/composables/useSchedulePageOverlays.d.ts +10 -3
- package/dist/src/views/scheduling/composables/useSchedulePdfExport.d.ts +19 -0
- package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +3 -1
- package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +3 -1
- package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +7 -1
- package/dist/src/views/scheduling/composables/useSchedulePublishPersistence.d.ts +11 -0
- package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +6 -0
- package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +2 -24
- package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +6 -1
- package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +62 -0
- package/dist/src/views/scheduling/composables/useScheduleShiftPersistence.d.ts +17 -0
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +10 -5
- package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +4 -1
- package/dist/src/views/scheduling/composables/useScheduleTour.d.ts +6 -4
- package/dist/src/views/scheduling/country-rules/index.d.ts +24 -0
- package/dist/src/views/scheduling/data.d.ts +11 -6
- package/dist/src/views/scheduling/locales/index.d.ts +80 -0
- package/dist/src/views/scheduling/schedule-constants.d.ts +7 -0
- package/dist/src/views/scheduling/schedule-state.d.ts +32 -8
- package/dist/src/views/scheduling/schedule-store.d.ts +4 -1
- package/dist/src/views/scheduling/types.d.ts +5 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useReportPermissions-Bl6Br79r.js → useReportPermissions-B2ev0j4w.js} +3 -3
- package/package.json +2 -1
- package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-B-XtB64L.js +0 -452
- package/dist/SchedulePage-Nm0krGVU.js +0 -17056
- package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-DTDXir_7.js +0 -1150
- package/dist/src/components/layout/AppSidebar.vue.d.ts +0 -2
- package/dist/src/components/layout/withShell.d.ts +0 -14
- package/dist/src/views/scheduling/components/ScheduleShiftCardMenu.vue.d.ts +0 -12
- package/dist/src/views/scheduling/composables/useScheduleStaffRail.d.ts +0 -17
- package/dist/src/views/scheduling/composables/useScheduleTopbar.d.ts +0 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var La = Object.defineProperty;
|
|
2
2
|
var Ka = (e, t, s) => t in e ? La(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
3
|
var Yt = (e, t, s) => Ka(e, typeof t != "symbol" ? t + "" : t, s);
|
|
4
|
-
import { isRef as Ja, ref as Ue, shallowRef as _a, watchEffect as hn, computed as Is, h as Rt, defineComponent as at, createBlock as $t, renderSlot as
|
|
4
|
+
import { isRef as Ja, ref as Ue, shallowRef as _a, watchEffect as hn, computed as Is, h as Rt, defineComponent as at, createBlock as $t, renderSlot as Ts, createCommentVNode as $a, unref as $e, openBlock as rt, createElementBlock as qs, createElementVNode as Xe, toDisplayString as sn, watch as er, nextTick as fn, onMounted as yn, onBeforeUnmount as tr, normalizeStyle as sr, resolveComponent as Ns, withCtx as nr, createVNode as ar, defineAsyncComponent as rr, readonly as Ds } from "vue";
|
|
5
5
|
import { useBreakpoints as or } from "@feedmepos/ui-library";
|
|
6
6
|
import { useRoute as ir, useRouter as lr } from "vue-router";
|
|
7
7
|
import { useCoreStore as bn, useI18n as vn } from "@feedmepos/mf-common";
|
|
@@ -77,7 +77,7 @@ const x = U.arrayToEnum([
|
|
|
77
77
|
"never",
|
|
78
78
|
"map",
|
|
79
79
|
"set"
|
|
80
|
-
]),
|
|
80
|
+
]), Qe = (e) => {
|
|
81
81
|
switch (typeof e) {
|
|
82
82
|
case "undefined":
|
|
83
83
|
return x.undefined;
|
|
@@ -153,7 +153,7 @@ class Ie extends Error {
|
|
|
153
153
|
return this.message;
|
|
154
154
|
}
|
|
155
155
|
get message() {
|
|
156
|
-
return JSON.stringify(this.issues,
|
|
156
|
+
return JSON.stringify(this.issues, Xs, 2);
|
|
157
157
|
}
|
|
158
158
|
get isEmpty() {
|
|
159
159
|
return this.issues.length === 0;
|
|
@@ -176,7 +176,7 @@ const jt = (e, t) => {
|
|
|
176
176
|
e.received === x.undefined ? s = "Required" : s = `Expected ${e.expected}, received ${e.received}`;
|
|
177
177
|
break;
|
|
178
178
|
case M.invalid_literal:
|
|
179
|
-
s = `Invalid literal value, expected ${JSON.stringify(e.expected,
|
|
179
|
+
s = `Invalid literal value, expected ${JSON.stringify(e.expected, Xs)}`;
|
|
180
180
|
break;
|
|
181
181
|
case M.unrecognized_keys:
|
|
182
182
|
s = `Unrecognized key(s) in object: ${U.joinValues(e.keys, ", ")}`;
|
|
@@ -243,7 +243,7 @@ const It = (e) => {
|
|
|
243
243
|
path: r,
|
|
244
244
|
message: a.message || c
|
|
245
245
|
};
|
|
246
|
-
},
|
|
246
|
+
}, mr = [];
|
|
247
247
|
function P(e, t) {
|
|
248
248
|
const s = It({
|
|
249
249
|
issueData: t,
|
|
@@ -299,11 +299,11 @@ class le {
|
|
|
299
299
|
}
|
|
300
300
|
const I = Object.freeze({
|
|
301
301
|
status: "aborted"
|
|
302
|
-
}),
|
|
303
|
-
var
|
|
302
|
+
}), Ar = (e) => ({ status: "dirty", value: e }), ce = (e) => ({ status: "valid", value: e }), js = (e) => e.status === "aborted", Es = (e) => e.status === "dirty", Tt = (e) => e.status === "valid", Ps = (e) => typeof Promise !== void 0 && e instanceof Promise, Xs = (e, t) => typeof t == "bigint" ? t.toString() : t;
|
|
303
|
+
var Q;
|
|
304
304
|
(function(e) {
|
|
305
305
|
e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t == null ? void 0 : t.message;
|
|
306
|
-
})(
|
|
306
|
+
})(Q || (Q = {}));
|
|
307
307
|
class Ye {
|
|
308
308
|
constructor(t, s, n, a) {
|
|
309
309
|
this.parent = t, this.data = s, this._path = n, this._key = a;
|
|
@@ -313,13 +313,13 @@ class Ye {
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
const nn = (e, t) => {
|
|
316
|
-
if (
|
|
316
|
+
if (Tt(t))
|
|
317
317
|
return { success: !0, data: t.value };
|
|
318
318
|
if (!e.common.issues.length)
|
|
319
319
|
throw new Error("Validation failed but no issues detected.");
|
|
320
320
|
return { success: !1, error: new Ie(e.common.issues) };
|
|
321
321
|
};
|
|
322
|
-
function
|
|
322
|
+
function N(e) {
|
|
323
323
|
if (!e)
|
|
324
324
|
return {};
|
|
325
325
|
const { errorMap: t, invalid_type_error: s, required_error: n, description: a } = e;
|
|
@@ -327,7 +327,7 @@ function X(e) {
|
|
|
327
327
|
throw new Error(`Can't use "invalid" or "required" in conjunction with custom error map.`);
|
|
328
328
|
return t ? { errorMap: t, description: a } : { errorMap: (l, c) => l.code !== "invalid_type" ? { message: c.defaultError } : typeof c.data > "u" ? { message: n ?? c.defaultError } : { message: s ?? c.defaultError }, description: a };
|
|
329
329
|
}
|
|
330
|
-
class
|
|
330
|
+
class q {
|
|
331
331
|
constructor(t) {
|
|
332
332
|
this.spa = this.safeParseAsync, this.superRefine = this._refinement, this._def = t, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.default = this.default.bind(this), this.describe = this.describe.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this);
|
|
333
333
|
}
|
|
@@ -335,13 +335,13 @@ class T {
|
|
|
335
335
|
return this._def.description;
|
|
336
336
|
}
|
|
337
337
|
_getType(t) {
|
|
338
|
-
return
|
|
338
|
+
return Qe(t.data);
|
|
339
339
|
}
|
|
340
340
|
_getOrReturnCtx(t, s) {
|
|
341
341
|
return s || {
|
|
342
342
|
common: t.parent.common,
|
|
343
343
|
data: t.data,
|
|
344
|
-
parsedType:
|
|
344
|
+
parsedType: Qe(t.data),
|
|
345
345
|
schemaErrorMap: this._def.errorMap,
|
|
346
346
|
path: t.path,
|
|
347
347
|
parent: t.parent
|
|
@@ -353,7 +353,7 @@ class T {
|
|
|
353
353
|
ctx: {
|
|
354
354
|
common: t.parent.common,
|
|
355
355
|
data: t.data,
|
|
356
|
-
parsedType:
|
|
356
|
+
parsedType: Qe(t.data),
|
|
357
357
|
schemaErrorMap: this._def.errorMap,
|
|
358
358
|
path: t.path,
|
|
359
359
|
parent: t.parent
|
|
@@ -388,7 +388,7 @@ class T {
|
|
|
388
388
|
schemaErrorMap: this._def.errorMap,
|
|
389
389
|
parent: null,
|
|
390
390
|
data: t,
|
|
391
|
-
parsedType:
|
|
391
|
+
parsedType: Qe(t)
|
|
392
392
|
}, r = this._parseSync({ data: t, path: a.path, parent: a });
|
|
393
393
|
return nn(a, r);
|
|
394
394
|
}
|
|
@@ -409,7 +409,7 @@ class T {
|
|
|
409
409
|
schemaErrorMap: this._def.errorMap,
|
|
410
410
|
parent: null,
|
|
411
411
|
data: t,
|
|
412
|
-
parsedType:
|
|
412
|
+
parsedType: Qe(t)
|
|
413
413
|
}, a = this._parse({ data: t, path: [], parent: n }), r = await (Ps(a) ? a : Promise.resolve(a));
|
|
414
414
|
return nn(n, r);
|
|
415
415
|
}
|
|
@@ -463,7 +463,7 @@ class T {
|
|
|
463
463
|
}
|
|
464
464
|
default(t) {
|
|
465
465
|
const s = typeof t == "function" ? t : () => t;
|
|
466
|
-
return new
|
|
466
|
+
return new Qs({
|
|
467
467
|
innerType: this,
|
|
468
468
|
defaultValue: s,
|
|
469
469
|
typeName: H.ZodDefault
|
|
@@ -484,13 +484,13 @@ class T {
|
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
const gr = /^c[^\s-]{8,}$/i, pr = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i, hr = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
|
|
487
|
-
class ze extends
|
|
487
|
+
class ze extends q {
|
|
488
488
|
constructor() {
|
|
489
489
|
super(...arguments), this._regex = (t, s, n) => this.refinement((a) => t.test(a), {
|
|
490
490
|
validation: s,
|
|
491
491
|
code: M.invalid_string,
|
|
492
|
-
...
|
|
493
|
-
}), this.nonempty = (t) => this.min(1,
|
|
492
|
+
...Q.errToObj(n)
|
|
493
|
+
}), this.nonempty = (t) => this.min(1, Q.errToObj(t)), this.trim = () => new ze({
|
|
494
494
|
...this._def,
|
|
495
495
|
checks: [...this._def.checks, { kind: "trim" }]
|
|
496
496
|
});
|
|
@@ -577,50 +577,50 @@ class ze extends T {
|
|
|
577
577
|
});
|
|
578
578
|
}
|
|
579
579
|
email(t) {
|
|
580
|
-
return this._addCheck({ kind: "email", ...
|
|
580
|
+
return this._addCheck({ kind: "email", ...Q.errToObj(t) });
|
|
581
581
|
}
|
|
582
582
|
url(t) {
|
|
583
|
-
return this._addCheck({ kind: "url", ...
|
|
583
|
+
return this._addCheck({ kind: "url", ...Q.errToObj(t) });
|
|
584
584
|
}
|
|
585
585
|
uuid(t) {
|
|
586
|
-
return this._addCheck({ kind: "uuid", ...
|
|
586
|
+
return this._addCheck({ kind: "uuid", ...Q.errToObj(t) });
|
|
587
587
|
}
|
|
588
588
|
cuid(t) {
|
|
589
|
-
return this._addCheck({ kind: "cuid", ...
|
|
589
|
+
return this._addCheck({ kind: "cuid", ...Q.errToObj(t) });
|
|
590
590
|
}
|
|
591
591
|
regex(t, s) {
|
|
592
592
|
return this._addCheck({
|
|
593
593
|
kind: "regex",
|
|
594
594
|
regex: t,
|
|
595
|
-
...
|
|
595
|
+
...Q.errToObj(s)
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
598
|
startsWith(t, s) {
|
|
599
599
|
return this._addCheck({
|
|
600
600
|
kind: "startsWith",
|
|
601
601
|
value: t,
|
|
602
|
-
...
|
|
602
|
+
...Q.errToObj(s)
|
|
603
603
|
});
|
|
604
604
|
}
|
|
605
605
|
endsWith(t, s) {
|
|
606
606
|
return this._addCheck({
|
|
607
607
|
kind: "endsWith",
|
|
608
608
|
value: t,
|
|
609
|
-
...
|
|
609
|
+
...Q.errToObj(s)
|
|
610
610
|
});
|
|
611
611
|
}
|
|
612
612
|
min(t, s) {
|
|
613
613
|
return this._addCheck({
|
|
614
614
|
kind: "min",
|
|
615
615
|
value: t,
|
|
616
|
-
...
|
|
616
|
+
...Q.errToObj(s)
|
|
617
617
|
});
|
|
618
618
|
}
|
|
619
619
|
max(t, s) {
|
|
620
620
|
return this._addCheck({
|
|
621
621
|
kind: "max",
|
|
622
622
|
value: t,
|
|
623
|
-
...
|
|
623
|
+
...Q.errToObj(s)
|
|
624
624
|
});
|
|
625
625
|
}
|
|
626
626
|
length(t, s) {
|
|
@@ -654,13 +654,13 @@ class ze extends T {
|
|
|
654
654
|
ze.create = (e) => new ze({
|
|
655
655
|
checks: [],
|
|
656
656
|
typeName: H.ZodString,
|
|
657
|
-
...
|
|
657
|
+
...N(e)
|
|
658
658
|
});
|
|
659
659
|
function fr(e, t) {
|
|
660
660
|
const s = (e.toString().split(".")[1] || "").length, n = (t.toString().split(".")[1] || "").length, a = s > n ? s : n, r = parseInt(e.toFixed(a).replace(".", "")), l = parseInt(t.toFixed(a).replace(".", ""));
|
|
661
661
|
return r % l / Math.pow(10, a);
|
|
662
662
|
}
|
|
663
|
-
class et extends
|
|
663
|
+
class et extends q {
|
|
664
664
|
constructor() {
|
|
665
665
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
666
666
|
}
|
|
@@ -701,16 +701,16 @@ class et extends T {
|
|
|
701
701
|
return { status: a.value, value: t.data };
|
|
702
702
|
}
|
|
703
703
|
gte(t, s) {
|
|
704
|
-
return this.setLimit("min", t, !0,
|
|
704
|
+
return this.setLimit("min", t, !0, Q.toString(s));
|
|
705
705
|
}
|
|
706
706
|
gt(t, s) {
|
|
707
|
-
return this.setLimit("min", t, !1,
|
|
707
|
+
return this.setLimit("min", t, !1, Q.toString(s));
|
|
708
708
|
}
|
|
709
709
|
lte(t, s) {
|
|
710
|
-
return this.setLimit("max", t, !0,
|
|
710
|
+
return this.setLimit("max", t, !0, Q.toString(s));
|
|
711
711
|
}
|
|
712
712
|
lt(t, s) {
|
|
713
|
-
return this.setLimit("max", t, !1,
|
|
713
|
+
return this.setLimit("max", t, !1, Q.toString(s));
|
|
714
714
|
}
|
|
715
715
|
setLimit(t, s, n, a) {
|
|
716
716
|
return new et({
|
|
@@ -721,7 +721,7 @@ class et extends T {
|
|
|
721
721
|
kind: t,
|
|
722
722
|
value: s,
|
|
723
723
|
inclusive: n,
|
|
724
|
-
message:
|
|
724
|
+
message: Q.toString(a)
|
|
725
725
|
}
|
|
726
726
|
]
|
|
727
727
|
});
|
|
@@ -735,7 +735,7 @@ class et extends T {
|
|
|
735
735
|
int(t) {
|
|
736
736
|
return this._addCheck({
|
|
737
737
|
kind: "int",
|
|
738
|
-
message:
|
|
738
|
+
message: Q.toString(t)
|
|
739
739
|
});
|
|
740
740
|
}
|
|
741
741
|
positive(t) {
|
|
@@ -743,7 +743,7 @@ class et extends T {
|
|
|
743
743
|
kind: "min",
|
|
744
744
|
value: 0,
|
|
745
745
|
inclusive: !1,
|
|
746
|
-
message:
|
|
746
|
+
message: Q.toString(t)
|
|
747
747
|
});
|
|
748
748
|
}
|
|
749
749
|
negative(t) {
|
|
@@ -751,7 +751,7 @@ class et extends T {
|
|
|
751
751
|
kind: "max",
|
|
752
752
|
value: 0,
|
|
753
753
|
inclusive: !1,
|
|
754
|
-
message:
|
|
754
|
+
message: Q.toString(t)
|
|
755
755
|
});
|
|
756
756
|
}
|
|
757
757
|
nonpositive(t) {
|
|
@@ -759,7 +759,7 @@ class et extends T {
|
|
|
759
759
|
kind: "max",
|
|
760
760
|
value: 0,
|
|
761
761
|
inclusive: !0,
|
|
762
|
-
message:
|
|
762
|
+
message: Q.toString(t)
|
|
763
763
|
});
|
|
764
764
|
}
|
|
765
765
|
nonnegative(t) {
|
|
@@ -767,14 +767,14 @@ class et extends T {
|
|
|
767
767
|
kind: "min",
|
|
768
768
|
value: 0,
|
|
769
769
|
inclusive: !0,
|
|
770
|
-
message:
|
|
770
|
+
message: Q.toString(t)
|
|
771
771
|
});
|
|
772
772
|
}
|
|
773
773
|
multipleOf(t, s) {
|
|
774
774
|
return this._addCheck({
|
|
775
775
|
kind: "multipleOf",
|
|
776
776
|
value: t,
|
|
777
|
-
message:
|
|
777
|
+
message: Q.toString(s)
|
|
778
778
|
});
|
|
779
779
|
}
|
|
780
780
|
get minValue() {
|
|
@@ -796,9 +796,9 @@ class et extends T {
|
|
|
796
796
|
et.create = (e) => new et({
|
|
797
797
|
checks: [],
|
|
798
798
|
typeName: H.ZodNumber,
|
|
799
|
-
...
|
|
799
|
+
...N(e)
|
|
800
800
|
});
|
|
801
|
-
class
|
|
801
|
+
class qt extends q {
|
|
802
802
|
_parse(t) {
|
|
803
803
|
if (this._getType(t) !== x.bigint) {
|
|
804
804
|
const n = this._getOrReturnCtx(t);
|
|
@@ -811,11 +811,11 @@ class Tt extends T {
|
|
|
811
811
|
return ce(t.data);
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
|
-
|
|
814
|
+
qt.create = (e) => new qt({
|
|
815
815
|
typeName: H.ZodBigInt,
|
|
816
|
-
...
|
|
816
|
+
...N(e)
|
|
817
817
|
});
|
|
818
|
-
class
|
|
818
|
+
class Nt extends q {
|
|
819
819
|
_parse(t) {
|
|
820
820
|
if (this._getType(t) !== x.boolean) {
|
|
821
821
|
const n = this._getOrReturnCtx(t);
|
|
@@ -828,11 +828,11 @@ class Xt extends T {
|
|
|
828
828
|
return ce(t.data);
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
|
-
|
|
831
|
+
Nt.create = (e) => new Nt({
|
|
832
832
|
typeName: H.ZodBoolean,
|
|
833
|
-
...
|
|
833
|
+
...N(e)
|
|
834
834
|
});
|
|
835
|
-
class
|
|
835
|
+
class At extends q {
|
|
836
836
|
_parse(t) {
|
|
837
837
|
if (this._getType(t) !== x.date) {
|
|
838
838
|
const r = this._getOrReturnCtx(t);
|
|
@@ -870,7 +870,7 @@ class mt extends T {
|
|
|
870
870
|
};
|
|
871
871
|
}
|
|
872
872
|
_addCheck(t) {
|
|
873
|
-
return new
|
|
873
|
+
return new At({
|
|
874
874
|
...this._def,
|
|
875
875
|
checks: [...this._def.checks, t]
|
|
876
876
|
});
|
|
@@ -879,14 +879,14 @@ class mt extends T {
|
|
|
879
879
|
return this._addCheck({
|
|
880
880
|
kind: "min",
|
|
881
881
|
value: t.getTime(),
|
|
882
|
-
message:
|
|
882
|
+
message: Q.toString(s)
|
|
883
883
|
});
|
|
884
884
|
}
|
|
885
885
|
max(t, s) {
|
|
886
886
|
return this._addCheck({
|
|
887
887
|
kind: "max",
|
|
888
888
|
value: t.getTime(),
|
|
889
|
-
message:
|
|
889
|
+
message: Q.toString(s)
|
|
890
890
|
});
|
|
891
891
|
}
|
|
892
892
|
get minDate() {
|
|
@@ -902,12 +902,12 @@ class mt extends T {
|
|
|
902
902
|
return t != null ? new Date(t) : null;
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
|
-
|
|
905
|
+
At.create = (e) => new At({
|
|
906
906
|
checks: [],
|
|
907
907
|
typeName: H.ZodDate,
|
|
908
|
-
...
|
|
908
|
+
...N(e)
|
|
909
909
|
});
|
|
910
|
-
class
|
|
910
|
+
class Xt extends q {
|
|
911
911
|
_parse(t) {
|
|
912
912
|
if (this._getType(t) !== x.undefined) {
|
|
913
913
|
const n = this._getOrReturnCtx(t);
|
|
@@ -920,11 +920,11 @@ class Qt extends T {
|
|
|
920
920
|
return ce(t.data);
|
|
921
921
|
}
|
|
922
922
|
}
|
|
923
|
-
|
|
923
|
+
Xt.create = (e) => new Xt({
|
|
924
924
|
typeName: H.ZodUndefined,
|
|
925
|
-
...
|
|
925
|
+
...N(e)
|
|
926
926
|
});
|
|
927
|
-
class
|
|
927
|
+
class Qt extends q {
|
|
928
928
|
_parse(t) {
|
|
929
929
|
if (this._getType(t) !== x.null) {
|
|
930
930
|
const n = this._getOrReturnCtx(t);
|
|
@@ -937,11 +937,11 @@ class Nt extends T {
|
|
|
937
937
|
return ce(t.data);
|
|
938
938
|
}
|
|
939
939
|
}
|
|
940
|
-
|
|
940
|
+
Qt.create = (e) => new Qt({
|
|
941
941
|
typeName: H.ZodNull,
|
|
942
|
-
...
|
|
942
|
+
...N(e)
|
|
943
943
|
});
|
|
944
|
-
class gt extends
|
|
944
|
+
class gt extends q {
|
|
945
945
|
constructor() {
|
|
946
946
|
super(...arguments), this._any = !0;
|
|
947
947
|
}
|
|
@@ -951,9 +951,9 @@ class gt extends T {
|
|
|
951
951
|
}
|
|
952
952
|
gt.create = (e) => new gt({
|
|
953
953
|
typeName: H.ZodAny,
|
|
954
|
-
...
|
|
954
|
+
...N(e)
|
|
955
955
|
});
|
|
956
|
-
class Ze extends
|
|
956
|
+
class Ze extends q {
|
|
957
957
|
constructor() {
|
|
958
958
|
super(...arguments), this._unknown = !0;
|
|
959
959
|
}
|
|
@@ -963,9 +963,9 @@ class Ze extends T {
|
|
|
963
963
|
}
|
|
964
964
|
Ze.create = (e) => new Ze({
|
|
965
965
|
typeName: H.ZodUnknown,
|
|
966
|
-
...
|
|
966
|
+
...N(e)
|
|
967
967
|
});
|
|
968
|
-
class We extends
|
|
968
|
+
class We extends q {
|
|
969
969
|
_parse(t) {
|
|
970
970
|
const s = this._getOrReturnCtx(t);
|
|
971
971
|
return P(s, {
|
|
@@ -977,9 +977,9 @@ class We extends T {
|
|
|
977
977
|
}
|
|
978
978
|
We.create = (e) => new We({
|
|
979
979
|
typeName: H.ZodNever,
|
|
980
|
-
...
|
|
980
|
+
...N(e)
|
|
981
981
|
});
|
|
982
|
-
class Zt extends
|
|
982
|
+
class Zt extends q {
|
|
983
983
|
_parse(t) {
|
|
984
984
|
if (this._getType(t) !== x.undefined) {
|
|
985
985
|
const n = this._getOrReturnCtx(t);
|
|
@@ -994,9 +994,9 @@ class Zt extends T {
|
|
|
994
994
|
}
|
|
995
995
|
Zt.create = (e) => new Zt({
|
|
996
996
|
typeName: H.ZodVoid,
|
|
997
|
-
...
|
|
997
|
+
...N(e)
|
|
998
998
|
});
|
|
999
|
-
class Ve extends
|
|
999
|
+
class Ve extends q {
|
|
1000
1000
|
_parse(t) {
|
|
1001
1001
|
const { ctx: s, status: n } = this._processInputParams(t), a = this._def;
|
|
1002
1002
|
if (s.parsedType !== x.array)
|
|
@@ -1028,13 +1028,13 @@ class Ve extends T {
|
|
|
1028
1028
|
min(t, s) {
|
|
1029
1029
|
return new Ve({
|
|
1030
1030
|
...this._def,
|
|
1031
|
-
minLength: { value: t, message:
|
|
1031
|
+
minLength: { value: t, message: Q.toString(s) }
|
|
1032
1032
|
});
|
|
1033
1033
|
}
|
|
1034
1034
|
max(t, s) {
|
|
1035
1035
|
return new Ve({
|
|
1036
1036
|
...this._def,
|
|
1037
|
-
maxLength: { value: t, message:
|
|
1037
|
+
maxLength: { value: t, message: Q.toString(s) }
|
|
1038
1038
|
});
|
|
1039
1039
|
}
|
|
1040
1040
|
length(t, s) {
|
|
@@ -1049,7 +1049,7 @@ Ve.create = (e, t) => new Ve({
|
|
|
1049
1049
|
minLength: null,
|
|
1050
1050
|
maxLength: null,
|
|
1051
1051
|
typeName: H.ZodArray,
|
|
1052
|
-
...
|
|
1052
|
+
...N(t)
|
|
1053
1053
|
});
|
|
1054
1054
|
var Ut;
|
|
1055
1055
|
(function(e) {
|
|
@@ -1065,20 +1065,20 @@ const an = (e) => (t) => new ee({
|
|
|
1065
1065
|
...t
|
|
1066
1066
|
})
|
|
1067
1067
|
});
|
|
1068
|
-
function
|
|
1068
|
+
function mt(e) {
|
|
1069
1069
|
if (e instanceof ee) {
|
|
1070
1070
|
const t = {};
|
|
1071
1071
|
for (const s in e.shape) {
|
|
1072
1072
|
const n = e.shape[s];
|
|
1073
|
-
t[s] = Ge.create(
|
|
1073
|
+
t[s] = Ge.create(mt(n));
|
|
1074
1074
|
}
|
|
1075
1075
|
return new ee({
|
|
1076
1076
|
...e._def,
|
|
1077
1077
|
shape: () => t
|
|
1078
1078
|
});
|
|
1079
|
-
} else return e instanceof Ve ? Ve.create(
|
|
1079
|
+
} else return e instanceof Ve ? Ve.create(mt(e.element)) : e instanceof Ge ? Ge.create(mt(e.unwrap())) : e instanceof nt ? nt.create(mt(e.unwrap())) : e instanceof Fe ? Fe.create(e.items.map((t) => mt(t))) : e;
|
|
1080
1080
|
}
|
|
1081
|
-
class ee extends
|
|
1081
|
+
class ee extends q {
|
|
1082
1082
|
constructor() {
|
|
1083
1083
|
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = an(this._def), this.extend = an(this._def);
|
|
1084
1084
|
}
|
|
@@ -1154,7 +1154,7 @@ class ee extends T {
|
|
|
1154
1154
|
return this._def.shape();
|
|
1155
1155
|
}
|
|
1156
1156
|
strict(t) {
|
|
1157
|
-
return
|
|
1157
|
+
return Q.errToObj, new ee({
|
|
1158
1158
|
...this._def,
|
|
1159
1159
|
unknownKeys: "strict",
|
|
1160
1160
|
...t !== void 0 ? {
|
|
@@ -1162,7 +1162,7 @@ class ee extends T {
|
|
|
1162
1162
|
var a, r, l, c;
|
|
1163
1163
|
const h = (l = (r = (a = this._def).errorMap) === null || r === void 0 ? void 0 : r.call(a, s, n).message) !== null && l !== void 0 ? l : n.defaultError;
|
|
1164
1164
|
return s.code === "unrecognized_keys" ? {
|
|
1165
|
-
message: (c =
|
|
1165
|
+
message: (c = Q.errToObj(t).message) !== null && c !== void 0 ? c : h
|
|
1166
1166
|
} : {
|
|
1167
1167
|
message: h
|
|
1168
1168
|
};
|
|
@@ -1223,7 +1223,7 @@ class ee extends T {
|
|
|
1223
1223
|
});
|
|
1224
1224
|
}
|
|
1225
1225
|
deepPartial() {
|
|
1226
|
-
return
|
|
1226
|
+
return mt(this);
|
|
1227
1227
|
}
|
|
1228
1228
|
partial(t) {
|
|
1229
1229
|
const s = {};
|
|
@@ -1265,23 +1265,23 @@ ee.create = (e, t) => new ee({
|
|
|
1265
1265
|
unknownKeys: "strip",
|
|
1266
1266
|
catchall: We.create(),
|
|
1267
1267
|
typeName: H.ZodObject,
|
|
1268
|
-
...
|
|
1268
|
+
...N(t)
|
|
1269
1269
|
});
|
|
1270
1270
|
ee.strictCreate = (e, t) => new ee({
|
|
1271
1271
|
shape: () => e,
|
|
1272
1272
|
unknownKeys: "strict",
|
|
1273
1273
|
catchall: We.create(),
|
|
1274
1274
|
typeName: H.ZodObject,
|
|
1275
|
-
...
|
|
1275
|
+
...N(t)
|
|
1276
1276
|
});
|
|
1277
1277
|
ee.lazycreate = (e, t) => new ee({
|
|
1278
1278
|
shape: e,
|
|
1279
1279
|
unknownKeys: "strip",
|
|
1280
1280
|
catchall: We.create(),
|
|
1281
1281
|
typeName: H.ZodObject,
|
|
1282
|
-
...
|
|
1282
|
+
...N(t)
|
|
1283
1283
|
});
|
|
1284
|
-
class Et extends
|
|
1284
|
+
class Et extends q {
|
|
1285
1285
|
_parse(t) {
|
|
1286
1286
|
const { ctx: s } = this._processInputParams(t), n = this._def.options;
|
|
1287
1287
|
function a(r) {
|
|
@@ -1352,9 +1352,9 @@ class Et extends T {
|
|
|
1352
1352
|
Et.create = (e, t) => new Et({
|
|
1353
1353
|
options: e,
|
|
1354
1354
|
typeName: H.ZodUnion,
|
|
1355
|
-
...
|
|
1355
|
+
...N(t)
|
|
1356
1356
|
});
|
|
1357
|
-
class es extends
|
|
1357
|
+
class es extends q {
|
|
1358
1358
|
_parse(t) {
|
|
1359
1359
|
const { ctx: s } = this._processInputParams(t);
|
|
1360
1360
|
if (s.parsedType !== x.object)
|
|
@@ -1411,12 +1411,12 @@ class es extends T {
|
|
|
1411
1411
|
typeName: H.ZodDiscriminatedUnion,
|
|
1412
1412
|
discriminator: t,
|
|
1413
1413
|
options: a,
|
|
1414
|
-
...
|
|
1414
|
+
...N(n)
|
|
1415
1415
|
});
|
|
1416
1416
|
}
|
|
1417
1417
|
}
|
|
1418
1418
|
function Os(e, t) {
|
|
1419
|
-
const s =
|
|
1419
|
+
const s = Qe(e), n = Qe(t);
|
|
1420
1420
|
if (e === t)
|
|
1421
1421
|
return { valid: !0, data: e };
|
|
1422
1422
|
if (s === x.object && n === x.object) {
|
|
@@ -1441,7 +1441,7 @@ function Os(e, t) {
|
|
|
1441
1441
|
return { valid: !0, data: a };
|
|
1442
1442
|
} else return s === x.date && n === x.date && +e == +t ? { valid: !0, data: e } : { valid: !1 };
|
|
1443
1443
|
}
|
|
1444
|
-
class Pt extends
|
|
1444
|
+
class Pt extends q {
|
|
1445
1445
|
_parse(t) {
|
|
1446
1446
|
const { status: s, ctx: n } = this._processInputParams(t), a = (r, l) => {
|
|
1447
1447
|
if (js(r) || js(l))
|
|
@@ -1477,9 +1477,9 @@ Pt.create = (e, t, s) => new Pt({
|
|
|
1477
1477
|
left: e,
|
|
1478
1478
|
right: t,
|
|
1479
1479
|
typeName: H.ZodIntersection,
|
|
1480
|
-
...
|
|
1480
|
+
...N(s)
|
|
1481
1481
|
});
|
|
1482
|
-
class Fe extends
|
|
1482
|
+
class Fe extends q {
|
|
1483
1483
|
_parse(t) {
|
|
1484
1484
|
const { status: s, ctx: n } = this._processInputParams(t);
|
|
1485
1485
|
if (n.parsedType !== x.array)
|
|
@@ -1521,9 +1521,9 @@ Fe.create = (e, t) => new Fe({
|
|
|
1521
1521
|
items: e,
|
|
1522
1522
|
typeName: H.ZodTuple,
|
|
1523
1523
|
rest: null,
|
|
1524
|
-
...
|
|
1524
|
+
...N(t)
|
|
1525
1525
|
});
|
|
1526
|
-
class Ot extends
|
|
1526
|
+
class Ot extends q {
|
|
1527
1527
|
get keySchema() {
|
|
1528
1528
|
return this._def.keyType;
|
|
1529
1529
|
}
|
|
@@ -1550,20 +1550,20 @@ class Ot extends T {
|
|
|
1550
1550
|
return this._def.valueType;
|
|
1551
1551
|
}
|
|
1552
1552
|
static create(t, s, n) {
|
|
1553
|
-
return s instanceof
|
|
1553
|
+
return s instanceof q ? new Ot({
|
|
1554
1554
|
keyType: t,
|
|
1555
1555
|
valueType: s,
|
|
1556
1556
|
typeName: H.ZodRecord,
|
|
1557
|
-
...
|
|
1557
|
+
...N(n)
|
|
1558
1558
|
}) : new Ot({
|
|
1559
1559
|
keyType: ze.create(),
|
|
1560
1560
|
valueType: t,
|
|
1561
1561
|
typeName: H.ZodRecord,
|
|
1562
|
-
...
|
|
1562
|
+
...N(s)
|
|
1563
1563
|
});
|
|
1564
1564
|
}
|
|
1565
1565
|
}
|
|
1566
|
-
class zt extends
|
|
1566
|
+
class zt extends q {
|
|
1567
1567
|
_parse(t) {
|
|
1568
1568
|
const { status: s, ctx: n } = this._processInputParams(t);
|
|
1569
1569
|
if (n.parsedType !== x.map)
|
|
@@ -1603,9 +1603,9 @@ zt.create = (e, t, s) => new zt({
|
|
|
1603
1603
|
valueType: t,
|
|
1604
1604
|
keyType: e,
|
|
1605
1605
|
typeName: H.ZodMap,
|
|
1606
|
-
...
|
|
1606
|
+
...N(s)
|
|
1607
1607
|
});
|
|
1608
|
-
class tt extends
|
|
1608
|
+
class tt extends q {
|
|
1609
1609
|
_parse(t) {
|
|
1610
1610
|
const { status: s, ctx: n } = this._processInputParams(t);
|
|
1611
1611
|
if (n.parsedType !== x.set)
|
|
@@ -1644,13 +1644,13 @@ class tt extends T {
|
|
|
1644
1644
|
min(t, s) {
|
|
1645
1645
|
return new tt({
|
|
1646
1646
|
...this._def,
|
|
1647
|
-
minSize: { value: t, message:
|
|
1647
|
+
minSize: { value: t, message: Q.toString(s) }
|
|
1648
1648
|
});
|
|
1649
1649
|
}
|
|
1650
1650
|
max(t, s) {
|
|
1651
1651
|
return new tt({
|
|
1652
1652
|
...this._def,
|
|
1653
|
-
maxSize: { value: t, message:
|
|
1653
|
+
maxSize: { value: t, message: Q.toString(s) }
|
|
1654
1654
|
});
|
|
1655
1655
|
}
|
|
1656
1656
|
size(t, s) {
|
|
@@ -1665,9 +1665,9 @@ tt.create = (e, t) => new tt({
|
|
|
1665
1665
|
minSize: null,
|
|
1666
1666
|
maxSize: null,
|
|
1667
1667
|
typeName: H.ZodSet,
|
|
1668
|
-
...
|
|
1668
|
+
...N(t)
|
|
1669
1669
|
});
|
|
1670
|
-
class st extends
|
|
1670
|
+
class st extends q {
|
|
1671
1671
|
constructor() {
|
|
1672
1672
|
super(...arguments), this.validate = this.implement;
|
|
1673
1673
|
}
|
|
@@ -1758,9 +1758,9 @@ st.create = (e, t, s) => new st({
|
|
|
1758
1758
|
args: e ? e.rest(Ze.create()) : Fe.create([]).rest(Ze.create()),
|
|
1759
1759
|
returns: t || Ze.create(),
|
|
1760
1760
|
typeName: H.ZodFunction,
|
|
1761
|
-
...
|
|
1761
|
+
...N(s)
|
|
1762
1762
|
});
|
|
1763
|
-
class Wt extends
|
|
1763
|
+
class Wt extends q {
|
|
1764
1764
|
get schema() {
|
|
1765
1765
|
return this._def.getter();
|
|
1766
1766
|
}
|
|
@@ -1772,9 +1772,9 @@ class Wt extends T {
|
|
|
1772
1772
|
Wt.create = (e, t) => new Wt({
|
|
1773
1773
|
getter: e,
|
|
1774
1774
|
typeName: H.ZodLazy,
|
|
1775
|
-
...
|
|
1775
|
+
...N(t)
|
|
1776
1776
|
});
|
|
1777
|
-
class Lt extends
|
|
1777
|
+
class Lt extends q {
|
|
1778
1778
|
_parse(t) {
|
|
1779
1779
|
if (t.data !== this._def.value) {
|
|
1780
1780
|
const s = this._getOrReturnCtx(t);
|
|
@@ -1792,16 +1792,16 @@ class Lt extends T {
|
|
|
1792
1792
|
Lt.create = (e, t) => new Lt({
|
|
1793
1793
|
value: e,
|
|
1794
1794
|
typeName: H.ZodLiteral,
|
|
1795
|
-
...
|
|
1795
|
+
...N(t)
|
|
1796
1796
|
});
|
|
1797
1797
|
function Cn(e, t) {
|
|
1798
1798
|
return new ts({
|
|
1799
1799
|
values: e,
|
|
1800
1800
|
typeName: H.ZodEnum,
|
|
1801
|
-
...
|
|
1801
|
+
...N(t)
|
|
1802
1802
|
});
|
|
1803
1803
|
}
|
|
1804
|
-
class ts extends
|
|
1804
|
+
class ts extends q {
|
|
1805
1805
|
_parse(t) {
|
|
1806
1806
|
if (typeof t.data != "string") {
|
|
1807
1807
|
const s = this._getOrReturnCtx(t), n = this._def.values;
|
|
@@ -1844,7 +1844,7 @@ class ts extends T {
|
|
|
1844
1844
|
}
|
|
1845
1845
|
}
|
|
1846
1846
|
ts.create = Cn;
|
|
1847
|
-
class Kt extends
|
|
1847
|
+
class Kt extends q {
|
|
1848
1848
|
_parse(t) {
|
|
1849
1849
|
const s = U.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(t);
|
|
1850
1850
|
if (n.parsedType !== x.string && n.parsedType !== x.number) {
|
|
@@ -1872,9 +1872,9 @@ class Kt extends T {
|
|
|
1872
1872
|
Kt.create = (e, t) => new Kt({
|
|
1873
1873
|
values: e,
|
|
1874
1874
|
typeName: H.ZodNativeEnum,
|
|
1875
|
-
...
|
|
1875
|
+
...N(t)
|
|
1876
1876
|
});
|
|
1877
|
-
class pt extends
|
|
1877
|
+
class pt extends q {
|
|
1878
1878
|
_parse(t) {
|
|
1879
1879
|
const { ctx: s } = this._processInputParams(t);
|
|
1880
1880
|
if (s.parsedType !== x.promise && s.common.async === !1)
|
|
@@ -1893,9 +1893,9 @@ class pt extends T {
|
|
|
1893
1893
|
pt.create = (e, t) => new pt({
|
|
1894
1894
|
type: e,
|
|
1895
1895
|
typeName: H.ZodPromise,
|
|
1896
|
-
...
|
|
1896
|
+
...N(t)
|
|
1897
1897
|
});
|
|
1898
|
-
class Se extends
|
|
1898
|
+
class Se extends q {
|
|
1899
1899
|
innerType() {
|
|
1900
1900
|
return this._def.schema;
|
|
1901
1901
|
}
|
|
@@ -1947,14 +1947,14 @@ class Se extends T {
|
|
|
1947
1947
|
path: n.path,
|
|
1948
1948
|
parent: n
|
|
1949
1949
|
});
|
|
1950
|
-
if (!
|
|
1950
|
+
if (!Tt(l))
|
|
1951
1951
|
return l;
|
|
1952
1952
|
const c = a.transform(l.value, r);
|
|
1953
1953
|
if (c instanceof Promise)
|
|
1954
1954
|
throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
1955
1955
|
return { status: s.value, value: c };
|
|
1956
1956
|
} else
|
|
1957
|
-
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((l) =>
|
|
1957
|
+
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((l) => Tt(l) ? Promise.resolve(a.transform(l.value, r)).then((c) => ({ status: s.value, value: c })) : l);
|
|
1958
1958
|
U.assertNever(a);
|
|
1959
1959
|
}
|
|
1960
1960
|
}
|
|
@@ -1962,15 +1962,15 @@ Se.create = (e, t, s) => new Se({
|
|
|
1962
1962
|
schema: e,
|
|
1963
1963
|
typeName: H.ZodEffects,
|
|
1964
1964
|
effect: t,
|
|
1965
|
-
...
|
|
1965
|
+
...N(s)
|
|
1966
1966
|
});
|
|
1967
1967
|
Se.createWithPreprocess = (e, t, s) => new Se({
|
|
1968
1968
|
schema: t,
|
|
1969
1969
|
effect: { type: "preprocess", transform: e },
|
|
1970
1970
|
typeName: H.ZodEffects,
|
|
1971
|
-
...
|
|
1971
|
+
...N(s)
|
|
1972
1972
|
});
|
|
1973
|
-
class Ge extends
|
|
1973
|
+
class Ge extends q {
|
|
1974
1974
|
_parse(t) {
|
|
1975
1975
|
return this._getType(t) === x.undefined ? ce(void 0) : this._def.innerType._parse(t);
|
|
1976
1976
|
}
|
|
@@ -1981,9 +1981,9 @@ class Ge extends T {
|
|
|
1981
1981
|
Ge.create = (e, t) => new Ge({
|
|
1982
1982
|
innerType: e,
|
|
1983
1983
|
typeName: H.ZodOptional,
|
|
1984
|
-
...
|
|
1984
|
+
...N(t)
|
|
1985
1985
|
});
|
|
1986
|
-
class nt extends
|
|
1986
|
+
class nt extends q {
|
|
1987
1987
|
_parse(t) {
|
|
1988
1988
|
return this._getType(t) === x.null ? ce(null) : this._def.innerType._parse(t);
|
|
1989
1989
|
}
|
|
@@ -1994,9 +1994,9 @@ class nt extends T {
|
|
|
1994
1994
|
nt.create = (e, t) => new nt({
|
|
1995
1995
|
innerType: e,
|
|
1996
1996
|
typeName: H.ZodNullable,
|
|
1997
|
-
...
|
|
1997
|
+
...N(t)
|
|
1998
1998
|
});
|
|
1999
|
-
class
|
|
1999
|
+
class Qs extends q {
|
|
2000
2000
|
_parse(t) {
|
|
2001
2001
|
const { ctx: s } = this._processInputParams(t);
|
|
2002
2002
|
let n = s.data;
|
|
@@ -2010,12 +2010,12 @@ class Ns extends T {
|
|
|
2010
2010
|
return this._def.innerType;
|
|
2011
2011
|
}
|
|
2012
2012
|
}
|
|
2013
|
-
|
|
2013
|
+
Qs.create = (e, t) => new Ge({
|
|
2014
2014
|
innerType: e,
|
|
2015
2015
|
typeName: H.ZodOptional,
|
|
2016
|
-
...
|
|
2016
|
+
...N(t)
|
|
2017
2017
|
});
|
|
2018
|
-
class Jt extends
|
|
2018
|
+
class Jt extends q {
|
|
2019
2019
|
_parse(t) {
|
|
2020
2020
|
if (this._getType(t) !== x.nan) {
|
|
2021
2021
|
const n = this._getOrReturnCtx(t);
|
|
@@ -2030,7 +2030,7 @@ class Jt extends T {
|
|
|
2030
2030
|
}
|
|
2031
2031
|
Jt.create = (e) => new Jt({
|
|
2032
2032
|
typeName: H.ZodNaN,
|
|
2033
|
-
...
|
|
2033
|
+
...N(e)
|
|
2034
2034
|
});
|
|
2035
2035
|
const Mn = (e, t = {}, s) => e ? gt.create().superRefine((n, a) => {
|
|
2036
2036
|
if (!e(n)) {
|
|
@@ -2046,31 +2046,31 @@ var H;
|
|
|
2046
2046
|
})(H || (H = {}));
|
|
2047
2047
|
const br = (e, t = {
|
|
2048
2048
|
message: `Input not instance of ${e.name}`
|
|
2049
|
-
}) => Mn((s) => s instanceof e, t, !0), Dn = ze.create, xn = et.create, vr = Jt.create, wr =
|
|
2049
|
+
}) => Mn((s) => s instanceof e, t, !0), Dn = ze.create, xn = et.create, vr = Jt.create, wr = qt.create, jn = Nt.create, Br = At.create, Cr = Xt.create, Mr = Qt.create, Dr = gt.create, xr = Ze.create, jr = We.create, Er = Zt.create, Pr = Ve.create, Or = ee.create, Gr = ee.strictCreate, Yr = Et.create, Vr = es.create, Fr = Pt.create, Sr = Fe.create, kr = Ot.create, Rr = zt.create, Hr = tt.create, Ir = st.create, Tr = Wt.create, qr = Lt.create, Nr = ts.create, Xr = Kt.create, Qr = pt.create, rn = Se.create, Zr = Ge.create, Ur = nt.create, zr = Se.createWithPreprocess, Wr = () => Dn().optional(), Lr = () => xn().optional(), Kr = () => jn().optional();
|
|
2050
2050
|
var Ct = /* @__PURE__ */ Object.freeze({
|
|
2051
2051
|
__proto__: null,
|
|
2052
|
-
getParsedType:
|
|
2052
|
+
getParsedType: Qe,
|
|
2053
2053
|
ZodParsedType: x,
|
|
2054
2054
|
makeIssue: It,
|
|
2055
|
-
EMPTY_PATH:
|
|
2055
|
+
EMPTY_PATH: mr,
|
|
2056
2056
|
addIssueToContext: P,
|
|
2057
2057
|
ParseStatus: le,
|
|
2058
2058
|
INVALID: I,
|
|
2059
|
-
DIRTY:
|
|
2059
|
+
DIRTY: Ar,
|
|
2060
2060
|
OK: ce,
|
|
2061
2061
|
isAborted: js,
|
|
2062
2062
|
isDirty: Es,
|
|
2063
|
-
isValid:
|
|
2063
|
+
isValid: Tt,
|
|
2064
2064
|
isAsync: Ps,
|
|
2065
|
-
jsonStringifyReplacer:
|
|
2066
|
-
ZodType:
|
|
2065
|
+
jsonStringifyReplacer: Xs,
|
|
2066
|
+
ZodType: q,
|
|
2067
2067
|
ZodString: ze,
|
|
2068
2068
|
ZodNumber: et,
|
|
2069
|
-
ZodBigInt:
|
|
2070
|
-
ZodBoolean:
|
|
2071
|
-
ZodDate:
|
|
2072
|
-
ZodUndefined:
|
|
2073
|
-
ZodNull:
|
|
2069
|
+
ZodBigInt: qt,
|
|
2070
|
+
ZodBoolean: Nt,
|
|
2071
|
+
ZodDate: At,
|
|
2072
|
+
ZodUndefined: Xt,
|
|
2073
|
+
ZodNull: Qt,
|
|
2074
2074
|
ZodAny: gt,
|
|
2075
2075
|
ZodUnknown: Ze,
|
|
2076
2076
|
ZodNever: We,
|
|
@@ -2097,11 +2097,11 @@ var Ct = /* @__PURE__ */ Object.freeze({
|
|
|
2097
2097
|
ZodTransformer: Se,
|
|
2098
2098
|
ZodOptional: Ge,
|
|
2099
2099
|
ZodNullable: nt,
|
|
2100
|
-
ZodDefault:
|
|
2100
|
+
ZodDefault: Qs,
|
|
2101
2101
|
ZodNaN: Jt,
|
|
2102
2102
|
custom: Mn,
|
|
2103
|
-
Schema:
|
|
2104
|
-
ZodSchema:
|
|
2103
|
+
Schema: q,
|
|
2104
|
+
ZodSchema: q,
|
|
2105
2105
|
late: yr,
|
|
2106
2106
|
get ZodFirstPartyTypeKind() {
|
|
2107
2107
|
return H;
|
|
@@ -2113,15 +2113,15 @@ var Ct = /* @__PURE__ */ Object.freeze({
|
|
|
2113
2113
|
date: Br,
|
|
2114
2114
|
discriminatedUnion: Vr,
|
|
2115
2115
|
effect: rn,
|
|
2116
|
-
enum:
|
|
2116
|
+
enum: Nr,
|
|
2117
2117
|
function: Ir,
|
|
2118
2118
|
instanceof: br,
|
|
2119
2119
|
intersection: Fr,
|
|
2120
|
-
lazy:
|
|
2121
|
-
literal:
|
|
2120
|
+
lazy: Tr,
|
|
2121
|
+
literal: qr,
|
|
2122
2122
|
map: Rr,
|
|
2123
2123
|
nan: vr,
|
|
2124
|
-
nativeEnum:
|
|
2124
|
+
nativeEnum: Xr,
|
|
2125
2125
|
never: jr,
|
|
2126
2126
|
null: Mr,
|
|
2127
2127
|
nullable: Ur,
|
|
@@ -2132,7 +2132,7 @@ var Ct = /* @__PURE__ */ Object.freeze({
|
|
|
2132
2132
|
optional: Zr,
|
|
2133
2133
|
ostring: Wr,
|
|
2134
2134
|
preprocess: zr,
|
|
2135
|
-
promise:
|
|
2135
|
+
promise: Qr,
|
|
2136
2136
|
record: kr,
|
|
2137
2137
|
set: Hr,
|
|
2138
2138
|
strictObject: Gr,
|
|
@@ -2307,7 +2307,7 @@ function co(e) {
|
|
|
2307
2307
|
e.startsWith(n.prefix) && (!s || n.prefix.length > s.prefix.length) && (s = n);
|
|
2308
2308
|
return (s == null ? void 0 : s.builders) ?? [];
|
|
2309
2309
|
}
|
|
2310
|
-
const uo = "business::report::reports::",
|
|
2310
|
+
const uo = "business::report::reports::", mo = Ct.object({
|
|
2311
2311
|
/** Requested report date, normalized to a UTC ISO string. */
|
|
2312
2312
|
reportDate: Ct.string().refine((e) => !Number.isNaN(Date.parse(e))),
|
|
2313
2313
|
/** Whole UTC days between now and the report date. */
|
|
@@ -2316,7 +2316,7 @@ const uo = "business::report::reports::", Ao = Ct.object({
|
|
|
2316
2316
|
reportAgeMonths: Ct.number().int().min(0),
|
|
2317
2317
|
/** Whole UTC years between now and the report date. */
|
|
2318
2318
|
reportAgeYears: Ct.number().int().min(0)
|
|
2319
|
-
}),
|
|
2319
|
+
}), Ao = 864e5;
|
|
2320
2320
|
function ln(e, t) {
|
|
2321
2321
|
const s = new Date(e);
|
|
2322
2322
|
if (Number.isNaN(s.getTime()))
|
|
@@ -2327,7 +2327,7 @@ function cn(e) {
|
|
|
2327
2327
|
return new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()));
|
|
2328
2328
|
}
|
|
2329
2329
|
function go(e, t) {
|
|
2330
|
-
return Math.floor((cn(t).getTime() - cn(e).getTime()) /
|
|
2330
|
+
return Math.floor((cn(t).getTime() - cn(e).getTime()) / Ao);
|
|
2331
2331
|
}
|
|
2332
2332
|
function po(e, t) {
|
|
2333
2333
|
let s = (t.getUTCFullYear() - e.getUTCFullYear()) * 12 + (t.getUTCMonth() - e.getUTCMonth());
|
|
@@ -2441,7 +2441,7 @@ const Bo = {
|
|
|
2441
2441
|
}, Co = no({
|
|
2442
2442
|
version: 1,
|
|
2443
2443
|
builderKey: yo,
|
|
2444
|
-
contextSchema:
|
|
2444
|
+
contextSchema: mo,
|
|
2445
2445
|
form: Bo,
|
|
2446
2446
|
// toCondition/fromCondition are generated from these templates (see
|
|
2447
2447
|
// ../templates.ts) — the two directions cannot drift apart.
|
|
@@ -3278,12 +3278,12 @@ const On = {
|
|
|
3278
3278
|
}, Io = {
|
|
3279
3279
|
date: Hn,
|
|
3280
3280
|
auditLog: In
|
|
3281
|
-
},
|
|
3281
|
+
}, To = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3282
3282
|
__proto__: null,
|
|
3283
3283
|
auditLog: In,
|
|
3284
3284
|
date: Hn,
|
|
3285
3285
|
default: Io
|
|
3286
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3286
|
+
}, Symbol.toStringTag, { value: "Module" })), Tn = {
|
|
3287
3287
|
predefinedRanges: {
|
|
3288
3288
|
today: "今天",
|
|
3289
3289
|
yesterday: "昨天",
|
|
@@ -3293,7 +3293,7 @@ const On = {
|
|
|
3293
3293
|
thisMonth: "本月",
|
|
3294
3294
|
lastMonth: "上月"
|
|
3295
3295
|
}
|
|
3296
|
-
},
|
|
3296
|
+
}, qn = {
|
|
3297
3297
|
title: "審計日誌",
|
|
3298
3298
|
export: "匯出",
|
|
3299
3299
|
dateRange: {
|
|
@@ -3505,20 +3505,20 @@ const On = {
|
|
|
3505
3505
|
}
|
|
3506
3506
|
}
|
|
3507
3507
|
}
|
|
3508
|
-
},
|
|
3509
|
-
date:
|
|
3510
|
-
auditLog:
|
|
3511
|
-
},
|
|
3508
|
+
}, qo = {
|
|
3509
|
+
date: Tn,
|
|
3510
|
+
auditLog: qn
|
|
3511
|
+
}, No = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3512
3512
|
__proto__: null,
|
|
3513
|
-
auditLog:
|
|
3514
|
-
date:
|
|
3515
|
-
default:
|
|
3516
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3513
|
+
auditLog: qn,
|
|
3514
|
+
date: Tn,
|
|
3515
|
+
default: qo
|
|
3516
|
+
}, Symbol.toStringTag, { value: "Module" })), Xo = {
|
|
3517
3517
|
"en-US": ko,
|
|
3518
|
-
"zh-CN":
|
|
3518
|
+
"zh-CN": To,
|
|
3519
3519
|
"th-TH": Ho,
|
|
3520
|
-
"zh-Hant":
|
|
3521
|
-
},
|
|
3520
|
+
"zh-Hant": No
|
|
3521
|
+
}, Nn = {
|
|
3522
3522
|
employee: {
|
|
3523
3523
|
title: "Employee",
|
|
3524
3524
|
subtitle: "Manage employees with access to the POS at your outlets.",
|
|
@@ -3723,13 +3723,13 @@ const On = {
|
|
|
3723
3723
|
placeholder: "Search restaurant"
|
|
3724
3724
|
}
|
|
3725
3725
|
}
|
|
3726
|
-
},
|
|
3727
|
-
hr:
|
|
3726
|
+
}, Qo = {
|
|
3727
|
+
hr: Nn
|
|
3728
3728
|
}, Zo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3729
3729
|
__proto__: null,
|
|
3730
|
-
default:
|
|
3731
|
-
hr:
|
|
3732
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3730
|
+
default: Qo,
|
|
3731
|
+
hr: Nn
|
|
3732
|
+
}, Symbol.toStringTag, { value: "Module" })), Xn = {
|
|
3733
3733
|
employee: {
|
|
3734
3734
|
title: "พนักงาน",
|
|
3735
3735
|
subtitle: "จัดการพนักงานที่สามารถเข้าถึงระบบ POS ในสาขาของคุณ",
|
|
@@ -3934,12 +3934,12 @@ const On = {
|
|
|
3934
3934
|
}
|
|
3935
3935
|
}
|
|
3936
3936
|
}, Uo = {
|
|
3937
|
-
hr:
|
|
3937
|
+
hr: Xn
|
|
3938
3938
|
}, zo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3939
3939
|
__proto__: null,
|
|
3940
3940
|
default: Uo,
|
|
3941
|
-
hr:
|
|
3942
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3941
|
+
hr: Xn
|
|
3942
|
+
}, Symbol.toStringTag, { value: "Module" })), Qn = {
|
|
3943
3943
|
employee: {
|
|
3944
3944
|
title: "员工",
|
|
3945
3945
|
subtitle: "管理可访问您门店 POS 系统的员工。",
|
|
@@ -4145,11 +4145,11 @@ const On = {
|
|
|
4145
4145
|
}
|
|
4146
4146
|
}
|
|
4147
4147
|
}, Wo = {
|
|
4148
|
-
hr:
|
|
4148
|
+
hr: Qn
|
|
4149
4149
|
}, Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4150
4150
|
__proto__: null,
|
|
4151
4151
|
default: Wo,
|
|
4152
|
-
hr:
|
|
4152
|
+
hr: Qn
|
|
4153
4153
|
}, Symbol.toStringTag, { value: "Module" })), Zn = {
|
|
4154
4154
|
employee: {
|
|
4155
4155
|
title: "員工",
|
|
@@ -5583,11 +5583,11 @@ const On = {
|
|
|
5583
5583
|
passcode: {
|
|
5584
5584
|
copied: "密码已复制"
|
|
5585
5585
|
}
|
|
5586
|
-
},
|
|
5586
|
+
}, mi = {
|
|
5587
5587
|
grantUser: sa
|
|
5588
|
-
},
|
|
5588
|
+
}, Ai = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5589
5589
|
__proto__: null,
|
|
5590
|
-
default:
|
|
5590
|
+
default: mi,
|
|
5591
5591
|
grantUser: sa
|
|
5592
5592
|
}, Symbol.toStringTag, { value: "Module" })), na = {
|
|
5593
5593
|
title: "POS 授予",
|
|
@@ -5651,7 +5651,7 @@ const On = {
|
|
|
5651
5651
|
grantUser: na
|
|
5652
5652
|
}, Symbol.toStringTag, { value: "Module" })), hi = {
|
|
5653
5653
|
"en-US": ci,
|
|
5654
|
-
"zh-CN":
|
|
5654
|
+
"zh-CN": Ai,
|
|
5655
5655
|
"th-TH": di,
|
|
5656
5656
|
"zh-Hant": pi
|
|
5657
5657
|
}, aa = {
|
|
@@ -6080,7 +6080,7 @@ const On = {
|
|
|
6080
6080
|
"zh-CN": Gi,
|
|
6081
6081
|
"th-TH": Pi,
|
|
6082
6082
|
"zh-Hant": Vi
|
|
6083
|
-
},
|
|
6083
|
+
}, ma = {
|
|
6084
6084
|
nav: {
|
|
6085
6085
|
section: "Scheduling",
|
|
6086
6086
|
board: "Schedule",
|
|
@@ -6126,7 +6126,8 @@ const On = {
|
|
|
6126
6126
|
},
|
|
6127
6127
|
status: {
|
|
6128
6128
|
draft: "Draft",
|
|
6129
|
-
published: "Published"
|
|
6129
|
+
published: "Published",
|
|
6130
|
+
locked: "Locked · payroll closed"
|
|
6130
6131
|
},
|
|
6131
6132
|
staffRail: {
|
|
6132
6133
|
title: "Staff",
|
|
@@ -6227,19 +6228,38 @@ const On = {
|
|
|
6227
6228
|
thisWeek: "This week",
|
|
6228
6229
|
nextWeek: "Next week"
|
|
6229
6230
|
},
|
|
6231
|
+
common: {
|
|
6232
|
+
anyPosition: "Any position",
|
|
6233
|
+
none: "None",
|
|
6234
|
+
leaveAsIs: "Leave as is",
|
|
6235
|
+
monthly: "/mo",
|
|
6236
|
+
hourly: "/hr",
|
|
6237
|
+
everyone: "Everyone",
|
|
6238
|
+
fullTime: "Full time",
|
|
6239
|
+
partTime: "Part time",
|
|
6240
|
+
noPosition: "No position",
|
|
6241
|
+
noPay: "No pay",
|
|
6242
|
+
cancel: "Cancel",
|
|
6243
|
+
done: "Done",
|
|
6244
|
+
tryAgain: "Try again"
|
|
6245
|
+
},
|
|
6246
|
+
positionModal: {
|
|
6247
|
+
editTitle: "Edit Position",
|
|
6248
|
+
addTitle: "Add Position"
|
|
6249
|
+
},
|
|
6230
6250
|
comingSoon: "Coming soon."
|
|
6231
6251
|
}, Si = {
|
|
6232
|
-
scheduling:
|
|
6252
|
+
scheduling: ma
|
|
6233
6253
|
}, ki = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6234
6254
|
__proto__: null,
|
|
6235
6255
|
default: Si,
|
|
6236
|
-
scheduling:
|
|
6237
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
6256
|
+
scheduling: ma
|
|
6257
|
+
}, Symbol.toStringTag, { value: "Module" })), Aa = {
|
|
6238
6258
|
nav: {
|
|
6239
6259
|
section: "Scheduling",
|
|
6240
6260
|
board: "Schedule",
|
|
6241
6261
|
position: "Position",
|
|
6242
|
-
general: "General"
|
|
6262
|
+
general: "General Settings"
|
|
6243
6263
|
},
|
|
6244
6264
|
topbar: {
|
|
6245
6265
|
title: "Schedule",
|
|
@@ -6280,7 +6300,8 @@ const On = {
|
|
|
6280
6300
|
},
|
|
6281
6301
|
status: {
|
|
6282
6302
|
draft: "Draft",
|
|
6283
|
-
published: "Published"
|
|
6303
|
+
published: "Published",
|
|
6304
|
+
locked: "Locked · payroll closed"
|
|
6284
6305
|
},
|
|
6285
6306
|
staffRail: {
|
|
6286
6307
|
title: "Staff",
|
|
@@ -6295,7 +6316,7 @@ const On = {
|
|
|
6295
6316
|
allCovered: "all demand covered",
|
|
6296
6317
|
openRemaining: "{count} still open",
|
|
6297
6318
|
noPositionsAdded: "No positions added",
|
|
6298
|
-
noPositionTitle: "
|
|
6319
|
+
noPositionTitle: "ยังไม่มีชื่อตำแหน่ง — ก่อนตั้งชื่อ สามารถจัดพนักงานไปยังสถานีใดก็ได้"
|
|
6299
6320
|
},
|
|
6300
6321
|
grid: {
|
|
6301
6322
|
employeeColumn: "Employee",
|
|
@@ -6381,13 +6402,32 @@ const On = {
|
|
|
6381
6402
|
thisWeek: "This week",
|
|
6382
6403
|
nextWeek: "Next week"
|
|
6383
6404
|
},
|
|
6405
|
+
common: {
|
|
6406
|
+
anyPosition: "Any position",
|
|
6407
|
+
none: "None",
|
|
6408
|
+
leaveAsIs: "Leave as is",
|
|
6409
|
+
monthly: "/mo",
|
|
6410
|
+
hourly: "/hr",
|
|
6411
|
+
everyone: "Everyone",
|
|
6412
|
+
fullTime: "Full time",
|
|
6413
|
+
partTime: "Part time",
|
|
6414
|
+
noPosition: "No position",
|
|
6415
|
+
noPay: "No pay",
|
|
6416
|
+
cancel: "Cancel",
|
|
6417
|
+
done: "Done",
|
|
6418
|
+
tryAgain: "Try again"
|
|
6419
|
+
},
|
|
6420
|
+
positionModal: {
|
|
6421
|
+
editTitle: "Edit Position",
|
|
6422
|
+
addTitle: "Add Position"
|
|
6423
|
+
},
|
|
6384
6424
|
comingSoon: "Coming soon."
|
|
6385
6425
|
}, Ri = {
|
|
6386
|
-
scheduling:
|
|
6426
|
+
scheduling: Aa
|
|
6387
6427
|
}, Hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6388
6428
|
__proto__: null,
|
|
6389
6429
|
default: Ri,
|
|
6390
|
-
scheduling:
|
|
6430
|
+
scheduling: Aa
|
|
6391
6431
|
}, Symbol.toStringTag, { value: "Module" })), ga = {
|
|
6392
6432
|
nav: {
|
|
6393
6433
|
section: "Scheduling",
|
|
@@ -6434,7 +6474,8 @@ const On = {
|
|
|
6434
6474
|
},
|
|
6435
6475
|
status: {
|
|
6436
6476
|
draft: "Draft",
|
|
6437
|
-
published: "Published"
|
|
6477
|
+
published: "Published",
|
|
6478
|
+
locked: "Locked · payroll closed"
|
|
6438
6479
|
},
|
|
6439
6480
|
staffRail: {
|
|
6440
6481
|
title: "Staff",
|
|
@@ -6449,7 +6490,7 @@ const On = {
|
|
|
6449
6490
|
allCovered: "all demand covered",
|
|
6450
6491
|
openRemaining: "{count} still open",
|
|
6451
6492
|
noPositionsAdded: "No positions added",
|
|
6452
|
-
noPositionTitle: "
|
|
6493
|
+
noPositionTitle: "职位尚未命名 — 命名之前,可以安排到任何工作站"
|
|
6453
6494
|
},
|
|
6454
6495
|
grid: {
|
|
6455
6496
|
employeeColumn: "Employee",
|
|
@@ -6535,10 +6576,29 @@ const On = {
|
|
|
6535
6576
|
thisWeek: "This week",
|
|
6536
6577
|
nextWeek: "Next week"
|
|
6537
6578
|
},
|
|
6579
|
+
common: {
|
|
6580
|
+
anyPosition: "Any position",
|
|
6581
|
+
none: "None",
|
|
6582
|
+
leaveAsIs: "Leave as is",
|
|
6583
|
+
monthly: "/mo",
|
|
6584
|
+
hourly: "/hr",
|
|
6585
|
+
everyone: "Everyone",
|
|
6586
|
+
fullTime: "Full time",
|
|
6587
|
+
partTime: "Part time",
|
|
6588
|
+
noPosition: "No position",
|
|
6589
|
+
noPay: "No pay",
|
|
6590
|
+
cancel: "Cancel",
|
|
6591
|
+
done: "Done",
|
|
6592
|
+
tryAgain: "Try again"
|
|
6593
|
+
},
|
|
6594
|
+
positionModal: {
|
|
6595
|
+
editTitle: "Edit Position",
|
|
6596
|
+
addTitle: "Add Position"
|
|
6597
|
+
},
|
|
6538
6598
|
comingSoon: "Coming soon."
|
|
6539
6599
|
}, Ii = {
|
|
6540
6600
|
scheduling: ga
|
|
6541
|
-
},
|
|
6601
|
+
}, Ti = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6542
6602
|
__proto__: null,
|
|
6543
6603
|
default: Ii,
|
|
6544
6604
|
scheduling: ga
|
|
@@ -6588,7 +6648,8 @@ const On = {
|
|
|
6588
6648
|
},
|
|
6589
6649
|
status: {
|
|
6590
6650
|
draft: "Draft",
|
|
6591
|
-
published: "Published"
|
|
6651
|
+
published: "Published",
|
|
6652
|
+
locked: "Locked · payroll closed"
|
|
6592
6653
|
},
|
|
6593
6654
|
staffRail: {
|
|
6594
6655
|
title: "Staff",
|
|
@@ -6603,7 +6664,7 @@ const On = {
|
|
|
6603
6664
|
allCovered: "all demand covered",
|
|
6604
6665
|
openRemaining: "{count} still open",
|
|
6605
6666
|
noPositionsAdded: "No positions added",
|
|
6606
|
-
noPositionTitle: "
|
|
6667
|
+
noPositionTitle: "職位尚未命名 — 命名之前,可以安排到任何工作站"
|
|
6607
6668
|
},
|
|
6608
6669
|
grid: {
|
|
6609
6670
|
employeeColumn: "Employee",
|
|
@@ -6689,18 +6750,37 @@ const On = {
|
|
|
6689
6750
|
thisWeek: "This week",
|
|
6690
6751
|
nextWeek: "Next week"
|
|
6691
6752
|
},
|
|
6753
|
+
common: {
|
|
6754
|
+
anyPosition: "Any position",
|
|
6755
|
+
none: "None",
|
|
6756
|
+
leaveAsIs: "Leave as is",
|
|
6757
|
+
monthly: "/mo",
|
|
6758
|
+
hourly: "/hr",
|
|
6759
|
+
everyone: "Everyone",
|
|
6760
|
+
fullTime: "Full time",
|
|
6761
|
+
partTime: "Part time",
|
|
6762
|
+
noPosition: "No position",
|
|
6763
|
+
noPay: "No pay",
|
|
6764
|
+
cancel: "Cancel",
|
|
6765
|
+
done: "Done",
|
|
6766
|
+
tryAgain: "Try again"
|
|
6767
|
+
},
|
|
6768
|
+
positionModal: {
|
|
6769
|
+
editTitle: "Edit Position",
|
|
6770
|
+
addTitle: "Add Position"
|
|
6771
|
+
},
|
|
6692
6772
|
comingSoon: "Coming soon."
|
|
6693
|
-
},
|
|
6773
|
+
}, qi = {
|
|
6694
6774
|
scheduling: pa
|
|
6695
|
-
},
|
|
6775
|
+
}, Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6696
6776
|
__proto__: null,
|
|
6697
|
-
default:
|
|
6777
|
+
default: qi,
|
|
6698
6778
|
scheduling: pa
|
|
6699
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
6779
|
+
}, Symbol.toStringTag, { value: "Module" })), Xi = {
|
|
6700
6780
|
"en-US": ki,
|
|
6701
|
-
"zh-CN":
|
|
6781
|
+
"zh-CN": Ti,
|
|
6702
6782
|
"th-TH": Hi,
|
|
6703
|
-
"zh-Hant":
|
|
6783
|
+
"zh-Hant": Ni
|
|
6704
6784
|
};
|
|
6705
6785
|
var S = /* @__PURE__ */ ((e) => (e.Order = "order", e.Refund = "refund", e.Drawer = "drawer", e.Menu = "menu", e.Inventory = "inventory", e.Deposit = "deposit", e.Delivery = "delivery", e.CounterRecord = "counterRecord", e.Counter = "counter", e.RestaurantSetting = "restaurantSetting", e.Display = "display", e.Printer = "printer", e.Table = "table", e.Employee = "employee", e.System = "system", e.Tax = "tax", e.PaymentType = "paymentType", e.FaceId = "faceId", e.MallIntegration = "mallIntegration", e.Report = "report", e))(S || {}), Re = /* @__PURE__ */ ((e) => (e.Discount = "discount", e.Payment = "payment", e.ClaimDeposit = "claimDeposit", e.ChangePrice = "changePrice", e.Void = "void_", e.WaiveServiceCharge = "waiveServiceCharge", e.Resend = "resend", e.ChangePaymentType = "changePaymentType", e))(Re || {}), k = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(k || {}), re = /* @__PURE__ */ ((e) => (e.Closeup = "closeup", e.Counter = "counter", e.HourlySales = "hourlySales", e.DailySales = "dailySales", e.ProductSales = "productSales", e.SourceProductSales = "sourceProductSales", e.UserProductSales = "userProductSales", e.CategorySales = "categorySales", e.AddonSales = "addonSales", e.SlotSales = "slotSales", e.Drawer = "drawer", e.Discount = "discount", e.Refund = "refund", e.Void = "void_", e.Timesheet = "timesheet", e.CounterPayment = "counterPayment", e))(re || {});
|
|
6706
6786
|
const su = {
|
|
@@ -7727,7 +7807,7 @@ const J = [
|
|
|
7727
7807
|
subject: z.crm,
|
|
7728
7808
|
actions: [o.read]
|
|
7729
7809
|
}
|
|
7730
|
-
], ge = (...e) => e.flat(),
|
|
7810
|
+
], ge = (...e) => e.flat(), Qi = [
|
|
7731
7811
|
...J,
|
|
7732
7812
|
{
|
|
7733
7813
|
label: "User",
|
|
@@ -8055,7 +8135,7 @@ const J = [
|
|
|
8055
8135
|
]
|
|
8056
8136
|
}
|
|
8057
8137
|
], il = ge(
|
|
8058
|
-
|
|
8138
|
+
Qi,
|
|
8059
8139
|
Zi,
|
|
8060
8140
|
ha,
|
|
8061
8141
|
fa,
|
|
@@ -8224,7 +8304,7 @@ const ue = [
|
|
|
8224
8304
|
subject: Y.inventory_unitCostHistory,
|
|
8225
8305
|
actions: [o.read]
|
|
8226
8306
|
}
|
|
8227
|
-
],
|
|
8307
|
+
], ml = [
|
|
8228
8308
|
...ue,
|
|
8229
8309
|
{
|
|
8230
8310
|
label: "Stock Adjustment",
|
|
@@ -8323,7 +8403,7 @@ const zs = [
|
|
|
8323
8403
|
...ka,
|
|
8324
8404
|
...Ra
|
|
8325
8405
|
];
|
|
8326
|
-
const
|
|
8406
|
+
const Al = [
|
|
8327
8407
|
{
|
|
8328
8408
|
label: "Inventory",
|
|
8329
8409
|
subject: Y.inventory,
|
|
@@ -8424,7 +8504,7 @@ const ml = [
|
|
|
8424
8504
|
subject: Y.inventory_shipment,
|
|
8425
8505
|
actions: [o.read, o.update]
|
|
8426
8506
|
}
|
|
8427
|
-
],
|
|
8507
|
+
], Ta = [
|
|
8428
8508
|
...ue,
|
|
8429
8509
|
{
|
|
8430
8510
|
label: "Surcharge",
|
|
@@ -8441,7 +8521,7 @@ const ml = [
|
|
|
8441
8521
|
subject: Y.inventory_supplier,
|
|
8442
8522
|
actions: [o.read]
|
|
8443
8523
|
}
|
|
8444
|
-
],
|
|
8524
|
+
], qa = [
|
|
8445
8525
|
...ue,
|
|
8446
8526
|
{
|
|
8447
8527
|
label: "Order Template",
|
|
@@ -8474,8 +8554,8 @@ const ml = [
|
|
|
8474
8554
|
[
|
|
8475
8555
|
...Ha,
|
|
8476
8556
|
...Ia,
|
|
8477
|
-
...
|
|
8478
|
-
...
|
|
8557
|
+
...Ta,
|
|
8558
|
+
...qa
|
|
8479
8559
|
];
|
|
8480
8560
|
const yl = [
|
|
8481
8561
|
...ue,
|
|
@@ -8541,7 +8621,7 @@ const Cl = {
|
|
|
8541
8621
|
[`set_${d.inventory_stockAdjustment}`]: {
|
|
8542
8622
|
key: "sys:inventory:stock_adjustment",
|
|
8543
8623
|
name: "Stock Adjustment",
|
|
8544
|
-
permissions:
|
|
8624
|
+
permissions: ml
|
|
8545
8625
|
},
|
|
8546
8626
|
[`set_${d.inventory_unitCostHistory}`]: {
|
|
8547
8627
|
key: "sys:inventory:unit_cost_history",
|
|
@@ -8571,7 +8651,7 @@ const Cl = {
|
|
|
8571
8651
|
[`set_${d.inventory_ingredient}`]: {
|
|
8572
8652
|
key: "sys:inventory:ingredient",
|
|
8573
8653
|
name: "Ingredient",
|
|
8574
|
-
permissions:
|
|
8654
|
+
permissions: Al
|
|
8575
8655
|
},
|
|
8576
8656
|
[`set_${d.inventory_ingredientGroup}`]: {
|
|
8577
8657
|
key: "sys:inventory:ingredient_group",
|
|
@@ -8606,12 +8686,12 @@ const Cl = {
|
|
|
8606
8686
|
[`set_${d.inventory_surcharge}`]: {
|
|
8607
8687
|
key: "sys:inventory:surcharge",
|
|
8608
8688
|
name: "Surcharge",
|
|
8609
|
-
permissions:
|
|
8689
|
+
permissions: Ta
|
|
8610
8690
|
},
|
|
8611
8691
|
[`set_${d.inventory_orderTemplate}`]: {
|
|
8612
8692
|
key: "sys:inventory:order_template",
|
|
8613
8693
|
name: "Order Template",
|
|
8614
|
-
permissions:
|
|
8694
|
+
permissions: qa
|
|
8615
8695
|
},
|
|
8616
8696
|
[`set_${d.inventory_supplier}`]: {
|
|
8617
8697
|
key: "sys:inventory:supplier",
|
|
@@ -8730,7 +8810,7 @@ const Ml = {
|
|
|
8730
8810
|
]
|
|
8731
8811
|
}
|
|
8732
8812
|
};
|
|
8733
|
-
var
|
|
8813
|
+
var Na = /* @__PURE__ */ ((e) => (e.payment_terminals = "payment::terminals", e))(Na || {});
|
|
8734
8814
|
const dn = [
|
|
8735
8815
|
{
|
|
8736
8816
|
label: "Payout Account",
|
|
@@ -8739,7 +8819,7 @@ const dn = [
|
|
|
8739
8819
|
},
|
|
8740
8820
|
{
|
|
8741
8821
|
label: "Payment Terminals",
|
|
8742
|
-
subject:
|
|
8822
|
+
subject: Na.payment_terminals,
|
|
8743
8823
|
actions: [o.read]
|
|
8744
8824
|
}
|
|
8745
8825
|
], Dl = {
|
|
@@ -8766,13 +8846,13 @@ const dn = [
|
|
|
8766
8846
|
return e[s = t.subject] ?? (e[s] = t.label), e;
|
|
8767
8847
|
},
|
|
8768
8848
|
{}
|
|
8769
|
-
),
|
|
8849
|
+
), Ne = {
|
|
8770
8850
|
Action: o,
|
|
8771
8851
|
Subject: {
|
|
8772
8852
|
Business: d,
|
|
8773
8853
|
Restaurant: wn
|
|
8774
8854
|
}
|
|
8775
|
-
},
|
|
8855
|
+
}, Xa = {
|
|
8776
8856
|
[ne.permission]: d.hrm_teamMember,
|
|
8777
8857
|
[ne.promotion]: d.crm_promotion,
|
|
8778
8858
|
[ne.voucher]: d.crm_voucher,
|
|
@@ -8795,7 +8875,7 @@ var Dt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
8795
8875
|
function jl(e) {
|
|
8796
8876
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
8797
8877
|
}
|
|
8798
|
-
var
|
|
8878
|
+
var Qa = { exports: {} };
|
|
8799
8879
|
(function(e, t) {
|
|
8800
8880
|
(function(s, n) {
|
|
8801
8881
|
e.exports = n();
|
|
@@ -8839,15 +8919,15 @@ var Na = { exports: {} };
|
|
|
8839
8919
|
s.exports = a(1);
|
|
8840
8920
|
},
|
|
8841
8921
|
function(s, n, a) {
|
|
8842
|
-
function r(
|
|
8922
|
+
function r(A) {
|
|
8843
8923
|
return (r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(p) {
|
|
8844
8924
|
return typeof p;
|
|
8845
8925
|
} : function(p) {
|
|
8846
8926
|
return p && typeof Symbol == "function" && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p;
|
|
8847
|
-
})(
|
|
8927
|
+
})(A);
|
|
8848
8928
|
}
|
|
8849
|
-
function l(
|
|
8850
|
-
var p = "[object " +
|
|
8929
|
+
function l(A) {
|
|
8930
|
+
var p = "[object " + A + "]";
|
|
8851
8931
|
return function(B) {
|
|
8852
8932
|
return Object.prototype.toString.call(B) === p;
|
|
8853
8933
|
};
|
|
@@ -8860,267 +8940,267 @@ var Na = { exports: {} };
|
|
|
8860
8940
|
return yt;
|
|
8861
8941
|
});
|
|
8862
8942
|
var c = l("Array"), h = l("Object"), y = l("Function");
|
|
8863
|
-
function w(
|
|
8864
|
-
return y(
|
|
8943
|
+
function w(A, p) {
|
|
8944
|
+
return y(A.get) ? A.get(p) : A[p];
|
|
8865
8945
|
}
|
|
8866
|
-
function V(
|
|
8946
|
+
function V(A) {
|
|
8867
8947
|
return function(p, B) {
|
|
8868
|
-
if (!c(B) || !B.length) return
|
|
8948
|
+
if (!c(B) || !B.length) return A(p, B);
|
|
8869
8949
|
for (var D = 0, E = B.length; D < E; D++)
|
|
8870
|
-
if (
|
|
8950
|
+
if (A(p, w(B, D))) return !0;
|
|
8871
8951
|
return !1;
|
|
8872
8952
|
};
|
|
8873
8953
|
}
|
|
8874
|
-
function Z(
|
|
8954
|
+
function Z(A) {
|
|
8875
8955
|
return function(p, B) {
|
|
8876
|
-
if (!c(B) || !B.length) return
|
|
8956
|
+
if (!c(B) || !B.length) return A(p, B);
|
|
8877
8957
|
for (var D = 0, E = B.length; D < E; D++)
|
|
8878
|
-
if (!
|
|
8958
|
+
if (!A(p, w(B, D))) return !1;
|
|
8879
8959
|
return !0;
|
|
8880
8960
|
};
|
|
8881
8961
|
}
|
|
8882
|
-
function W(
|
|
8883
|
-
return
|
|
8962
|
+
function W(A, p, B, D) {
|
|
8963
|
+
return A.validate(A.options, p, B, D);
|
|
8884
8964
|
}
|
|
8885
8965
|
var se = {
|
|
8886
|
-
$eq: V(function(
|
|
8887
|
-
return
|
|
8966
|
+
$eq: V(function(A, p) {
|
|
8967
|
+
return A(p);
|
|
8888
8968
|
}),
|
|
8889
|
-
$ne: Z(function(
|
|
8890
|
-
return
|
|
8969
|
+
$ne: Z(function(A, p) {
|
|
8970
|
+
return A(p);
|
|
8891
8971
|
}),
|
|
8892
|
-
$gt: V(function(
|
|
8893
|
-
return
|
|
8972
|
+
$gt: V(function(A, p) {
|
|
8973
|
+
return A(p);
|
|
8894
8974
|
}),
|
|
8895
|
-
$gte: V(function(
|
|
8896
|
-
return
|
|
8975
|
+
$gte: V(function(A, p) {
|
|
8976
|
+
return A(p);
|
|
8897
8977
|
}),
|
|
8898
|
-
$lt: V(function(
|
|
8899
|
-
return
|
|
8978
|
+
$lt: V(function(A, p) {
|
|
8979
|
+
return A(p);
|
|
8900
8980
|
}),
|
|
8901
|
-
$lte: V(function(
|
|
8902
|
-
return
|
|
8981
|
+
$lte: V(function(A, p) {
|
|
8982
|
+
return A(p);
|
|
8903
8983
|
}),
|
|
8904
|
-
$mod: V(function(
|
|
8905
|
-
return
|
|
8984
|
+
$mod: V(function(A, p) {
|
|
8985
|
+
return A(p);
|
|
8906
8986
|
}),
|
|
8907
|
-
$in: function(
|
|
8908
|
-
return
|
|
8987
|
+
$in: function(A, p) {
|
|
8988
|
+
return A(p);
|
|
8909
8989
|
},
|
|
8910
|
-
$nin: function(
|
|
8911
|
-
return
|
|
8990
|
+
$nin: function(A, p) {
|
|
8991
|
+
return A(p);
|
|
8912
8992
|
},
|
|
8913
|
-
$not: function(
|
|
8914
|
-
return
|
|
8993
|
+
$not: function(A, p, B, D) {
|
|
8994
|
+
return A(p, B, D);
|
|
8915
8995
|
},
|
|
8916
|
-
$type: function(
|
|
8917
|
-
return
|
|
8996
|
+
$type: function(A, p) {
|
|
8997
|
+
return A(p);
|
|
8918
8998
|
},
|
|
8919
|
-
$all: function(
|
|
8920
|
-
return se.$and(
|
|
8999
|
+
$all: function(A, p, B, D) {
|
|
9000
|
+
return se.$and(A, p, B, D);
|
|
8921
9001
|
},
|
|
8922
|
-
$size: function(
|
|
8923
|
-
return !!p &&
|
|
9002
|
+
$size: function(A, p) {
|
|
9003
|
+
return !!p && A === p.length;
|
|
8924
9004
|
},
|
|
8925
|
-
$or: function(
|
|
8926
|
-
for (var E = 0, O =
|
|
8927
|
-
if (W(w(
|
|
9005
|
+
$or: function(A, p, B, D) {
|
|
9006
|
+
for (var E = 0, O = A.length; E < O; E++)
|
|
9007
|
+
if (W(w(A, E), p, B, D)) return !0;
|
|
8928
9008
|
return !1;
|
|
8929
9009
|
},
|
|
8930
|
-
$nor: function(
|
|
8931
|
-
return !se.$or(
|
|
9010
|
+
$nor: function(A, p, B, D) {
|
|
9011
|
+
return !se.$or(A, p, B, D);
|
|
8932
9012
|
},
|
|
8933
|
-
$and: function(
|
|
8934
|
-
for (var E = 0, O =
|
|
8935
|
-
if (!W(w(
|
|
9013
|
+
$and: function(A, p, B, D) {
|
|
9014
|
+
for (var E = 0, O = A.length; E < O; E++)
|
|
9015
|
+
if (!W(w(A, E), p, B, D)) return !1;
|
|
8936
9016
|
return !0;
|
|
8937
9017
|
},
|
|
8938
|
-
$regex: V(function(
|
|
8939
|
-
return typeof p == "string" &&
|
|
9018
|
+
$regex: V(function(A, p) {
|
|
9019
|
+
return typeof p == "string" && A.test(p);
|
|
8940
9020
|
}),
|
|
8941
|
-
$where: function(
|
|
8942
|
-
return
|
|
9021
|
+
$where: function(A, p, B, D) {
|
|
9022
|
+
return A.call(p, p, B, D);
|
|
8943
9023
|
},
|
|
8944
|
-
$elemMatch: function(
|
|
9024
|
+
$elemMatch: function(A, p, B, D) {
|
|
8945
9025
|
return c(p) ? !!~function(E, O) {
|
|
8946
9026
|
for (var R = 0; R < E.length; R++)
|
|
8947
9027
|
if (w(E, R), W(O, w(E, R))) return R;
|
|
8948
9028
|
return -1;
|
|
8949
|
-
}(p,
|
|
9029
|
+
}(p, A) : W(A, p, B, D);
|
|
8950
9030
|
},
|
|
8951
|
-
$exists: function(
|
|
8952
|
-
return D.hasOwnProperty(B) ===
|
|
9031
|
+
$exists: function(A, p, B, D) {
|
|
9032
|
+
return D.hasOwnProperty(B) === A;
|
|
8953
9033
|
}
|
|
8954
9034
|
}, oe = {
|
|
8955
|
-
$eq: function(
|
|
9035
|
+
$eq: function(A, p, B) {
|
|
8956
9036
|
var D = B.comparable, E = B.compare;
|
|
8957
|
-
return
|
|
8958
|
-
return typeof O == "string" &&
|
|
8959
|
-
}) :
|
|
9037
|
+
return A instanceof RegExp ? V(function(O) {
|
|
9038
|
+
return typeof O == "string" && A.test(O);
|
|
9039
|
+
}) : A instanceof Function ? V(A) : c(A) && !A.length ? V(function(O) {
|
|
8960
9040
|
return c(O) && !O.length;
|
|
8961
9041
|
}) : V(
|
|
8962
|
-
|
|
9042
|
+
A === null ? function(O) {
|
|
8963
9043
|
return O == null;
|
|
8964
9044
|
} : function(O) {
|
|
8965
|
-
return E(D(O), D(
|
|
9045
|
+
return E(D(O), D(A)) === 0;
|
|
8966
9046
|
}
|
|
8967
9047
|
);
|
|
8968
9048
|
},
|
|
8969
|
-
$gt: function(
|
|
9049
|
+
$gt: function(A, p, B) {
|
|
8970
9050
|
var D = B.comparable, E = B.compare;
|
|
8971
9051
|
return function(O) {
|
|
8972
|
-
return E(D(O), D(
|
|
9052
|
+
return E(D(O), D(A)) > 0;
|
|
8973
9053
|
};
|
|
8974
9054
|
},
|
|
8975
|
-
$gte: function(
|
|
9055
|
+
$gte: function(A, p, B) {
|
|
8976
9056
|
var D = B.comparable, E = B.compare;
|
|
8977
9057
|
return function(O) {
|
|
8978
|
-
return E(D(O), D(
|
|
9058
|
+
return E(D(O), D(A)) >= 0;
|
|
8979
9059
|
};
|
|
8980
9060
|
},
|
|
8981
|
-
$lt: function(
|
|
9061
|
+
$lt: function(A, p, B) {
|
|
8982
9062
|
var D = B.comparable, E = B.compare;
|
|
8983
9063
|
return function(O) {
|
|
8984
|
-
return E(D(O), D(
|
|
9064
|
+
return E(D(O), D(A)) < 0;
|
|
8985
9065
|
};
|
|
8986
9066
|
},
|
|
8987
|
-
$lte: function(
|
|
9067
|
+
$lte: function(A, p, B) {
|
|
8988
9068
|
var D = B.comparable, E = B.compare;
|
|
8989
9069
|
return function(O) {
|
|
8990
|
-
return E(D(O), D(
|
|
9070
|
+
return E(D(O), D(A)) <= 0;
|
|
8991
9071
|
};
|
|
8992
9072
|
},
|
|
8993
|
-
$in: function(
|
|
9073
|
+
$in: function(A, p, B) {
|
|
8994
9074
|
var D = B.comparable;
|
|
8995
9075
|
return function(E) {
|
|
8996
9076
|
if (!(E instanceof Array)) {
|
|
8997
9077
|
var O = D(E);
|
|
8998
9078
|
if (O === E && r(E) === "object") {
|
|
8999
|
-
for (
|
|
9000
|
-
if (String(
|
|
9079
|
+
for (T = A.length; T--; )
|
|
9080
|
+
if (String(A[T]) === String(E) && String(E) !== "[object Object]")
|
|
9001
9081
|
return !0;
|
|
9002
9082
|
}
|
|
9003
9083
|
if (O === void 0) {
|
|
9004
|
-
for (
|
|
9084
|
+
for (T = A.length; T--; ) if (A[T] == null) return !0;
|
|
9005
9085
|
}
|
|
9006
|
-
for (
|
|
9007
|
-
var R = W(ht(w(
|
|
9086
|
+
for (T = A.length; T--; ) {
|
|
9087
|
+
var R = W(ht(w(A, T), B), O, T, A);
|
|
9008
9088
|
if (R && String(R) !== "[object Object]" && String(O) !== "[object Object]")
|
|
9009
9089
|
return !0;
|
|
9010
9090
|
}
|
|
9011
|
-
return !!~
|
|
9091
|
+
return !!~A.indexOf(O);
|
|
9012
9092
|
}
|
|
9013
|
-
for (var
|
|
9014
|
-
if (~
|
|
9093
|
+
for (var T = E.length; T--; )
|
|
9094
|
+
if (~A.indexOf(D(w(E, T)))) return !0;
|
|
9015
9095
|
return !1;
|
|
9016
9096
|
};
|
|
9017
9097
|
},
|
|
9018
|
-
$nin: function(
|
|
9019
|
-
var D = oe.$in(
|
|
9020
|
-
return function(E, O, R,
|
|
9021
|
-
return !D(E, O, R,
|
|
9098
|
+
$nin: function(A, p, B) {
|
|
9099
|
+
var D = oe.$in(A, p, B);
|
|
9100
|
+
return function(E, O, R, T) {
|
|
9101
|
+
return !D(E, O, R, T);
|
|
9022
9102
|
};
|
|
9023
9103
|
},
|
|
9024
|
-
$mod: function(
|
|
9104
|
+
$mod: function(A) {
|
|
9025
9105
|
return function(p) {
|
|
9026
|
-
return p %
|
|
9106
|
+
return p % A[0] == A[1];
|
|
9027
9107
|
};
|
|
9028
9108
|
},
|
|
9029
|
-
$ne: function(
|
|
9030
|
-
var D = oe.$eq(
|
|
9031
|
-
return Z(function(E, O, R,
|
|
9032
|
-
return !D(E, O, R,
|
|
9109
|
+
$ne: function(A, p, B) {
|
|
9110
|
+
var D = oe.$eq(A, p, B);
|
|
9111
|
+
return Z(function(E, O, R, T) {
|
|
9112
|
+
return !D(E, O, R, T);
|
|
9033
9113
|
});
|
|
9034
9114
|
},
|
|
9035
|
-
$and: function(
|
|
9036
|
-
return
|
|
9115
|
+
$and: function(A, p, B) {
|
|
9116
|
+
return A.map(Ce(B));
|
|
9037
9117
|
},
|
|
9038
|
-
$all: function(
|
|
9039
|
-
return oe.$and(
|
|
9118
|
+
$all: function(A, p, B) {
|
|
9119
|
+
return oe.$and(A, p, B);
|
|
9040
9120
|
},
|
|
9041
|
-
$or: function(
|
|
9042
|
-
return
|
|
9121
|
+
$or: function(A, p, B) {
|
|
9122
|
+
return A.map(Ce(B));
|
|
9043
9123
|
},
|
|
9044
|
-
$nor: function(
|
|
9045
|
-
return
|
|
9124
|
+
$nor: function(A, p, B) {
|
|
9125
|
+
return A.map(Ce(B));
|
|
9046
9126
|
},
|
|
9047
|
-
$not: function(
|
|
9048
|
-
var D = Ce(B)(
|
|
9127
|
+
$not: function(A, p, B) {
|
|
9128
|
+
var D = Ce(B)(A);
|
|
9049
9129
|
return function(E, O, R) {
|
|
9050
9130
|
return !W(D, E, O, R);
|
|
9051
9131
|
};
|
|
9052
9132
|
},
|
|
9053
|
-
$type: function(
|
|
9133
|
+
$type: function(A) {
|
|
9054
9134
|
return function(p, B, D) {
|
|
9055
|
-
return p != null && (p instanceof
|
|
9135
|
+
return p != null && (p instanceof A || p.constructor == A);
|
|
9056
9136
|
};
|
|
9057
9137
|
},
|
|
9058
|
-
$regex: function(
|
|
9059
|
-
return new RegExp(
|
|
9138
|
+
$regex: function(A, p) {
|
|
9139
|
+
return new RegExp(A, p.$options);
|
|
9060
9140
|
},
|
|
9061
|
-
$where: function(
|
|
9062
|
-
if (typeof
|
|
9141
|
+
$where: function(A) {
|
|
9142
|
+
if (typeof A == "function") return A;
|
|
9063
9143
|
throw new Error(
|
|
9064
9144
|
'In CSP mode, sift does not support strings in "$where" condition'
|
|
9065
9145
|
);
|
|
9066
9146
|
},
|
|
9067
|
-
$elemMatch: function(
|
|
9068
|
-
return Ce(B)(
|
|
9147
|
+
$elemMatch: function(A, p, B) {
|
|
9148
|
+
return Ce(B)(A);
|
|
9069
9149
|
},
|
|
9070
|
-
$exists: function(
|
|
9071
|
-
return !!
|
|
9150
|
+
$exists: function(A) {
|
|
9151
|
+
return !!A;
|
|
9072
9152
|
}
|
|
9073
9153
|
};
|
|
9074
|
-
function fe(
|
|
9075
|
-
return { options:
|
|
9154
|
+
function fe(A, p) {
|
|
9155
|
+
return { options: A, validate: p };
|
|
9076
9156
|
}
|
|
9077
|
-
function ie(
|
|
9078
|
-
var B =
|
|
9079
|
-
if (function i(g,
|
|
9080
|
-
if (b ===
|
|
9081
|
-
return void G.push([g,
|
|
9082
|
-
var F = w(
|
|
9157
|
+
function ie(A, p) {
|
|
9158
|
+
var B = A.keyPath, D = A.child, E = A.query, O = [];
|
|
9159
|
+
if (function i(g, m, b, C, G) {
|
|
9160
|
+
if (b === m.length || g == null)
|
|
9161
|
+
return void G.push([g, m[b - 1], C]);
|
|
9162
|
+
var F = w(m, b);
|
|
9083
9163
|
if (c(g) && isNaN(Number(F)))
|
|
9084
|
-
for (var
|
|
9085
|
-
else i(w(g, F),
|
|
9164
|
+
for (var X = 0, j = g.length; X < j; X++) i(w(g, X), m, b, g, G);
|
|
9165
|
+
else i(w(g, F), m, b + 1, g, G);
|
|
9086
9166
|
}(p, B, 0, p, O), O.length === 1) {
|
|
9087
9167
|
var R = O[0];
|
|
9088
9168
|
return W(D, R[0], R[1], R[2]);
|
|
9089
9169
|
}
|
|
9090
|
-
for (var
|
|
9170
|
+
for (var T = E && E.$ne !== void 0, te = T, ae = 0; ae < O.length; ae++) {
|
|
9091
9171
|
var f = O[ae], u = W(D, f[0], f[1], f[2]);
|
|
9092
|
-
|
|
9172
|
+
T ? te &= u : te |= u;
|
|
9093
9173
|
}
|
|
9094
9174
|
return te;
|
|
9095
9175
|
}
|
|
9096
|
-
function ss(
|
|
9097
|
-
return fe({ keyPath:
|
|
9176
|
+
function ss(A, p, B) {
|
|
9177
|
+
return fe({ keyPath: A, child: p, query: B }, ie);
|
|
9098
9178
|
}
|
|
9099
|
-
function Ce(
|
|
9100
|
-
var p =
|
|
9101
|
-
var
|
|
9102
|
-
return (!R || !(
|
|
9179
|
+
function Ce(A) {
|
|
9180
|
+
var p = A.comparable, B = A.expressions, D = function(R) {
|
|
9181
|
+
var T;
|
|
9182
|
+
return (!R || !(T = R) || T.constructor !== Object && T.constructor !== Array && T.constructor.toString() !== "function Object() { [native code] }" && T.constructor.toString() !== "function Array() { [native code] }" || T.toJSON) && (R = { $eq: R }), R;
|
|
9103
9183
|
}, E = function(R) {
|
|
9104
9184
|
R = p(R);
|
|
9105
|
-
var
|
|
9185
|
+
var T = [];
|
|
9106
9186
|
for (var te in R) {
|
|
9107
9187
|
var ae = R[te];
|
|
9108
9188
|
if (te !== "$options") {
|
|
9109
|
-
var f = se[te] ||
|
|
9110
|
-
if (f) oe[te] && (ae = oe[te](ae, R,
|
|
9189
|
+
var f = se[te] || A && B && B[te];
|
|
9190
|
+
if (f) oe[te] && (ae = oe[te](ae, R, A)), T.push(fe(p(ae), f));
|
|
9111
9191
|
else {
|
|
9112
9192
|
if (te.charCodeAt(0) === 36)
|
|
9113
9193
|
throw new Error("Unknown operation " + te);
|
|
9114
9194
|
var u = te.split(".");
|
|
9115
|
-
|
|
9195
|
+
T.push(ss(u, O(ae), ae));
|
|
9116
9196
|
}
|
|
9117
9197
|
}
|
|
9118
9198
|
}
|
|
9119
|
-
return
|
|
9199
|
+
return T.length === 1 ? T[0] : fe(T, se.$and);
|
|
9120
9200
|
}, O = function(R) {
|
|
9121
|
-
return R = D(R), function
|
|
9201
|
+
return R = D(R), function T(te, ae) {
|
|
9122
9202
|
if (!h(te)) return ae;
|
|
9123
|
-
for (var f in te) ae.push(f),
|
|
9203
|
+
for (var f in te) ae.push(f), T(te[f], ae);
|
|
9124
9204
|
return ae;
|
|
9125
9205
|
}(R, []).join(",").search(/[$.]/) === -1 ? fe(R, Le) : E(R);
|
|
9126
9206
|
};
|
|
@@ -9128,24 +9208,24 @@ var Na = { exports: {} };
|
|
|
9128
9208
|
return E(D(R));
|
|
9129
9209
|
};
|
|
9130
9210
|
}
|
|
9131
|
-
function Le(
|
|
9132
|
-
if (Object.prototype.toString.call(
|
|
9211
|
+
function Le(A, p) {
|
|
9212
|
+
if (Object.prototype.toString.call(A) !== Object.prototype.toString.call(p))
|
|
9133
9213
|
return !1;
|
|
9134
|
-
if (h(
|
|
9135
|
-
if (Object.keys(
|
|
9136
|
-
for (var B in
|
|
9214
|
+
if (h(A)) {
|
|
9215
|
+
if (Object.keys(A).length !== Object.keys(p).length) return !1;
|
|
9216
|
+
for (var B in A) if (!Le(A[B], p[B])) return !1;
|
|
9137
9217
|
return !0;
|
|
9138
9218
|
}
|
|
9139
|
-
if (c(
|
|
9140
|
-
if (
|
|
9141
|
-
for (var D = 0, E =
|
|
9142
|
-
if (!Le(
|
|
9219
|
+
if (c(A)) {
|
|
9220
|
+
if (A.length !== p.length) return !1;
|
|
9221
|
+
for (var D = 0, E = A.length; D < E; D++)
|
|
9222
|
+
if (!Le(A[D], p[D])) return !1;
|
|
9143
9223
|
return !0;
|
|
9144
9224
|
}
|
|
9145
|
-
return
|
|
9225
|
+
return A === p;
|
|
9146
9226
|
}
|
|
9147
|
-
function ht(
|
|
9148
|
-
var B = Ce(p)(
|
|
9227
|
+
function ht(A, p) {
|
|
9228
|
+
var B = Ce(p)(A);
|
|
9149
9229
|
return p && p.select && (B = {
|
|
9150
9230
|
options: B,
|
|
9151
9231
|
validate: function(D, E, O, R) {
|
|
@@ -9153,27 +9233,27 @@ var Na = { exports: {} };
|
|
|
9153
9233
|
}
|
|
9154
9234
|
}), B;
|
|
9155
9235
|
}
|
|
9156
|
-
function Gt(
|
|
9157
|
-
var B = ht(
|
|
9236
|
+
function Gt(A, p) {
|
|
9237
|
+
var B = ht(A, p = Object.assign({ compare: ft, comparable: yt }, p));
|
|
9158
9238
|
return function(D, E, O) {
|
|
9159
9239
|
return W(B, D, E, O);
|
|
9160
9240
|
};
|
|
9161
9241
|
}
|
|
9162
|
-
function ft(
|
|
9163
|
-
if (Le(
|
|
9164
|
-
if (r(
|
|
9165
|
-
if (
|
|
9166
|
-
if (
|
|
9242
|
+
function ft(A, p) {
|
|
9243
|
+
if (Le(A, p)) return 0;
|
|
9244
|
+
if (r(A) === r(p)) {
|
|
9245
|
+
if (A > p) return 1;
|
|
9246
|
+
if (A < p) return -1;
|
|
9167
9247
|
}
|
|
9168
9248
|
}
|
|
9169
|
-
function yt(
|
|
9170
|
-
return
|
|
9249
|
+
function yt(A) {
|
|
9250
|
+
return A instanceof Date ? A.getTime() : c(A) ? A.map(yt) : A && typeof A.toJSON == "function" ? A.toJSON() : A;
|
|
9171
9251
|
}
|
|
9172
9252
|
}
|
|
9173
9253
|
]);
|
|
9174
9254
|
});
|
|
9175
|
-
})(
|
|
9176
|
-
var El =
|
|
9255
|
+
})(Qa);
|
|
9256
|
+
var El = Qa.exports;
|
|
9177
9257
|
const Pl = /* @__PURE__ */ jl(El);
|
|
9178
9258
|
function Ol(e, t) {
|
|
9179
9259
|
for (var s = 0; s < t.length; s++) {
|
|
@@ -9241,7 +9321,7 @@ function Fs(e) {
|
|
|
9241
9321
|
}), _t(a, n);
|
|
9242
9322
|
}, Fs(e);
|
|
9243
9323
|
}
|
|
9244
|
-
function
|
|
9324
|
+
function mn(e) {
|
|
9245
9325
|
if (e === void 0)
|
|
9246
9326
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
9247
9327
|
return e;
|
|
@@ -9261,7 +9341,7 @@ var Za = function(t) {
|
|
|
9261
9341
|
};
|
|
9262
9342
|
function t(n, a) {
|
|
9263
9343
|
var r;
|
|
9264
|
-
return a === void 0 && (a = {}), r = e.call(this, n) || this, r._setMetadata(a), r.message = n || Vt(
|
|
9344
|
+
return a === void 0 && (a = {}), r = e.call(this, n) || this, r._setMetadata(a), r.message = n || Vt(mn(r)), r._customMessage = null, typeof Error.captureStackTrace == "function" && (r.name = r.constructor.name, Error.captureStackTrace(mn(r), r.constructor)), r;
|
|
9265
9345
|
}
|
|
9266
9346
|
var s = t.prototype;
|
|
9267
9347
|
return s.setMessage = function(a) {
|
|
@@ -9296,17 +9376,17 @@ function kl(e) {
|
|
|
9296
9376
|
function Rl(e) {
|
|
9297
9377
|
return JSON.parse(JSON.stringify(e));
|
|
9298
9378
|
}
|
|
9299
|
-
var Hl = /[-/\\^$+?.()|[\]{}]/g, Il = /\.?\*+\.?/g,
|
|
9300
|
-
function
|
|
9301
|
-
var n = s[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", a = e.indexOf("**") === -1 ? "[^.]" : ".", r = e.replace(
|
|
9379
|
+
var Hl = /[-/\\^$+?.()|[\]{}]/g, Il = /\.?\*+\.?/g, Tl = /\*+/, ql = /\./g;
|
|
9380
|
+
function Nl(e, t, s) {
|
|
9381
|
+
var n = s[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", a = e.indexOf("**") === -1 ? "[^.]" : ".", r = e.replace(ql, "\\$&").replace(Tl, a + n);
|
|
9302
9382
|
return t + e.length === s.length ? "(?:" + r + ")?" : r;
|
|
9303
9383
|
}
|
|
9304
|
-
function
|
|
9384
|
+
function Xl(e, t, s) {
|
|
9305
9385
|
return e === "." && (s[t - 1] === "*" || s[t + 1] === "*") ? e : "\\" + e;
|
|
9306
9386
|
}
|
|
9307
|
-
function
|
|
9387
|
+
function Ql(e) {
|
|
9308
9388
|
var t = e.map(function(n) {
|
|
9309
|
-
return n.replace(Hl,
|
|
9389
|
+
return n.replace(Hl, Xl).replace(Il, Nl);
|
|
9310
9390
|
}), s = t.length > 1 ? "(?:" + t.join("|") + ")" : t[0];
|
|
9311
9391
|
return new RegExp("^" + s + "$");
|
|
9312
9392
|
}
|
|
@@ -9325,9 +9405,9 @@ var Zl = /* @__PURE__ */ function() {
|
|
|
9325
9405
|
}, t.isRelevantFor = function(n, a) {
|
|
9326
9406
|
return this.fields ? a ? this.matchesField(a) : !this.inverted : !0;
|
|
9327
9407
|
}, t.matchesField = function(n) {
|
|
9328
|
-
return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null :
|
|
9408
|
+
return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : Ql(this.fields)), this._fieldsPattern === null || n.indexOf("*") !== -1 ? this.fields.indexOf(n) !== -1 : this._fieldsPattern.test(n);
|
|
9329
9409
|
}, e;
|
|
9330
|
-
}(), he = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(),
|
|
9410
|
+
}(), he = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(), An = {
|
|
9331
9411
|
crud: ["create", "read", "update", "delete"]
|
|
9332
9412
|
};
|
|
9333
9413
|
function gn(e, t) {
|
|
@@ -9339,7 +9419,7 @@ var Ul = /* @__PURE__ */ function() {
|
|
|
9339
9419
|
throw new Error('Cannot add alias for "manage" action because it represents any action');
|
|
9340
9420
|
if (gn(n, a))
|
|
9341
9421
|
throw new Error("Attempt to alias action to itself: " + n + " -> " + a.toString());
|
|
9342
|
-
return
|
|
9422
|
+
return An[n] = a, this;
|
|
9343
9423
|
};
|
|
9344
9424
|
function e(s, n) {
|
|
9345
9425
|
n === void 0 && (n = {}), Object.defineProperty(this, "subjectName", {
|
|
@@ -9351,7 +9431,7 @@ var Ul = /* @__PURE__ */ function() {
|
|
|
9351
9431
|
indexedRules: /* @__PURE__ */ Object.create(null),
|
|
9352
9432
|
mergedRules: /* @__PURE__ */ Object.create(null),
|
|
9353
9433
|
events: {},
|
|
9354
|
-
aliases: Rl(
|
|
9434
|
+
aliases: Rl(An)
|
|
9355
9435
|
}, this.update(s);
|
|
9356
9436
|
}
|
|
9357
9437
|
var t = e.prototype;
|
|
@@ -9442,10 +9522,10 @@ var Ul = /* @__PURE__ */ function() {
|
|
|
9442
9522
|
}]), e;
|
|
9443
9523
|
}();
|
|
9444
9524
|
function zl(e) {
|
|
9445
|
-
return
|
|
9525
|
+
return Xa[e] ?? e;
|
|
9446
9526
|
}
|
|
9447
9527
|
function ru(e) {
|
|
9448
|
-
const t = Object.entries(
|
|
9528
|
+
const t = Object.entries(Xa).find(([, s]) => s === e);
|
|
9449
9529
|
return t ? t[0] : e;
|
|
9450
9530
|
}
|
|
9451
9531
|
function Wl(e) {
|
|
@@ -9626,7 +9706,7 @@ const nc = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
9626
9706
|
subtitle: "โอ้! คุณไม่มีสิทธิ์เข้าถึงหน้านี้"
|
|
9627
9707
|
}, dc = {
|
|
9628
9708
|
noPermission: uc
|
|
9629
|
-
},
|
|
9709
|
+
}, mc = { class: "w-full h-full flex justify-center items-center" }, Ac = { class: "flex flex-row xs:flex-col items-center gap-24 p-16" }, gc = { class: "w-[300px] h-[300px]" }, pc = ["src"], hc = { class: "text-2xl" }, fc = { class: "text-xl" }, yc = /* @__PURE__ */ at({
|
|
9630
9710
|
__name: "NoPermission",
|
|
9631
9711
|
setup(e) {
|
|
9632
9712
|
const { t } = vn({
|
|
@@ -9637,17 +9717,17 @@ const nc = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
9637
9717
|
"th-TH": dc
|
|
9638
9718
|
}
|
|
9639
9719
|
});
|
|
9640
|
-
return (s, n) => (rt(),
|
|
9641
|
-
|
|
9642
|
-
|
|
9643
|
-
|
|
9720
|
+
return (s, n) => (rt(), qs("div", mc, [
|
|
9721
|
+
Xe("div", Ac, [
|
|
9722
|
+
Xe("div", gc, [
|
|
9723
|
+
Xe("img", {
|
|
9644
9724
|
src: $e(nc),
|
|
9645
9725
|
class: "w-full h-full"
|
|
9646
9726
|
}, null, 8, pc)
|
|
9647
9727
|
]),
|
|
9648
|
-
|
|
9649
|
-
|
|
9650
|
-
|
|
9728
|
+
Xe("div", null, [
|
|
9729
|
+
Xe("h1", hc, sn($e(t)("noPermission.title")), 1),
|
|
9730
|
+
Xe("h2", fc, sn($e(t)("noPermission.subtitle")), 1)
|
|
9651
9731
|
])
|
|
9652
9732
|
])
|
|
9653
9733
|
]));
|
|
@@ -9656,7 +9736,7 @@ const nc = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
9656
9736
|
__name: "PermissionWrapper",
|
|
9657
9737
|
setup(e) {
|
|
9658
9738
|
const t = sc();
|
|
9659
|
-
return (s, n) => $e(t) === $e(Rs).Denied ? (rt(), $t(yc, { key: 0 })) : $e(t) === $e(Rs).Allowed ?
|
|
9739
|
+
return (s, n) => $e(t) === $e(Rs).Denied ? (rt(), $t(yc, { key: 0 })) : $e(t) === $e(Rs).Allowed ? Ts(s.$slots, "default", { key: 1 }) : $a("", !0);
|
|
9660
9740
|
}
|
|
9661
9741
|
});
|
|
9662
9742
|
function ot(e) {
|
|
@@ -9699,22 +9779,22 @@ const wc = /* @__PURE__ */ at({
|
|
|
9699
9779
|
height: `calc(100dvh - ${((c = n.value) == null ? void 0 : c.top) + 24 + l}px)`
|
|
9700
9780
|
};
|
|
9701
9781
|
});
|
|
9702
|
-
return (r, l) => (rt(),
|
|
9782
|
+
return (r, l) => (rt(), qs("div", {
|
|
9703
9783
|
ref_key: "wrapper",
|
|
9704
9784
|
ref: s,
|
|
9705
9785
|
style: sr(a.value)
|
|
9706
9786
|
}, [
|
|
9707
|
-
|
|
9787
|
+
Ts(r.$slots, "default")
|
|
9708
9788
|
], 4));
|
|
9709
9789
|
}
|
|
9710
9790
|
}), Bc = { class: "flex justify-center items-center h-full w-full" }, Cc = /* @__PURE__ */ at({
|
|
9711
9791
|
__name: "PageLoading",
|
|
9712
9792
|
setup(e) {
|
|
9713
9793
|
return (t, s) => {
|
|
9714
|
-
const n =
|
|
9794
|
+
const n = Ns("FmCircularProgress");
|
|
9715
9795
|
return rt(), $t(wc, null, {
|
|
9716
9796
|
default: nr(() => [
|
|
9717
|
-
|
|
9797
|
+
Xe("div", Bc, [
|
|
9718
9798
|
ar(n, { size: "xl" })
|
|
9719
9799
|
])
|
|
9720
9800
|
]),
|
|
@@ -9728,9 +9808,9 @@ const wc = /* @__PURE__ */ at({
|
|
|
9728
9808
|
}), Mc = { class: "sch-vars sch-page" }, Dc = { class: "sch-shell-main" }, xc = /* @__PURE__ */ at({
|
|
9729
9809
|
__name: "PortalShell",
|
|
9730
9810
|
setup(e) {
|
|
9731
|
-
return (t, s) => (rt(),
|
|
9732
|
-
|
|
9733
|
-
|
|
9811
|
+
return (t, s) => (rt(), qs("div", Mc, [
|
|
9812
|
+
Xe("div", Dc, [
|
|
9813
|
+
Ts(t.$slots, "default")
|
|
9734
9814
|
])
|
|
9735
9815
|
]));
|
|
9736
9816
|
}
|
|
@@ -9748,27 +9828,27 @@ const _e = (e) => ({
|
|
|
9748
9828
|
validationManifest: {
|
|
9749
9829
|
requiredCaslPermissions: [
|
|
9750
9830
|
{
|
|
9751
|
-
action:
|
|
9831
|
+
action: Ne.Action.manage,
|
|
9752
9832
|
subject: e
|
|
9753
9833
|
}
|
|
9754
9834
|
]
|
|
9755
9835
|
}
|
|
9756
|
-
}), jc = ot(pe(() => import("./Main-
|
|
9757
|
-
pe(() => import("./AuditLogList-
|
|
9758
|
-
), Oc = ot(pe(() => import("./Main-
|
|
9759
|
-
() => import("./PermissionSetList-
|
|
9836
|
+
}), jc = ot(pe(() => import("./Main-BgB9lD4K.js"))), Ec = ot(pe(() => import("./Main-C0cnqQ3B.js"))), Pc = ot(
|
|
9837
|
+
pe(() => import("./AuditLogList-CHA98ZqW.js"))
|
|
9838
|
+
), Oc = ot(pe(() => import("./Main-hlcHtrsc.js"))), Gc = pe(() => import("./ApprovalCodeList-CJaNPHZC.js")), Yc = pe(() => import("./GrantUserList-MYjgt5-F.js")), Vc = pe(() => import("./EmployeeList-CVmMKt71.js")), Fc = pe(() => import("./RoleList-DNR4miXr.js")), Sc = pe(() => import("./TimesheetList-BzXarZbM.js")), kc = pe(() => import("./TeamMemberList-mw5OveZG.js")), Rc = pe(
|
|
9839
|
+
() => import("./PermissionSetList-5f1WIaVa.js")
|
|
9760
9840
|
), Hc = Ws(
|
|
9761
|
-
ot(pe(() => import("./SchedulePage-
|
|
9841
|
+
ot(pe(() => import("./SchedulePage-C8m0-m3l.js")))
|
|
9762
9842
|
), Ic = Ws(
|
|
9763
|
-
ot(pe(() => import("./SchedulePositionPage-
|
|
9764
|
-
),
|
|
9765
|
-
ot(pe(() => import("./ScheduleGeneralPage-
|
|
9843
|
+
ot(pe(() => import("./SchedulePositionPage-DyRckyUx.js")))
|
|
9844
|
+
), Tc = Ws(
|
|
9845
|
+
ot(pe(() => import("./ScheduleGeneralPage-Cd5AlY4z.js")))
|
|
9766
9846
|
), ou = [
|
|
9767
9847
|
{
|
|
9768
9848
|
path: "/",
|
|
9769
9849
|
name: "home",
|
|
9770
9850
|
component: jc,
|
|
9771
|
-
meta: _e(
|
|
9851
|
+
meta: _e(Ne.Subject.Business.hrm_employee),
|
|
9772
9852
|
redirect: {
|
|
9773
9853
|
name: "employee"
|
|
9774
9854
|
/* EMPLOYEE */
|
|
@@ -9795,13 +9875,13 @@ const _e = (e) => ({
|
|
|
9795
9875
|
path: "/audit-log",
|
|
9796
9876
|
name: "audit-log",
|
|
9797
9877
|
component: Pc,
|
|
9798
|
-
meta: _e(
|
|
9878
|
+
meta: _e(Ne.Subject.Business.hrm_auditLog)
|
|
9799
9879
|
},
|
|
9800
9880
|
{
|
|
9801
9881
|
path: "/team",
|
|
9802
9882
|
name: "team",
|
|
9803
9883
|
component: Ec,
|
|
9804
|
-
meta: _e(
|
|
9884
|
+
meta: _e(Ne.Subject.Business.hrm_teamMember),
|
|
9805
9885
|
redirect: {
|
|
9806
9886
|
name: "team-member"
|
|
9807
9887
|
/* TEAM_MEMBER */
|
|
@@ -9823,7 +9903,7 @@ const _e = (e) => ({
|
|
|
9823
9903
|
path: "/pos-access",
|
|
9824
9904
|
name: "pos-access",
|
|
9825
9905
|
component: Oc,
|
|
9826
|
-
meta: _e(
|
|
9906
|
+
meta: _e(Ne.Subject.Business.hrm_approvalCode),
|
|
9827
9907
|
redirect: {
|
|
9828
9908
|
name: "approval-code"
|
|
9829
9909
|
/* APPROVAL_CODE */
|
|
@@ -9845,19 +9925,19 @@ const _e = (e) => ({
|
|
|
9845
9925
|
path: "/schedule",
|
|
9846
9926
|
name: "schedule",
|
|
9847
9927
|
component: Hc,
|
|
9848
|
-
meta: _e(
|
|
9928
|
+
meta: _e(Ne.Subject.Business.hrm_scheduling)
|
|
9849
9929
|
},
|
|
9850
9930
|
{
|
|
9851
9931
|
path: "/schedule/position",
|
|
9852
9932
|
name: "schedule-position",
|
|
9853
9933
|
component: Ic,
|
|
9854
|
-
meta: _e(
|
|
9934
|
+
meta: _e(Ne.Subject.Business.hrm_scheduling)
|
|
9855
9935
|
},
|
|
9856
9936
|
{
|
|
9857
9937
|
path: "/schedule/general",
|
|
9858
9938
|
name: "schedule-general",
|
|
9859
|
-
component:
|
|
9860
|
-
meta: _e(
|
|
9939
|
+
component: Tc,
|
|
9940
|
+
meta: _e(Ne.Subject.Business.hrm_scheduling)
|
|
9861
9941
|
},
|
|
9862
9942
|
// Old bookmarks / deep links from before the POS Access merge.
|
|
9863
9943
|
{ path: "/approval-code", redirect: {
|
|
@@ -9868,7 +9948,7 @@ const _e = (e) => ({
|
|
|
9868
9948
|
name: "pos-grant"
|
|
9869
9949
|
/* POS_GRANT */
|
|
9870
9950
|
} }
|
|
9871
|
-
],
|
|
9951
|
+
], qc = /* @__PURE__ */ at({
|
|
9872
9952
|
__name: "Navigator",
|
|
9873
9953
|
emits: ["close-navigation"],
|
|
9874
9954
|
setup(e, { emit: t }) {
|
|
@@ -9965,7 +10045,7 @@ const _e = (e) => ({
|
|
|
9965
10045
|
}
|
|
9966
10046
|
c.value !== h && (c.value = h);
|
|
9967
10047
|
}), (h, y) => {
|
|
9968
|
-
const w =
|
|
10048
|
+
const w = Ns("FmCollapsibleTabs");
|
|
9969
10049
|
return rt(), $t(w, {
|
|
9970
10050
|
modelValue: c.value,
|
|
9971
10051
|
"onUpdate:modelValue": y[0] || (y[0] = (V) => c.value = V),
|
|
@@ -9988,47 +10068,47 @@ var Hs = { exports: {} };
|
|
|
9988
10068
|
}
|
|
9989
10069
|
}, getItem: function(f, u) {
|
|
9990
10070
|
var i = this;
|
|
9991
|
-
return new Promise(function(g,
|
|
10071
|
+
return new Promise(function(g, m) {
|
|
9992
10072
|
try {
|
|
9993
10073
|
var b = i.getItemSync(f);
|
|
9994
10074
|
u == null || u(null, b), g(b);
|
|
9995
10075
|
} catch (C) {
|
|
9996
|
-
u && u(C, null),
|
|
10076
|
+
u && u(C, null), m(C);
|
|
9997
10077
|
}
|
|
9998
10078
|
});
|
|
9999
10079
|
}, setItem: function(f, u, i) {
|
|
10000
|
-
return new Promise(function(g,
|
|
10080
|
+
return new Promise(function(g, m) {
|
|
10001
10081
|
try {
|
|
10002
10082
|
localStorage.setItem(f, u), i && i(null, u), g(u);
|
|
10003
10083
|
} catch (b) {
|
|
10004
|
-
i && i(b, null),
|
|
10084
|
+
i && i(b, null), m(b);
|
|
10005
10085
|
}
|
|
10006
10086
|
});
|
|
10007
10087
|
} }, a = function() {
|
|
10008
10088
|
return a = Object.assign || function(f) {
|
|
10009
|
-
for (var u, i = 1, g = arguments.length; i < g; i++) for (var
|
|
10089
|
+
for (var u, i = 1, g = arguments.length; i < g; i++) for (var m in u = arguments[i]) Object.prototype.hasOwnProperty.call(u, m) && (f[m] = u[m]);
|
|
10010
10090
|
return f;
|
|
10011
10091
|
}, a.apply(this, arguments);
|
|
10012
10092
|
};
|
|
10013
10093
|
function r(f, u, i, g) {
|
|
10014
|
-
return new (i || (i = Promise))(function(
|
|
10015
|
-
function C(
|
|
10094
|
+
return new (i || (i = Promise))(function(m, b) {
|
|
10095
|
+
function C(X) {
|
|
10016
10096
|
try {
|
|
10017
|
-
F(g.next(
|
|
10097
|
+
F(g.next(X));
|
|
10018
10098
|
} catch (j) {
|
|
10019
10099
|
b(j);
|
|
10020
10100
|
}
|
|
10021
10101
|
}
|
|
10022
|
-
function G(
|
|
10102
|
+
function G(X) {
|
|
10023
10103
|
try {
|
|
10024
|
-
F(g.throw(
|
|
10104
|
+
F(g.throw(X));
|
|
10025
10105
|
} catch (j) {
|
|
10026
10106
|
b(j);
|
|
10027
10107
|
}
|
|
10028
10108
|
}
|
|
10029
|
-
function F(
|
|
10109
|
+
function F(X) {
|
|
10030
10110
|
var j;
|
|
10031
|
-
|
|
10111
|
+
X.done ? m(X.value) : (j = X.value, j instanceof i ? j : new i(function(L) {
|
|
10032
10112
|
L(j);
|
|
10033
10113
|
})).then(C, G);
|
|
10034
10114
|
}
|
|
@@ -10036,23 +10116,23 @@ var Hs = { exports: {} };
|
|
|
10036
10116
|
});
|
|
10037
10117
|
}
|
|
10038
10118
|
function l(f, u) {
|
|
10039
|
-
var i, g,
|
|
10040
|
-
if (1 &
|
|
10041
|
-
return
|
|
10119
|
+
var i, g, m, b, C = { label: 0, sent: function() {
|
|
10120
|
+
if (1 & m[0]) throw m[1];
|
|
10121
|
+
return m[1];
|
|
10042
10122
|
}, trys: [], ops: [] };
|
|
10043
10123
|
return b = { next: G(0), throw: G(1), return: G(2) }, typeof Symbol == "function" && (b[Symbol.iterator] = function() {
|
|
10044
10124
|
return this;
|
|
10045
10125
|
}), b;
|
|
10046
10126
|
function G(F) {
|
|
10047
|
-
return function(
|
|
10127
|
+
return function(X) {
|
|
10048
10128
|
return function(j) {
|
|
10049
10129
|
if (i) throw new TypeError("Generator is already executing.");
|
|
10050
10130
|
for (; C; ) try {
|
|
10051
|
-
if (i = 1, g && (
|
|
10052
|
-
switch (g = 0,
|
|
10131
|
+
if (i = 1, g && (m = 2 & j[0] ? g.return : j[0] ? g.throw || ((m = g.return) && m.call(g), 0) : g.next) && !(m = m.call(g, j[1])).done) return m;
|
|
10132
|
+
switch (g = 0, m && (j = [2 & j[0], m.value]), j[0]) {
|
|
10053
10133
|
case 0:
|
|
10054
10134
|
case 1:
|
|
10055
|
-
|
|
10135
|
+
m = j;
|
|
10056
10136
|
break;
|
|
10057
10137
|
case 4:
|
|
10058
10138
|
return C.label++, { value: j[1], done: !1 };
|
|
@@ -10063,58 +10143,58 @@ var Hs = { exports: {} };
|
|
|
10063
10143
|
j = C.ops.pop(), C.trys.pop();
|
|
10064
10144
|
continue;
|
|
10065
10145
|
default:
|
|
10066
|
-
if (
|
|
10146
|
+
if (m = C.trys, !((m = m.length > 0 && m[m.length - 1]) || j[0] !== 6 && j[0] !== 2)) {
|
|
10067
10147
|
C = 0;
|
|
10068
10148
|
continue;
|
|
10069
10149
|
}
|
|
10070
|
-
if (j[0] === 3 && (!
|
|
10150
|
+
if (j[0] === 3 && (!m || j[1] > m[0] && j[1] < m[3])) {
|
|
10071
10151
|
C.label = j[1];
|
|
10072
10152
|
break;
|
|
10073
10153
|
}
|
|
10074
|
-
if (j[0] === 6 && C.label <
|
|
10075
|
-
C.label =
|
|
10154
|
+
if (j[0] === 6 && C.label < m[1]) {
|
|
10155
|
+
C.label = m[1], m = j;
|
|
10076
10156
|
break;
|
|
10077
10157
|
}
|
|
10078
|
-
if (
|
|
10079
|
-
C.label =
|
|
10158
|
+
if (m && C.label < m[2]) {
|
|
10159
|
+
C.label = m[2], C.ops.push(j);
|
|
10080
10160
|
break;
|
|
10081
10161
|
}
|
|
10082
|
-
|
|
10162
|
+
m[2] && C.ops.pop(), C.trys.pop();
|
|
10083
10163
|
continue;
|
|
10084
10164
|
}
|
|
10085
10165
|
j = u.call(f, C);
|
|
10086
10166
|
} catch (L) {
|
|
10087
10167
|
j = [6, L], g = 0;
|
|
10088
10168
|
} finally {
|
|
10089
|
-
i =
|
|
10169
|
+
i = m = 0;
|
|
10090
10170
|
}
|
|
10091
10171
|
if (5 & j[0]) throw j[1];
|
|
10092
10172
|
return { value: j[0] ? j[1] : void 0, done: !0 };
|
|
10093
|
-
}([F,
|
|
10173
|
+
}([F, X]);
|
|
10094
10174
|
};
|
|
10095
10175
|
}
|
|
10096
10176
|
}
|
|
10097
10177
|
function c(f, u, i) {
|
|
10098
|
-
for (var g,
|
|
10178
|
+
for (var g, m = 0, b = u.length; m < b; m++) !g && m in u || (g || (g = Array.prototype.slice.call(u, 0, m)), g[m] = u[m]);
|
|
10099
10179
|
return f.concat(g || Array.prototype.slice.call(u));
|
|
10100
10180
|
}
|
|
10101
10181
|
var h = function f(u, i) {
|
|
10102
10182
|
if (u === i) return !0;
|
|
10103
10183
|
if (u && i && typeof u == "object" && typeof i == "object") {
|
|
10104
10184
|
if (u.constructor !== i.constructor) return !1;
|
|
10105
|
-
var g,
|
|
10185
|
+
var g, m, b;
|
|
10106
10186
|
if (Array.isArray(u)) {
|
|
10107
10187
|
if ((g = u.length) != i.length) return !1;
|
|
10108
|
-
for (
|
|
10188
|
+
for (m = g; m-- != 0; ) if (!f(u[m], i[m])) return !1;
|
|
10109
10189
|
return !0;
|
|
10110
10190
|
}
|
|
10111
10191
|
if (u.constructor === RegExp) return u.source === i.source && u.flags === i.flags;
|
|
10112
10192
|
if (u.valueOf !== Object.prototype.valueOf) return u.valueOf() === i.valueOf();
|
|
10113
10193
|
if (u.toString !== Object.prototype.toString) return u.toString() === i.toString();
|
|
10114
10194
|
if ((g = (b = Object.keys(u)).length) !== Object.keys(i).length) return !1;
|
|
10115
|
-
for (
|
|
10116
|
-
for (
|
|
10117
|
-
var C = b[
|
|
10195
|
+
for (m = g; m-- != 0; ) if (!Object.prototype.hasOwnProperty.call(i, b[m])) return !1;
|
|
10196
|
+
for (m = g; m-- != 0; ) {
|
|
10197
|
+
var C = b[m];
|
|
10118
10198
|
if (!f(u[C], i[C])) return !1;
|
|
10119
10199
|
}
|
|
10120
10200
|
return !0;
|
|
@@ -10123,8 +10203,8 @@ var Hs = { exports: {} };
|
|
|
10123
10203
|
};
|
|
10124
10204
|
function y(f, u) {
|
|
10125
10205
|
var i = Object.keys(u || {}).filter(function(g) {
|
|
10126
|
-
var
|
|
10127
|
-
return !h(
|
|
10206
|
+
var m = f == null ? void 0 : f[g], b = u == null ? void 0 : u[g];
|
|
10207
|
+
return !h(m, b);
|
|
10128
10208
|
});
|
|
10129
10209
|
return Object.keys(f || {}).filter(function(g) {
|
|
10130
10210
|
Object.keys(u || {}).includes(g) || i.push(g);
|
|
@@ -10132,8 +10212,8 @@ var Hs = { exports: {} };
|
|
|
10132
10212
|
}
|
|
10133
10213
|
var w, V;
|
|
10134
10214
|
function Z(f, u, i) {
|
|
10135
|
-
var g = "shortString",
|
|
10136
|
-
typeof i == "number" && (g = "javaDouble",
|
|
10215
|
+
var g = "shortString", m = !0;
|
|
10216
|
+
typeof i == "number" && (g = "javaDouble", m = !1), f[g] = f[g] || {}, f[g][u] = m ? i + "" : i;
|
|
10137
10217
|
}
|
|
10138
10218
|
function W(f) {
|
|
10139
10219
|
return !!f && typeof f == "object" && f.value !== void 0;
|
|
@@ -10154,10 +10234,10 @@ var Hs = { exports: {} };
|
|
|
10154
10234
|
function f(u) {
|
|
10155
10235
|
var i = this;
|
|
10156
10236
|
this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
|
|
10157
|
-
var g = i,
|
|
10237
|
+
var g = i, m = g.api, b = g.evaluationContext;
|
|
10158
10238
|
i.log("Get Flags"), i.isLoading = !0, i.loadingState.isFetching || i.setLoadingState(a(a({}, i.loadingState), { isFetching: !0 }));
|
|
10159
10239
|
var C = "".concat(i.getContext().identity), G = function(F) {
|
|
10160
|
-
var
|
|
10240
|
+
var X, j, L, de;
|
|
10161
10241
|
if (F && C === "".concat(i.getContext().identity)) {
|
|
10162
10242
|
var xe = F.flags, ye = F.traits, Me = F.identifier;
|
|
10163
10243
|
i.isLoading = !1;
|
|
@@ -10167,7 +10247,7 @@ var Hs = { exports: {} };
|
|
|
10167
10247
|
}), ye.forEach(function(K) {
|
|
10168
10248
|
ve[K.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: K.transient, value: K.trait_value };
|
|
10169
10249
|
}), i.oldFlags = a({}, i.flags);
|
|
10170
|
-
var je = y(i.oldFlags, be), bt = y((
|
|
10250
|
+
var je = y(i.oldFlags, be), bt = y((X = i.evaluationContext.identity) === null || X === void 0 ? void 0 : X.traits, ve);
|
|
10171
10251
|
if ((Me || Object.keys(ve).length) && (i.evaluationContext.identity = a(a({}, i.evaluationContext.identity), { traits: ve }), Me && (i.evaluationContext.identity.identifier = Me)), i.flags = be, i.updateStorage(), i._onChange(i.oldFlags, { isFromServer: !0, flagsChanged: je, traitsChanged: bt }, i._loadedState(null, w.SERVER)), i.datadogRum) try {
|
|
10172
10252
|
if (i.datadogRum.trackTraits) {
|
|
10173
10253
|
var vt = {};
|
|
@@ -10181,88 +10261,88 @@ var Hs = { exports: {} };
|
|
|
10181
10261
|
console.error(K);
|
|
10182
10262
|
}
|
|
10183
10263
|
if (i.dtrum) try {
|
|
10184
|
-
var
|
|
10264
|
+
var me = { javaDouble: {}, date: {}, shortString: {}, javaLongOrObject: {} };
|
|
10185
10265
|
Object.keys(i.flags).map(function(K) {
|
|
10186
|
-
Z(
|
|
10266
|
+
Z(me, ht + K, i.getValue(K, { skipAnalytics: !0 })), Z(me, Gt + K, i.hasFeature(K, { skipAnalytics: !0 }));
|
|
10187
10267
|
}), Object.keys(((de = i.evaluationContext.identity) === null || de === void 0 ? void 0 : de.traits) || {}).map(function(K) {
|
|
10188
|
-
Z(
|
|
10189
|
-
}), i.log("Sending javaLongOrObject traits to dynatrace",
|
|
10268
|
+
Z(me, ft + K, i.getTrait(K));
|
|
10269
|
+
}), i.log("Sending javaLongOrObject traits to dynatrace", me.javaLongOrObject), i.log("Sending date traits to dynatrace", me.date), i.log("Sending shortString traits to dynatrace", me.shortString), i.log("Sending javaDouble to dynatrace", me.javaDouble), i.dtrum.sendSessionProperties(me.javaLongOrObject, me.date, me.shortString, me.javaDouble);
|
|
10190
10270
|
} catch (K) {
|
|
10191
10271
|
console.error(K);
|
|
10192
10272
|
}
|
|
10193
10273
|
}
|
|
10194
10274
|
};
|
|
10195
|
-
return b.identity ? Promise.all([b.identity.traits && Object.keys(b.identity.traits).length || !b.identity.identifier ? i.getJSON(
|
|
10196
|
-
var
|
|
10197
|
-
return { trait_key:
|
|
10275
|
+
return b.identity ? Promise.all([b.identity.traits && Object.keys(b.identity.traits).length || !b.identity.identifier ? i.getJSON(m + "identities/", "POST", JSON.stringify({ identifier: b.identity.identifier, transient: b.identity.transient, traits: Object.entries(b.identity.traits).map(function(F) {
|
|
10276
|
+
var X = F[0], j = F[1];
|
|
10277
|
+
return { trait_key: X, trait_value: j == null ? void 0 : j.value, transient: j == null ? void 0 : j.transient };
|
|
10198
10278
|
}).filter(function(F) {
|
|
10199
10279
|
return F.trait_value !== void 0 || (i.log("Warning - attempted to set an undefined trait value for key", F.trait_key), !1);
|
|
10200
|
-
}) })) : i.getJSON(
|
|
10280
|
+
}) })) : i.getJSON(m + "identities/?identifier=" + encodeURIComponent(b.identity.identifier) + (b.identity.transient ? "&transient=true" : ""))]).then(function(F) {
|
|
10201
10281
|
return i.evaluationContext.identity = a(a({}, i.evaluationContext.identity), { traits: {} }), G(F == null ? void 0 : F[0]);
|
|
10202
10282
|
}).catch(function(F) {
|
|
10203
|
-
var
|
|
10283
|
+
var X = F.message, j = new Error(X);
|
|
10204
10284
|
return Promise.reject(j);
|
|
10205
|
-
}) : i.getJSON(
|
|
10285
|
+
}) : i.getJSON(m + "flags/").then(function(F) {
|
|
10206
10286
|
return G({ flags: F, traits: void 0 });
|
|
10207
10287
|
});
|
|
10208
10288
|
}, this.analyticsFlags = function() {
|
|
10209
10289
|
var g = i.api;
|
|
10210
|
-
if (i.evaluationEvent && i.evaluationContext.environment && i.evaluationEvent[i.evaluationContext.environment.apiKey]) return i.evaluationEvent && Object.getOwnPropertyNames(i.evaluationEvent).length !== 0 && Object.getOwnPropertyNames(i.evaluationEvent[i.evaluationContext.environment.apiKey]).length !== 0 ? i.getJSON(g + "analytics/flags/", "POST", JSON.stringify(i.evaluationEvent[i.evaluationContext.environment.apiKey])).then(function(
|
|
10290
|
+
if (i.evaluationEvent && i.evaluationContext.environment && i.evaluationEvent[i.evaluationContext.environment.apiKey]) return i.evaluationEvent && Object.getOwnPropertyNames(i.evaluationEvent).length !== 0 && Object.getOwnPropertyNames(i.evaluationEvent[i.evaluationContext.environment.apiKey]).length !== 0 ? i.getJSON(g + "analytics/flags/", "POST", JSON.stringify(i.evaluationEvent[i.evaluationContext.environment.apiKey])).then(function(m) {
|
|
10211
10291
|
if (i.evaluationContext.environment) {
|
|
10212
10292
|
var b = i.getState();
|
|
10213
10293
|
i.evaluationEvent || (i.evaluationEvent = {}), i.evaluationEvent[i.evaluationContext.environment.apiKey] = {}, i.setState(a(a({}, b), { evaluationEvent: i.evaluationEvent })), i.updateEventStorage();
|
|
10214
10294
|
}
|
|
10215
|
-
}).catch(function(
|
|
10216
|
-
i.log("Exception fetching evaluationEvent",
|
|
10295
|
+
}).catch(function(m) {
|
|
10296
|
+
i.log("Exception fetching evaluationEvent", m);
|
|
10217
10297
|
}) : void 0;
|
|
10218
|
-
}, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: w.NONE }, this.canUseStorage = !1, this.analyticsInterval = null, this.api = null, this.cacheFlags = !1, this.ts = null, this.enableAnalytics = !1, this.enableLogs = !1, this.evaluationContext = {}, this.evaluationEvent = null, this.flags = null, this.getFlagInterval = null, this.headers = null, this.initialised = !1, this.oldFlags = null, this.onChange = null, this.onError = null, this.ticks = null, this.timer = null, this.dtrum = null, this.withTraits = null, this.cacheOptions = { ttl: 0, skipAPI: !1, loadStale: !1, storageKey: void 0 }, this.getValue = function(g,
|
|
10298
|
+
}, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: w.NONE }, this.canUseStorage = !1, this.analyticsInterval = null, this.api = null, this.cacheFlags = !1, this.ts = null, this.enableAnalytics = !1, this.enableLogs = !1, this.evaluationContext = {}, this.evaluationEvent = null, this.flags = null, this.getFlagInterval = null, this.headers = null, this.initialised = !1, this.oldFlags = null, this.onChange = null, this.onError = null, this.ticks = null, this.timer = null, this.dtrum = null, this.withTraits = null, this.cacheOptions = { ttl: 0, skipAPI: !1, loadStale: !1, storageKey: void 0 }, this.getValue = function(g, m, b) {
|
|
10219
10299
|
var C = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], G = null;
|
|
10220
|
-
if (C && (G = C.value),
|
|
10221
|
-
if (
|
|
10300
|
+
if (C && (G = C.value), m != null && m.skipAnalytics || b || i.evaluateFlag(g, "VALUE"), G === null && (m == null ? void 0 : m.fallback) !== void 0) return m.fallback;
|
|
10301
|
+
if (m != null && m.json) try {
|
|
10222
10302
|
return G === null ? (i.log("Tried to parse null flag as JSON: " + g), null) : JSON.parse(G);
|
|
10223
10303
|
} catch {
|
|
10224
|
-
return
|
|
10304
|
+
return m.fallback;
|
|
10225
10305
|
}
|
|
10226
10306
|
return G;
|
|
10227
10307
|
}, this.getTrait = function(g) {
|
|
10228
|
-
var
|
|
10229
|
-
return ((
|
|
10308
|
+
var m, b;
|
|
10309
|
+
return ((m = i.evaluationContext.identity) === null || m === void 0 ? void 0 : m.traits) && ((b = i.evaluationContext.identity.traits[g.toLowerCase().replace(/ /g, "_")]) === null || b === void 0 ? void 0 : b.value);
|
|
10230
10310
|
}, this.getAllTraits = function() {
|
|
10231
10311
|
var g;
|
|
10232
|
-
return Object.fromEntries(Object.entries(((g = i.evaluationContext.identity) === null || g === void 0 ? void 0 : g.traits) || {}).map(function(
|
|
10233
|
-
var b =
|
|
10312
|
+
return Object.fromEntries(Object.entries(((g = i.evaluationContext.identity) === null || g === void 0 ? void 0 : g.traits) || {}).map(function(m) {
|
|
10313
|
+
var b = m[0], C = m[1];
|
|
10234
10314
|
return [b, C == null ? void 0 : C.value];
|
|
10235
10315
|
}));
|
|
10236
10316
|
}, this.setContext = function(g) {
|
|
10237
|
-
var
|
|
10238
|
-
return i.evaluationContext = a(a({},
|
|
10317
|
+
var m = oe(g);
|
|
10318
|
+
return i.evaluationContext = a(a({}, m), { environment: m.environment || i.evaluationContext.environment }), i.initialised ? i.getFlags() : Promise.resolve();
|
|
10239
10319
|
}, this.getContext = function() {
|
|
10240
10320
|
return i.evaluationContext;
|
|
10241
10321
|
}, this.updateContext = function(g) {
|
|
10242
10322
|
return i.setContext(a(a({}, i.getContext()), g));
|
|
10243
|
-
}, this.setTrait = function(g,
|
|
10323
|
+
}, this.setTrait = function(g, m) {
|
|
10244
10324
|
var b;
|
|
10245
|
-
if (i.api) return i.setContext(a(a({}, i.evaluationContext), { identity: a(a({}, i.evaluationContext.identity), { traits: a(a({}, (b = i.evaluationContext.identity) === null || b === void 0 ? void 0 : b.traits), se(Object.fromEntries([[g,
|
|
10325
|
+
if (i.api) return i.setContext(a(a({}, i.evaluationContext), { identity: a(a({}, i.evaluationContext.identity), { traits: a(a({}, (b = i.evaluationContext.identity) === null || b === void 0 ? void 0 : b.traits), se(Object.fromEntries([[g, m]]))) }) }));
|
|
10246
10326
|
}, this.setTraits = function(g) {
|
|
10247
|
-
var
|
|
10248
|
-
if (i.api) return i.setContext(a(a({}, i.evaluationContext), { identity: a(a({}, i.evaluationContext.identity), { traits: a(a({}, (
|
|
10327
|
+
var m;
|
|
10328
|
+
if (i.api) return i.setContext(a(a({}, i.evaluationContext), { identity: a(a({}, i.evaluationContext.identity), { traits: a(a({}, (m = i.evaluationContext.identity) === null || m === void 0 ? void 0 : m.traits), Object.fromEntries(Object.entries(g).map(function(b) {
|
|
10249
10329
|
var C = b[0], G = b[1];
|
|
10250
10330
|
return [C, W(G) ? G : { value: G }];
|
|
10251
10331
|
}))) }) }));
|
|
10252
10332
|
console.error("Attempted to setTraits a user before calling flagsmith.init. Call flagsmith.init first, if you wish to prevent it sending a request for flags, call init with preventFetch:true.");
|
|
10253
|
-
}, this.hasFeature = function(g,
|
|
10254
|
-
var b = typeof
|
|
10255
|
-
return !C && b &&
|
|
10333
|
+
}, this.hasFeature = function(g, m) {
|
|
10334
|
+
var b = typeof m == "object", C = i.flags && i.flags[g.toLowerCase().replace(/ /g, "_")], G = !1;
|
|
10335
|
+
return !C && b && m.fallback !== void 0 ? G = m == null ? void 0 : m.fallback : C && C.enabled && (G = !0), (b && !m.skipAnalytics || !m) && i.evaluateFlag(g, "ENABLED"), G;
|
|
10256
10336
|
}, this.getStorageKey = function() {
|
|
10257
|
-
var g,
|
|
10258
|
-
return ((g = i.cacheOptions) === null || g === void 0 ? void 0 : g.storageKey) || "FLAGSMITH_DB_" + ((
|
|
10259
|
-
}, this.getJSON = function(g,
|
|
10337
|
+
var g, m;
|
|
10338
|
+
return ((g = i.cacheOptions) === null || g === void 0 ? void 0 : g.storageKey) || "FLAGSMITH_DB_" + ((m = i.evaluationContext.environment) === null || m === void 0 ? void 0 : m.apiKey);
|
|
10339
|
+
}, this.getJSON = function(g, m, b) {
|
|
10260
10340
|
var C, G = i;
|
|
10261
10341
|
G.evaluationContext;
|
|
10262
|
-
var F = G.headers,
|
|
10263
|
-
i.evaluationContext.environment && (
|
|
10342
|
+
var F = G.headers, X = { method: m || "GET", body: b, cache: "no-cache", headers: {} };
|
|
10343
|
+
i.evaluationContext.environment && (X.headers["X-Environment-Key"] = i.evaluationContext.environment.apiKey), m && m !== "GET" && (X.headers["Content-Type"] = "application/json; charset=utf-8"), F && Object.assign(X.headers, F), V || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
|
|
10264
10344
|
var j = "".concat((C = i.evaluationContext.identity) === null || C === void 0 ? void 0 : C.identifier);
|
|
10265
|
-
return V(g,
|
|
10345
|
+
return V(g, X).then(function(L) {
|
|
10266
10346
|
var de, xe, ye = "".concat((de = i.evaluationContext.identity) === null || de === void 0 ? void 0 : de.identifier);
|
|
10267
10347
|
if (j === ye) {
|
|
10268
10348
|
var Me = (xe = L.headers) === null || xe === void 0 ? void 0 : xe.get("x-flagsmith-document-updated-at");
|
|
@@ -10273,7 +10353,7 @@ var Hs = { exports: {} };
|
|
|
10273
10353
|
} catch (ve) {
|
|
10274
10354
|
i.log(ve, "Failed to parse x-flagsmith-document-updated-at", Me);
|
|
10275
10355
|
}
|
|
10276
|
-
return i.log("Fetch response: " + L.status + " " + (
|
|
10356
|
+
return i.log("Fetch response: " + L.status + " " + (m || "GET") + 0 + g), L.text().then(function(ve) {
|
|
10277
10357
|
var je = ve;
|
|
10278
10358
|
try {
|
|
10279
10359
|
je = JSON.parse(ve);
|
|
@@ -10284,45 +10364,45 @@ var Hs = { exports: {} };
|
|
|
10284
10364
|
}
|
|
10285
10365
|
i.log("Received response with identity mismatch, ignoring response. Requested: ".concat(j, ", Current: ").concat(ye));
|
|
10286
10366
|
});
|
|
10287
|
-
}, this.evaluateFlag = function(g,
|
|
10288
|
-
if (i.datadogRum && (i.datadogRum.client.addFeatureFlagEvaluation ?
|
|
10367
|
+
}, this.evaluateFlag = function(g, m) {
|
|
10368
|
+
if (i.datadogRum && (i.datadogRum.client.addFeatureFlagEvaluation ? m === "VALUE" ? i.datadogRum.client.addFeatureFlagEvaluation(ht + g, i.getValue(g, {}, !0)) : i.datadogRum.client.addFeatureFlagEvaluation(Gt + g, i.hasFeature(g, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), i.enableAnalytics) {
|
|
10289
10369
|
if (!i.evaluationEvent || !i.evaluationContext.environment) return;
|
|
10290
10370
|
i.evaluationEvent[i.evaluationContext.environment.apiKey] || (i.evaluationEvent[i.evaluationContext.environment.apiKey] = {}), i.evaluationEvent[i.evaluationContext.environment.apiKey][g] === void 0 && (i.evaluationEvent[i.evaluationContext.environment.apiKey][g] = 0), i.evaluationEvent[i.evaluationContext.environment.apiKey][g] += 1;
|
|
10291
10371
|
}
|
|
10292
10372
|
i.updateEventStorage();
|
|
10293
|
-
}, this._onChange = function(g,
|
|
10373
|
+
}, this._onChange = function(g, m, b) {
|
|
10294
10374
|
var C, G;
|
|
10295
|
-
i.setLoadingState(b), (C = i.onChange) === null || C === void 0 || C.call(i, g,
|
|
10375
|
+
i.setLoadingState(b), (C = i.onChange) === null || C === void 0 || C.call(i, g, m, i.loadingState), (G = i._trigger) === null || G === void 0 || G.call(i);
|
|
10296
10376
|
}, V = u.fetch ? u.fetch : typeof fetch < "u" ? fetch : Dt == null ? void 0 : Dt.fetch, this.canUseStorage = typeof window < "u" || !!u.browserlessStorage, this.log("Constructing flagsmith instance " + u), u.eventSource && (fe = u.eventSource), u.AsyncStorage && (ie = u.AsyncStorage);
|
|
10297
10377
|
}
|
|
10298
10378
|
return f.prototype.init = function(u) {
|
|
10299
|
-
var i, g,
|
|
10379
|
+
var i, g, m;
|
|
10300
10380
|
return r(this, void 0, void 0, function() {
|
|
10301
|
-
var b, C, G, F,
|
|
10381
|
+
var b, C, G, F, X, j, L, de, xe, ye, Me, be, ve, je, bt, vt, it, me, K, ns, wt, Ls, lt, as, Ks, Js, rs, _s, os, Bt, ct, $s, Ae = this;
|
|
10302
10382
|
return l(this, function(De) {
|
|
10303
10383
|
switch (De.label) {
|
|
10304
10384
|
case 0:
|
|
10305
10385
|
b = oe(u.evaluationContext || this.evaluationContext), De.label = 1;
|
|
10306
10386
|
case 1:
|
|
10307
|
-
if (De.trys.push([1, 13, , 14]), C = u.environmentID, G = u.api, F = G === void 0 ? Le : G,
|
|
10387
|
+
if (De.trys.push([1, 13, , 14]), C = u.environmentID, G = u.api, F = G === void 0 ? Le : G, X = u.headers, j = u.onChange, L = u.cacheFlags, de = u.datadogRum, xe = u.onError, ye = u.defaultFlags, Me = u.fetch, be = u.preventFetch, ve = u.enableLogs, je = u.enableDynatrace, bt = u.enableAnalytics, vt = u.realtime, it = u.eventSourceUrl, me = it === void 0 ? "https://realtime.flagsmith.com/" : it, K = u.AsyncStorage, ns = u.identity, wt = u.traits, Ls = u.state, lt = u.cacheOptions, as = u.angularHttpClient, Ks = u._trigger, Js = u._triggerLoadingState, b.environment = C ? { apiKey: C } : b.environment, !b.environment || !b.environment.apiKey) throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
|
|
10308
10388
|
if (b.identity = ns || wt ? { identifier: ns, traits: wt ? Object.fromEntries(Object.entries(wt).map(function(we) {
|
|
10309
10389
|
return [we[0], { value: we[1] }];
|
|
10310
|
-
})) : {} } : b.identity, this.evaluationContext = b, this.api = F, this.headers =
|
|
10311
|
-
|
|
10312
|
-
}, this.enableLogs = ve || !1, this.cacheOptions = lt ? { skipAPI: !!lt.skipAPI, ttl: lt.ttl || 0, storageKey: lt.storageKey, loadStale: !!lt.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), Me && (V = Me), this.enableAnalytics = bt || !1, this.flags = Object.assign({}, ye) || {}, this.datadogRum = de || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = ie !== void 0 && !!L, Ce = "FLAGSMITH_EVENT_" + b.environment.apiKey, K && (ie = K), vt && typeof window < "u" && this.setupRealtime(
|
|
10390
|
+
})) : {} } : b.identity, this.evaluationContext = b, this.api = F, this.headers = X, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = j, rs = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Ks || this._trigger, this._triggerLoadingState = Js || this._triggerLoadingState, this.onError = function(we) {
|
|
10391
|
+
Ae.setLoadingState(a(a({}, Ae.loadingState), { isFetching: !1, isLoading: !1, error: we })), xe == null || xe(we);
|
|
10392
|
+
}, this.enableLogs = ve || !1, this.cacheOptions = lt ? { skipAPI: !!lt.skipAPI, ttl: lt.ttl || 0, storageKey: lt.storageKey, loadStale: !!lt.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), Me && (V = Me), this.enableAnalytics = bt || !1, this.flags = Object.assign({}, ye) || {}, this.datadogRum = de || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = ie !== void 0 && !!L, Ce = "FLAGSMITH_EVENT_" + b.environment.apiKey, K && (ie = K), vt && typeof window < "u" && this.setupRealtime(me, b.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = a(a({}, this.loadingState), { isLoading: !1, source: w.DEFAULT_FLAGS })), this.setState(Ls), this.log("Initialising with properties", u, this), je && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), as && (V = /* @__PURE__ */ function(we) {
|
|
10313
10393
|
return function(Ee, Pe) {
|
|
10314
|
-
var
|
|
10394
|
+
var Te = Pe.headers, _ = Pe.method, ut = Pe.body;
|
|
10315
10395
|
return new Promise(function(Ke) {
|
|
10316
10396
|
switch (_) {
|
|
10317
10397
|
case "GET":
|
|
10318
|
-
return we.get(Ee, { headers:
|
|
10398
|
+
return we.get(Ee, { headers: Te }).subscribe(function(ke) {
|
|
10319
10399
|
Ke({ ok: !0, text: function() {
|
|
10320
10400
|
return Promise.resolve(ke);
|
|
10321
10401
|
} });
|
|
10322
10402
|
});
|
|
10323
10403
|
case "POST":
|
|
10324
10404
|
case "PUT":
|
|
10325
|
-
return we.post(Ee, ut, { headers:
|
|
10405
|
+
return we.post(Ee, ut, { headers: Te }).subscribe(function(ke) {
|
|
10326
10406
|
Ke({ ok: !0, text: function() {
|
|
10327
10407
|
return Promise.resolve(ke);
|
|
10328
10408
|
} });
|
|
@@ -10332,55 +10412,55 @@ var Hs = { exports: {} };
|
|
|
10332
10412
|
};
|
|
10333
10413
|
}(as)), ie && this.canUseStorage && ie.getItem(Ce).then(function(we) {
|
|
10334
10414
|
try {
|
|
10335
|
-
|
|
10415
|
+
Ae.evaluationEvent = JSON.parse(we) || {};
|
|
10336
10416
|
} catch {
|
|
10337
|
-
|
|
10417
|
+
Ae.evaluationEvent = {};
|
|
10338
10418
|
}
|
|
10339
|
-
|
|
10419
|
+
Ae.analyticsInterval = setInterval(Ae.analyticsFlags, Ae.ticks);
|
|
10340
10420
|
}), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), ie && this.canUseStorage && ie.getItem(Ce, function(we, Ee) {
|
|
10341
|
-
if (Ee &&
|
|
10421
|
+
if (Ee && Ae.evaluationContext.environment) {
|
|
10342
10422
|
var Pe = JSON.parse(Ee);
|
|
10343
|
-
if (Pe[
|
|
10344
|
-
var
|
|
10345
|
-
|
|
10423
|
+
if (Pe[Ae.evaluationContext.environment.apiKey]) {
|
|
10424
|
+
var Te = Ae.getState();
|
|
10425
|
+
Ae.log("Retrieved events from cache", Ee), Ae.setState(a(a({}, Te), { evaluationEvent: Pe[Ae.evaluationContext.environment.apiKey] }));
|
|
10346
10426
|
}
|
|
10347
10427
|
}
|
|
10348
10428
|
})), !L) return [3, 9];
|
|
10349
10429
|
if (!ie || !this.canUseStorage) return [3, 8];
|
|
10350
10430
|
_s = function(we, Ee) {
|
|
10351
|
-
return r(
|
|
10352
|
-
var Pe,
|
|
10353
|
-
return l(this, function(
|
|
10354
|
-
switch (
|
|
10431
|
+
return r(Ae, void 0, void 0, function() {
|
|
10432
|
+
var Pe, Te, _, ut, Ke, ke, is, en, ls, cs, us, ds, ms, As, gs, ps, hs, fs, ys, bs, vs, ws, Bs, Cs, tn = this;
|
|
10433
|
+
return l(this, function(qe) {
|
|
10434
|
+
switch (qe.label) {
|
|
10355
10435
|
case 0:
|
|
10356
10436
|
if (!Ee) return [3, 7];
|
|
10357
|
-
Pe = null,
|
|
10437
|
+
Pe = null, Te = null, qe.label = 1;
|
|
10358
10438
|
case 1:
|
|
10359
|
-
return
|
|
10439
|
+
return qe.trys.push([1, 5, , 6]), _ = JSON.parse(Ee), ut = !1, Ke = !1, _ && _.api === this.api && ((cs = (ls = _.evaluationContext) === null || ls === void 0 ? void 0 : ls.environment) === null || cs === void 0 ? void 0 : cs.apiKey) === ((us = this.evaluationContext.environment) === null || us === void 0 ? void 0 : us.apiKey) && (ke = !0, this.evaluationContext.identity && ((ms = (ds = _.evaluationContext) === null || ds === void 0 ? void 0 : ds.identity) === null || ms === void 0 ? void 0 : ms.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((gs = (As = _.evaluationContext) === null || As === void 0 ? void 0 : As.identity) === null || gs === void 0 ? void 0 : gs.identifier) + " to " + this.evaluationContext.identity.identifier), ke = !1), this.cacheOptions.ttl && (!_.ts || (/* @__PURE__ */ new Date()).valueOf() - _.ts > this.cacheOptions.ttl) && (_.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + _.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - _.ts) + "ms"), ke = !1) : _.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + _.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - _.ts) + "ms"), Ke = !0, ke = !0)), ke && (ut = !0, Te = y((ps = this.evaluationContext.identity) === null || ps === void 0 ? void 0 : ps.traits, (fs = (hs = _.evaluationContext) === null || hs === void 0 ? void 0 : hs.identity) === null || fs === void 0 ? void 0 : fs.traits), Pe = y(this.flags, _.flags), this.setState(a(a({}, _), { evaluationContext: oe(a(a({}, _.evaluationContext), { identity: !((ys = _.evaluationContext) === null || ys === void 0) && ys.identity ? a(a({}, (bs = _.evaluationContext) === null || bs === void 0 ? void 0 : bs.identity), { traits: a(a({}, ((ws = (vs = _.evaluationContext) === null || vs === void 0 ? void 0 : vs.identity) === null || ws === void 0 ? void 0 : ws.traits) || {}), wt || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", _))), ut ? (is = !be && (!this.cacheOptions.skipAPI || Ke), this._onChange(null, { isFromServer: !1, flagsChanged: Pe, traitsChanged: Te }, this._loadedState(null, w.CACHE, is)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && ut && !Ke && this.log("Skipping API, using cache"), is && this.getFlags().catch(function(Wa) {
|
|
10360
10440
|
var Ms;
|
|
10361
10441
|
(Ms = tn.onError) === null || Ms === void 0 || Ms.call(tn, Wa);
|
|
10362
10442
|
}), [3, 4]) : [3, 2];
|
|
10363
10443
|
case 2:
|
|
10364
10444
|
return be ? [3, 4] : [4, this.getFlags()];
|
|
10365
10445
|
case 3:
|
|
10366
|
-
|
|
10446
|
+
qe.sent(), qe.label = 4;
|
|
10367
10447
|
case 4:
|
|
10368
10448
|
return [3, 6];
|
|
10369
10449
|
case 5:
|
|
10370
|
-
return en =
|
|
10450
|
+
return en = qe.sent(), this.log("Exception fetching cached logs", en), [3, 6];
|
|
10371
10451
|
case 6:
|
|
10372
10452
|
return [3, 10];
|
|
10373
10453
|
case 7:
|
|
10374
10454
|
return be ? [3, 9] : [4, this.getFlags()];
|
|
10375
10455
|
case 8:
|
|
10376
|
-
return
|
|
10456
|
+
return qe.sent(), [3, 10];
|
|
10377
10457
|
case 9:
|
|
10378
10458
|
if (ye) this._onChange(null, { isFromServer: !1, flagsChanged: y({}, this.flags), traitsChanged: y({}, (Bs = this.evaluationContext.identity) === null || Bs === void 0 ? void 0 : Bs.traits) }, this._loadedState(null, w.DEFAULT_FLAGS));
|
|
10379
10459
|
else {
|
|
10380
10460
|
if (!this.flags) throw new Error(rs);
|
|
10381
10461
|
this._onChange(null, { isFromServer: !1, flagsChanged: y({}, this.flags), traitsChanged: y({}, (Cs = this.evaluationContext.identity) === null || Cs === void 0 ? void 0 : Cs.traits) }, this._loadedState(null, w.DEFAULT_FLAGS));
|
|
10382
10462
|
}
|
|
10383
|
-
|
|
10463
|
+
qe.label = 10;
|
|
10384
10464
|
case 10:
|
|
10385
10465
|
return [2];
|
|
10386
10466
|
}
|
|
@@ -10411,7 +10491,7 @@ var Hs = { exports: {} };
|
|
|
10411
10491
|
case 12:
|
|
10412
10492
|
return [3, 14];
|
|
10413
10493
|
case 13:
|
|
10414
|
-
throw ct = De.sent(), this.log("Error during initialisation ", ct), $s = ct instanceof Error ? ct : new Error("".concat(ct)), (
|
|
10494
|
+
throw ct = De.sent(), this.log("Error during initialisation ", ct), $s = ct instanceof Error ? ct : new Error("".concat(ct)), (m = this.onError) === null || m === void 0 || m.call(this, $s), ct;
|
|
10415
10495
|
case 14:
|
|
10416
10496
|
return [2];
|
|
10417
10497
|
}
|
|
@@ -10420,8 +10500,8 @@ var Hs = { exports: {} };
|
|
|
10420
10500
|
}, f.prototype.getAllFlags = function() {
|
|
10421
10501
|
return this.flags;
|
|
10422
10502
|
}, f.prototype.identify = function(u, i, g) {
|
|
10423
|
-
return this.evaluationContext.identity = { identifier: u, transient: g, traits: this.evaluationContext.identity && this.evaluationContext.identity.identifier == u ? this.evaluationContext.identity.traits : {} }, this.evaluationContext.identity.identifier = u, this.log("Identify: " + this.evaluationContext.identity.identifier), i && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(i).map(function(
|
|
10424
|
-
var b =
|
|
10503
|
+
return this.evaluationContext.identity = { identifier: u, transient: g, traits: this.evaluationContext.identity && this.evaluationContext.identity.identifier == u ? this.evaluationContext.identity.traits : {} }, this.evaluationContext.identity.identifier = u, this.log("Identify: " + this.evaluationContext.identity.identifier), i && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(i).map(function(m) {
|
|
10504
|
+
var b = m[0], C = m[1];
|
|
10425
10505
|
return [b, W(C) ? C : { value: C }];
|
|
10426
10506
|
}))), this.initialised ? this.getFlags() : Promise.resolve();
|
|
10427
10507
|
}, f.prototype.getState = function() {
|
|
@@ -10456,8 +10536,8 @@ var Hs = { exports: {} };
|
|
|
10456
10536
|
var i;
|
|
10457
10537
|
h(u, this.loadingState) || (this.loadingState = a({}, u), this.log("Loading state changed", u), (i = this._triggerLoadingState) === null || i === void 0 || i.call(this));
|
|
10458
10538
|
}, f.prototype.setupRealtime = function(u, i) {
|
|
10459
|
-
var g = this,
|
|
10460
|
-
fe ? this.eventSource || (this.log("Creating event source with url " +
|
|
10539
|
+
var g = this, m = u + "sse/environments/" + i + "/stream";
|
|
10540
|
+
fe ? this.eventSource || (this.log("Creating event source with url " + m), this.eventSource = new fe(m), this.eventSource.addEventListener("environment_updated", function(b) {
|
|
10461
10541
|
var C;
|
|
10462
10542
|
try {
|
|
10463
10543
|
C = JSON.parse(b.data).updated_at;
|
|
@@ -10468,7 +10548,7 @@ var Hs = { exports: {} };
|
|
|
10468
10548
|
})) : this.log("Error, EventSource is undefined");
|
|
10469
10549
|
}, f;
|
|
10470
10550
|
}();
|
|
10471
|
-
function
|
|
10551
|
+
function A(f) {
|
|
10472
10552
|
var u = f.fetch, i = f.AsyncStorage, g = f.eventSource;
|
|
10473
10553
|
return new yt({ fetch: u, AsyncStorage: i, eventSource: g });
|
|
10474
10554
|
}
|
|
@@ -10476,7 +10556,7 @@ var Hs = { exports: {} };
|
|
|
10476
10556
|
return p = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, g) {
|
|
10477
10557
|
i.__proto__ = g;
|
|
10478
10558
|
} || function(i, g) {
|
|
10479
|
-
for (var
|
|
10559
|
+
for (var m in g) Object.prototype.hasOwnProperty.call(g, m) && (i[m] = g[m]);
|
|
10480
10560
|
}, p(f, u);
|
|
10481
10561
|
}, function(f, u) {
|
|
10482
10562
|
if (typeof u != "function" && u !== null) throw new TypeError("Class extends value " + String(u) + " is not a constructor or null");
|
|
@@ -10494,21 +10574,21 @@ var Hs = { exports: {} };
|
|
|
10494
10574
|
}, E = function(f, u) {
|
|
10495
10575
|
var i = typeof Symbol == "function" && f[Symbol.iterator];
|
|
10496
10576
|
if (!i) return f;
|
|
10497
|
-
var g,
|
|
10577
|
+
var g, m, b = i.call(f), C = [];
|
|
10498
10578
|
try {
|
|
10499
10579
|
for (; (u === void 0 || u-- > 0) && !(g = b.next()).done; ) C.push(g.value);
|
|
10500
10580
|
} catch (G) {
|
|
10501
|
-
|
|
10581
|
+
m = { error: G };
|
|
10502
10582
|
} finally {
|
|
10503
10583
|
try {
|
|
10504
10584
|
g && !g.done && (i = b.return) && i.call(b);
|
|
10505
10585
|
} finally {
|
|
10506
|
-
if (
|
|
10586
|
+
if (m) throw m.error;
|
|
10507
10587
|
}
|
|
10508
10588
|
}
|
|
10509
10589
|
return C;
|
|
10510
10590
|
}, O = function(f, u, i) {
|
|
10511
|
-
if (arguments.length === 2) for (var g,
|
|
10591
|
+
if (arguments.length === 2) for (var g, m = 0, b = u.length; m < b; m++) !g && m in u || (g || (g = Array.prototype.slice.call(u, 0, m)), g[m] = u[m]);
|
|
10512
10592
|
return f.concat(g || Array.prototype.slice.call(u));
|
|
10513
10593
|
}, R = function(f) {
|
|
10514
10594
|
function u() {
|
|
@@ -10516,19 +10596,19 @@ var Hs = { exports: {} };
|
|
|
10516
10596
|
Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`) || this;
|
|
10517
10597
|
}
|
|
10518
10598
|
return B(u, f), u;
|
|
10519
|
-
}(Error),
|
|
10599
|
+
}(Error), T = function() {
|
|
10520
10600
|
function f(u, i) {
|
|
10521
10601
|
var g = this;
|
|
10522
10602
|
if (this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, this._configuration = i != null ? Object.assign({}, i) : void 0, this.withCredentials = !1, this._eventSource = null, this._lastEventId = null, this._timer = null, this._listeners = { open: [], error: [], message: [] }, this.url = u.toString(), this.readyState = this.CONNECTING, this.max_retry_time = 3e3, this.eventSourceClass = globalThis.FlagsmithEventSource, this._configuration != null && (this._configuration.lastEventId && (this._lastEventId = this._configuration.lastEventId, delete this._configuration.lastEventId), this._configuration.max_retry_time && (this.max_retry_time = this._configuration.max_retry_time, delete this._configuration.max_retry_time), this._configuration.eventSourceClass && (this.eventSourceClass = this._configuration.eventSourceClass, delete this._configuration.eventSourceClass)), this.eventSourceClass == null || typeof this.eventSourceClass != "function") throw new R();
|
|
10523
|
-
this._onevent_wrapped = function(
|
|
10524
|
-
g._onevent(
|
|
10603
|
+
this._onevent_wrapped = function(m) {
|
|
10604
|
+
g._onevent(m);
|
|
10525
10605
|
}, this._start();
|
|
10526
10606
|
}
|
|
10527
10607
|
return f.prototype.dispatchEvent = function(u) {
|
|
10528
10608
|
throw new Error("Method not implemented.");
|
|
10529
10609
|
}, f.prototype._start = function() {
|
|
10530
|
-
var u, i, g = this,
|
|
10531
|
-
this._lastEventId && (
|
|
10610
|
+
var u, i, g = this, m = this.url;
|
|
10611
|
+
this._lastEventId && (m.indexOf("?") === -1 ? m += "?" : m += "&", m += "lastEventId=" + encodeURIComponent(this._lastEventId)), this._eventSource = new this.eventSourceClass(m, this._configuration), this._eventSource.onopen = function(F) {
|
|
10532
10612
|
g._onopen(F);
|
|
10533
10613
|
}, this._eventSource.onerror = function(F) {
|
|
10534
10614
|
g._onerror(F);
|
|
@@ -10563,9 +10643,9 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
10563
10643
|
}, f.prototype._onevent = function(u) {
|
|
10564
10644
|
var i, g;
|
|
10565
10645
|
u && u.lastEventId && (this._lastEventId = u.lastEventId);
|
|
10566
|
-
var
|
|
10567
|
-
if (
|
|
10568
|
-
for (var b = D(O([], E(
|
|
10646
|
+
var m = this._listeners[u.type];
|
|
10647
|
+
if (m != null) try {
|
|
10648
|
+
for (var b = D(O([], E(m), !1)), C = b.next(); !C.done; C = b.next())
|
|
10569
10649
|
C.value.call(this, u);
|
|
10570
10650
|
} catch (G) {
|
|
10571
10651
|
i = { error: G };
|
|
@@ -10584,11 +10664,11 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
10584
10664
|
this._timer && (clearTimeout(this._timer), this._timer = null), this._eventSource && (this._eventSource.close(), this._eventSource = null), this.readyState = 2;
|
|
10585
10665
|
}, f.prototype.addEventListener = function(u, i, g) {
|
|
10586
10666
|
this._listeners[u] == null && (this._listeners[u] = [], this._eventSource != null && this._eventSource.addEventListener(u, this._onevent_wrapped));
|
|
10587
|
-
var
|
|
10588
|
-
|
|
10667
|
+
var m = this._listeners[u];
|
|
10668
|
+
m.includes(i) || (this._listeners[u] = O(O([], E(m), !1), [i], !1));
|
|
10589
10669
|
}, f.prototype.removeEventListener = function(u, i, g) {
|
|
10590
|
-
var
|
|
10591
|
-
this._listeners[u] =
|
|
10670
|
+
var m = this._listeners[u];
|
|
10671
|
+
this._listeners[u] = m.filter(function(b) {
|
|
10592
10672
|
return b !== i;
|
|
10593
10673
|
});
|
|
10594
10674
|
}, f;
|
|
@@ -10596,13 +10676,13 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
10596
10676
|
globalThis.FlagsmithEventSource = typeof EventSource < "u" ? EventSource : null;
|
|
10597
10677
|
var te = function(f, u) {
|
|
10598
10678
|
return u = u || {}, new Promise(function(i, g) {
|
|
10599
|
-
var
|
|
10600
|
-
return { ok: (
|
|
10601
|
-
return Promise.resolve(
|
|
10679
|
+
var m = new XMLHttpRequest(), b = [], C = [], G = {}, F = function() {
|
|
10680
|
+
return { ok: (m.status / 100 | 0) == 2, statusText: m.statusText, status: m.status, url: m.responseURL, text: function() {
|
|
10681
|
+
return Promise.resolve(m.responseText);
|
|
10602
10682
|
}, json: function() {
|
|
10603
|
-
return Promise.resolve(
|
|
10683
|
+
return Promise.resolve(m.responseText).then(JSON.parse);
|
|
10604
10684
|
}, blob: function() {
|
|
10605
|
-
return Promise.resolve(new Blob([
|
|
10685
|
+
return Promise.resolve(new Blob([m.response]));
|
|
10606
10686
|
}, clone: F, headers: { keys: function() {
|
|
10607
10687
|
return b;
|
|
10608
10688
|
}, entries: function() {
|
|
@@ -10613,22 +10693,22 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
10613
10693
|
return j.toLowerCase() in G;
|
|
10614
10694
|
} } };
|
|
10615
10695
|
};
|
|
10616
|
-
for (var
|
|
10617
|
-
|
|
10696
|
+
for (var X in m.open(u.method || "get", f, !0), m.onload = function() {
|
|
10697
|
+
m.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(j, L, de) {
|
|
10618
10698
|
b.push(L = L.toLowerCase()), C.push([L, de]), G[L] = G[L] ? G[L] + "," + de : de;
|
|
10619
10699
|
}), i(F());
|
|
10620
|
-
},
|
|
10621
|
-
|
|
10700
|
+
}, m.onerror = g, m.withCredentials = u.credentials == "include", u.headers) m.setRequestHeader(X, u.headers[X]);
|
|
10701
|
+
m.send(u.body || null);
|
|
10622
10702
|
});
|
|
10623
|
-
}, ae =
|
|
10703
|
+
}, ae = A({ AsyncStorage: n, fetch: te, eventSource: T });
|
|
10624
10704
|
typeof window < "u" && (window.flagsmith = ae), s.createFlagsmithInstance = function() {
|
|
10625
|
-
return
|
|
10705
|
+
return A({ AsyncStorage: n, fetch: te, eventSource: T });
|
|
10626
10706
|
}, s.default = ae, Object.defineProperty(s, "__esModule", { value: !0 });
|
|
10627
10707
|
});
|
|
10628
10708
|
})(Hs, Hs.exports);
|
|
10629
|
-
var
|
|
10709
|
+
var Nc = Hs.exports, Xc = {
|
|
10630
10710
|
NOT_INITIALIZED: "FeatureFlag not initialized. Call init() first."
|
|
10631
|
-
}, pn = "business", Oe,
|
|
10711
|
+
}, pn = "business", Oe, Qc = (Oe = class {
|
|
10632
10712
|
constructor() {
|
|
10633
10713
|
Yt(this, "flagsmithClient", null);
|
|
10634
10714
|
Yt(this, "userContext", null);
|
|
@@ -10638,12 +10718,12 @@ var Xc = Hs.exports, Qc = {
|
|
|
10638
10718
|
}
|
|
10639
10719
|
ensureInitialized() {
|
|
10640
10720
|
if (!this.flagsmithClient)
|
|
10641
|
-
throw new Error(
|
|
10721
|
+
throw new Error(Xc.NOT_INITIALIZED);
|
|
10642
10722
|
}
|
|
10643
10723
|
async init(t, s = []) {
|
|
10644
10724
|
if (!this.flagsmithClient)
|
|
10645
10725
|
try {
|
|
10646
|
-
this.flagsmithClient =
|
|
10726
|
+
this.flagsmithClient = Nc.createFlagsmithInstance();
|
|
10647
10727
|
const n = s.reduce((a, r) => (a[r.feature.name] = r, a), {});
|
|
10648
10728
|
await this.flagsmithClient.init({
|
|
10649
10729
|
environmentID: t.apiKey,
|
|
@@ -10730,7 +10810,7 @@ var Xc = Hs.exports, Qc = {
|
|
|
10730
10810
|
reset() {
|
|
10731
10811
|
this.flagsmithClient = null, this.userContext = null;
|
|
10732
10812
|
}
|
|
10733
|
-
}, Yt(Oe, "instance"), Oe), Zc =
|
|
10813
|
+
}, Yt(Oe, "instance"), Oe), Zc = Qc.getInstance(), Mt = Ue(!1), Ft = Ue([]), dt = Ue(null);
|
|
10734
10814
|
function Uc(e = Zc) {
|
|
10735
10815
|
const t = () => Mt.value ? !0 : (console.warn("FeatureFlag is not initialized. Using default values."), !1), s = async (w, V = []) => {
|
|
10736
10816
|
if (Mt.value) {
|
|
@@ -10799,16 +10879,16 @@ const iu = /* @__PURE__ */ at({
|
|
|
10799
10879
|
setup(e) {
|
|
10800
10880
|
const t = bn(), { init: s } = zc();
|
|
10801
10881
|
return yn(async () => {
|
|
10802
|
-
t.registerSidebarComponent(
|
|
10882
|
+
t.registerSidebarComponent(qc), await s({
|
|
10803
10883
|
apiKey: t.namespace.value === "prod" ? "6GhcttsJ9Rj9cTevcdrpin" : "MaGoXrEWuEJNpWgKTqseee"
|
|
10804
10884
|
});
|
|
10805
10885
|
}), (n, a) => {
|
|
10806
|
-
const r =
|
|
10886
|
+
const r = Ns("RouterView");
|
|
10807
10887
|
return rt(), $t(r);
|
|
10808
10888
|
};
|
|
10809
10889
|
}
|
|
10810
10890
|
});
|
|
10811
|
-
var xs = { name: "@feedmepos/mf-hrm-portal", version: "2.3.0-dev", mode: "fmmf" };
|
|
10891
|
+
var xs = { name: "@feedmepos/mf-hrm-portal", version: "2.3.0-dev.2", mode: "fmmf" };
|
|
10812
10892
|
console.log(
|
|
10813
10893
|
`%c${xs.name}%c v${xs.version} %c${xs.mode}`,
|
|
10814
10894
|
"background:#1f1f1f;color:#fff;padding:2px 6px;border-radius:3px 0 0 3px",
|
|
@@ -10819,12 +10899,12 @@ const lu = () => {
|
|
|
10819
10899
|
const e = [
|
|
10820
10900
|
ii,
|
|
10821
10901
|
_o,
|
|
10822
|
-
|
|
10902
|
+
Xo,
|
|
10823
10903
|
hi,
|
|
10824
10904
|
Fo,
|
|
10825
10905
|
Di,
|
|
10826
10906
|
Fi,
|
|
10827
|
-
|
|
10907
|
+
Xi
|
|
10828
10908
|
], t = new Set(e.flatMap((s) => Object.keys(s)));
|
|
10829
10909
|
return Array.from(t).reduce(
|
|
10830
10910
|
(s, n) => {
|
|
@@ -10849,7 +10929,7 @@ export {
|
|
|
10849
10929
|
wc as _,
|
|
10850
10930
|
Cc as a,
|
|
10851
10931
|
xl as b,
|
|
10852
|
-
|
|
10932
|
+
Ne as c,
|
|
10853
10933
|
so as d,
|
|
10854
10934
|
zl as e,
|
|
10855
10935
|
Dt as f,
|