@feedmepos/mf-connect 0.1.14-prod → 0.1.16-prod
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/{Analytic-MRp7gtO3.js → Analytic-9_JkMO2c.js} +18 -17
- package/dist/{App-BU3B2A-F.js → App-DfbUtaeM.js} +68 -64
- package/dist/Bin-BoolyqZn.js +165 -0
- package/dist/{Broadcast-DmciJlSU.js → Broadcast-8UwFqqzp.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DJPOgBXj.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CjoVXqOG.js} +6 -7
- package/dist/{Card-Dq2cAgTi.js → Card-BFEc9Zgu.js} +78 -79
- package/dist/{Collections-B4x4VH1a.js → Collections-DqlqGVcv.js} +5 -5
- package/dist/{Credit-CVdT1KBU.js → Credit-BuKQEMU2.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BmjXu-U7.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BjCVR7D4.js} +27 -27
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-A_uosv-g.js → EffectSheet.vue_vue_type_style_index_0_lang-DXBqS4zs.js} +8 -8
- package/dist/{Experience-CEeXWbue.js → Experience-BTf5f-Kb.js} +8 -8
- package/dist/{Game-mx5c5ZhV.js → Game-Ci_39vHg.js} +8 -8
- package/dist/{Index-DQ1qadwz.js → Index-8JLenrzT.js} +9 -9
- package/dist/{Marketing-CciBZijv.js → Marketing-XAmIlYCx.js} +5 -5
- package/dist/{Member-C51SlKxj.js → Member-Bvxgoep1.js} +4 -4
- package/dist/MemberList-BvX98Yt-.js +1596 -0
- package/dist/MemberTransactions-DJt3aJ-h.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DZu24zwy.js → MessageInput.vue_vue_type_script_setup_true_lang-OFqra1ac.js} +45 -33
- package/dist/{Mission-LpCnpKYD.js → Mission-D_CqN5Es.js} +8 -8
- package/dist/{Overview-DxvOqUao.js → Overview-FRebjePW.js} +62 -63
- package/dist/{Point-BmI7y6h6.js → Point-C_amiOK4.js} +8 -8
- package/dist/{Promotion-MHaOqrwu.js → Promotion-qt_pE8uB.js} +9 -9
- package/dist/{Record-75BxMATe.js → Record-2eAijNwr.js} +6 -6
- package/dist/{Reward-8VfyFuEt.js → Reward-DLNijsC9.js} +35 -35
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D12_r-9X.js → RewardGroup.vue_vue_type_script_setup_true_lang-dsxs4d5k.js} +12 -13
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BIdBxvN7.js → RuleGroup.vue_vue_type_script_setup_true_lang-BZ4ORSgp.js} +14 -15
- package/dist/{Segment-I9FUibZy.js → Segment-QKuGmThT.js} +13 -13
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BGeR0-AG.js → SelectItems.vue_vue_type_script_setup_true_lang-C02QXf6B.js} +2 -2
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DXpzjbIh.js +147 -0
- package/dist/Setting-GTro0uCw.js +1877 -0
- package/dist/{Store-CQkGNSSm.js → Store-CTxmlEVr.js} +55 -56
- package/dist/{StoreRewards-DOtjveqw.js → StoreRewards-Bm9NXXH2.js} +12 -12
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Cf9IsQXS.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CrxFaBDj.js} +321 -354
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DPmeW62s.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Cf2JpXND.js} +1 -1
- package/dist/{Tier-DAj_5abZ.js → Tier-CB64ZbLz.js} +20 -21
- package/dist/{Title-DryO4wcO.js → Title-62HEE-nU.js} +20 -21
- package/dist/{Transaction-DpibVFU-.js → Transaction-CK9Igmnp.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DoiPRPPo.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DJB9g9bg.js} +6 -6
- package/dist/Voucher-CZLp6Mfd.js +353 -0
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DRnVggfC.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DKunt5iP.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BzBcsSYS.js → ZodTextField.vue_vue_type_script_setup_true_lang-CP0wAVaD.js} +1 -1
- package/dist/{app-BoQTcBOD.js → app-BsOd2LLI.js} +651 -615
- package/dist/{app-BzPle2EI.js → app-D7g1W_8e.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-H9a63ymR.js → business-e0ErhqsW.js} +1 -1
- package/dist/{dto-BBLfD0Lh.js → campaign-CcRs_0FM.js} +610 -819
- package/dist/{campaign-CR-16mwD.js → campaign-CcdO3quq.js} +2 -2
- package/dist/{campaign.enum-DcaetYuk.js → campaign.enum-DSB0ntaX.js} +1 -1
- package/dist/{campaign.fn-BqGZqM77.js → campaign.fn-BSxLDscM.js} +133 -133
- package/dist/{collectible.enum-YKtiwQbt.js → collectible.enum-DR19JADq.js} +3 -3
- package/dist/{collection.fn-CI8lSAsC.js → collection.fn-Bm_oNhCa.js} +2 -2
- package/dist/dto-3LqyQCjQ.js +214 -0
- package/dist/{effect-36H79d0n.js → effect-BuC4ddqL.js} +1 -1
- package/dist/{email-addresses-drrACeqJ.js → email-addresses-FxQM5JQh.js} +1 -1
- package/dist/{export-BgnO3lJs.js → export-DB_vSJ5r.js} +5 -5
- package/dist/{helper-CcV9DZXq.js → helper-Czc_ykUT.js} +1 -1
- package/dist/index-0EgN5Vaf.js +115 -0
- package/dist/{index-Cidu1YZP.js → index-B-gmFyeP.js} +5 -5
- package/dist/{index-CB1CnEOn.js → index-C2Y3Z6cQ.js} +1 -1
- package/dist/{index-mgoYj6L9.js → index-CavK1FD8.js} +1 -1
- package/dist/{index-BEDXujqZ.js → index-DF7DfJ1p.js} +1 -1
- package/dist/{index-DydNNBhY.js → index-DJmQQbIZ.js} +29 -4
- package/dist/{index-CibFRBGu.js → index-DP1XHU5I.js} +6 -6
- package/dist/{index-BRTpdfj3.js → index-DTirkGj1.js} +2057 -1010
- package/dist/{index-ZycLk3NR.js → index-Dc_5fMdM.js} +1 -1
- package/dist/index-Dvp6UpsY.js +44 -0
- package/dist/{index-BPbhXWRp.js → index-KXIH9y_C.js} +12 -13
- package/dist/{index-DLAAi9ur.js → index-o3ez16Wf.js} +3 -3
- package/dist/{index.esm2017-QS_XhcBp.js → index.esm2017-DsCfyosK.js} +1 -1
- package/dist/{loading-LktVwV5k.js → loading-CsMKK-RP.js} +4 -4
- package/dist/{membership-7ETvXph3.js → membership-ChU9QHZQ.js} +6 -6
- package/dist/{money-BYszknw8.js → money-CG2aMqwR.js} +1 -1
- package/dist/{number-Dmd4vT4F.js → number-DOiTymUW.js} +1 -1
- package/dist/{objectid-BQtSeCVi.js → objectid-DEgIJB4V.js} +4 -4
- package/dist/{reward-DJGOX-D1.js → reward-bezIYRz1.js} +1 -1
- package/dist/{rule-D7jM4gdg.js → rule-BXvIZA60.js} +3 -3
- package/dist/{rule-builder-FO9UeYUJ.js → rule-builder-BD_t-4Oq.js} +1 -1
- package/dist/{template-C4Ddrpk1.js → template-CYa8Yqzb.js} +4 -4
- package/dist/{trigger-w7Q4qOMB.js → trigger-B2Ihm351.js} +13 -13
- package/dist/{usePagination-PH1OvyZM.js → usePagination-Dus-uVGw.js} +1 -1
- package/dist/{user-DRPXRVy2.js → user-BkIvuR0M.js} +1 -1
- package/dist/{vue-i18n-B49HKiTU.js → vue-i18n-BOO66JER.js} +112 -112
- package/package.json +1 -1
- package/dist/MemberList-D1x731cU.js +0 -1043
- package/dist/MemberTransactions-BpoTQHFQ.js +0 -38
- package/dist/Setting-B8V2I0EZ.js +0 -1871
- package/dist/Voucher-CSc0_dGX.js +0 -491
- package/dist/index-6RqtavHk.js +0 -1051
- package/dist/index-B5ii6hOh.js +0 -99
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { withPermission as
|
|
2
|
-
import { defineAsyncComponent as
|
|
3
|
-
const
|
|
1
|
+
import { withPermission as R, Permission as x } from "@feedmepos/mf-common";
|
|
2
|
+
import { defineAsyncComponent as k } from "vue";
|
|
3
|
+
const Pe = {
|
|
4
4
|
common: {
|
|
5
5
|
submit: "Submit",
|
|
6
6
|
confirm: "Confirm",
|
|
@@ -86,15 +86,24 @@ const Me = {
|
|
|
86
86
|
search: "search",
|
|
87
87
|
location: "Location: ",
|
|
88
88
|
noResults: "No results found",
|
|
89
|
+
title: "Title",
|
|
90
|
+
deletedAt: "Deleted at",
|
|
91
|
+
campaignType: "Campaign type",
|
|
89
92
|
remove: {
|
|
90
93
|
confirm: "Are you sure you want to remove {name}?",
|
|
91
94
|
removing: "Removing {name}",
|
|
92
95
|
removed: "Removed {name} successfully"
|
|
93
96
|
},
|
|
97
|
+
restore: {
|
|
98
|
+
confirm: "Are you sure you want to restore {name}?",
|
|
99
|
+
restoring: "Restoring {name}",
|
|
100
|
+
restored: "Restored {name} successfully"
|
|
101
|
+
},
|
|
94
102
|
actions: {
|
|
95
103
|
remove: "Remove",
|
|
96
104
|
send: "Send",
|
|
97
|
-
share: "Share"
|
|
105
|
+
share: "Share",
|
|
106
|
+
restore: "Restore"
|
|
98
107
|
},
|
|
99
108
|
effect_required: "Effect is required",
|
|
100
109
|
unsaved_changes: "Are you sure you want to discard this changes?",
|
|
@@ -257,7 +266,12 @@ const Me = {
|
|
|
257
266
|
transaction: "Transaction",
|
|
258
267
|
setting: "Setting",
|
|
259
268
|
mission: "Mission",
|
|
260
|
-
referral: "Referral"
|
|
269
|
+
referral: "Referral",
|
|
270
|
+
bin: "Bin"
|
|
271
|
+
},
|
|
272
|
+
bin: {
|
|
273
|
+
title: "Bin",
|
|
274
|
+
description: "Restore deleted campaigns from the bin. Campaigns in the bin can be restored or permanently deleted."
|
|
261
275
|
},
|
|
262
276
|
loyalty: {
|
|
263
277
|
card: {
|
|
@@ -1001,7 +1015,7 @@ const Me = {
|
|
|
1001
1015
|
effect_required: "Effect is required"
|
|
1002
1016
|
}
|
|
1003
1017
|
}, De = {
|
|
1004
|
-
connect:
|
|
1018
|
+
connect: Pe,
|
|
1005
1019
|
connectZod: Le,
|
|
1006
1020
|
connectZodCustom: je
|
|
1007
1021
|
}, Ze = {
|
|
@@ -1983,7 +1997,7 @@ const Me = {
|
|
|
1983
1997
|
map: "字典",
|
|
1984
1998
|
set: "集合"
|
|
1985
1999
|
}
|
|
1986
|
-
},
|
|
2000
|
+
}, Be = {
|
|
1987
2001
|
timeframe: {
|
|
1988
2002
|
end_before_start: "结束日期必须晚于或等于开始日期"
|
|
1989
2003
|
},
|
|
@@ -1999,74 +2013,74 @@ const Me = {
|
|
|
1999
2013
|
reward_threshold_unique: "奖励阈值必须是唯一的",
|
|
2000
2014
|
effect_required: "效果是必需的"
|
|
2001
2015
|
}
|
|
2002
|
-
},
|
|
2016
|
+
}, $e = {
|
|
2003
2017
|
connect: Ze,
|
|
2004
2018
|
connectZod: Ve,
|
|
2005
|
-
connectZodCustom:
|
|
2019
|
+
connectZodCustom: Be
|
|
2006
2020
|
}, Ue = {
|
|
2007
2021
|
campaign: {
|
|
2008
2022
|
common: {
|
|
2009
2023
|
createCampaign: "สร้างแคมเปญ",
|
|
2010
2024
|
search: "ค้นหา",
|
|
2011
|
-
location: "
|
|
2012
|
-
noResults: "
|
|
2025
|
+
location: "สาขา:",
|
|
2026
|
+
noResults: "ไม่พบข้อมูล",
|
|
2013
2027
|
remove: {
|
|
2014
2028
|
confirm: "คุณแน่ใจหรือไม่ว่าต้องการลบ {name}",
|
|
2015
2029
|
removing: "กำลังลบ {name}",
|
|
2016
|
-
removed: "ลบ {name}
|
|
2030
|
+
removed: "ลบ {name} สำเร็จ"
|
|
2017
2031
|
},
|
|
2018
2032
|
actions: {
|
|
2019
2033
|
remove: "ลบ",
|
|
2020
2034
|
send: "ส่ง",
|
|
2021
2035
|
share: "แชร์"
|
|
2022
2036
|
},
|
|
2023
|
-
effect_required: "
|
|
2024
|
-
unsaved_changes: "
|
|
2025
|
-
unsaved_changes_confirm: "
|
|
2026
|
-
unsaved_changes_cancel: "
|
|
2037
|
+
effect_required: "จำเป็นต้องกรอก",
|
|
2038
|
+
unsaved_changes: "คุณแน่ใจหรือไม่ว่าต้องการยืนยันการแก้ไข",
|
|
2039
|
+
unsaved_changes_confirm: "ยืนยัน",
|
|
2040
|
+
unsaved_changes_cancel: "ยืนยัน",
|
|
2027
2041
|
save: "บันทึก",
|
|
2028
|
-
cancel: "
|
|
2042
|
+
cancel: "ยืนยัน",
|
|
2029
2043
|
summary: "สรุปแคมเปญ",
|
|
2030
2044
|
campaign_name: "ชื่อแคมเปญ",
|
|
2031
|
-
campaign_period: "
|
|
2045
|
+
campaign_period: "ระยะเวลาแคมเปญ",
|
|
2032
2046
|
next_schedule_at: "กำหนดการถัดไป",
|
|
2033
2047
|
discount_type: "ประเภทส่วนลด",
|
|
2034
2048
|
discount_amount: "จำนวนส่วนลด",
|
|
2035
2049
|
discount_percentage: "เปอร์เซ็นต์ส่วนลด",
|
|
2036
|
-
all_locations: "
|
|
2037
|
-
available_at: "
|
|
2050
|
+
all_locations: "ทุกสาขา",
|
|
2051
|
+
available_at: "สาขาที่ใช้งาน",
|
|
2038
2052
|
always: "เสมอ",
|
|
2039
|
-
no_location: "
|
|
2053
|
+
no_location: "ไม่พบสาขา"
|
|
2040
2054
|
},
|
|
2041
2055
|
mission: {
|
|
2042
|
-
title: "
|
|
2056
|
+
title: "Mission",
|
|
2043
2057
|
create: "สร้างแคมเปญ",
|
|
2044
2058
|
confirmDelete: "คุณแน่ใจหรือไม่ว่าต้องการลบ {name}",
|
|
2045
2059
|
removing: "กำลังลบ {name}",
|
|
2046
|
-
removed: "ลบ {name}
|
|
2047
|
-
updating: "
|
|
2048
|
-
updated: "
|
|
2049
|
-
creating: "
|
|
2050
|
-
created: "
|
|
2051
|
-
location: "
|
|
2052
|
-
createProgram: "
|
|
2053
|
-
description: "
|
|
2054
|
-
createButton: "
|
|
2055
|
-
type: "
|
|
2060
|
+
removed: "ลบ {name} สำเร็จ",
|
|
2061
|
+
updating: "กำลังอัปเดต Mission",
|
|
2062
|
+
updated: "อัปเดต Mission สำเร็จ",
|
|
2063
|
+
creating: "กำลังสร้าง Mission",
|
|
2064
|
+
created: "สร้าง Mission สำเร็จ",
|
|
2065
|
+
location: "สาขา:",
|
|
2066
|
+
createProgram: "สร้าง Mission ของคุณ",
|
|
2067
|
+
description: "Mission สำหรับช่วยกระตุ้นให้ลูกค้าช้อปปิ้งและเพิ่มโอกาสในการใช้งานมากขึ้น",
|
|
2068
|
+
createButton: "สร้าง Mission ",
|
|
2069
|
+
type: "ประเภท Mission",
|
|
2056
2070
|
received: "ได้รับ"
|
|
2057
2071
|
},
|
|
2058
2072
|
broadcast: {
|
|
2059
2073
|
title: "บรอดแคสต์",
|
|
2060
2074
|
messageSent: "ส่งแล้ว {count} ครั้ง",
|
|
2061
2075
|
create: {
|
|
2062
|
-
title: "
|
|
2063
|
-
description: "
|
|
2076
|
+
title: "สร้างแคมเปญบรอดแคสต์ของคุณ",
|
|
2077
|
+
description: "การการบรอดแคสต์ทำให้คุณสามารถส่งข้อความถึงลูกค้าทั้งหมด เพื่อแจ้งให้พวกเขาทราบเกี่ยวกับข้อเสนอใหม่ กิจกรรม หรือการอัปเดตที่สำคัญ",
|
|
2064
2078
|
button: "สร้างแคมเปญบรอดแคสต์"
|
|
2065
2079
|
},
|
|
2066
2080
|
update: {
|
|
2067
|
-
creating: "
|
|
2068
|
-
updating: "
|
|
2069
|
-
success: "บรอดแคสต์ {action}
|
|
2081
|
+
creating: "กำลังสร้างบรอดแคสต์",
|
|
2082
|
+
updating: "กำลังอัปเดตบรอดแคสต์",
|
|
2083
|
+
success: "บรอดแคสต์ {action} สำเร็จ"
|
|
2070
2084
|
}
|
|
2071
2085
|
},
|
|
2072
2086
|
promotion: {
|
|
@@ -2074,13 +2088,13 @@ const Me = {
|
|
|
2074
2088
|
typeLabel: "{type} โปรโมชัน",
|
|
2075
2089
|
create: {
|
|
2076
2090
|
title: "สร้างแคมเปญโปรโมชัน",
|
|
2077
|
-
description: "
|
|
2091
|
+
description: "ข้อเสนอพิเศษที่จำกัดระยะเวลาใช้งานเพื่อกระตุ้นให้ลูกค้ามีส่วนร่วมในการสั่งซื้อ แต่โปรโมชันทั่วไปจะมีไว้สำหรับลูกค้าที่มีสิทธิ์ทุกคนโดยไม่ต้องใช้โค้ดเฉพาะ และจะถูกนำมาใช้โดยร้านค้าในระยะเวลาที่จัดโปรโมชันเท่านั้น",
|
|
2078
2092
|
button: "สร้างแคมเปญโปรโมชัน"
|
|
2079
2093
|
},
|
|
2080
2094
|
update: {
|
|
2081
2095
|
creating: "กำลังสร้างโปรโมชัน",
|
|
2082
2096
|
updating: "กำลังอัปเดตโปรโมชัน",
|
|
2083
|
-
success: "โปรโมชัน {action}
|
|
2097
|
+
success: "โปรโมชัน {action} สำเร็จ"
|
|
2084
2098
|
}
|
|
2085
2099
|
},
|
|
2086
2100
|
voucher: {
|
|
@@ -2089,25 +2103,25 @@ const Me = {
|
|
|
2089
2103
|
unlimited: "ไม่จำกัด",
|
|
2090
2104
|
updateConfirm: {
|
|
2091
2105
|
title: "ยืนยัน",
|
|
2092
|
-
message: "
|
|
2106
|
+
message: "การดำเนินการนี้จะเปลี่ยนแปลงบัตรกำนัลในอนาคตทั้งหมดหรือไม่ คุณต้องการอัปเดตวันหมดอายุและส่วนลดของบัตรกำนัลที่เคยถูกรับสิทธิ์ไปแล้วด้วยหรือไม่?",
|
|
2093
2107
|
updateAll: "อัปเดตทั้งหมด",
|
|
2094
|
-
updateFuture: "
|
|
2108
|
+
updateFuture: "อัปเดตเฉพาะรายการในอนาคตเท่านั้น"
|
|
2095
2109
|
},
|
|
2096
2110
|
create: {
|
|
2097
|
-
title: "
|
|
2098
|
-
description: "
|
|
2099
|
-
button: "
|
|
2111
|
+
title: "สร้างแคมเปญบัตรกำนัล",
|
|
2112
|
+
description: "บัตรกำนัลดิจิทัลที่ผู้ใช้สามารถแลกรับส่วนลดในการซื้อในอนาคต โดยปกติแล้วผู้ใช้จะต้องรับและใช้บัตรกำนัลเพื่อรับส่วนลด",
|
|
2113
|
+
button: "สร้างแคมเปญบัตรกำนัล"
|
|
2100
2114
|
},
|
|
2101
2115
|
update: {
|
|
2102
|
-
creating: "
|
|
2103
|
-
updating: "
|
|
2104
|
-
success: "
|
|
2116
|
+
creating: "กำลังสร้างบัตรกำนัล",
|
|
2117
|
+
updating: "กำลังอัปเดตบัตรกำนัล",
|
|
2118
|
+
success: "บัตรกำนัล {action} สำเร็จ"
|
|
2105
2119
|
},
|
|
2106
2120
|
share: {
|
|
2107
|
-
error: "
|
|
2108
|
-
errorTitle: "
|
|
2121
|
+
error: "ไม่สามารถแชร์บัตรกำนัลที่ไม่ใช่การรับสิทธิ์แบบง่ายได้",
|
|
2122
|
+
errorTitle: "แชร์บัตรกำนัล",
|
|
2109
2123
|
errorButton: "ตกลง",
|
|
2110
|
-
success: "
|
|
2124
|
+
success: "คัดลอกลิงก์บัตรกำนัลไปยังคลิปบอร์ดแล้ว"
|
|
2111
2125
|
}
|
|
2112
2126
|
}
|
|
2113
2127
|
},
|
|
@@ -2123,68 +2137,68 @@ const Me = {
|
|
|
2123
2137
|
removedSuccessfully: "ลบ {name} สำเร็จ",
|
|
2124
2138
|
updating: "กำลังอัปเดตโปรโมชัน",
|
|
2125
2139
|
creating: "กำลังสร้างโปรโมชัน",
|
|
2126
|
-
updatedSuccessfully: "
|
|
2127
|
-
createdSuccessfully: "
|
|
2140
|
+
updatedSuccessfully: "อัปเดตโปรโมชันสำเร็จ",
|
|
2141
|
+
createdSuccessfully: "สร้างโปรโมชันสำเร็จ",
|
|
2128
2142
|
title: "โปรโมชัน",
|
|
2129
2143
|
search: "ค้นหา",
|
|
2130
|
-
location: "
|
|
2131
|
-
createPromotionCampaign: "
|
|
2132
|
-
description: "
|
|
2144
|
+
location: "สาขา:",
|
|
2145
|
+
createPromotionCampaign: "สร้างแคมเปญโปรโมชัน",
|
|
2146
|
+
description: "ข้อเสนอพิเศษที่จำกัดระยะเวลาใช้งานเพื่อกระตุ้นให้ลูกค้ามีส่วนร่วมในการสั่งซื้อ แต่โปรโมชันทั่วไปจะมีไว้สำหรับลูกค้าที่มีสิทธิ์ทุกคนโดยไม่ต้องใช้โค้ดเฉพาะ และจะถูกนำมาใช้โดยร้านค้าในระยะเวลาที่จัดโปรโมชันเท่านั้น"
|
|
2133
2147
|
},
|
|
2134
2148
|
voucher: {
|
|
2135
2149
|
createCampaign: "สร้างแคมเปญ",
|
|
2136
|
-
voucherTitle: "
|
|
2150
|
+
voucherTitle: "ชื่อบัตรกำนัล",
|
|
2137
2151
|
status: "สถานะ",
|
|
2138
2152
|
summary: "สรุป",
|
|
2139
2153
|
quota: "โควตา",
|
|
2140
|
-
claimed: "
|
|
2154
|
+
claimed: "รับสิทธิ์แล้ว",
|
|
2141
2155
|
actions: "การดำเนินการ",
|
|
2142
2156
|
remove: "ลบ",
|
|
2143
2157
|
send: "ส่ง",
|
|
2144
2158
|
share: "แชร์",
|
|
2145
2159
|
confirmRemove: "คุณแน่ใจหรือไม่ว่าต้องการลบ {name}",
|
|
2146
2160
|
removing: "กำลังลบ {name}",
|
|
2147
|
-
removedSuccessfully: "ลบ {name}
|
|
2148
|
-
updating: "
|
|
2149
|
-
creating: "
|
|
2150
|
-
updatedSuccessfully: "
|
|
2151
|
-
createdSuccessfully: "
|
|
2152
|
-
title: "
|
|
2161
|
+
removedSuccessfully: "ลบ {name} สำเร็จ",
|
|
2162
|
+
updating: "กำลังอัปเดตบัตรกำนัล",
|
|
2163
|
+
creating: "กำลังสร้างบัตรกำนัล",
|
|
2164
|
+
updatedSuccessfully: "อัปเดตบัตรกำนัลสำเร็จ",
|
|
2165
|
+
createdSuccessfully: "สร้างบัตรกำนัลสำเร็จ",
|
|
2166
|
+
title: "บัตรกำนัล",
|
|
2153
2167
|
search: "ค้นหา",
|
|
2154
|
-
location: "
|
|
2155
|
-
createVoucherCampaign: "
|
|
2156
|
-
description: "
|
|
2168
|
+
location: "สาขา:",
|
|
2169
|
+
createVoucherCampaign: "สร้างแคมเปญบัตรกำนัล",
|
|
2170
|
+
description: "บัตรกำนัลดิจิทัลที่ผู้ใช้สามารถแลกรับส่วนลดในการซื้อในอนาคต โดยปกติแล้วผู้ใช้จะต้องรับและใช้บัตรกำนัลเพื่อรับส่วนลด"
|
|
2157
2171
|
},
|
|
2158
2172
|
navigation: {
|
|
2159
2173
|
analytic: "การวิเคราะห์",
|
|
2160
2174
|
campaign: "แคมเปญ",
|
|
2161
|
-
promotion: "
|
|
2175
|
+
promotion: "โปรโมชัน",
|
|
2162
2176
|
voucher: "บัตรกำนัล",
|
|
2163
2177
|
broadcast: "บรอดแคสต์",
|
|
2164
|
-
program: "
|
|
2165
|
-
tier: "
|
|
2166
|
-
title: "
|
|
2167
|
-
experience: "
|
|
2178
|
+
program: "โปรแกรมสมาชิก",
|
|
2179
|
+
tier: "ระดับสมาชิก",
|
|
2180
|
+
title: "ป้ายชื่อ",
|
|
2181
|
+
experience: "ค่าประสบการณ์",
|
|
2168
2182
|
point: "คะแนน",
|
|
2169
2183
|
credit: "เครดิต",
|
|
2170
2184
|
game: "เกม",
|
|
2171
|
-
loyalty: "
|
|
2185
|
+
loyalty: "ระบบสมาชิก",
|
|
2172
2186
|
member: "สมาชิก",
|
|
2173
|
-
segments: "
|
|
2174
|
-
card: "
|
|
2187
|
+
segments: "กลุ่มสมาชิก",
|
|
2188
|
+
card: "บัตรสมาชิก",
|
|
2175
2189
|
store: "ร้านค้า",
|
|
2176
2190
|
transaction: "ธุรกรรม",
|
|
2177
2191
|
setting: "การตั้งค่า",
|
|
2178
|
-
mission: "
|
|
2192
|
+
mission: "Mission"
|
|
2179
2193
|
},
|
|
2180
2194
|
loyalty: {
|
|
2181
2195
|
card: {
|
|
2182
|
-
title: "
|
|
2183
|
-
premium_label: "
|
|
2196
|
+
title: "บัตรสมาชิก",
|
|
2197
|
+
premium_label: "Premium",
|
|
2184
2198
|
actions: {
|
|
2185
|
-
create: "
|
|
2186
|
-
manage_design: "
|
|
2187
|
-
add: "
|
|
2199
|
+
create: "สร้างบัตรสมาชิก",
|
|
2200
|
+
manage_design: "ใส่รูปบัตรสำหรับสมาชิก",
|
|
2201
|
+
add: "เพิ่มบัตรสมาชิก"
|
|
2188
2202
|
},
|
|
2189
2203
|
empty_state: {
|
|
2190
2204
|
title: "สร้างบัตรสมาชิก",
|
|
@@ -2192,11 +2206,11 @@ const Me = {
|
|
|
2192
2206
|
premium_cta: "อัปเกรดเป็นพรีเมียมและเพลิดเพลินกับฟีเจอร์ทั้งหมด"
|
|
2193
2207
|
},
|
|
2194
2208
|
table: {
|
|
2195
|
-
card_number: "
|
|
2209
|
+
card_number: "หมายเลขบัตรสมาชิก",
|
|
2196
2210
|
redeemed_by: "แลกรับโดย",
|
|
2197
|
-
phone: "
|
|
2211
|
+
phone: "เบอร์โทร",
|
|
2198
2212
|
created_at: "สร้างเมื่อ",
|
|
2199
|
-
bundle: "
|
|
2213
|
+
bundle: "ชุดรางวัล",
|
|
2200
2214
|
redeemed_at: "แลกรับเมื่อ",
|
|
2201
2215
|
actions: "การดำเนินการ"
|
|
2202
2216
|
}
|
|
@@ -2208,15 +2222,15 @@ const Me = {
|
|
|
2208
2222
|
}
|
|
2209
2223
|
},
|
|
2210
2224
|
segment: {
|
|
2211
|
-
title: "
|
|
2225
|
+
title: "กลุ่มสมาชิก",
|
|
2212
2226
|
actions: {
|
|
2213
|
-
refresh: "
|
|
2214
|
-
add: "
|
|
2227
|
+
refresh: "รีเฟรชกลุ่มสมาชิก",
|
|
2228
|
+
add: "เพิ่มกลุ่มสมาชิก",
|
|
2215
2229
|
remove: "ลบ"
|
|
2216
2230
|
},
|
|
2217
2231
|
table: {
|
|
2218
|
-
name: "
|
|
2219
|
-
total_customers: "
|
|
2232
|
+
name: "ป้ายชื่อ",
|
|
2233
|
+
total_customers: "จำนวนลูกค้าทั้งหมดในกลุ่มสมาชิก",
|
|
2220
2234
|
customer_percentage: "% ของลูกค้า",
|
|
2221
2235
|
actions: "การดำเนินการ"
|
|
2222
2236
|
},
|
|
@@ -2230,7 +2244,7 @@ const Me = {
|
|
|
2230
2244
|
common: {
|
|
2231
2245
|
create: "สร้างโปรแกรม",
|
|
2232
2246
|
search: "ค้นหา",
|
|
2233
|
-
location: "
|
|
2247
|
+
location: "สาขา:",
|
|
2234
2248
|
used: "ใช้ไปแล้ว {count} ราย",
|
|
2235
2249
|
actions: {
|
|
2236
2250
|
create: "สร้างโปรแกรม {type} ราย",
|
|
@@ -2246,16 +2260,16 @@ const Me = {
|
|
|
2246
2260
|
remove: {
|
|
2247
2261
|
confirm: "คุณแน่ใจว่าต้องการลบ {name} หรือไม่",
|
|
2248
2262
|
removing: "กำลังลบ {name}",
|
|
2249
|
-
removed: "ลบ {name}
|
|
2263
|
+
removed: "ลบ {name} สำเร็จ"
|
|
2250
2264
|
},
|
|
2251
2265
|
update: {
|
|
2252
2266
|
creating: "กำลังสร้างโปรแกรม {type}",
|
|
2253
2267
|
updating: "กำลังอัปเดตโปรแกรม {type}",
|
|
2254
|
-
success: "โปรแกรม {type} {action}
|
|
2268
|
+
success: "โปรแกรม {type} {action} สำเร็จ"
|
|
2255
2269
|
}
|
|
2256
2270
|
},
|
|
2257
2271
|
experience: {
|
|
2258
|
-
title: "
|
|
2272
|
+
title: "ค่าประสบการณ์",
|
|
2259
2273
|
empty_state: {
|
|
2260
2274
|
title: "สร้างโปรแกรมประสบการณ์",
|
|
2261
2275
|
description: "ประสบการณ์ช่วยให้ลูกค้าได้รับระดับสมาชิกที่สูงขึ้น ยิ่งลูกค้าโต้ตอบและใช้จ่ายมากเท่าไหร่ ระดับสมาชิกของพวกเขาก็จะสูงขึ้นเท่านั้น ทำให้สามารถปลดล็อกรางวัลและสิทธิประโยชน์ต่างๆ มากขึ้น"
|
|
@@ -2268,7 +2282,7 @@ const Me = {
|
|
|
2268
2282
|
title: "สร้างโปรแกรมเกมของคุณ",
|
|
2269
2283
|
description: "ฟีเจอร์เกมเพิ่มความสนุกสนานให้กับการช้อปปิ้ง กระตุ้นให้ลูกค้ามีส่วนร่วมมากขึ้น"
|
|
2270
2284
|
},
|
|
2271
|
-
token_received: "
|
|
2285
|
+
token_received: "เหรียญที่ได้รับ: {count}"
|
|
2272
2286
|
},
|
|
2273
2287
|
credit: {
|
|
2274
2288
|
title: "เครดิต"
|
|
@@ -2277,15 +2291,15 @@ const Me = {
|
|
|
2277
2291
|
title: "คะแนน",
|
|
2278
2292
|
empty_state: {
|
|
2279
2293
|
title: "สร้างโปรแกรมคะแนนของคุณ",
|
|
2280
|
-
description: "
|
|
2294
|
+
description: "คะแนนเสมือนที่ลูกค้าสามารถรับและนำไปใช้ซื้อสินค้าแบบเป็นชุด (Bundle)"
|
|
2281
2295
|
},
|
|
2282
2296
|
point_received: "คะแนนที่ได้รับ: {count}",
|
|
2283
2297
|
used: "ใช้ไปแล้ว {count} คะแนน"
|
|
2284
2298
|
},
|
|
2285
2299
|
tier: {
|
|
2286
|
-
title: "
|
|
2300
|
+
title: "ระดับสมาชิก",
|
|
2287
2301
|
empty_state: {
|
|
2288
|
-
title: "
|
|
2302
|
+
title: "สร้างโปรแกรมระดับสมาชิก",
|
|
2289
2303
|
description: "มอบสิทธิประโยชน์และรางวัลสุดพิเศษให้กับสมาชิกของคุณด้วยการเข้าร่วมแคมเปญสมาชิก คุณสามารถเลือกสิ่งที่สมาชิกต้องการเสนอได้"
|
|
2290
2304
|
},
|
|
2291
2305
|
actions: {
|
|
@@ -2320,7 +2334,7 @@ const Me = {
|
|
|
2320
2334
|
title: "ชื่อเรื่อง",
|
|
2321
2335
|
empty_state: {
|
|
2322
2336
|
title: "สร้างโปรแกรมชื่อเรื่อง",
|
|
2323
|
-
description: "
|
|
2337
|
+
description: "สร้างโปรแกรมป้ายชื่อ สร้างชื่อสมาชิกที่ไม่ซ้ำกันเพื่อปรับแต่งประสบการณ์ของสมาชิก ดึงดูดลูกค้าด้วยชื่อที่สนุกสนานเพื่อปรับปรุงการเล่นเกมโปรแกรมสะสมคะแนน"
|
|
2324
2338
|
},
|
|
2325
2339
|
actions: {
|
|
2326
2340
|
add: "เพิ่มชื่อ"
|
|
@@ -2345,13 +2359,13 @@ const Me = {
|
|
|
2345
2359
|
},
|
|
2346
2360
|
voucher_update: {
|
|
2347
2361
|
title: "การยืนยัน",
|
|
2348
|
-
message: "สิ่งนี้จะเปลี่ยนบัตรกำนัลในอนาคตทั้งหมดหรือไม่
|
|
2362
|
+
message: "สิ่งนี้จะเปลี่ยนบัตรกำนัลในอนาคตทั้งหมดหรือไม่ คุณต้องการอัปเดตวันหมดอายุและส่วนลดของบัตรกำนัลที่เคยถูกรับสิทธิ์ไปแล้วด้วยหรือไม่?",
|
|
2349
2363
|
update_all: "อัพเดททั้งหมด",
|
|
2350
2364
|
update_future: "อัพเดทในอนาคตเท่านั้น"
|
|
2351
2365
|
}
|
|
2352
2366
|
},
|
|
2353
2367
|
table: {
|
|
2354
|
-
title: "
|
|
2368
|
+
title: "ป้ายชื่อ",
|
|
2355
2369
|
program_title: "ชื่อโปรแกรม",
|
|
2356
2370
|
status: "สถานะ",
|
|
2357
2371
|
type: "พิมพ์",
|
|
@@ -2359,7 +2373,7 @@ const Me = {
|
|
|
2359
2373
|
actions: "การดำเนินการ"
|
|
2360
2374
|
},
|
|
2361
2375
|
search: "ค้นหา",
|
|
2362
|
-
location: "
|
|
2376
|
+
location: "สาขา: ",
|
|
2363
2377
|
addBenefit: "เพิ่มสิทธิประโยชน์",
|
|
2364
2378
|
noDescription: "ไม่มีคำอธิบาย",
|
|
2365
2379
|
descriptionLimit: "{name} คำอธิบายไม่ควรเกิน 200 ตัวอักษร",
|
|
@@ -2367,14 +2381,14 @@ const Me = {
|
|
|
2367
2381
|
internalOnly: "ภายในเท่านั้น",
|
|
2368
2382
|
notShown: "{name} จะไม่แสดงให้ลูกค้าเห็น",
|
|
2369
2383
|
submit: "ส่ง",
|
|
2370
|
-
cancel: "
|
|
2384
|
+
cancel: "ยืนยัน",
|
|
2371
2385
|
imageLabel: "รูปภาพ {name}"
|
|
2372
2386
|
},
|
|
2373
2387
|
mission: {
|
|
2374
|
-
title: "
|
|
2388
|
+
title: "Mission",
|
|
2375
2389
|
empty_state: {
|
|
2376
|
-
title: "
|
|
2377
|
-
description: "
|
|
2390
|
+
title: "สร้างโปรแกรมMissionของคุณ",
|
|
2391
|
+
description: "Missionเป็นโปรแกรมที่ช่วยให้ลูกค้าสามารถทำงานให้เสร็จสิ้นเพื่อรับรางวัลได้"
|
|
2378
2392
|
}
|
|
2379
2393
|
}
|
|
2380
2394
|
},
|
|
@@ -2390,7 +2404,7 @@ const Me = {
|
|
|
2390
2404
|
},
|
|
2391
2405
|
emptyState: {
|
|
2392
2406
|
title: "สร้างกลุ่มแคมเปญเพื่อติดตามประสิทธิภาพ",
|
|
2393
|
-
description: "
|
|
2407
|
+
description: "เริ่มจัดระเบียบแคมเปญและโปรโมชันของคุณโดยการสร้างกลุ่ม กลุ่มช่วยให้คุณสามารถรวมตัวชี้วัดประสิทธิภาพจากบัตรกำนัล โปรโมชัน หรือรางวัลอื่น ๆ ได้หลายรายการ",
|
|
2394
2408
|
action: "สร้างกลุ่ม"
|
|
2395
2409
|
}
|
|
2396
2410
|
},
|
|
@@ -2399,7 +2413,7 @@ const Me = {
|
|
|
2399
2413
|
create: "สร้างสื่อการตลาด",
|
|
2400
2414
|
search: "ค้นหา",
|
|
2401
2415
|
table: {
|
|
2402
|
-
name: "
|
|
2416
|
+
name: "ป้ายชื่อ",
|
|
2403
2417
|
campaign: "แคมเปญ",
|
|
2404
2418
|
createdDate: "วันที่สร้าง",
|
|
2405
2419
|
actions: "การดำเนินการ"
|
|
@@ -2414,7 +2428,7 @@ const Me = {
|
|
|
2414
2428
|
description: "เพิ่มความสามารถทางการตลาดของคุณอย่างง่ายดายด้วยเครื่องมือที่ขับเคลื่อนด้วย AI ของเรา สร้างภาพที่น่าทึ่งและคำบรรยายที่น่าดึงดูดสำหรับแพลตฟอร์มที่คุณต้องการ",
|
|
2415
2429
|
action: "เพิ่มวัสดุ"
|
|
2416
2430
|
},
|
|
2417
|
-
noResults: "
|
|
2431
|
+
noResults: "ไม่พบข้อมูล"
|
|
2418
2432
|
},
|
|
2419
2433
|
setting: {
|
|
2420
2434
|
title: "การตั้งค่า",
|
|
@@ -2456,7 +2470,7 @@ const Me = {
|
|
|
2456
2470
|
},
|
|
2457
2471
|
summary: {
|
|
2458
2472
|
title: "สรุปการตั้งค่าความภักดี",
|
|
2459
|
-
name: "
|
|
2473
|
+
name: "ป้ายชื่อ",
|
|
2460
2474
|
advertisement: "โฆษณา",
|
|
2461
2475
|
noAds: "ไม่มีโฆษณา",
|
|
2462
2476
|
freeCredit: "เครดิตฟรีเป็นส่วนลด",
|
|
@@ -2547,7 +2561,7 @@ const Me = {
|
|
|
2547
2561
|
stripePriceId: "รหัสราคาแถบข้อมูล",
|
|
2548
2562
|
subscriptionValidity: "อายุการใช้งานการสมัครสมาชิก (วัน)",
|
|
2549
2563
|
submit: "ส่ง",
|
|
2550
|
-
cancel: "
|
|
2564
|
+
cancel: "ยืนยัน",
|
|
2551
2565
|
advanceSetting: "การตั้งค่าขั้นสูง",
|
|
2552
2566
|
credit: "เครดิต",
|
|
2553
2567
|
normalCredit: "เครดิตปกติ",
|
|
@@ -2611,7 +2625,7 @@ const Me = {
|
|
|
2611
2625
|
},
|
|
2612
2626
|
create: "สร้างรางวัล",
|
|
2613
2627
|
table: {
|
|
2614
|
-
name: "
|
|
2628
|
+
name: "ป้ายชื่อ",
|
|
2615
2629
|
type: "พิมพ์",
|
|
2616
2630
|
validity: "ความถูกต้อง",
|
|
2617
2631
|
used: "ใช้แล้ว",
|
|
@@ -2738,20 +2752,20 @@ const Me = {
|
|
|
2738
2752
|
},
|
|
2739
2753
|
campaign: {
|
|
2740
2754
|
rule_required: "ต้องมีกฎเกณฑ์เมื่อประเภทตัวกระตุ้นคือ '{type}'",
|
|
2741
|
-
earning_amount_exceed: "จำนวนเงินที่ได้รับต้องน้อยกว่า {max} (
|
|
2755
|
+
earning_amount_exceed: "จำนวนเงินที่ได้รับต้องน้อยกว่า {max} (จำนวนเงินที่ได้รับสูงสุดของMission)",
|
|
2742
2756
|
credit_validity_required: "แคมเปญเครดิตต้องมีตัวเลือกอายุการใช้งาน (ต้องเป็นเครดิตฟรี)",
|
|
2743
|
-
mission_first_receive: "
|
|
2757
|
+
mission_first_receive: "แคมเปญMissionต้องติดตามการรับก่อน",
|
|
2744
2758
|
schedule_period_required: "ตัวกระตุ้นกำหนดการต้องตั้งค่าช่วงเวลาที่ใช้งานอยู่",
|
|
2745
2759
|
active_period_invalid: "กฎช่วงเวลาที่ใช้งานอยู่ไม่ถูกต้อง",
|
|
2746
2760
|
fixed_earning_required: "แคมเปญที่ไม่สามารถเรียกเก็บเงินได้ครบต้องมีตัวเลือกการรับรายได้คงที่",
|
|
2747
|
-
reward_threshold_range: "
|
|
2761
|
+
reward_threshold_range: "เกณฑ์รางวัลจะต้องอยู่ภายในจุดสิ้นสุดMission",
|
|
2748
2762
|
reward_threshold_unique: "เกณฑ์รางวัลจะต้องไม่ซ้ำกัน",
|
|
2749
2763
|
effect_required: "จำเป็นต้องมีเอฟเฟกต์"
|
|
2750
2764
|
}
|
|
2751
2765
|
},
|
|
2752
2766
|
prompt: {
|
|
2753
2767
|
confirm: "ยืนยัน",
|
|
2754
|
-
cancel: "
|
|
2768
|
+
cancel: "ยืนยัน"
|
|
2755
2769
|
},
|
|
2756
2770
|
editTierSheet: {
|
|
2757
2771
|
add: "เพิ่ม",
|
|
@@ -2764,7 +2778,7 @@ const Me = {
|
|
|
2764
2778
|
maxExperience: "ประสบการณ์สูงสุด",
|
|
2765
2779
|
actions: "การดำเนินการ",
|
|
2766
2780
|
submit: "ส่ง",
|
|
2767
|
-
cancel: "
|
|
2781
|
+
cancel: "ยืนยัน"
|
|
2768
2782
|
}
|
|
2769
2783
|
}, qe = {
|
|
2770
2784
|
connect: Ue
|
|
@@ -3773,44 +3787,44 @@ const Me = {
|
|
|
3773
3787
|
connectZodCustom: We
|
|
3774
3788
|
};
|
|
3775
3789
|
var b;
|
|
3776
|
-
(function(
|
|
3777
|
-
|
|
3790
|
+
(function(i) {
|
|
3791
|
+
i.assertEqual = (n) => n;
|
|
3778
3792
|
function e(n) {
|
|
3779
3793
|
}
|
|
3780
|
-
|
|
3794
|
+
i.assertIs = e;
|
|
3781
3795
|
function t(n) {
|
|
3782
3796
|
throw new Error();
|
|
3783
3797
|
}
|
|
3784
|
-
|
|
3798
|
+
i.assertNever = t, i.arrayToEnum = (n) => {
|
|
3785
3799
|
const r = {};
|
|
3786
3800
|
for (const s of n)
|
|
3787
3801
|
r[s] = s;
|
|
3788
3802
|
return r;
|
|
3789
|
-
},
|
|
3790
|
-
const r =
|
|
3803
|
+
}, i.getValidEnumValues = (n) => {
|
|
3804
|
+
const r = i.objectKeys(n).filter((o) => typeof n[n[o]] != "number"), s = {};
|
|
3791
3805
|
for (const o of r)
|
|
3792
3806
|
s[o] = n[o];
|
|
3793
|
-
return
|
|
3794
|
-
},
|
|
3807
|
+
return i.objectValues(s);
|
|
3808
|
+
}, i.objectValues = (n) => i.objectKeys(n).map(function(r) {
|
|
3795
3809
|
return n[r];
|
|
3796
|
-
}),
|
|
3810
|
+
}), i.objectKeys = typeof Object.keys == "function" ? (n) => Object.keys(n) : (n) => {
|
|
3797
3811
|
const r = [];
|
|
3798
3812
|
for (const s in n)
|
|
3799
3813
|
Object.prototype.hasOwnProperty.call(n, s) && r.push(s);
|
|
3800
3814
|
return r;
|
|
3801
|
-
},
|
|
3815
|
+
}, i.find = (n, r) => {
|
|
3802
3816
|
for (const s of n)
|
|
3803
3817
|
if (r(s))
|
|
3804
3818
|
return s;
|
|
3805
|
-
},
|
|
3806
|
-
function
|
|
3819
|
+
}, i.isInteger = typeof Number.isInteger == "function" ? (n) => Number.isInteger(n) : (n) => typeof n == "number" && isFinite(n) && Math.floor(n) === n;
|
|
3820
|
+
function a(n, r = " | ") {
|
|
3807
3821
|
return n.map((s) => typeof s == "string" ? `'${s}'` : s).join(r);
|
|
3808
3822
|
}
|
|
3809
|
-
|
|
3823
|
+
i.joinValues = a, i.jsonStringifyReplacer = (n, r) => typeof r == "bigint" ? r.toString() : r;
|
|
3810
3824
|
})(b || (b = {}));
|
|
3811
3825
|
var be;
|
|
3812
|
-
(function(
|
|
3813
|
-
|
|
3826
|
+
(function(i) {
|
|
3827
|
+
i.mergeShapes = (e, t) => ({
|
|
3814
3828
|
...e,
|
|
3815
3829
|
...t
|
|
3816
3830
|
// second overwrites first
|
|
@@ -3837,14 +3851,14 @@ const l = b.arrayToEnum([
|
|
|
3837
3851
|
"never",
|
|
3838
3852
|
"map",
|
|
3839
3853
|
"set"
|
|
3840
|
-
]), j = (
|
|
3841
|
-
switch (typeof
|
|
3854
|
+
]), j = (i) => {
|
|
3855
|
+
switch (typeof i) {
|
|
3842
3856
|
case "undefined":
|
|
3843
3857
|
return l.undefined;
|
|
3844
3858
|
case "string":
|
|
3845
3859
|
return l.string;
|
|
3846
3860
|
case "number":
|
|
3847
|
-
return isNaN(
|
|
3861
|
+
return isNaN(i) ? l.nan : l.number;
|
|
3848
3862
|
case "boolean":
|
|
3849
3863
|
return l.boolean;
|
|
3850
3864
|
case "function":
|
|
@@ -3854,7 +3868,7 @@ const l = b.arrayToEnum([
|
|
|
3854
3868
|
case "symbol":
|
|
3855
3869
|
return l.symbol;
|
|
3856
3870
|
case "object":
|
|
3857
|
-
return Array.isArray(
|
|
3871
|
+
return Array.isArray(i) ? l.array : i === null ? l.null : i.then && typeof i.then == "function" && i.catch && typeof i.catch == "function" ? l.promise : typeof Map < "u" && i instanceof Map ? l.map : typeof Set < "u" && i instanceof Set ? l.set : typeof Date < "u" && i instanceof Date ? l.date : l.object;
|
|
3858
3872
|
default:
|
|
3859
3873
|
return l.unknown;
|
|
3860
3874
|
}
|
|
@@ -3875,13 +3889,13 @@ const l = b.arrayToEnum([
|
|
|
3875
3889
|
"invalid_intersection_types",
|
|
3876
3890
|
"not_multiple_of",
|
|
3877
3891
|
"not_finite"
|
|
3878
|
-
]), Fe = (
|
|
3892
|
+
]), Fe = (i) => JSON.stringify(i, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
3879
3893
|
class E extends Error {
|
|
3880
3894
|
constructor(e) {
|
|
3881
|
-
super(), this.issues = [], this.addIssue = (
|
|
3882
|
-
this.issues = [...this.issues,
|
|
3883
|
-
}, this.addIssues = (
|
|
3884
|
-
this.issues = [...this.issues, ...
|
|
3895
|
+
super(), this.issues = [], this.addIssue = (a) => {
|
|
3896
|
+
this.issues = [...this.issues, a];
|
|
3897
|
+
}, this.addIssues = (a = []) => {
|
|
3898
|
+
this.issues = [...this.issues, ...a];
|
|
3885
3899
|
};
|
|
3886
3900
|
const t = new.target.prototype;
|
|
3887
3901
|
Object.setPrototypeOf ? Object.setPrototypeOf(this, t) : this.__proto__ = t, this.name = "ZodError", this.issues = e;
|
|
@@ -3892,7 +3906,7 @@ class E extends Error {
|
|
|
3892
3906
|
format(e) {
|
|
3893
3907
|
const t = e || function(r) {
|
|
3894
3908
|
return r.message;
|
|
3895
|
-
},
|
|
3909
|
+
}, a = { _errors: [] }, n = (r) => {
|
|
3896
3910
|
for (const s of r.issues)
|
|
3897
3911
|
if (s.code === "invalid_union")
|
|
3898
3912
|
s.unionErrors.map(n);
|
|
@@ -3901,16 +3915,16 @@ class E extends Error {
|
|
|
3901
3915
|
else if (s.code === "invalid_arguments")
|
|
3902
3916
|
n(s.argumentsError);
|
|
3903
3917
|
else if (s.path.length === 0)
|
|
3904
|
-
|
|
3918
|
+
a._errors.push(t(s));
|
|
3905
3919
|
else {
|
|
3906
|
-
let o =
|
|
3920
|
+
let o = a, m = 0;
|
|
3907
3921
|
for (; m < s.path.length; ) {
|
|
3908
3922
|
const d = s.path[m];
|
|
3909
3923
|
m === s.path.length - 1 ? (o[d] = o[d] || { _errors: [] }, o[d]._errors.push(t(s))) : o[d] = o[d] || { _errors: [] }, o = o[d], m++;
|
|
3910
3924
|
}
|
|
3911
3925
|
}
|
|
3912
3926
|
};
|
|
3913
|
-
return n(this),
|
|
3927
|
+
return n(this), a;
|
|
3914
3928
|
}
|
|
3915
3929
|
toString() {
|
|
3916
3930
|
return this.message;
|
|
@@ -3922,36 +3936,36 @@ class E extends Error {
|
|
|
3922
3936
|
return this.issues.length === 0;
|
|
3923
3937
|
}
|
|
3924
3938
|
flatten(e = (t) => t.message) {
|
|
3925
|
-
const t = {},
|
|
3939
|
+
const t = {}, a = [];
|
|
3926
3940
|
for (const n of this.issues)
|
|
3927
|
-
n.path.length > 0 ? (t[n.path[0]] = t[n.path[0]] || [], t[n.path[0]].push(e(n))) :
|
|
3928
|
-
return { formErrors:
|
|
3941
|
+
n.path.length > 0 ? (t[n.path[0]] = t[n.path[0]] || [], t[n.path[0]].push(e(n))) : a.push(e(n));
|
|
3942
|
+
return { formErrors: a, fieldErrors: t };
|
|
3929
3943
|
}
|
|
3930
3944
|
get formErrors() {
|
|
3931
3945
|
return this.flatten();
|
|
3932
3946
|
}
|
|
3933
3947
|
}
|
|
3934
|
-
E.create = (
|
|
3935
|
-
const F = (
|
|
3948
|
+
E.create = (i) => new E(i);
|
|
3949
|
+
const F = (i, e) => {
|
|
3936
3950
|
let t;
|
|
3937
|
-
switch (
|
|
3951
|
+
switch (i.code) {
|
|
3938
3952
|
case c.invalid_type:
|
|
3939
|
-
|
|
3953
|
+
i.received === l.undefined ? t = "Required" : t = `Expected ${i.expected}, received ${i.received}`;
|
|
3940
3954
|
break;
|
|
3941
3955
|
case c.invalid_literal:
|
|
3942
|
-
t = `Invalid literal value, expected ${JSON.stringify(
|
|
3956
|
+
t = `Invalid literal value, expected ${JSON.stringify(i.expected, b.jsonStringifyReplacer)}`;
|
|
3943
3957
|
break;
|
|
3944
3958
|
case c.unrecognized_keys:
|
|
3945
|
-
t = `Unrecognized key(s) in object: ${b.joinValues(
|
|
3959
|
+
t = `Unrecognized key(s) in object: ${b.joinValues(i.keys, ", ")}`;
|
|
3946
3960
|
break;
|
|
3947
3961
|
case c.invalid_union:
|
|
3948
3962
|
t = "Invalid input";
|
|
3949
3963
|
break;
|
|
3950
3964
|
case c.invalid_union_discriminator:
|
|
3951
|
-
t = `Invalid discriminator value. Expected ${b.joinValues(
|
|
3965
|
+
t = `Invalid discriminator value. Expected ${b.joinValues(i.options)}`;
|
|
3952
3966
|
break;
|
|
3953
3967
|
case c.invalid_enum_value:
|
|
3954
|
-
t = `Invalid enum value. Expected ${b.joinValues(
|
|
3968
|
+
t = `Invalid enum value. Expected ${b.joinValues(i.options)}, received '${i.received}'`;
|
|
3955
3969
|
break;
|
|
3956
3970
|
case c.invalid_arguments:
|
|
3957
3971
|
t = "Invalid function arguments";
|
|
@@ -3963,13 +3977,13 @@ const F = (a, e) => {
|
|
|
3963
3977
|
t = "Invalid date";
|
|
3964
3978
|
break;
|
|
3965
3979
|
case c.invalid_string:
|
|
3966
|
-
typeof
|
|
3980
|
+
typeof i.validation == "object" ? "includes" in i.validation ? (t = `Invalid input: must include "${i.validation.includes}"`, typeof i.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${i.validation.position}`)) : "startsWith" in i.validation ? t = `Invalid input: must start with "${i.validation.startsWith}"` : "endsWith" in i.validation ? t = `Invalid input: must end with "${i.validation.endsWith}"` : b.assertNever(i.validation) : i.validation !== "regex" ? t = `Invalid ${i.validation}` : t = "Invalid";
|
|
3967
3981
|
break;
|
|
3968
3982
|
case c.too_small:
|
|
3969
|
-
|
|
3983
|
+
i.type === "array" ? t = `Array must contain ${i.exact ? "exactly" : i.inclusive ? "at least" : "more than"} ${i.minimum} element(s)` : i.type === "string" ? t = `String must contain ${i.exact ? "exactly" : i.inclusive ? "at least" : "over"} ${i.minimum} character(s)` : i.type === "number" ? t = `Number must be ${i.exact ? "exactly equal to " : i.inclusive ? "greater than or equal to " : "greater than "}${i.minimum}` : i.type === "date" ? t = `Date must be ${i.exact ? "exactly equal to " : i.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(i.minimum))}` : t = "Invalid input";
|
|
3970
3984
|
break;
|
|
3971
3985
|
case c.too_big:
|
|
3972
|
-
|
|
3986
|
+
i.type === "array" ? t = `Array must contain ${i.exact ? "exactly" : i.inclusive ? "at most" : "less than"} ${i.maximum} element(s)` : i.type === "string" ? t = `String must contain ${i.exact ? "exactly" : i.inclusive ? "at most" : "under"} ${i.maximum} character(s)` : i.type === "number" ? t = `Number must be ${i.exact ? "exactly" : i.inclusive ? "less than or equal to" : "less than"} ${i.maximum}` : i.type === "bigint" ? t = `BigInt must be ${i.exact ? "exactly" : i.inclusive ? "less than or equal to" : "less than"} ${i.maximum}` : i.type === "date" ? t = `Date must be ${i.exact ? "exactly" : i.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(i.maximum))}` : t = "Invalid input";
|
|
3973
3987
|
break;
|
|
3974
3988
|
case c.custom:
|
|
3975
3989
|
t = "Invalid input";
|
|
@@ -3978,30 +3992,30 @@ const F = (a, e) => {
|
|
|
3978
3992
|
t = "Intersection results could not be merged";
|
|
3979
3993
|
break;
|
|
3980
3994
|
case c.not_multiple_of:
|
|
3981
|
-
t = `Number must be a multiple of ${
|
|
3995
|
+
t = `Number must be a multiple of ${i.multipleOf}`;
|
|
3982
3996
|
break;
|
|
3983
3997
|
case c.not_finite:
|
|
3984
3998
|
t = "Number must be finite";
|
|
3985
3999
|
break;
|
|
3986
4000
|
default:
|
|
3987
|
-
t = e.defaultError, b.assertNever(
|
|
4001
|
+
t = e.defaultError, b.assertNever(i);
|
|
3988
4002
|
}
|
|
3989
4003
|
return { message: t };
|
|
3990
4004
|
};
|
|
3991
|
-
let
|
|
3992
|
-
function He(
|
|
3993
|
-
|
|
4005
|
+
let ke = F;
|
|
4006
|
+
function He(i) {
|
|
4007
|
+
ke = i;
|
|
3994
4008
|
}
|
|
3995
4009
|
function ce() {
|
|
3996
|
-
return
|
|
4010
|
+
return ke;
|
|
3997
4011
|
}
|
|
3998
|
-
const de = (
|
|
3999
|
-
const { data: e, path: t, errorMaps:
|
|
4012
|
+
const de = (i) => {
|
|
4013
|
+
const { data: e, path: t, errorMaps: a, issueData: n } = i, r = [...t, ...n.path || []], s = {
|
|
4000
4014
|
...n,
|
|
4001
4015
|
path: r
|
|
4002
4016
|
};
|
|
4003
4017
|
let o = "";
|
|
4004
|
-
const m =
|
|
4018
|
+
const m = a.filter((d) => !!d).slice().reverse();
|
|
4005
4019
|
for (const d of m)
|
|
4006
4020
|
o = d(s, { data: e, defaultError: o }).message;
|
|
4007
4021
|
return {
|
|
@@ -4010,20 +4024,20 @@ const de = (a) => {
|
|
|
4010
4024
|
message: n.message || o
|
|
4011
4025
|
};
|
|
4012
4026
|
}, Je = [];
|
|
4013
|
-
function u(
|
|
4027
|
+
function u(i, e) {
|
|
4014
4028
|
const t = de({
|
|
4015
4029
|
issueData: e,
|
|
4016
|
-
data:
|
|
4017
|
-
path:
|
|
4030
|
+
data: i.data,
|
|
4031
|
+
path: i.path,
|
|
4018
4032
|
errorMaps: [
|
|
4019
|
-
|
|
4020
|
-
|
|
4033
|
+
i.common.contextualErrorMap,
|
|
4034
|
+
i.schemaErrorMap,
|
|
4021
4035
|
ce(),
|
|
4022
4036
|
F
|
|
4023
4037
|
// then global default map
|
|
4024
|
-
].filter((
|
|
4038
|
+
].filter((a) => !!a)
|
|
4025
4039
|
});
|
|
4026
|
-
|
|
4040
|
+
i.common.issues.push(t);
|
|
4027
4041
|
}
|
|
4028
4042
|
class T {
|
|
4029
4043
|
constructor() {
|
|
@@ -4036,71 +4050,71 @@ class T {
|
|
|
4036
4050
|
this.value !== "aborted" && (this.value = "aborted");
|
|
4037
4051
|
}
|
|
4038
4052
|
static mergeArray(e, t) {
|
|
4039
|
-
const
|
|
4053
|
+
const a = [];
|
|
4040
4054
|
for (const n of t) {
|
|
4041
4055
|
if (n.status === "aborted")
|
|
4042
4056
|
return h;
|
|
4043
|
-
n.status === "dirty" && e.dirty(),
|
|
4057
|
+
n.status === "dirty" && e.dirty(), a.push(n.value);
|
|
4044
4058
|
}
|
|
4045
|
-
return { status: e.value, value:
|
|
4059
|
+
return { status: e.value, value: a };
|
|
4046
4060
|
}
|
|
4047
4061
|
static async mergeObjectAsync(e, t) {
|
|
4048
|
-
const
|
|
4062
|
+
const a = [];
|
|
4049
4063
|
for (const n of t)
|
|
4050
|
-
|
|
4064
|
+
a.push({
|
|
4051
4065
|
key: await n.key,
|
|
4052
4066
|
value: await n.value
|
|
4053
4067
|
});
|
|
4054
|
-
return T.mergeObjectSync(e,
|
|
4068
|
+
return T.mergeObjectSync(e, a);
|
|
4055
4069
|
}
|
|
4056
4070
|
static mergeObjectSync(e, t) {
|
|
4057
|
-
const
|
|
4071
|
+
const a = {};
|
|
4058
4072
|
for (const n of t) {
|
|
4059
4073
|
const { key: r, value: s } = n;
|
|
4060
4074
|
if (r.status === "aborted" || s.status === "aborted")
|
|
4061
4075
|
return h;
|
|
4062
|
-
r.status === "dirty" && e.dirty(), s.status === "dirty" && e.dirty(), r.value !== "__proto__" && (typeof s.value < "u" || n.alwaysSet) && (
|
|
4076
|
+
r.status === "dirty" && e.dirty(), s.status === "dirty" && e.dirty(), r.value !== "__proto__" && (typeof s.value < "u" || n.alwaysSet) && (a[r.value] = s.value);
|
|
4063
4077
|
}
|
|
4064
|
-
return { status: e.value, value:
|
|
4078
|
+
return { status: e.value, value: a };
|
|
4065
4079
|
}
|
|
4066
4080
|
}
|
|
4067
4081
|
const h = Object.freeze({
|
|
4068
4082
|
status: "aborted"
|
|
4069
|
-
}), Se = (
|
|
4083
|
+
}), Se = (i) => ({ status: "dirty", value: i }), C = (i) => ({ status: "valid", value: i }), xe = (i) => i.status === "aborted", we = (i) => i.status === "dirty", H = (i) => i.status === "valid", le = (i) => typeof Promise < "u" && i instanceof Promise;
|
|
4070
4084
|
var p;
|
|
4071
|
-
(function(
|
|
4072
|
-
|
|
4085
|
+
(function(i) {
|
|
4086
|
+
i.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, i.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
4073
4087
|
})(p || (p = {}));
|
|
4074
|
-
class
|
|
4075
|
-
constructor(e, t,
|
|
4076
|
-
this._cachedPath = [], this.parent = e, this.data = t, this._path =
|
|
4088
|
+
class I {
|
|
4089
|
+
constructor(e, t, a, n) {
|
|
4090
|
+
this._cachedPath = [], this.parent = e, this.data = t, this._path = a, this._key = n;
|
|
4077
4091
|
}
|
|
4078
4092
|
get path() {
|
|
4079
4093
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
4080
4094
|
}
|
|
4081
4095
|
}
|
|
4082
|
-
const Ce = (
|
|
4096
|
+
const Ce = (i, e) => {
|
|
4083
4097
|
if (H(e))
|
|
4084
4098
|
return { success: !0, data: e.value };
|
|
4085
|
-
if (!
|
|
4099
|
+
if (!i.common.issues.length)
|
|
4086
4100
|
throw new Error("Validation failed but no issues detected.");
|
|
4087
4101
|
return {
|
|
4088
4102
|
success: !1,
|
|
4089
4103
|
get error() {
|
|
4090
4104
|
if (this._error)
|
|
4091
4105
|
return this._error;
|
|
4092
|
-
const t = new E(
|
|
4106
|
+
const t = new E(i.common.issues);
|
|
4093
4107
|
return this._error = t, this._error;
|
|
4094
4108
|
}
|
|
4095
4109
|
};
|
|
4096
4110
|
};
|
|
4097
|
-
function g(
|
|
4098
|
-
if (!
|
|
4111
|
+
function g(i) {
|
|
4112
|
+
if (!i)
|
|
4099
4113
|
return {};
|
|
4100
|
-
const { errorMap: e, invalid_type_error: t, required_error:
|
|
4101
|
-
if (e && (t ||
|
|
4114
|
+
const { errorMap: e, invalid_type_error: t, required_error: a, description: n } = i;
|
|
4115
|
+
if (e && (t || a))
|
|
4102
4116
|
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
4103
|
-
return e ? { errorMap: e, description: n } : { errorMap: (s, o) => s.code !== "invalid_type" ? { message: o.defaultError } : typeof o.data > "u" ? { message:
|
|
4117
|
+
return e ? { errorMap: e, description: n } : { errorMap: (s, o) => s.code !== "invalid_type" ? { message: o.defaultError } : typeof o.data > "u" ? { message: a ?? o.defaultError } : { message: t ?? o.defaultError }, description: n };
|
|
4104
4118
|
}
|
|
4105
4119
|
class v {
|
|
4106
4120
|
constructor(e) {
|
|
@@ -4146,17 +4160,17 @@ class v {
|
|
|
4146
4160
|
return Promise.resolve(t);
|
|
4147
4161
|
}
|
|
4148
4162
|
parse(e, t) {
|
|
4149
|
-
const
|
|
4150
|
-
if (
|
|
4151
|
-
return
|
|
4152
|
-
throw
|
|
4163
|
+
const a = this.safeParse(e, t);
|
|
4164
|
+
if (a.success)
|
|
4165
|
+
return a.data;
|
|
4166
|
+
throw a.error;
|
|
4153
4167
|
}
|
|
4154
4168
|
safeParse(e, t) {
|
|
4155
|
-
var
|
|
4169
|
+
var a;
|
|
4156
4170
|
const n = {
|
|
4157
4171
|
common: {
|
|
4158
4172
|
issues: [],
|
|
4159
|
-
async: (
|
|
4173
|
+
async: (a = t == null ? void 0 : t.async) !== null && a !== void 0 ? a : !1,
|
|
4160
4174
|
contextualErrorMap: t == null ? void 0 : t.errorMap
|
|
4161
4175
|
},
|
|
4162
4176
|
path: (t == null ? void 0 : t.path) || [],
|
|
@@ -4168,13 +4182,13 @@ class v {
|
|
|
4168
4182
|
return Ce(n, r);
|
|
4169
4183
|
}
|
|
4170
4184
|
async parseAsync(e, t) {
|
|
4171
|
-
const
|
|
4172
|
-
if (
|
|
4173
|
-
return
|
|
4174
|
-
throw
|
|
4185
|
+
const a = await this.safeParseAsync(e, t);
|
|
4186
|
+
if (a.success)
|
|
4187
|
+
return a.data;
|
|
4188
|
+
throw a.error;
|
|
4175
4189
|
}
|
|
4176
4190
|
async safeParseAsync(e, t) {
|
|
4177
|
-
const
|
|
4191
|
+
const a = {
|
|
4178
4192
|
common: {
|
|
4179
4193
|
issues: [],
|
|
4180
4194
|
contextualErrorMap: t == null ? void 0 : t.errorMap,
|
|
@@ -4185,24 +4199,24 @@ class v {
|
|
|
4185
4199
|
parent: null,
|
|
4186
4200
|
data: e,
|
|
4187
4201
|
parsedType: j(e)
|
|
4188
|
-
}, n = this._parse({ data: e, path:
|
|
4189
|
-
return Ce(
|
|
4202
|
+
}, n = this._parse({ data: e, path: a.path, parent: a }), r = await (le(n) ? n : Promise.resolve(n));
|
|
4203
|
+
return Ce(a, r);
|
|
4190
4204
|
}
|
|
4191
4205
|
refine(e, t) {
|
|
4192
|
-
const
|
|
4206
|
+
const a = (n) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(n) : t;
|
|
4193
4207
|
return this._refinement((n, r) => {
|
|
4194
4208
|
const s = e(n), o = () => r.addIssue({
|
|
4195
4209
|
code: c.custom,
|
|
4196
|
-
...
|
|
4210
|
+
...a(n)
|
|
4197
4211
|
});
|
|
4198
4212
|
return typeof Promise < "u" && s instanceof Promise ? s.then((m) => m ? !0 : (o(), !1)) : s ? !0 : (o(), !1);
|
|
4199
4213
|
});
|
|
4200
4214
|
}
|
|
4201
4215
|
refinement(e, t) {
|
|
4202
|
-
return this._refinement((
|
|
4216
|
+
return this._refinement((a, n) => e(a) ? !0 : (n.addIssue(typeof t == "function" ? t(a, n) : t), !1));
|
|
4203
4217
|
}
|
|
4204
4218
|
_refinement(e) {
|
|
4205
|
-
return new
|
|
4219
|
+
return new M({
|
|
4206
4220
|
schema: this,
|
|
4207
4221
|
typeName: f.ZodEffects,
|
|
4208
4222
|
effect: { type: "refinement", refinement: e }
|
|
@@ -4212,7 +4226,7 @@ class v {
|
|
|
4212
4226
|
return this._refinement(e);
|
|
4213
4227
|
}
|
|
4214
4228
|
optional() {
|
|
4215
|
-
return
|
|
4229
|
+
return P.create(this, this._def);
|
|
4216
4230
|
}
|
|
4217
4231
|
nullable() {
|
|
4218
4232
|
return q.create(this, this._def);
|
|
@@ -4233,7 +4247,7 @@ class v {
|
|
|
4233
4247
|
return ee.create(this, e, this._def);
|
|
4234
4248
|
}
|
|
4235
4249
|
transform(e) {
|
|
4236
|
-
return new
|
|
4250
|
+
return new M({
|
|
4237
4251
|
...g(this._def),
|
|
4238
4252
|
schema: this,
|
|
4239
4253
|
typeName: f.ZodEffects,
|
|
@@ -4285,11 +4299,11 @@ class v {
|
|
|
4285
4299
|
return this.safeParse(null).success;
|
|
4286
4300
|
}
|
|
4287
4301
|
}
|
|
4288
|
-
const Xe = /^c[^\s-]{8,}$/i, Ke = /^[a-z][a-z0-9]*$/, Qe = /^[0-9A-HJKMNP-TV-Z]{26}$/, et = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, tt = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,
|
|
4302
|
+
const Xe = /^c[^\s-]{8,}$/i, Ke = /^[a-z][a-z0-9]*$/, Qe = /^[0-9A-HJKMNP-TV-Z]{26}$/, et = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, tt = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, it = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
4289
4303
|
let ye;
|
|
4290
|
-
const
|
|
4291
|
-
function st(
|
|
4292
|
-
return !!((e === "v4" || !e) &&
|
|
4304
|
+
const at = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/, nt = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, rt = (i) => i.precision ? i.offset ? new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`) : new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}Z$`) : i.precision === 0 ? i.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$") : i.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");
|
|
4305
|
+
function st(i, e) {
|
|
4306
|
+
return !!((e === "v4" || !e) && at.test(i) || (e === "v6" || !e) && nt.test(i));
|
|
4293
4307
|
}
|
|
4294
4308
|
class A extends v {
|
|
4295
4309
|
_parse(e) {
|
|
@@ -4305,7 +4319,7 @@ class A extends v {
|
|
|
4305
4319
|
//
|
|
4306
4320
|
), h;
|
|
4307
4321
|
}
|
|
4308
|
-
const
|
|
4322
|
+
const a = new T();
|
|
4309
4323
|
let n;
|
|
4310
4324
|
for (const r of this._def.checks)
|
|
4311
4325
|
if (r.kind === "min")
|
|
@@ -4316,7 +4330,7 @@ class A extends v {
|
|
|
4316
4330
|
inclusive: !0,
|
|
4317
4331
|
exact: !1,
|
|
4318
4332
|
message: r.message
|
|
4319
|
-
}),
|
|
4333
|
+
}), a.dirty());
|
|
4320
4334
|
else if (r.kind === "max")
|
|
4321
4335
|
e.data.length > r.value && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4322
4336
|
code: c.too_big,
|
|
@@ -4325,7 +4339,7 @@ class A extends v {
|
|
|
4325
4339
|
inclusive: !0,
|
|
4326
4340
|
exact: !1,
|
|
4327
4341
|
message: r.message
|
|
4328
|
-
}),
|
|
4342
|
+
}), a.dirty());
|
|
4329
4343
|
else if (r.kind === "length") {
|
|
4330
4344
|
const s = e.data.length > r.value, o = e.data.length < r.value;
|
|
4331
4345
|
(s || o) && (n = this._getOrReturnCtx(e, n), s ? u(n, {
|
|
@@ -4342,43 +4356,43 @@ class A extends v {
|
|
|
4342
4356
|
inclusive: !0,
|
|
4343
4357
|
exact: !0,
|
|
4344
4358
|
message: r.message
|
|
4345
|
-
}),
|
|
4359
|
+
}), a.dirty());
|
|
4346
4360
|
} else if (r.kind === "email")
|
|
4347
4361
|
tt.test(e.data) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4348
4362
|
validation: "email",
|
|
4349
4363
|
code: c.invalid_string,
|
|
4350
4364
|
message: r.message
|
|
4351
|
-
}),
|
|
4365
|
+
}), a.dirty());
|
|
4352
4366
|
else if (r.kind === "emoji")
|
|
4353
|
-
ye || (ye = new RegExp(
|
|
4367
|
+
ye || (ye = new RegExp(it, "u")), ye.test(e.data) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4354
4368
|
validation: "emoji",
|
|
4355
4369
|
code: c.invalid_string,
|
|
4356
4370
|
message: r.message
|
|
4357
|
-
}),
|
|
4371
|
+
}), a.dirty());
|
|
4358
4372
|
else if (r.kind === "uuid")
|
|
4359
4373
|
et.test(e.data) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4360
4374
|
validation: "uuid",
|
|
4361
4375
|
code: c.invalid_string,
|
|
4362
4376
|
message: r.message
|
|
4363
|
-
}),
|
|
4377
|
+
}), a.dirty());
|
|
4364
4378
|
else if (r.kind === "cuid")
|
|
4365
4379
|
Xe.test(e.data) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4366
4380
|
validation: "cuid",
|
|
4367
4381
|
code: c.invalid_string,
|
|
4368
4382
|
message: r.message
|
|
4369
|
-
}),
|
|
4383
|
+
}), a.dirty());
|
|
4370
4384
|
else if (r.kind === "cuid2")
|
|
4371
4385
|
Ke.test(e.data) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4372
4386
|
validation: "cuid2",
|
|
4373
4387
|
code: c.invalid_string,
|
|
4374
4388
|
message: r.message
|
|
4375
|
-
}),
|
|
4389
|
+
}), a.dirty());
|
|
4376
4390
|
else if (r.kind === "ulid")
|
|
4377
4391
|
Qe.test(e.data) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4378
4392
|
validation: "ulid",
|
|
4379
4393
|
code: c.invalid_string,
|
|
4380
4394
|
message: r.message
|
|
4381
|
-
}),
|
|
4395
|
+
}), a.dirty());
|
|
4382
4396
|
else if (r.kind === "url")
|
|
4383
4397
|
try {
|
|
4384
4398
|
new URL(e.data);
|
|
@@ -4387,40 +4401,40 @@ class A extends v {
|
|
|
4387
4401
|
validation: "url",
|
|
4388
4402
|
code: c.invalid_string,
|
|
4389
4403
|
message: r.message
|
|
4390
|
-
}),
|
|
4404
|
+
}), a.dirty();
|
|
4391
4405
|
}
|
|
4392
4406
|
else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4393
4407
|
validation: "regex",
|
|
4394
4408
|
code: c.invalid_string,
|
|
4395
4409
|
message: r.message
|
|
4396
|
-
}),
|
|
4410
|
+
}), a.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4397
4411
|
code: c.invalid_string,
|
|
4398
4412
|
validation: { includes: r.value, position: r.position },
|
|
4399
4413
|
message: r.message
|
|
4400
|
-
}),
|
|
4414
|
+
}), a.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4401
4415
|
code: c.invalid_string,
|
|
4402
4416
|
validation: { startsWith: r.value },
|
|
4403
4417
|
message: r.message
|
|
4404
|
-
}),
|
|
4418
|
+
}), a.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4405
4419
|
code: c.invalid_string,
|
|
4406
4420
|
validation: { endsWith: r.value },
|
|
4407
4421
|
message: r.message
|
|
4408
|
-
}),
|
|
4422
|
+
}), a.dirty()) : r.kind === "datetime" ? rt(r).test(e.data) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4409
4423
|
code: c.invalid_string,
|
|
4410
4424
|
validation: "datetime",
|
|
4411
4425
|
message: r.message
|
|
4412
|
-
}),
|
|
4426
|
+
}), a.dirty()) : r.kind === "ip" ? st(e.data, r.version) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4413
4427
|
validation: "ip",
|
|
4414
4428
|
code: c.invalid_string,
|
|
4415
4429
|
message: r.message
|
|
4416
|
-
}),
|
|
4417
|
-
return { status:
|
|
4430
|
+
}), a.dirty()) : b.assertNever(r);
|
|
4431
|
+
return { status: a.value, value: e.data };
|
|
4418
4432
|
}
|
|
4419
|
-
_regex(e, t,
|
|
4433
|
+
_regex(e, t, a) {
|
|
4420
4434
|
return this.refinement((n) => e.test(n), {
|
|
4421
4435
|
validation: t,
|
|
4422
4436
|
code: c.invalid_string,
|
|
4423
|
-
...p.errToObj(
|
|
4437
|
+
...p.errToObj(a)
|
|
4424
4438
|
});
|
|
4425
4439
|
}
|
|
4426
4440
|
_addCheck(e) {
|
|
@@ -4582,17 +4596,17 @@ class A extends v {
|
|
|
4582
4596
|
return e;
|
|
4583
4597
|
}
|
|
4584
4598
|
}
|
|
4585
|
-
A.create = (
|
|
4599
|
+
A.create = (i) => {
|
|
4586
4600
|
var e;
|
|
4587
4601
|
return new A({
|
|
4588
4602
|
checks: [],
|
|
4589
4603
|
typeName: f.ZodString,
|
|
4590
|
-
coerce: (e =
|
|
4591
|
-
...g(
|
|
4604
|
+
coerce: (e = i == null ? void 0 : i.coerce) !== null && e !== void 0 ? e : !1,
|
|
4605
|
+
...g(i)
|
|
4592
4606
|
});
|
|
4593
4607
|
};
|
|
4594
|
-
function ot(
|
|
4595
|
-
const t = (
|
|
4608
|
+
function ot(i, e) {
|
|
4609
|
+
const t = (i.toString().split(".")[1] || "").length, a = (e.toString().split(".")[1] || "").length, n = t > a ? t : a, r = parseInt(i.toFixed(n).replace(".", "")), s = parseInt(e.toFixed(n).replace(".", ""));
|
|
4596
4610
|
return r % s / Math.pow(10, n);
|
|
4597
4611
|
}
|
|
4598
4612
|
class D extends v {
|
|
@@ -4608,33 +4622,33 @@ class D extends v {
|
|
|
4608
4622
|
received: r.parsedType
|
|
4609
4623
|
}), h;
|
|
4610
4624
|
}
|
|
4611
|
-
let
|
|
4625
|
+
let a;
|
|
4612
4626
|
const n = new T();
|
|
4613
4627
|
for (const r of this._def.checks)
|
|
4614
|
-
r.kind === "int" ? b.isInteger(e.data) || (
|
|
4628
|
+
r.kind === "int" ? b.isInteger(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4615
4629
|
code: c.invalid_type,
|
|
4616
4630
|
expected: "integer",
|
|
4617
4631
|
received: "float",
|
|
4618
4632
|
message: r.message
|
|
4619
|
-
}), n.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (
|
|
4633
|
+
}), n.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4620
4634
|
code: c.too_small,
|
|
4621
4635
|
minimum: r.value,
|
|
4622
4636
|
type: "number",
|
|
4623
4637
|
inclusive: r.inclusive,
|
|
4624
4638
|
exact: !1,
|
|
4625
4639
|
message: r.message
|
|
4626
|
-
}), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (
|
|
4640
|
+
}), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4627
4641
|
code: c.too_big,
|
|
4628
4642
|
maximum: r.value,
|
|
4629
4643
|
type: "number",
|
|
4630
4644
|
inclusive: r.inclusive,
|
|
4631
4645
|
exact: !1,
|
|
4632
4646
|
message: r.message
|
|
4633
|
-
}), n.dirty()) : r.kind === "multipleOf" ? ot(e.data, r.value) !== 0 && (
|
|
4647
|
+
}), n.dirty()) : r.kind === "multipleOf" ? ot(e.data, r.value) !== 0 && (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4634
4648
|
code: c.not_multiple_of,
|
|
4635
4649
|
multipleOf: r.value,
|
|
4636
4650
|
message: r.message
|
|
4637
|
-
}), n.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (
|
|
4651
|
+
}), n.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4638
4652
|
code: c.not_finite,
|
|
4639
4653
|
message: r.message
|
|
4640
4654
|
}), n.dirty()) : b.assertNever(r);
|
|
@@ -4652,7 +4666,7 @@ class D extends v {
|
|
|
4652
4666
|
lt(e, t) {
|
|
4653
4667
|
return this.setLimit("max", e, !1, p.toString(t));
|
|
4654
4668
|
}
|
|
4655
|
-
setLimit(e, t,
|
|
4669
|
+
setLimit(e, t, a, n) {
|
|
4656
4670
|
return new D({
|
|
4657
4671
|
...this._def,
|
|
4658
4672
|
checks: [
|
|
@@ -4660,7 +4674,7 @@ class D extends v {
|
|
|
4660
4674
|
{
|
|
4661
4675
|
kind: e,
|
|
4662
4676
|
value: t,
|
|
4663
|
-
inclusive:
|
|
4677
|
+
inclusive: a,
|
|
4664
4678
|
message: p.toString(n)
|
|
4665
4679
|
}
|
|
4666
4680
|
]
|
|
@@ -4753,19 +4767,19 @@ class D extends v {
|
|
|
4753
4767
|
}
|
|
4754
4768
|
get isFinite() {
|
|
4755
4769
|
let e = null, t = null;
|
|
4756
|
-
for (const
|
|
4757
|
-
if (
|
|
4770
|
+
for (const a of this._def.checks) {
|
|
4771
|
+
if (a.kind === "finite" || a.kind === "int" || a.kind === "multipleOf")
|
|
4758
4772
|
return !0;
|
|
4759
|
-
|
|
4773
|
+
a.kind === "min" ? (t === null || a.value > t) && (t = a.value) : a.kind === "max" && (e === null || a.value < e) && (e = a.value);
|
|
4760
4774
|
}
|
|
4761
4775
|
return Number.isFinite(t) && Number.isFinite(e);
|
|
4762
4776
|
}
|
|
4763
4777
|
}
|
|
4764
|
-
D.create = (
|
|
4778
|
+
D.create = (i) => new D({
|
|
4765
4779
|
checks: [],
|
|
4766
4780
|
typeName: f.ZodNumber,
|
|
4767
|
-
coerce: (
|
|
4768
|
-
...g(
|
|
4781
|
+
coerce: (i == null ? void 0 : i.coerce) || !1,
|
|
4782
|
+
...g(i)
|
|
4769
4783
|
});
|
|
4770
4784
|
class Z extends v {
|
|
4771
4785
|
constructor() {
|
|
@@ -4780,22 +4794,22 @@ class Z extends v {
|
|
|
4780
4794
|
received: r.parsedType
|
|
4781
4795
|
}), h;
|
|
4782
4796
|
}
|
|
4783
|
-
let
|
|
4797
|
+
let a;
|
|
4784
4798
|
const n = new T();
|
|
4785
4799
|
for (const r of this._def.checks)
|
|
4786
|
-
r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (
|
|
4800
|
+
r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4787
4801
|
code: c.too_small,
|
|
4788
4802
|
type: "bigint",
|
|
4789
4803
|
minimum: r.value,
|
|
4790
4804
|
inclusive: r.inclusive,
|
|
4791
4805
|
message: r.message
|
|
4792
|
-
}), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (
|
|
4806
|
+
}), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4793
4807
|
code: c.too_big,
|
|
4794
4808
|
type: "bigint",
|
|
4795
4809
|
maximum: r.value,
|
|
4796
4810
|
inclusive: r.inclusive,
|
|
4797
4811
|
message: r.message
|
|
4798
|
-
}), n.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (
|
|
4812
|
+
}), n.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (a = this._getOrReturnCtx(e, a), u(a, {
|
|
4799
4813
|
code: c.not_multiple_of,
|
|
4800
4814
|
multipleOf: r.value,
|
|
4801
4815
|
message: r.message
|
|
@@ -4814,7 +4828,7 @@ class Z extends v {
|
|
|
4814
4828
|
lt(e, t) {
|
|
4815
4829
|
return this.setLimit("max", e, !1, p.toString(t));
|
|
4816
4830
|
}
|
|
4817
|
-
setLimit(e, t,
|
|
4831
|
+
setLimit(e, t, a, n) {
|
|
4818
4832
|
return new Z({
|
|
4819
4833
|
...this._def,
|
|
4820
4834
|
checks: [
|
|
@@ -4822,7 +4836,7 @@ class Z extends v {
|
|
|
4822
4836
|
{
|
|
4823
4837
|
kind: e,
|
|
4824
4838
|
value: t,
|
|
4825
|
-
inclusive:
|
|
4839
|
+
inclusive: a,
|
|
4826
4840
|
message: p.toString(n)
|
|
4827
4841
|
}
|
|
4828
4842
|
]
|
|
@@ -4886,34 +4900,34 @@ class Z extends v {
|
|
|
4886
4900
|
return e;
|
|
4887
4901
|
}
|
|
4888
4902
|
}
|
|
4889
|
-
Z.create = (
|
|
4903
|
+
Z.create = (i) => {
|
|
4890
4904
|
var e;
|
|
4891
4905
|
return new Z({
|
|
4892
4906
|
checks: [],
|
|
4893
4907
|
typeName: f.ZodBigInt,
|
|
4894
|
-
coerce: (e =
|
|
4895
|
-
...g(
|
|
4908
|
+
coerce: (e = i == null ? void 0 : i.coerce) !== null && e !== void 0 ? e : !1,
|
|
4909
|
+
...g(i)
|
|
4896
4910
|
});
|
|
4897
4911
|
};
|
|
4898
4912
|
class J extends v {
|
|
4899
4913
|
_parse(e) {
|
|
4900
4914
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== l.boolean) {
|
|
4901
|
-
const
|
|
4902
|
-
return u(
|
|
4915
|
+
const a = this._getOrReturnCtx(e);
|
|
4916
|
+
return u(a, {
|
|
4903
4917
|
code: c.invalid_type,
|
|
4904
4918
|
expected: l.boolean,
|
|
4905
|
-
received:
|
|
4919
|
+
received: a.parsedType
|
|
4906
4920
|
}), h;
|
|
4907
4921
|
}
|
|
4908
4922
|
return C(e.data);
|
|
4909
4923
|
}
|
|
4910
4924
|
}
|
|
4911
|
-
J.create = (
|
|
4925
|
+
J.create = (i) => new J({
|
|
4912
4926
|
typeName: f.ZodBoolean,
|
|
4913
|
-
coerce: (
|
|
4914
|
-
...g(
|
|
4927
|
+
coerce: (i == null ? void 0 : i.coerce) || !1,
|
|
4928
|
+
...g(i)
|
|
4915
4929
|
});
|
|
4916
|
-
class
|
|
4930
|
+
class $ extends v {
|
|
4917
4931
|
_parse(e) {
|
|
4918
4932
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== l.date) {
|
|
4919
4933
|
const r = this._getOrReturnCtx(e);
|
|
@@ -4929,7 +4943,7 @@ class B extends v {
|
|
|
4929
4943
|
code: c.invalid_date
|
|
4930
4944
|
}), h;
|
|
4931
4945
|
}
|
|
4932
|
-
const
|
|
4946
|
+
const a = new T();
|
|
4933
4947
|
let n;
|
|
4934
4948
|
for (const r of this._def.checks)
|
|
4935
4949
|
r.kind === "min" ? e.data.getTime() < r.value && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
@@ -4939,21 +4953,21 @@ class B extends v {
|
|
|
4939
4953
|
exact: !1,
|
|
4940
4954
|
minimum: r.value,
|
|
4941
4955
|
type: "date"
|
|
4942
|
-
}),
|
|
4956
|
+
}), a.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
4943
4957
|
code: c.too_big,
|
|
4944
4958
|
message: r.message,
|
|
4945
4959
|
inclusive: !0,
|
|
4946
4960
|
exact: !1,
|
|
4947
4961
|
maximum: r.value,
|
|
4948
4962
|
type: "date"
|
|
4949
|
-
}),
|
|
4963
|
+
}), a.dirty()) : b.assertNever(r);
|
|
4950
4964
|
return {
|
|
4951
|
-
status:
|
|
4965
|
+
status: a.value,
|
|
4952
4966
|
value: new Date(e.data.getTime())
|
|
4953
4967
|
};
|
|
4954
4968
|
}
|
|
4955
4969
|
_addCheck(e) {
|
|
4956
|
-
return new
|
|
4970
|
+
return new $({
|
|
4957
4971
|
...this._def,
|
|
4958
4972
|
checks: [...this._def.checks, e]
|
|
4959
4973
|
});
|
|
@@ -4985,62 +4999,62 @@ class B extends v {
|
|
|
4985
4999
|
return e != null ? new Date(e) : null;
|
|
4986
5000
|
}
|
|
4987
5001
|
}
|
|
4988
|
-
|
|
5002
|
+
$.create = (i) => new $({
|
|
4989
5003
|
checks: [],
|
|
4990
|
-
coerce: (
|
|
5004
|
+
coerce: (i == null ? void 0 : i.coerce) || !1,
|
|
4991
5005
|
typeName: f.ZodDate,
|
|
4992
|
-
...g(
|
|
5006
|
+
...g(i)
|
|
4993
5007
|
});
|
|
4994
5008
|
class ue extends v {
|
|
4995
5009
|
_parse(e) {
|
|
4996
5010
|
if (this._getType(e) !== l.symbol) {
|
|
4997
|
-
const
|
|
4998
|
-
return u(
|
|
5011
|
+
const a = this._getOrReturnCtx(e);
|
|
5012
|
+
return u(a, {
|
|
4999
5013
|
code: c.invalid_type,
|
|
5000
5014
|
expected: l.symbol,
|
|
5001
|
-
received:
|
|
5015
|
+
received: a.parsedType
|
|
5002
5016
|
}), h;
|
|
5003
5017
|
}
|
|
5004
5018
|
return C(e.data);
|
|
5005
5019
|
}
|
|
5006
5020
|
}
|
|
5007
|
-
ue.create = (
|
|
5021
|
+
ue.create = (i) => new ue({
|
|
5008
5022
|
typeName: f.ZodSymbol,
|
|
5009
|
-
...g(
|
|
5023
|
+
...g(i)
|
|
5010
5024
|
});
|
|
5011
5025
|
class X extends v {
|
|
5012
5026
|
_parse(e) {
|
|
5013
5027
|
if (this._getType(e) !== l.undefined) {
|
|
5014
|
-
const
|
|
5015
|
-
return u(
|
|
5028
|
+
const a = this._getOrReturnCtx(e);
|
|
5029
|
+
return u(a, {
|
|
5016
5030
|
code: c.invalid_type,
|
|
5017
5031
|
expected: l.undefined,
|
|
5018
|
-
received:
|
|
5032
|
+
received: a.parsedType
|
|
5019
5033
|
}), h;
|
|
5020
5034
|
}
|
|
5021
5035
|
return C(e.data);
|
|
5022
5036
|
}
|
|
5023
5037
|
}
|
|
5024
|
-
X.create = (
|
|
5038
|
+
X.create = (i) => new X({
|
|
5025
5039
|
typeName: f.ZodUndefined,
|
|
5026
|
-
...g(
|
|
5040
|
+
...g(i)
|
|
5027
5041
|
});
|
|
5028
5042
|
class K extends v {
|
|
5029
5043
|
_parse(e) {
|
|
5030
5044
|
if (this._getType(e) !== l.null) {
|
|
5031
|
-
const
|
|
5032
|
-
return u(
|
|
5045
|
+
const a = this._getOrReturnCtx(e);
|
|
5046
|
+
return u(a, {
|
|
5033
5047
|
code: c.invalid_type,
|
|
5034
5048
|
expected: l.null,
|
|
5035
|
-
received:
|
|
5049
|
+
received: a.parsedType
|
|
5036
5050
|
}), h;
|
|
5037
5051
|
}
|
|
5038
5052
|
return C(e.data);
|
|
5039
5053
|
}
|
|
5040
5054
|
}
|
|
5041
|
-
K.create = (
|
|
5055
|
+
K.create = (i) => new K({
|
|
5042
5056
|
typeName: f.ZodNull,
|
|
5043
|
-
...g(
|
|
5057
|
+
...g(i)
|
|
5044
5058
|
});
|
|
5045
5059
|
class W extends v {
|
|
5046
5060
|
constructor() {
|
|
@@ -5050,11 +5064,11 @@ class W extends v {
|
|
|
5050
5064
|
return C(e.data);
|
|
5051
5065
|
}
|
|
5052
5066
|
}
|
|
5053
|
-
W.create = (
|
|
5067
|
+
W.create = (i) => new W({
|
|
5054
5068
|
typeName: f.ZodAny,
|
|
5055
|
-
...g(
|
|
5069
|
+
...g(i)
|
|
5056
5070
|
});
|
|
5057
|
-
class
|
|
5071
|
+
class B extends v {
|
|
5058
5072
|
constructor() {
|
|
5059
5073
|
super(...arguments), this._unknown = !0;
|
|
5060
5074
|
}
|
|
@@ -5062,9 +5076,9 @@ class $ extends v {
|
|
|
5062
5076
|
return C(e.data);
|
|
5063
5077
|
}
|
|
5064
5078
|
}
|
|
5065
|
-
|
|
5079
|
+
B.create = (i) => new B({
|
|
5066
5080
|
typeName: f.ZodUnknown,
|
|
5067
|
-
...g(
|
|
5081
|
+
...g(i)
|
|
5068
5082
|
});
|
|
5069
5083
|
class L extends v {
|
|
5070
5084
|
_parse(e) {
|
|
@@ -5076,30 +5090,30 @@ class L extends v {
|
|
|
5076
5090
|
}), h;
|
|
5077
5091
|
}
|
|
5078
5092
|
}
|
|
5079
|
-
L.create = (
|
|
5093
|
+
L.create = (i) => new L({
|
|
5080
5094
|
typeName: f.ZodNever,
|
|
5081
|
-
...g(
|
|
5095
|
+
...g(i)
|
|
5082
5096
|
});
|
|
5083
5097
|
class me extends v {
|
|
5084
5098
|
_parse(e) {
|
|
5085
5099
|
if (this._getType(e) !== l.undefined) {
|
|
5086
|
-
const
|
|
5087
|
-
return u(
|
|
5100
|
+
const a = this._getOrReturnCtx(e);
|
|
5101
|
+
return u(a, {
|
|
5088
5102
|
code: c.invalid_type,
|
|
5089
5103
|
expected: l.void,
|
|
5090
|
-
received:
|
|
5104
|
+
received: a.parsedType
|
|
5091
5105
|
}), h;
|
|
5092
5106
|
}
|
|
5093
5107
|
return C(e.data);
|
|
5094
5108
|
}
|
|
5095
5109
|
}
|
|
5096
|
-
me.create = (
|
|
5110
|
+
me.create = (i) => new me({
|
|
5097
5111
|
typeName: f.ZodVoid,
|
|
5098
|
-
...g(
|
|
5112
|
+
...g(i)
|
|
5099
5113
|
});
|
|
5100
5114
|
class O extends v {
|
|
5101
5115
|
_parse(e) {
|
|
5102
|
-
const { ctx: t, status:
|
|
5116
|
+
const { ctx: t, status: a } = this._processInputParams(e), n = this._def;
|
|
5103
5117
|
if (t.parsedType !== l.array)
|
|
5104
5118
|
return u(t, {
|
|
5105
5119
|
code: c.invalid_type,
|
|
@@ -5116,7 +5130,7 @@ class O extends v {
|
|
|
5116
5130
|
inclusive: !0,
|
|
5117
5131
|
exact: !0,
|
|
5118
5132
|
message: n.exactLength.message
|
|
5119
|
-
}),
|
|
5133
|
+
}), a.dirty());
|
|
5120
5134
|
}
|
|
5121
5135
|
if (n.minLength !== null && t.data.length < n.minLength.value && (u(t, {
|
|
5122
5136
|
code: c.too_small,
|
|
@@ -5125,17 +5139,17 @@ class O extends v {
|
|
|
5125
5139
|
inclusive: !0,
|
|
5126
5140
|
exact: !1,
|
|
5127
5141
|
message: n.minLength.message
|
|
5128
|
-
}),
|
|
5142
|
+
}), a.dirty()), n.maxLength !== null && t.data.length > n.maxLength.value && (u(t, {
|
|
5129
5143
|
code: c.too_big,
|
|
5130
5144
|
maximum: n.maxLength.value,
|
|
5131
5145
|
type: "array",
|
|
5132
5146
|
inclusive: !0,
|
|
5133
5147
|
exact: !1,
|
|
5134
5148
|
message: n.maxLength.message
|
|
5135
|
-
}),
|
|
5136
|
-
return Promise.all([...t.data].map((s, o) => n.type._parseAsync(new
|
|
5137
|
-
const r = [...t.data].map((s, o) => n.type._parseSync(new
|
|
5138
|
-
return T.mergeArray(
|
|
5149
|
+
}), a.dirty()), t.common.async)
|
|
5150
|
+
return Promise.all([...t.data].map((s, o) => n.type._parseAsync(new I(t, s, t.path, o)))).then((s) => T.mergeArray(a, s));
|
|
5151
|
+
const r = [...t.data].map((s, o) => n.type._parseSync(new I(t, s, t.path, o)));
|
|
5152
|
+
return T.mergeArray(a, r);
|
|
5139
5153
|
}
|
|
5140
5154
|
get element() {
|
|
5141
5155
|
return this._def.type;
|
|
@@ -5162,29 +5176,29 @@ class O extends v {
|
|
|
5162
5176
|
return this.min(1, e);
|
|
5163
5177
|
}
|
|
5164
5178
|
}
|
|
5165
|
-
O.create = (
|
|
5166
|
-
type:
|
|
5179
|
+
O.create = (i, e) => new O({
|
|
5180
|
+
type: i,
|
|
5167
5181
|
minLength: null,
|
|
5168
5182
|
maxLength: null,
|
|
5169
5183
|
exactLength: null,
|
|
5170
5184
|
typeName: f.ZodArray,
|
|
5171
5185
|
...g(e)
|
|
5172
5186
|
});
|
|
5173
|
-
function G(
|
|
5174
|
-
if (
|
|
5187
|
+
function G(i) {
|
|
5188
|
+
if (i instanceof w) {
|
|
5175
5189
|
const e = {};
|
|
5176
|
-
for (const t in
|
|
5177
|
-
const
|
|
5178
|
-
e[t] =
|
|
5190
|
+
for (const t in i.shape) {
|
|
5191
|
+
const a = i.shape[t];
|
|
5192
|
+
e[t] = P.create(G(a));
|
|
5179
5193
|
}
|
|
5180
5194
|
return new w({
|
|
5181
|
-
...
|
|
5195
|
+
...i._def,
|
|
5182
5196
|
shape: () => e
|
|
5183
5197
|
});
|
|
5184
|
-
} else return
|
|
5185
|
-
...
|
|
5186
|
-
type: G(
|
|
5187
|
-
}) :
|
|
5198
|
+
} else return i instanceof O ? new O({
|
|
5199
|
+
...i._def,
|
|
5200
|
+
type: G(i.element)
|
|
5201
|
+
}) : i instanceof P ? P.create(G(i.unwrap())) : i instanceof q ? q.create(G(i.unwrap())) : i instanceof N ? N.create(i.items.map((e) => G(e))) : i;
|
|
5188
5202
|
}
|
|
5189
5203
|
class w extends v {
|
|
5190
5204
|
constructor() {
|
|
@@ -5205,7 +5219,7 @@ class w extends v {
|
|
|
5205
5219
|
received: d.parsedType
|
|
5206
5220
|
}), h;
|
|
5207
5221
|
}
|
|
5208
|
-
const { status:
|
|
5222
|
+
const { status: a, ctx: n } = this._processInputParams(e), { shape: r, keys: s } = this._getCached(), o = [];
|
|
5209
5223
|
if (!(this._def.catchall instanceof L && this._def.unknownKeys === "strip"))
|
|
5210
5224
|
for (const d in n.data)
|
|
5211
5225
|
s.includes(d) || o.push(d);
|
|
@@ -5214,7 +5228,7 @@ class w extends v {
|
|
|
5214
5228
|
const y = r[d], S = n.data[d];
|
|
5215
5229
|
m.push({
|
|
5216
5230
|
key: { status: "valid", value: d },
|
|
5217
|
-
value: y._parse(new
|
|
5231
|
+
value: y._parse(new I(n, S, n.path, d)),
|
|
5218
5232
|
alwaysSet: d in n.data
|
|
5219
5233
|
});
|
|
5220
5234
|
}
|
|
@@ -5230,7 +5244,7 @@ class w extends v {
|
|
|
5230
5244
|
o.length > 0 && (u(n, {
|
|
5231
5245
|
code: c.unrecognized_keys,
|
|
5232
5246
|
keys: o
|
|
5233
|
-
}),
|
|
5247
|
+
}), a.dirty());
|
|
5234
5248
|
else if (d !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
5235
5249
|
} else {
|
|
5236
5250
|
const d = this._def.catchall;
|
|
@@ -5239,7 +5253,7 @@ class w extends v {
|
|
|
5239
5253
|
m.push({
|
|
5240
5254
|
key: { status: "valid", value: y },
|
|
5241
5255
|
value: d._parse(
|
|
5242
|
-
new
|
|
5256
|
+
new I(n, S, n.path, y)
|
|
5243
5257
|
//, ctx.child(key), value, getParsedType(value)
|
|
5244
5258
|
),
|
|
5245
5259
|
alwaysSet: y in n.data
|
|
@@ -5257,7 +5271,7 @@ class w extends v {
|
|
|
5257
5271
|
});
|
|
5258
5272
|
}
|
|
5259
5273
|
return d;
|
|
5260
|
-
}).then((d) => T.mergeObjectSync(
|
|
5274
|
+
}).then((d) => T.mergeObjectSync(a, d)) : T.mergeObjectSync(a, m);
|
|
5261
5275
|
}
|
|
5262
5276
|
get shape() {
|
|
5263
5277
|
return this._def.shape();
|
|
@@ -5267,9 +5281,9 @@ class w extends v {
|
|
|
5267
5281
|
...this._def,
|
|
5268
5282
|
unknownKeys: "strict",
|
|
5269
5283
|
...e !== void 0 ? {
|
|
5270
|
-
errorMap: (t,
|
|
5284
|
+
errorMap: (t, a) => {
|
|
5271
5285
|
var n, r, s, o;
|
|
5272
|
-
const m = (s = (r = (n = this._def).errorMap) === null || r === void 0 ? void 0 : r.call(n, t,
|
|
5286
|
+
const m = (s = (r = (n = this._def).errorMap) === null || r === void 0 ? void 0 : r.call(n, t, a).message) !== null && s !== void 0 ? s : a.defaultError;
|
|
5273
5287
|
return t.code === "unrecognized_keys" ? {
|
|
5274
5288
|
message: (o = p.errToObj(e).message) !== null && o !== void 0 ? o : m
|
|
5275
5289
|
} : {
|
|
@@ -5400,8 +5414,8 @@ class w extends v {
|
|
|
5400
5414
|
}
|
|
5401
5415
|
pick(e) {
|
|
5402
5416
|
const t = {};
|
|
5403
|
-
return b.objectKeys(e).forEach((
|
|
5404
|
-
e[
|
|
5417
|
+
return b.objectKeys(e).forEach((a) => {
|
|
5418
|
+
e[a] && this.shape[a] && (t[a] = this.shape[a]);
|
|
5405
5419
|
}), new w({
|
|
5406
5420
|
...this._def,
|
|
5407
5421
|
shape: () => t
|
|
@@ -5409,8 +5423,8 @@ class w extends v {
|
|
|
5409
5423
|
}
|
|
5410
5424
|
omit(e) {
|
|
5411
5425
|
const t = {};
|
|
5412
|
-
return b.objectKeys(this.shape).forEach((
|
|
5413
|
-
e[
|
|
5426
|
+
return b.objectKeys(this.shape).forEach((a) => {
|
|
5427
|
+
e[a] || (t[a] = this.shape[a]);
|
|
5414
5428
|
}), new w({
|
|
5415
5429
|
...this._def,
|
|
5416
5430
|
shape: () => t
|
|
@@ -5424,9 +5438,9 @@ class w extends v {
|
|
|
5424
5438
|
}
|
|
5425
5439
|
partial(e) {
|
|
5426
5440
|
const t = {};
|
|
5427
|
-
return b.objectKeys(this.shape).forEach((
|
|
5428
|
-
const n = this.shape[
|
|
5429
|
-
e && !e[
|
|
5441
|
+
return b.objectKeys(this.shape).forEach((a) => {
|
|
5442
|
+
const n = this.shape[a];
|
|
5443
|
+
e && !e[a] ? t[a] = n : t[a] = n.optional();
|
|
5430
5444
|
}), new w({
|
|
5431
5445
|
...this._def,
|
|
5432
5446
|
shape: () => t
|
|
@@ -5434,14 +5448,14 @@ class w extends v {
|
|
|
5434
5448
|
}
|
|
5435
5449
|
required(e) {
|
|
5436
5450
|
const t = {};
|
|
5437
|
-
return b.objectKeys(this.shape).forEach((
|
|
5438
|
-
if (e && !e[
|
|
5439
|
-
t[
|
|
5451
|
+
return b.objectKeys(this.shape).forEach((a) => {
|
|
5452
|
+
if (e && !e[a])
|
|
5453
|
+
t[a] = this.shape[a];
|
|
5440
5454
|
else {
|
|
5441
|
-
let r = this.shape[
|
|
5442
|
-
for (; r instanceof
|
|
5455
|
+
let r = this.shape[a];
|
|
5456
|
+
for (; r instanceof P; )
|
|
5443
5457
|
r = r._def.innerType;
|
|
5444
|
-
t[
|
|
5458
|
+
t[a] = r;
|
|
5445
5459
|
}
|
|
5446
5460
|
}), new w({
|
|
5447
5461
|
...this._def,
|
|
@@ -5452,22 +5466,22 @@ class w extends v {
|
|
|
5452
5466
|
return Ae(b.objectKeys(this.shape));
|
|
5453
5467
|
}
|
|
5454
5468
|
}
|
|
5455
|
-
w.create = (
|
|
5456
|
-
shape: () =>
|
|
5469
|
+
w.create = (i, e) => new w({
|
|
5470
|
+
shape: () => i,
|
|
5457
5471
|
unknownKeys: "strip",
|
|
5458
5472
|
catchall: L.create(),
|
|
5459
5473
|
typeName: f.ZodObject,
|
|
5460
5474
|
...g(e)
|
|
5461
5475
|
});
|
|
5462
|
-
w.strictCreate = (
|
|
5463
|
-
shape: () =>
|
|
5476
|
+
w.strictCreate = (i, e) => new w({
|
|
5477
|
+
shape: () => i,
|
|
5464
5478
|
unknownKeys: "strict",
|
|
5465
5479
|
catchall: L.create(),
|
|
5466
5480
|
typeName: f.ZodObject,
|
|
5467
5481
|
...g(e)
|
|
5468
5482
|
});
|
|
5469
|
-
w.lazycreate = (
|
|
5470
|
-
shape:
|
|
5483
|
+
w.lazycreate = (i, e) => new w({
|
|
5484
|
+
shape: i,
|
|
5471
5485
|
unknownKeys: "strip",
|
|
5472
5486
|
catchall: L.create(),
|
|
5473
5487
|
typeName: f.ZodObject,
|
|
@@ -5475,7 +5489,7 @@ w.lazycreate = (a, e) => new w({
|
|
|
5475
5489
|
});
|
|
5476
5490
|
class Q extends v {
|
|
5477
5491
|
_parse(e) {
|
|
5478
|
-
const { ctx: t } = this._processInputParams(e),
|
|
5492
|
+
const { ctx: t } = this._processInputParams(e), a = this._def.options;
|
|
5479
5493
|
function n(r) {
|
|
5480
5494
|
for (const o of r)
|
|
5481
5495
|
if (o.result.status === "valid")
|
|
@@ -5490,7 +5504,7 @@ class Q extends v {
|
|
|
5490
5504
|
}), h;
|
|
5491
5505
|
}
|
|
5492
5506
|
if (t.common.async)
|
|
5493
|
-
return Promise.all(
|
|
5507
|
+
return Promise.all(a.map(async (r) => {
|
|
5494
5508
|
const s = {
|
|
5495
5509
|
...t,
|
|
5496
5510
|
common: {
|
|
@@ -5511,7 +5525,7 @@ class Q extends v {
|
|
|
5511
5525
|
{
|
|
5512
5526
|
let r;
|
|
5513
5527
|
const s = [];
|
|
5514
|
-
for (const m of
|
|
5528
|
+
for (const m of a) {
|
|
5515
5529
|
const d = {
|
|
5516
5530
|
...t,
|
|
5517
5531
|
common: {
|
|
@@ -5541,12 +5555,12 @@ class Q extends v {
|
|
|
5541
5555
|
return this._def.options;
|
|
5542
5556
|
}
|
|
5543
5557
|
}
|
|
5544
|
-
Q.create = (
|
|
5545
|
-
options:
|
|
5558
|
+
Q.create = (i, e) => new Q({
|
|
5559
|
+
options: i,
|
|
5546
5560
|
typeName: f.ZodUnion,
|
|
5547
5561
|
...g(e)
|
|
5548
5562
|
});
|
|
5549
|
-
const oe = (
|
|
5563
|
+
const oe = (i) => i instanceof ie ? oe(i.schema) : i instanceof M ? oe(i.innerType()) : i instanceof ae ? [i.value] : i instanceof V ? i.options : i instanceof ne ? Object.keys(i.enum) : i instanceof re ? oe(i._def.innerType) : i instanceof X ? [void 0] : i instanceof K ? [null] : null;
|
|
5550
5564
|
class ge extends v {
|
|
5551
5565
|
_parse(e) {
|
|
5552
5566
|
const { ctx: t } = this._processInputParams(e);
|
|
@@ -5556,7 +5570,7 @@ class ge extends v {
|
|
|
5556
5570
|
expected: l.object,
|
|
5557
5571
|
received: t.parsedType
|
|
5558
5572
|
}), h;
|
|
5559
|
-
const
|
|
5573
|
+
const a = this.discriminator, n = t.data[a], r = this.optionsMap.get(n);
|
|
5560
5574
|
return r ? t.common.async ? r._parseAsync({
|
|
5561
5575
|
data: t.data,
|
|
5562
5576
|
path: t.path,
|
|
@@ -5568,7 +5582,7 @@ class ge extends v {
|
|
|
5568
5582
|
}) : (u(t, {
|
|
5569
5583
|
code: c.invalid_union_discriminator,
|
|
5570
5584
|
options: Array.from(this.optionsMap.keys()),
|
|
5571
|
-
path: [
|
|
5585
|
+
path: [a]
|
|
5572
5586
|
}), h);
|
|
5573
5587
|
}
|
|
5574
5588
|
get discriminator() {
|
|
@@ -5588,7 +5602,7 @@ class ge extends v {
|
|
|
5588
5602
|
* @param types an array of object schemas
|
|
5589
5603
|
* @param params
|
|
5590
5604
|
*/
|
|
5591
|
-
static create(e, t,
|
|
5605
|
+
static create(e, t, a) {
|
|
5592
5606
|
const n = /* @__PURE__ */ new Map();
|
|
5593
5607
|
for (const r of t) {
|
|
5594
5608
|
const s = oe(r.shape[e]);
|
|
@@ -5605,119 +5619,119 @@ class ge extends v {
|
|
|
5605
5619
|
discriminator: e,
|
|
5606
5620
|
options: t,
|
|
5607
5621
|
optionsMap: n,
|
|
5608
|
-
...g(
|
|
5622
|
+
...g(a)
|
|
5609
5623
|
});
|
|
5610
5624
|
}
|
|
5611
5625
|
}
|
|
5612
|
-
function Te(
|
|
5613
|
-
const t = j(
|
|
5614
|
-
if (
|
|
5615
|
-
return { valid: !0, data:
|
|
5616
|
-
if (t === l.object &&
|
|
5617
|
-
const n = b.objectKeys(e), r = b.objectKeys(
|
|
5626
|
+
function Te(i, e) {
|
|
5627
|
+
const t = j(i), a = j(e);
|
|
5628
|
+
if (i === e)
|
|
5629
|
+
return { valid: !0, data: i };
|
|
5630
|
+
if (t === l.object && a === l.object) {
|
|
5631
|
+
const n = b.objectKeys(e), r = b.objectKeys(i).filter((o) => n.indexOf(o) !== -1), s = { ...i, ...e };
|
|
5618
5632
|
for (const o of r) {
|
|
5619
|
-
const m = Te(
|
|
5633
|
+
const m = Te(i[o], e[o]);
|
|
5620
5634
|
if (!m.valid)
|
|
5621
5635
|
return { valid: !1 };
|
|
5622
5636
|
s[o] = m.data;
|
|
5623
5637
|
}
|
|
5624
5638
|
return { valid: !0, data: s };
|
|
5625
|
-
} else if (t === l.array &&
|
|
5626
|
-
if (
|
|
5639
|
+
} else if (t === l.array && a === l.array) {
|
|
5640
|
+
if (i.length !== e.length)
|
|
5627
5641
|
return { valid: !1 };
|
|
5628
5642
|
const n = [];
|
|
5629
|
-
for (let r = 0; r <
|
|
5630
|
-
const s =
|
|
5643
|
+
for (let r = 0; r < i.length; r++) {
|
|
5644
|
+
const s = i[r], o = e[r], m = Te(s, o);
|
|
5631
5645
|
if (!m.valid)
|
|
5632
5646
|
return { valid: !1 };
|
|
5633
5647
|
n.push(m.data);
|
|
5634
5648
|
}
|
|
5635
5649
|
return { valid: !0, data: n };
|
|
5636
|
-
} else return t === l.date &&
|
|
5650
|
+
} else return t === l.date && a === l.date && +i == +e ? { valid: !0, data: i } : { valid: !1 };
|
|
5637
5651
|
}
|
|
5638
5652
|
class ee extends v {
|
|
5639
5653
|
_parse(e) {
|
|
5640
|
-
const { status: t, ctx:
|
|
5654
|
+
const { status: t, ctx: a } = this._processInputParams(e), n = (r, s) => {
|
|
5641
5655
|
if (xe(r) || xe(s))
|
|
5642
5656
|
return h;
|
|
5643
5657
|
const o = Te(r.value, s.value);
|
|
5644
|
-
return o.valid ? ((we(r) || we(s)) && t.dirty(), { status: t.value, value: o.data }) : (u(
|
|
5658
|
+
return o.valid ? ((we(r) || we(s)) && t.dirty(), { status: t.value, value: o.data }) : (u(a, {
|
|
5645
5659
|
code: c.invalid_intersection_types
|
|
5646
5660
|
}), h);
|
|
5647
5661
|
};
|
|
5648
|
-
return
|
|
5662
|
+
return a.common.async ? Promise.all([
|
|
5649
5663
|
this._def.left._parseAsync({
|
|
5650
|
-
data:
|
|
5651
|
-
path:
|
|
5652
|
-
parent:
|
|
5664
|
+
data: a.data,
|
|
5665
|
+
path: a.path,
|
|
5666
|
+
parent: a
|
|
5653
5667
|
}),
|
|
5654
5668
|
this._def.right._parseAsync({
|
|
5655
|
-
data:
|
|
5656
|
-
path:
|
|
5657
|
-
parent:
|
|
5669
|
+
data: a.data,
|
|
5670
|
+
path: a.path,
|
|
5671
|
+
parent: a
|
|
5658
5672
|
})
|
|
5659
5673
|
]).then(([r, s]) => n(r, s)) : n(this._def.left._parseSync({
|
|
5660
|
-
data:
|
|
5661
|
-
path:
|
|
5662
|
-
parent:
|
|
5674
|
+
data: a.data,
|
|
5675
|
+
path: a.path,
|
|
5676
|
+
parent: a
|
|
5663
5677
|
}), this._def.right._parseSync({
|
|
5664
|
-
data:
|
|
5665
|
-
path:
|
|
5666
|
-
parent:
|
|
5678
|
+
data: a.data,
|
|
5679
|
+
path: a.path,
|
|
5680
|
+
parent: a
|
|
5667
5681
|
}));
|
|
5668
5682
|
}
|
|
5669
5683
|
}
|
|
5670
|
-
ee.create = (
|
|
5671
|
-
left:
|
|
5684
|
+
ee.create = (i, e, t) => new ee({
|
|
5685
|
+
left: i,
|
|
5672
5686
|
right: e,
|
|
5673
5687
|
typeName: f.ZodIntersection,
|
|
5674
5688
|
...g(t)
|
|
5675
5689
|
});
|
|
5676
|
-
class
|
|
5690
|
+
class N extends v {
|
|
5677
5691
|
_parse(e) {
|
|
5678
|
-
const { status: t, ctx:
|
|
5679
|
-
if (
|
|
5680
|
-
return u(
|
|
5692
|
+
const { status: t, ctx: a } = this._processInputParams(e);
|
|
5693
|
+
if (a.parsedType !== l.array)
|
|
5694
|
+
return u(a, {
|
|
5681
5695
|
code: c.invalid_type,
|
|
5682
5696
|
expected: l.array,
|
|
5683
|
-
received:
|
|
5697
|
+
received: a.parsedType
|
|
5684
5698
|
}), h;
|
|
5685
|
-
if (
|
|
5686
|
-
return u(
|
|
5699
|
+
if (a.data.length < this._def.items.length)
|
|
5700
|
+
return u(a, {
|
|
5687
5701
|
code: c.too_small,
|
|
5688
5702
|
minimum: this._def.items.length,
|
|
5689
5703
|
inclusive: !0,
|
|
5690
5704
|
exact: !1,
|
|
5691
5705
|
type: "array"
|
|
5692
5706
|
}), h;
|
|
5693
|
-
!this._def.rest &&
|
|
5707
|
+
!this._def.rest && a.data.length > this._def.items.length && (u(a, {
|
|
5694
5708
|
code: c.too_big,
|
|
5695
5709
|
maximum: this._def.items.length,
|
|
5696
5710
|
inclusive: !0,
|
|
5697
5711
|
exact: !1,
|
|
5698
5712
|
type: "array"
|
|
5699
5713
|
}), t.dirty());
|
|
5700
|
-
const r = [...
|
|
5714
|
+
const r = [...a.data].map((s, o) => {
|
|
5701
5715
|
const m = this._def.items[o] || this._def.rest;
|
|
5702
|
-
return m ? m._parse(new
|
|
5716
|
+
return m ? m._parse(new I(a, s, a.path, o)) : null;
|
|
5703
5717
|
}).filter((s) => !!s);
|
|
5704
|
-
return
|
|
5718
|
+
return a.common.async ? Promise.all(r).then((s) => T.mergeArray(t, s)) : T.mergeArray(t, r);
|
|
5705
5719
|
}
|
|
5706
5720
|
get items() {
|
|
5707
5721
|
return this._def.items;
|
|
5708
5722
|
}
|
|
5709
5723
|
rest(e) {
|
|
5710
|
-
return new
|
|
5724
|
+
return new N({
|
|
5711
5725
|
...this._def,
|
|
5712
5726
|
rest: e
|
|
5713
5727
|
});
|
|
5714
5728
|
}
|
|
5715
5729
|
}
|
|
5716
|
-
|
|
5717
|
-
if (!Array.isArray(
|
|
5730
|
+
N.create = (i, e) => {
|
|
5731
|
+
if (!Array.isArray(i))
|
|
5718
5732
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
5719
|
-
return new
|
|
5720
|
-
items:
|
|
5733
|
+
return new N({
|
|
5734
|
+
items: i,
|
|
5721
5735
|
typeName: f.ZodTuple,
|
|
5722
5736
|
rest: null,
|
|
5723
5737
|
...g(e)
|
|
@@ -5731,30 +5745,30 @@ class te extends v {
|
|
|
5731
5745
|
return this._def.valueType;
|
|
5732
5746
|
}
|
|
5733
5747
|
_parse(e) {
|
|
5734
|
-
const { status: t, ctx:
|
|
5735
|
-
if (
|
|
5736
|
-
return u(
|
|
5748
|
+
const { status: t, ctx: a } = this._processInputParams(e);
|
|
5749
|
+
if (a.parsedType !== l.object)
|
|
5750
|
+
return u(a, {
|
|
5737
5751
|
code: c.invalid_type,
|
|
5738
5752
|
expected: l.object,
|
|
5739
|
-
received:
|
|
5753
|
+
received: a.parsedType
|
|
5740
5754
|
}), h;
|
|
5741
5755
|
const n = [], r = this._def.keyType, s = this._def.valueType;
|
|
5742
|
-
for (const o in
|
|
5756
|
+
for (const o in a.data)
|
|
5743
5757
|
n.push({
|
|
5744
|
-
key: r._parse(new
|
|
5745
|
-
value: s._parse(new
|
|
5758
|
+
key: r._parse(new I(a, o, a.path, o)),
|
|
5759
|
+
value: s._parse(new I(a, a.data[o], a.path, o))
|
|
5746
5760
|
});
|
|
5747
|
-
return
|
|
5761
|
+
return a.common.async ? T.mergeObjectAsync(t, n) : T.mergeObjectSync(t, n);
|
|
5748
5762
|
}
|
|
5749
5763
|
get element() {
|
|
5750
5764
|
return this._def.valueType;
|
|
5751
5765
|
}
|
|
5752
|
-
static create(e, t,
|
|
5766
|
+
static create(e, t, a) {
|
|
5753
5767
|
return t instanceof v ? new te({
|
|
5754
5768
|
keyType: e,
|
|
5755
5769
|
valueType: t,
|
|
5756
5770
|
typeName: f.ZodRecord,
|
|
5757
|
-
...g(
|
|
5771
|
+
...g(a)
|
|
5758
5772
|
}) : new te({
|
|
5759
5773
|
keyType: A.create(),
|
|
5760
5774
|
valueType: e,
|
|
@@ -5771,18 +5785,18 @@ class pe extends v {
|
|
|
5771
5785
|
return this._def.valueType;
|
|
5772
5786
|
}
|
|
5773
5787
|
_parse(e) {
|
|
5774
|
-
const { status: t, ctx:
|
|
5775
|
-
if (
|
|
5776
|
-
return u(
|
|
5788
|
+
const { status: t, ctx: a } = this._processInputParams(e);
|
|
5789
|
+
if (a.parsedType !== l.map)
|
|
5790
|
+
return u(a, {
|
|
5777
5791
|
code: c.invalid_type,
|
|
5778
5792
|
expected: l.map,
|
|
5779
|
-
received:
|
|
5793
|
+
received: a.parsedType
|
|
5780
5794
|
}), h;
|
|
5781
|
-
const n = this._def.keyType, r = this._def.valueType, s = [...
|
|
5782
|
-
key: n._parse(new
|
|
5783
|
-
value: r._parse(new
|
|
5795
|
+
const n = this._def.keyType, r = this._def.valueType, s = [...a.data.entries()].map(([o, m], d) => ({
|
|
5796
|
+
key: n._parse(new I(a, o, a.path, [d, "key"])),
|
|
5797
|
+
value: r._parse(new I(a, m, a.path, [d, "value"]))
|
|
5784
5798
|
}));
|
|
5785
|
-
if (
|
|
5799
|
+
if (a.common.async) {
|
|
5786
5800
|
const o = /* @__PURE__ */ new Map();
|
|
5787
5801
|
return Promise.resolve().then(async () => {
|
|
5788
5802
|
for (const m of s) {
|
|
@@ -5805,30 +5819,30 @@ class pe extends v {
|
|
|
5805
5819
|
}
|
|
5806
5820
|
}
|
|
5807
5821
|
}
|
|
5808
|
-
pe.create = (
|
|
5822
|
+
pe.create = (i, e, t) => new pe({
|
|
5809
5823
|
valueType: e,
|
|
5810
|
-
keyType:
|
|
5824
|
+
keyType: i,
|
|
5811
5825
|
typeName: f.ZodMap,
|
|
5812
5826
|
...g(t)
|
|
5813
5827
|
});
|
|
5814
5828
|
class U extends v {
|
|
5815
5829
|
_parse(e) {
|
|
5816
|
-
const { status: t, ctx:
|
|
5817
|
-
if (
|
|
5818
|
-
return u(
|
|
5830
|
+
const { status: t, ctx: a } = this._processInputParams(e);
|
|
5831
|
+
if (a.parsedType !== l.set)
|
|
5832
|
+
return u(a, {
|
|
5819
5833
|
code: c.invalid_type,
|
|
5820
5834
|
expected: l.set,
|
|
5821
|
-
received:
|
|
5835
|
+
received: a.parsedType
|
|
5822
5836
|
}), h;
|
|
5823
5837
|
const n = this._def;
|
|
5824
|
-
n.minSize !== null &&
|
|
5838
|
+
n.minSize !== null && a.data.size < n.minSize.value && (u(a, {
|
|
5825
5839
|
code: c.too_small,
|
|
5826
5840
|
minimum: n.minSize.value,
|
|
5827
5841
|
type: "set",
|
|
5828
5842
|
inclusive: !0,
|
|
5829
5843
|
exact: !1,
|
|
5830
5844
|
message: n.minSize.message
|
|
5831
|
-
}), t.dirty()), n.maxSize !== null &&
|
|
5845
|
+
}), t.dirty()), n.maxSize !== null && a.data.size > n.maxSize.value && (u(a, {
|
|
5832
5846
|
code: c.too_big,
|
|
5833
5847
|
maximum: n.maxSize.value,
|
|
5834
5848
|
type: "set",
|
|
@@ -5846,8 +5860,8 @@ class U extends v {
|
|
|
5846
5860
|
}
|
|
5847
5861
|
return { status: t.value, value: d };
|
|
5848
5862
|
}
|
|
5849
|
-
const o = [...
|
|
5850
|
-
return
|
|
5863
|
+
const o = [...a.data.values()].map((m, d) => r._parse(new I(a, m, a.path, d)));
|
|
5864
|
+
return a.common.async ? Promise.all(o).then((m) => s(m)) : s(o);
|
|
5851
5865
|
}
|
|
5852
5866
|
min(e, t) {
|
|
5853
5867
|
return new U({
|
|
@@ -5868,8 +5882,8 @@ class U extends v {
|
|
|
5868
5882
|
return this.min(1, e);
|
|
5869
5883
|
}
|
|
5870
5884
|
}
|
|
5871
|
-
U.create = (
|
|
5872
|
-
valueType:
|
|
5885
|
+
U.create = (i, e) => new U({
|
|
5886
|
+
valueType: i,
|
|
5873
5887
|
minSize: null,
|
|
5874
5888
|
maxSize: null,
|
|
5875
5889
|
typeName: f.ZodSet,
|
|
@@ -5887,7 +5901,7 @@ class z extends v {
|
|
|
5887
5901
|
expected: l.function,
|
|
5888
5902
|
received: t.parsedType
|
|
5889
5903
|
}), h;
|
|
5890
|
-
function
|
|
5904
|
+
function a(o, m) {
|
|
5891
5905
|
return de({
|
|
5892
5906
|
data: o,
|
|
5893
5907
|
path: t.path,
|
|
@@ -5924,7 +5938,7 @@ class z extends v {
|
|
|
5924
5938
|
const o = this;
|
|
5925
5939
|
return C(async function(...m) {
|
|
5926
5940
|
const d = new E([]), y = await o._def.args.parseAsync(m, r).catch((ve) => {
|
|
5927
|
-
throw d.addIssue(
|
|
5941
|
+
throw d.addIssue(a(m, ve)), d;
|
|
5928
5942
|
}), S = await Reflect.apply(s, this, y);
|
|
5929
5943
|
return await o._def.returns._def.type.parseAsync(S, r).catch((ve) => {
|
|
5930
5944
|
throw d.addIssue(n(S, ve)), d;
|
|
@@ -5935,7 +5949,7 @@ class z extends v {
|
|
|
5935
5949
|
return C(function(...m) {
|
|
5936
5950
|
const d = o._def.args.safeParse(m, r);
|
|
5937
5951
|
if (!d.success)
|
|
5938
|
-
throw new E([
|
|
5952
|
+
throw new E([a(m, d.error)]);
|
|
5939
5953
|
const y = Reflect.apply(s, this, d.data), S = o._def.returns.safeParse(y, r);
|
|
5940
5954
|
if (!S.success)
|
|
5941
5955
|
throw new E([n(y, S.error)]);
|
|
@@ -5952,7 +5966,7 @@ class z extends v {
|
|
|
5952
5966
|
args(...e) {
|
|
5953
5967
|
return new z({
|
|
5954
5968
|
...this._def,
|
|
5955
|
-
args:
|
|
5969
|
+
args: N.create(e).rest(B.create())
|
|
5956
5970
|
});
|
|
5957
5971
|
}
|
|
5958
5972
|
returns(e) {
|
|
@@ -5967,16 +5981,16 @@ class z extends v {
|
|
|
5967
5981
|
strictImplement(e) {
|
|
5968
5982
|
return this.parse(e);
|
|
5969
5983
|
}
|
|
5970
|
-
static create(e, t,
|
|
5984
|
+
static create(e, t, a) {
|
|
5971
5985
|
return new z({
|
|
5972
|
-
args: e ||
|
|
5973
|
-
returns: t ||
|
|
5986
|
+
args: e || N.create([]).rest(B.create()),
|
|
5987
|
+
returns: t || B.create(),
|
|
5974
5988
|
typeName: f.ZodFunction,
|
|
5975
|
-
...g(
|
|
5989
|
+
...g(a)
|
|
5976
5990
|
});
|
|
5977
5991
|
}
|
|
5978
5992
|
}
|
|
5979
|
-
class
|
|
5993
|
+
class ie extends v {
|
|
5980
5994
|
get schema() {
|
|
5981
5995
|
return this._def.getter();
|
|
5982
5996
|
}
|
|
@@ -5985,12 +5999,12 @@ class ae extends v {
|
|
|
5985
5999
|
return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
|
|
5986
6000
|
}
|
|
5987
6001
|
}
|
|
5988
|
-
|
|
5989
|
-
getter:
|
|
6002
|
+
ie.create = (i, e) => new ie({
|
|
6003
|
+
getter: i,
|
|
5990
6004
|
typeName: f.ZodLazy,
|
|
5991
6005
|
...g(e)
|
|
5992
6006
|
});
|
|
5993
|
-
class
|
|
6007
|
+
class ae extends v {
|
|
5994
6008
|
_parse(e) {
|
|
5995
6009
|
if (e.data !== this._def.value) {
|
|
5996
6010
|
const t = this._getOrReturnCtx(e);
|
|
@@ -6006,14 +6020,14 @@ class ie extends v {
|
|
|
6006
6020
|
return this._def.value;
|
|
6007
6021
|
}
|
|
6008
6022
|
}
|
|
6009
|
-
|
|
6010
|
-
value:
|
|
6023
|
+
ae.create = (i, e) => new ae({
|
|
6024
|
+
value: i,
|
|
6011
6025
|
typeName: f.ZodLiteral,
|
|
6012
6026
|
...g(e)
|
|
6013
6027
|
});
|
|
6014
|
-
function Ae(
|
|
6028
|
+
function Ae(i, e) {
|
|
6015
6029
|
return new V({
|
|
6016
|
-
values:
|
|
6030
|
+
values: i,
|
|
6017
6031
|
typeName: f.ZodEnum,
|
|
6018
6032
|
...g(e)
|
|
6019
6033
|
});
|
|
@@ -6021,19 +6035,19 @@ function Ae(a, e) {
|
|
|
6021
6035
|
class V extends v {
|
|
6022
6036
|
_parse(e) {
|
|
6023
6037
|
if (typeof e.data != "string") {
|
|
6024
|
-
const t = this._getOrReturnCtx(e),
|
|
6038
|
+
const t = this._getOrReturnCtx(e), a = this._def.values;
|
|
6025
6039
|
return u(t, {
|
|
6026
|
-
expected: b.joinValues(
|
|
6040
|
+
expected: b.joinValues(a),
|
|
6027
6041
|
received: t.parsedType,
|
|
6028
6042
|
code: c.invalid_type
|
|
6029
6043
|
}), h;
|
|
6030
6044
|
}
|
|
6031
6045
|
if (this._def.values.indexOf(e.data) === -1) {
|
|
6032
|
-
const t = this._getOrReturnCtx(e),
|
|
6046
|
+
const t = this._getOrReturnCtx(e), a = this._def.values;
|
|
6033
6047
|
return u(t, {
|
|
6034
6048
|
received: t.data,
|
|
6035
6049
|
code: c.invalid_enum_value,
|
|
6036
|
-
options:
|
|
6050
|
+
options: a
|
|
6037
6051
|
}), h;
|
|
6038
6052
|
}
|
|
6039
6053
|
return C(e.data);
|
|
@@ -6069,19 +6083,19 @@ class V extends v {
|
|
|
6069
6083
|
V.create = Ae;
|
|
6070
6084
|
class ne extends v {
|
|
6071
6085
|
_parse(e) {
|
|
6072
|
-
const t = b.getValidEnumValues(this._def.values),
|
|
6073
|
-
if (
|
|
6086
|
+
const t = b.getValidEnumValues(this._def.values), a = this._getOrReturnCtx(e);
|
|
6087
|
+
if (a.parsedType !== l.string && a.parsedType !== l.number) {
|
|
6074
6088
|
const n = b.objectValues(t);
|
|
6075
|
-
return u(
|
|
6089
|
+
return u(a, {
|
|
6076
6090
|
expected: b.joinValues(n),
|
|
6077
|
-
received:
|
|
6091
|
+
received: a.parsedType,
|
|
6078
6092
|
code: c.invalid_type
|
|
6079
6093
|
}), h;
|
|
6080
6094
|
}
|
|
6081
6095
|
if (t.indexOf(e.data) === -1) {
|
|
6082
6096
|
const n = b.objectValues(t);
|
|
6083
|
-
return u(
|
|
6084
|
-
received:
|
|
6097
|
+
return u(a, {
|
|
6098
|
+
received: a.data,
|
|
6085
6099
|
code: c.invalid_enum_value,
|
|
6086
6100
|
options: n
|
|
6087
6101
|
}), h;
|
|
@@ -6092,8 +6106,8 @@ class ne extends v {
|
|
|
6092
6106
|
return this._def.values;
|
|
6093
6107
|
}
|
|
6094
6108
|
}
|
|
6095
|
-
ne.create = (
|
|
6096
|
-
values:
|
|
6109
|
+
ne.create = (i, e) => new ne({
|
|
6110
|
+
values: i,
|
|
6097
6111
|
typeName: f.ZodNativeEnum,
|
|
6098
6112
|
...g(e)
|
|
6099
6113
|
});
|
|
@@ -6109,19 +6123,19 @@ class Y extends v {
|
|
|
6109
6123
|
expected: l.promise,
|
|
6110
6124
|
received: t.parsedType
|
|
6111
6125
|
}), h;
|
|
6112
|
-
const
|
|
6113
|
-
return C(
|
|
6126
|
+
const a = t.parsedType === l.promise ? t.data : Promise.resolve(t.data);
|
|
6127
|
+
return C(a.then((n) => this._def.type.parseAsync(n, {
|
|
6114
6128
|
path: t.path,
|
|
6115
6129
|
errorMap: t.common.contextualErrorMap
|
|
6116
6130
|
})));
|
|
6117
6131
|
}
|
|
6118
6132
|
}
|
|
6119
|
-
Y.create = (
|
|
6120
|
-
type:
|
|
6133
|
+
Y.create = (i, e) => new Y({
|
|
6134
|
+
type: i,
|
|
6121
6135
|
typeName: f.ZodPromise,
|
|
6122
6136
|
...g(e)
|
|
6123
6137
|
});
|
|
6124
|
-
class
|
|
6138
|
+
class M extends v {
|
|
6125
6139
|
innerType() {
|
|
6126
6140
|
return this._def.schema;
|
|
6127
6141
|
}
|
|
@@ -6129,54 +6143,54 @@ class I extends v {
|
|
|
6129
6143
|
return this._def.schema._def.typeName === f.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
6130
6144
|
}
|
|
6131
6145
|
_parse(e) {
|
|
6132
|
-
const { status: t, ctx:
|
|
6146
|
+
const { status: t, ctx: a } = this._processInputParams(e), n = this._def.effect || null, r = {
|
|
6133
6147
|
addIssue: (s) => {
|
|
6134
|
-
u(
|
|
6148
|
+
u(a, s), s.fatal ? t.abort() : t.dirty();
|
|
6135
6149
|
},
|
|
6136
6150
|
get path() {
|
|
6137
|
-
return
|
|
6151
|
+
return a.path;
|
|
6138
6152
|
}
|
|
6139
6153
|
};
|
|
6140
6154
|
if (r.addIssue = r.addIssue.bind(r), n.type === "preprocess") {
|
|
6141
|
-
const s = n.transform(
|
|
6142
|
-
return
|
|
6155
|
+
const s = n.transform(a.data, r);
|
|
6156
|
+
return a.common.issues.length ? {
|
|
6143
6157
|
status: "dirty",
|
|
6144
|
-
value:
|
|
6145
|
-
} :
|
|
6158
|
+
value: a.data
|
|
6159
|
+
} : a.common.async ? Promise.resolve(s).then((o) => this._def.schema._parseAsync({
|
|
6146
6160
|
data: o,
|
|
6147
|
-
path:
|
|
6148
|
-
parent:
|
|
6161
|
+
path: a.path,
|
|
6162
|
+
parent: a
|
|
6149
6163
|
})) : this._def.schema._parseSync({
|
|
6150
6164
|
data: s,
|
|
6151
|
-
path:
|
|
6152
|
-
parent:
|
|
6165
|
+
path: a.path,
|
|
6166
|
+
parent: a
|
|
6153
6167
|
});
|
|
6154
6168
|
}
|
|
6155
6169
|
if (n.type === "refinement") {
|
|
6156
6170
|
const s = (o) => {
|
|
6157
6171
|
const m = n.refinement(o, r);
|
|
6158
|
-
if (
|
|
6172
|
+
if (a.common.async)
|
|
6159
6173
|
return Promise.resolve(m);
|
|
6160
6174
|
if (m instanceof Promise)
|
|
6161
6175
|
throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
6162
6176
|
return o;
|
|
6163
6177
|
};
|
|
6164
|
-
if (
|
|
6178
|
+
if (a.common.async === !1) {
|
|
6165
6179
|
const o = this._def.schema._parseSync({
|
|
6166
|
-
data:
|
|
6167
|
-
path:
|
|
6168
|
-
parent:
|
|
6180
|
+
data: a.data,
|
|
6181
|
+
path: a.path,
|
|
6182
|
+
parent: a
|
|
6169
6183
|
});
|
|
6170
6184
|
return o.status === "aborted" ? h : (o.status === "dirty" && t.dirty(), s(o.value), { status: t.value, value: o.value });
|
|
6171
6185
|
} else
|
|
6172
|
-
return this._def.schema._parseAsync({ data:
|
|
6186
|
+
return this._def.schema._parseAsync({ data: a.data, path: a.path, parent: a }).then((o) => o.status === "aborted" ? h : (o.status === "dirty" && t.dirty(), s(o.value).then(() => ({ status: t.value, value: o.value }))));
|
|
6173
6187
|
}
|
|
6174
6188
|
if (n.type === "transform")
|
|
6175
|
-
if (
|
|
6189
|
+
if (a.common.async === !1) {
|
|
6176
6190
|
const s = this._def.schema._parseSync({
|
|
6177
|
-
data:
|
|
6178
|
-
path:
|
|
6179
|
-
parent:
|
|
6191
|
+
data: a.data,
|
|
6192
|
+
path: a.path,
|
|
6193
|
+
parent: a
|
|
6180
6194
|
});
|
|
6181
6195
|
if (!H(s))
|
|
6182
6196
|
return s;
|
|
@@ -6185,23 +6199,23 @@ class I extends v {
|
|
|
6185
6199
|
throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
6186
6200
|
return { status: t.value, value: o };
|
|
6187
6201
|
} else
|
|
6188
|
-
return this._def.schema._parseAsync({ data:
|
|
6202
|
+
return this._def.schema._parseAsync({ data: a.data, path: a.path, parent: a }).then((s) => H(s) ? Promise.resolve(n.transform(s.value, r)).then((o) => ({ status: t.value, value: o })) : s);
|
|
6189
6203
|
b.assertNever(n);
|
|
6190
6204
|
}
|
|
6191
6205
|
}
|
|
6192
|
-
|
|
6193
|
-
schema:
|
|
6206
|
+
M.create = (i, e, t) => new M({
|
|
6207
|
+
schema: i,
|
|
6194
6208
|
typeName: f.ZodEffects,
|
|
6195
6209
|
effect: e,
|
|
6196
6210
|
...g(t)
|
|
6197
6211
|
});
|
|
6198
|
-
|
|
6212
|
+
M.createWithPreprocess = (i, e, t) => new M({
|
|
6199
6213
|
schema: e,
|
|
6200
|
-
effect: { type: "preprocess", transform:
|
|
6214
|
+
effect: { type: "preprocess", transform: i },
|
|
6201
6215
|
typeName: f.ZodEffects,
|
|
6202
6216
|
...g(t)
|
|
6203
6217
|
});
|
|
6204
|
-
class
|
|
6218
|
+
class P extends v {
|
|
6205
6219
|
_parse(e) {
|
|
6206
6220
|
return this._getType(e) === l.undefined ? C(void 0) : this._def.innerType._parse(e);
|
|
6207
6221
|
}
|
|
@@ -6209,8 +6223,8 @@ class M extends v {
|
|
|
6209
6223
|
return this._def.innerType;
|
|
6210
6224
|
}
|
|
6211
6225
|
}
|
|
6212
|
-
|
|
6213
|
-
innerType:
|
|
6226
|
+
P.create = (i, e) => new P({
|
|
6227
|
+
innerType: i,
|
|
6214
6228
|
typeName: f.ZodOptional,
|
|
6215
6229
|
...g(e)
|
|
6216
6230
|
});
|
|
@@ -6222,17 +6236,17 @@ class q extends v {
|
|
|
6222
6236
|
return this._def.innerType;
|
|
6223
6237
|
}
|
|
6224
6238
|
}
|
|
6225
|
-
q.create = (
|
|
6226
|
-
innerType:
|
|
6239
|
+
q.create = (i, e) => new q({
|
|
6240
|
+
innerType: i,
|
|
6227
6241
|
typeName: f.ZodNullable,
|
|
6228
6242
|
...g(e)
|
|
6229
6243
|
});
|
|
6230
6244
|
class re extends v {
|
|
6231
6245
|
_parse(e) {
|
|
6232
6246
|
const { ctx: t } = this._processInputParams(e);
|
|
6233
|
-
let
|
|
6234
|
-
return t.parsedType === l.undefined && (
|
|
6235
|
-
data:
|
|
6247
|
+
let a = t.data;
|
|
6248
|
+
return t.parsedType === l.undefined && (a = this._def.defaultValue()), this._def.innerType._parse({
|
|
6249
|
+
data: a,
|
|
6236
6250
|
path: t.path,
|
|
6237
6251
|
parent: t
|
|
6238
6252
|
});
|
|
@@ -6241,42 +6255,42 @@ class re extends v {
|
|
|
6241
6255
|
return this._def.innerType;
|
|
6242
6256
|
}
|
|
6243
6257
|
}
|
|
6244
|
-
re.create = (
|
|
6245
|
-
innerType:
|
|
6258
|
+
re.create = (i, e) => new re({
|
|
6259
|
+
innerType: i,
|
|
6246
6260
|
typeName: f.ZodDefault,
|
|
6247
6261
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
6248
6262
|
...g(e)
|
|
6249
6263
|
});
|
|
6250
6264
|
class fe extends v {
|
|
6251
6265
|
_parse(e) {
|
|
6252
|
-
const { ctx: t } = this._processInputParams(e),
|
|
6266
|
+
const { ctx: t } = this._processInputParams(e), a = {
|
|
6253
6267
|
...t,
|
|
6254
6268
|
common: {
|
|
6255
6269
|
...t.common,
|
|
6256
6270
|
issues: []
|
|
6257
6271
|
}
|
|
6258
6272
|
}, n = this._def.innerType._parse({
|
|
6259
|
-
data:
|
|
6260
|
-
path:
|
|
6273
|
+
data: a.data,
|
|
6274
|
+
path: a.path,
|
|
6261
6275
|
parent: {
|
|
6262
|
-
...
|
|
6276
|
+
...a
|
|
6263
6277
|
}
|
|
6264
6278
|
});
|
|
6265
6279
|
return le(n) ? n.then((r) => ({
|
|
6266
6280
|
status: "valid",
|
|
6267
6281
|
value: r.status === "valid" ? r.value : this._def.catchValue({
|
|
6268
6282
|
get error() {
|
|
6269
|
-
return new E(
|
|
6283
|
+
return new E(a.common.issues);
|
|
6270
6284
|
},
|
|
6271
|
-
input:
|
|
6285
|
+
input: a.data
|
|
6272
6286
|
})
|
|
6273
6287
|
})) : {
|
|
6274
6288
|
status: "valid",
|
|
6275
6289
|
value: n.status === "valid" ? n.value : this._def.catchValue({
|
|
6276
6290
|
get error() {
|
|
6277
|
-
return new E(
|
|
6291
|
+
return new E(a.common.issues);
|
|
6278
6292
|
},
|
|
6279
|
-
input:
|
|
6293
|
+
input: a.data
|
|
6280
6294
|
})
|
|
6281
6295
|
};
|
|
6282
6296
|
}
|
|
@@ -6284,8 +6298,8 @@ class fe extends v {
|
|
|
6284
6298
|
return this._def.innerType;
|
|
6285
6299
|
}
|
|
6286
6300
|
}
|
|
6287
|
-
fe.create = (
|
|
6288
|
-
innerType:
|
|
6301
|
+
fe.create = (i, e) => new fe({
|
|
6302
|
+
innerType: i,
|
|
6289
6303
|
typeName: f.ZodCatch,
|
|
6290
6304
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
6291
6305
|
...g(e)
|
|
@@ -6293,26 +6307,26 @@ fe.create = (a, e) => new fe({
|
|
|
6293
6307
|
class he extends v {
|
|
6294
6308
|
_parse(e) {
|
|
6295
6309
|
if (this._getType(e) !== l.nan) {
|
|
6296
|
-
const
|
|
6297
|
-
return u(
|
|
6310
|
+
const a = this._getOrReturnCtx(e);
|
|
6311
|
+
return u(a, {
|
|
6298
6312
|
code: c.invalid_type,
|
|
6299
6313
|
expected: l.nan,
|
|
6300
|
-
received:
|
|
6314
|
+
received: a.parsedType
|
|
6301
6315
|
}), h;
|
|
6302
6316
|
}
|
|
6303
6317
|
return { status: "valid", value: e.data };
|
|
6304
6318
|
}
|
|
6305
6319
|
}
|
|
6306
|
-
he.create = (
|
|
6320
|
+
he.create = (i) => new he({
|
|
6307
6321
|
typeName: f.ZodNaN,
|
|
6308
|
-
...g(
|
|
6322
|
+
...g(i)
|
|
6309
6323
|
});
|
|
6310
6324
|
const ct = Symbol("zod_brand");
|
|
6311
6325
|
class Ee extends v {
|
|
6312
6326
|
_parse(e) {
|
|
6313
|
-
const { ctx: t } = this._processInputParams(e),
|
|
6327
|
+
const { ctx: t } = this._processInputParams(e), a = t.data;
|
|
6314
6328
|
return this._def.type._parse({
|
|
6315
|
-
data:
|
|
6329
|
+
data: a,
|
|
6316
6330
|
path: t.path,
|
|
6317
6331
|
parent: t
|
|
6318
6332
|
});
|
|
@@ -6323,33 +6337,33 @@ class Ee extends v {
|
|
|
6323
6337
|
}
|
|
6324
6338
|
class se extends v {
|
|
6325
6339
|
_parse(e) {
|
|
6326
|
-
const { status: t, ctx:
|
|
6327
|
-
if (
|
|
6340
|
+
const { status: t, ctx: a } = this._processInputParams(e);
|
|
6341
|
+
if (a.common.async)
|
|
6328
6342
|
return (async () => {
|
|
6329
6343
|
const r = await this._def.in._parseAsync({
|
|
6330
|
-
data:
|
|
6331
|
-
path:
|
|
6332
|
-
parent:
|
|
6344
|
+
data: a.data,
|
|
6345
|
+
path: a.path,
|
|
6346
|
+
parent: a
|
|
6333
6347
|
});
|
|
6334
6348
|
return r.status === "aborted" ? h : r.status === "dirty" ? (t.dirty(), Se(r.value)) : this._def.out._parseAsync({
|
|
6335
6349
|
data: r.value,
|
|
6336
|
-
path:
|
|
6337
|
-
parent:
|
|
6350
|
+
path: a.path,
|
|
6351
|
+
parent: a
|
|
6338
6352
|
});
|
|
6339
6353
|
})();
|
|
6340
6354
|
{
|
|
6341
6355
|
const n = this._def.in._parseSync({
|
|
6342
|
-
data:
|
|
6343
|
-
path:
|
|
6344
|
-
parent:
|
|
6356
|
+
data: a.data,
|
|
6357
|
+
path: a.path,
|
|
6358
|
+
parent: a
|
|
6345
6359
|
});
|
|
6346
6360
|
return n.status === "aborted" ? h : n.status === "dirty" ? (t.dirty(), {
|
|
6347
6361
|
status: "dirty",
|
|
6348
6362
|
value: n.value
|
|
6349
6363
|
}) : this._def.out._parseSync({
|
|
6350
6364
|
data: n.value,
|
|
6351
|
-
path:
|
|
6352
|
-
parent:
|
|
6365
|
+
path: a.path,
|
|
6366
|
+
parent: a
|
|
6353
6367
|
});
|
|
6354
6368
|
}
|
|
6355
6369
|
}
|
|
@@ -6367,35 +6381,35 @@ class _e extends v {
|
|
|
6367
6381
|
return H(t) && (t.value = Object.freeze(t.value)), t;
|
|
6368
6382
|
}
|
|
6369
6383
|
}
|
|
6370
|
-
_e.create = (
|
|
6371
|
-
innerType:
|
|
6384
|
+
_e.create = (i, e) => new _e({
|
|
6385
|
+
innerType: i,
|
|
6372
6386
|
typeName: f.ZodReadonly,
|
|
6373
6387
|
...g(e)
|
|
6374
6388
|
});
|
|
6375
|
-
const Oe = (
|
|
6389
|
+
const Oe = (i, e = {}, t) => i ? W.create().superRefine((a, n) => {
|
|
6376
6390
|
var r, s;
|
|
6377
|
-
if (!a
|
|
6378
|
-
const o = typeof e == "function" ? e(
|
|
6391
|
+
if (!i(a)) {
|
|
6392
|
+
const o = typeof e == "function" ? e(a) : typeof e == "string" ? { message: e } : e, m = (s = (r = o.fatal) !== null && r !== void 0 ? r : t) !== null && s !== void 0 ? s : !0, d = typeof o == "string" ? { message: o } : o;
|
|
6379
6393
|
n.addIssue({ code: "custom", ...d, fatal: m });
|
|
6380
6394
|
}
|
|
6381
6395
|
}) : W.create(), dt = {
|
|
6382
6396
|
object: w.lazycreate
|
|
6383
6397
|
};
|
|
6384
6398
|
var f;
|
|
6385
|
-
(function(
|
|
6386
|
-
|
|
6399
|
+
(function(i) {
|
|
6400
|
+
i.ZodString = "ZodString", i.ZodNumber = "ZodNumber", i.ZodNaN = "ZodNaN", i.ZodBigInt = "ZodBigInt", i.ZodBoolean = "ZodBoolean", i.ZodDate = "ZodDate", i.ZodSymbol = "ZodSymbol", i.ZodUndefined = "ZodUndefined", i.ZodNull = "ZodNull", i.ZodAny = "ZodAny", i.ZodUnknown = "ZodUnknown", i.ZodNever = "ZodNever", i.ZodVoid = "ZodVoid", i.ZodArray = "ZodArray", i.ZodObject = "ZodObject", i.ZodUnion = "ZodUnion", i.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", i.ZodIntersection = "ZodIntersection", i.ZodTuple = "ZodTuple", i.ZodRecord = "ZodRecord", i.ZodMap = "ZodMap", i.ZodSet = "ZodSet", i.ZodFunction = "ZodFunction", i.ZodLazy = "ZodLazy", i.ZodLiteral = "ZodLiteral", i.ZodEnum = "ZodEnum", i.ZodEffects = "ZodEffects", i.ZodNativeEnum = "ZodNativeEnum", i.ZodOptional = "ZodOptional", i.ZodNullable = "ZodNullable", i.ZodDefault = "ZodDefault", i.ZodCatch = "ZodCatch", i.ZodPromise = "ZodPromise", i.ZodBranded = "ZodBranded", i.ZodPipeline = "ZodPipeline", i.ZodReadonly = "ZodReadonly";
|
|
6387
6401
|
})(f || (f = {}));
|
|
6388
|
-
const lt = (
|
|
6389
|
-
message: `Input not instance of ${
|
|
6390
|
-
}) => Oe((t) => t instanceof
|
|
6391
|
-
string: (
|
|
6392
|
-
number: (
|
|
6393
|
-
boolean: (
|
|
6394
|
-
...
|
|
6402
|
+
const lt = (i, e = {
|
|
6403
|
+
message: `Input not instance of ${i.name}`
|
|
6404
|
+
}) => Oe((t) => t instanceof i, e), Me = A.create, Ie = D.create, ut = he.create, mt = Z.create, Ne = J.create, pt = $.create, ft = ue.create, ht = X.create, _t = K.create, gt = W.create, vt = B.create, yt = L.create, bt = me.create, xt = O.create, wt = w.create, Tt = w.strictCreate, Ct = Q.create, Rt = ge.create, kt = ee.create, St = N.create, At = te.create, Et = pe.create, Ot = U.create, Mt = z.create, It = ie.create, Nt = ae.create, Pt = V.create, Lt = ne.create, jt = Y.create, Re = M.create, Dt = P.create, Zt = q.create, Vt = M.createWithPreprocess, Bt = se.create, $t = () => Me().optional(), Ut = () => Ie().optional(), qt = () => Ne().optional(), Gt = {
|
|
6405
|
+
string: (i) => A.create({ ...i, coerce: !0 }),
|
|
6406
|
+
number: (i) => D.create({ ...i, coerce: !0 }),
|
|
6407
|
+
boolean: (i) => J.create({
|
|
6408
|
+
...i,
|
|
6395
6409
|
coerce: !0
|
|
6396
6410
|
}),
|
|
6397
|
-
bigint: (
|
|
6398
|
-
date: (
|
|
6411
|
+
bigint: (i) => Z.create({ ...i, coerce: !0 }),
|
|
6412
|
+
date: (i) => $.create({ ...i, coerce: !0 })
|
|
6399
6413
|
}, zt = h;
|
|
6400
6414
|
var Wt = /* @__PURE__ */ Object.freeze({
|
|
6401
6415
|
__proto__: null,
|
|
@@ -6426,12 +6440,12 @@ var Wt = /* @__PURE__ */ Object.freeze({
|
|
|
6426
6440
|
ZodNumber: D,
|
|
6427
6441
|
ZodBigInt: Z,
|
|
6428
6442
|
ZodBoolean: J,
|
|
6429
|
-
ZodDate:
|
|
6443
|
+
ZodDate: $,
|
|
6430
6444
|
ZodSymbol: ue,
|
|
6431
6445
|
ZodUndefined: X,
|
|
6432
6446
|
ZodNull: K,
|
|
6433
6447
|
ZodAny: W,
|
|
6434
|
-
ZodUnknown:
|
|
6448
|
+
ZodUnknown: B,
|
|
6435
6449
|
ZodNever: L,
|
|
6436
6450
|
ZodVoid: me,
|
|
6437
6451
|
ZodArray: O,
|
|
@@ -6439,19 +6453,19 @@ var Wt = /* @__PURE__ */ Object.freeze({
|
|
|
6439
6453
|
ZodUnion: Q,
|
|
6440
6454
|
ZodDiscriminatedUnion: ge,
|
|
6441
6455
|
ZodIntersection: ee,
|
|
6442
|
-
ZodTuple:
|
|
6456
|
+
ZodTuple: N,
|
|
6443
6457
|
ZodRecord: te,
|
|
6444
6458
|
ZodMap: pe,
|
|
6445
6459
|
ZodSet: U,
|
|
6446
6460
|
ZodFunction: z,
|
|
6447
|
-
ZodLazy:
|
|
6448
|
-
ZodLiteral:
|
|
6461
|
+
ZodLazy: ie,
|
|
6462
|
+
ZodLiteral: ae,
|
|
6449
6463
|
ZodEnum: V,
|
|
6450
6464
|
ZodNativeEnum: ne,
|
|
6451
6465
|
ZodPromise: Y,
|
|
6452
|
-
ZodEffects:
|
|
6453
|
-
ZodTransformer:
|
|
6454
|
-
ZodOptional:
|
|
6466
|
+
ZodEffects: M,
|
|
6467
|
+
ZodTransformer: M,
|
|
6468
|
+
ZodOptional: P,
|
|
6455
6469
|
ZodNullable: q,
|
|
6456
6470
|
ZodDefault: re,
|
|
6457
6471
|
ZodCatch: fe,
|
|
@@ -6471,37 +6485,37 @@ var Wt = /* @__PURE__ */ Object.freeze({
|
|
|
6471
6485
|
any: gt,
|
|
6472
6486
|
array: xt,
|
|
6473
6487
|
bigint: mt,
|
|
6474
|
-
boolean:
|
|
6488
|
+
boolean: Ne,
|
|
6475
6489
|
date: pt,
|
|
6476
|
-
discriminatedUnion:
|
|
6477
|
-
effect:
|
|
6478
|
-
enum:
|
|
6479
|
-
function:
|
|
6490
|
+
discriminatedUnion: Rt,
|
|
6491
|
+
effect: Re,
|
|
6492
|
+
enum: Pt,
|
|
6493
|
+
function: Mt,
|
|
6480
6494
|
instanceof: lt,
|
|
6481
|
-
intersection:
|
|
6482
|
-
lazy:
|
|
6483
|
-
literal:
|
|
6495
|
+
intersection: kt,
|
|
6496
|
+
lazy: It,
|
|
6497
|
+
literal: Nt,
|
|
6484
6498
|
map: Et,
|
|
6485
6499
|
nan: ut,
|
|
6486
6500
|
nativeEnum: Lt,
|
|
6487
6501
|
never: yt,
|
|
6488
6502
|
null: _t,
|
|
6489
6503
|
nullable: Zt,
|
|
6490
|
-
number:
|
|
6504
|
+
number: Ie,
|
|
6491
6505
|
object: wt,
|
|
6492
6506
|
oboolean: qt,
|
|
6493
6507
|
onumber: Ut,
|
|
6494
6508
|
optional: Dt,
|
|
6495
|
-
ostring:
|
|
6496
|
-
pipeline:
|
|
6509
|
+
ostring: $t,
|
|
6510
|
+
pipeline: Bt,
|
|
6497
6511
|
preprocess: Vt,
|
|
6498
6512
|
promise: jt,
|
|
6499
6513
|
record: At,
|
|
6500
6514
|
set: Ot,
|
|
6501
6515
|
strictObject: Tt,
|
|
6502
|
-
string:
|
|
6516
|
+
string: Me,
|
|
6503
6517
|
symbol: ft,
|
|
6504
|
-
transformer:
|
|
6518
|
+
transformer: Re,
|
|
6505
6519
|
tuple: St,
|
|
6506
6520
|
undefined: ht,
|
|
6507
6521
|
union: Ct,
|
|
@@ -6544,8 +6558,9 @@ const Yt = [
|
|
|
6544
6558
|
"REFERRAL",
|
|
6545
6559
|
"REFERRAL_OVERVIEW",
|
|
6546
6560
|
"REFERRAL_RECORD",
|
|
6547
|
-
"REWARD_TEMPLATE"
|
|
6548
|
-
|
|
6561
|
+
"REWARD_TEMPLATE",
|
|
6562
|
+
"BIN"
|
|
6563
|
+
].map((i) => `$connect-${i}`), Ft = Wt.enum(Yt), _ = Ft.Enum, Kt = [
|
|
6549
6564
|
{
|
|
6550
6565
|
path: "",
|
|
6551
6566
|
name: _["$connect-DASHBOARD"],
|
|
@@ -6559,7 +6574,7 @@ const Yt = [
|
|
|
6559
6574
|
{
|
|
6560
6575
|
path: "/analytic",
|
|
6561
6576
|
name: _["$connect-ANALYTIC"],
|
|
6562
|
-
component: k(
|
|
6577
|
+
component: R(k(() => import("./Analytic-9_JkMO2c.js"))),
|
|
6563
6578
|
meta: {
|
|
6564
6579
|
validationManifest: {
|
|
6565
6580
|
requiredCaslPermissions: [
|
|
@@ -6582,7 +6597,7 @@ const Yt = [
|
|
|
6582
6597
|
{
|
|
6583
6598
|
path: "/campaign/promotion",
|
|
6584
6599
|
name: _["$connect-CAMPAIGN_PROMOTION"],
|
|
6585
|
-
component: k(
|
|
6600
|
+
component: R(k(() => import("./Promotion-qt_pE8uB.js"))),
|
|
6586
6601
|
meta: {
|
|
6587
6602
|
validationManifest: {
|
|
6588
6603
|
requiredCaslPermissions: [
|
|
@@ -6601,7 +6616,7 @@ const Yt = [
|
|
|
6601
6616
|
{
|
|
6602
6617
|
path: "/campaign/voucher",
|
|
6603
6618
|
name: _["$connect-CAMPAIGN_VOUCHER"],
|
|
6604
|
-
component: k(
|
|
6619
|
+
component: R(k(() => import("./Voucher-CZLp6Mfd.js"))),
|
|
6605
6620
|
meta: {
|
|
6606
6621
|
validationManifest: {
|
|
6607
6622
|
requiredCaslPermissions: [
|
|
@@ -6616,7 +6631,7 @@ const Yt = [
|
|
|
6616
6631
|
{
|
|
6617
6632
|
path: "/campaign/voucher/:id/collections",
|
|
6618
6633
|
name: _["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
|
|
6619
|
-
component: k(
|
|
6634
|
+
component: R(k(() => import("./Collections-DqlqGVcv.js"))),
|
|
6620
6635
|
meta: {
|
|
6621
6636
|
validationManifest: {
|
|
6622
6637
|
requiredCaslPermissions: [
|
|
@@ -6633,7 +6648,7 @@ const Yt = [
|
|
|
6633
6648
|
{
|
|
6634
6649
|
path: "/campaign/broadcast",
|
|
6635
6650
|
name: _["$connect-CAMPAIGN_BROADCAST"],
|
|
6636
|
-
component: k(
|
|
6651
|
+
component: R(k(() => import("./Broadcast-8UwFqqzp.js"))),
|
|
6637
6652
|
meta: {
|
|
6638
6653
|
validationManifest: {
|
|
6639
6654
|
requiredCaslPermissions: [
|
|
@@ -6650,7 +6665,7 @@ const Yt = [
|
|
|
6650
6665
|
{
|
|
6651
6666
|
path: "/program",
|
|
6652
6667
|
// component: () => import('@/layouts/MainLayout.vue'),
|
|
6653
|
-
component: k(
|
|
6668
|
+
component: R(k(() => import("./MainLayout-DpZC6o3R.js"))),
|
|
6654
6669
|
meta: {
|
|
6655
6670
|
validationManifest: {
|
|
6656
6671
|
requiredCaslPermissions: [
|
|
@@ -6667,43 +6682,43 @@ const Yt = [
|
|
|
6667
6682
|
{
|
|
6668
6683
|
path: "/program/tier",
|
|
6669
6684
|
name: _["$connect-PROGRAM_TIER"],
|
|
6670
|
-
component: () => import("./Tier-
|
|
6685
|
+
component: () => import("./Tier-CB64ZbLz.js")
|
|
6671
6686
|
},
|
|
6672
6687
|
{
|
|
6673
6688
|
path: "/program/title",
|
|
6674
6689
|
name: _["$connect-PROGRAM_TITLE"],
|
|
6675
|
-
component: () => import("./Title-
|
|
6690
|
+
component: () => import("./Title-62HEE-nU.js")
|
|
6676
6691
|
},
|
|
6677
6692
|
{
|
|
6678
6693
|
path: "/program/experience",
|
|
6679
6694
|
name: _["$connect-PROGRAM_EXPERIENCE"],
|
|
6680
|
-
component: () => import("./Experience-
|
|
6695
|
+
component: () => import("./Experience-BTf5f-Kb.js")
|
|
6681
6696
|
},
|
|
6682
6697
|
{
|
|
6683
6698
|
path: "/program/point",
|
|
6684
6699
|
name: _["$connect-PROGRAM_POINT"],
|
|
6685
|
-
component: () => import("./Point-
|
|
6700
|
+
component: () => import("./Point-C_amiOK4.js")
|
|
6686
6701
|
},
|
|
6687
6702
|
{
|
|
6688
6703
|
path: "/program/credit",
|
|
6689
6704
|
name: _["$connect-PROGRAM_CREDIT"],
|
|
6690
|
-
component: () => import("./Credit-
|
|
6705
|
+
component: () => import("./Credit-BuKQEMU2.js")
|
|
6691
6706
|
},
|
|
6692
6707
|
{
|
|
6693
6708
|
path: "/program/game",
|
|
6694
6709
|
name: _["$connect-PROGRAM_GAME"],
|
|
6695
|
-
component: () => import("./Game-
|
|
6710
|
+
component: () => import("./Game-Ci_39vHg.js")
|
|
6696
6711
|
},
|
|
6697
6712
|
{
|
|
6698
6713
|
path: "mission",
|
|
6699
6714
|
name: _["$connect-PROGRAM_MISSION"],
|
|
6700
|
-
component: () => import("./Mission-
|
|
6715
|
+
component: () => import("./Mission-D_CqN5Es.js")
|
|
6701
6716
|
}
|
|
6702
6717
|
]
|
|
6703
6718
|
},
|
|
6704
6719
|
{
|
|
6705
6720
|
path: "/loyalty",
|
|
6706
|
-
component: k(
|
|
6721
|
+
component: R(k(() => import("./MainLayout-DpZC6o3R.js"))),
|
|
6707
6722
|
meta: {
|
|
6708
6723
|
validationManifest: {
|
|
6709
6724
|
requiredCaslPermissions: [
|
|
@@ -6720,7 +6735,7 @@ const Yt = [
|
|
|
6720
6735
|
{
|
|
6721
6736
|
path: "/loyalty/member",
|
|
6722
6737
|
name: _["$connect-LOYALTY_MEMBER"],
|
|
6723
|
-
component: () => import("./Member-
|
|
6738
|
+
component: () => import("./Member-Bvxgoep1.js"),
|
|
6724
6739
|
redirect: {
|
|
6725
6740
|
name: _["$connect-LOYALTY_MEMBER_OVERVIEW"]
|
|
6726
6741
|
},
|
|
@@ -6733,31 +6748,31 @@ const Yt = [
|
|
|
6733
6748
|
{
|
|
6734
6749
|
path: "/loyalty/member/list",
|
|
6735
6750
|
name: _["$connect-LOYALTY_MEMBER_LIST"],
|
|
6736
|
-
component: () => import("./MemberList-
|
|
6751
|
+
component: () => import("./MemberList-BvX98Yt-.js")
|
|
6737
6752
|
},
|
|
6738
6753
|
{
|
|
6739
6754
|
path: "/loyalty/member/transactions/:id",
|
|
6740
6755
|
name: _["$connect-LOYALTY_MEMBER_TRANSACTIONS"],
|
|
6741
|
-
component: () => import("./MemberTransactions-
|
|
6756
|
+
component: () => import("./MemberTransactions-DJt3aJ-h.js")
|
|
6742
6757
|
}
|
|
6743
6758
|
]
|
|
6744
6759
|
},
|
|
6745
6760
|
{
|
|
6746
6761
|
path: "/loyalty/segment",
|
|
6747
6762
|
name: _["$connect-LOYALTY_SEGMENT"],
|
|
6748
|
-
component: () => import("./Segment-
|
|
6763
|
+
component: () => import("./Segment-QKuGmThT.js")
|
|
6749
6764
|
},
|
|
6750
6765
|
{
|
|
6751
6766
|
path: "/loyalty/card",
|
|
6752
6767
|
name: _["$connect-LOYALTY_CARD"],
|
|
6753
|
-
component: () => import("./Card-
|
|
6768
|
+
component: () => import("./Card-BFEc9Zgu.js")
|
|
6754
6769
|
}
|
|
6755
6770
|
]
|
|
6756
6771
|
},
|
|
6757
6772
|
{
|
|
6758
6773
|
path: "/referral",
|
|
6759
6774
|
redirect: { name: _["$connect-REFERRAL"] },
|
|
6760
|
-
component: k(
|
|
6775
|
+
component: R(k(() => import("./MainLayout-DpZC6o3R.js"))),
|
|
6761
6776
|
meta: {
|
|
6762
6777
|
validationManifest: {
|
|
6763
6778
|
requiredCaslPermissions: [
|
|
@@ -6772,7 +6787,7 @@ const Yt = [
|
|
|
6772
6787
|
{
|
|
6773
6788
|
path: "/referral",
|
|
6774
6789
|
name: _["$connect-REFERRAL"],
|
|
6775
|
-
component: () => import("./Index-
|
|
6790
|
+
component: () => import("./Index-8JLenrzT.js"),
|
|
6776
6791
|
redirect: {
|
|
6777
6792
|
name: _["$connect-REFERRAL_OVERVIEW"]
|
|
6778
6793
|
},
|
|
@@ -6780,12 +6795,12 @@ const Yt = [
|
|
|
6780
6795
|
{
|
|
6781
6796
|
path: "/referral",
|
|
6782
6797
|
name: _["$connect-REFERRAL_OVERVIEW"],
|
|
6783
|
-
component: () => import("./Overview-
|
|
6798
|
+
component: () => import("./Overview-FRebjePW.js")
|
|
6784
6799
|
},
|
|
6785
6800
|
{
|
|
6786
6801
|
path: "/referral/record",
|
|
6787
6802
|
name: _["$connect-REFERRAL_RECORD"],
|
|
6788
|
-
component: () => import("./Record-
|
|
6803
|
+
component: () => import("./Record-2eAijNwr.js")
|
|
6789
6804
|
}
|
|
6790
6805
|
]
|
|
6791
6806
|
}
|
|
@@ -6793,7 +6808,7 @@ const Yt = [
|
|
|
6793
6808
|
},
|
|
6794
6809
|
{
|
|
6795
6810
|
path: "/store",
|
|
6796
|
-
component: k(
|
|
6811
|
+
component: R(k(() => import("./MainLayout-DpZC6o3R.js"))),
|
|
6797
6812
|
meta: {
|
|
6798
6813
|
validationManifest: {
|
|
6799
6814
|
requiredCaslPermissions: [
|
|
@@ -6808,7 +6823,7 @@ const Yt = [
|
|
|
6808
6823
|
{
|
|
6809
6824
|
path: "/store",
|
|
6810
6825
|
name: _["$connect-STORE"],
|
|
6811
|
-
component: () => import("./Store-
|
|
6826
|
+
component: () => import("./Store-CTxmlEVr.js")
|
|
6812
6827
|
},
|
|
6813
6828
|
{
|
|
6814
6829
|
path: "/store/rewards",
|
|
@@ -6817,12 +6832,12 @@ const Yt = [
|
|
|
6817
6832
|
{
|
|
6818
6833
|
path: "/store/rewards",
|
|
6819
6834
|
name: _["$connect-STORE_REWARDS"],
|
|
6820
|
-
component: () => import("./StoreRewards-
|
|
6835
|
+
component: () => import("./StoreRewards-Bm9NXXH2.js")
|
|
6821
6836
|
},
|
|
6822
6837
|
{
|
|
6823
6838
|
path: "/store/rewards/:id/collections",
|
|
6824
6839
|
name: _["$connect-STORE_REWARD_COLLECTIONS"],
|
|
6825
|
-
component: () => import("./Collections-
|
|
6840
|
+
component: () => import("./Collections-DqlqGVcv.js")
|
|
6826
6841
|
}
|
|
6827
6842
|
]
|
|
6828
6843
|
}
|
|
@@ -6830,7 +6845,7 @@ const Yt = [
|
|
|
6830
6845
|
},
|
|
6831
6846
|
{
|
|
6832
6847
|
path: "/transaction",
|
|
6833
|
-
component: k(
|
|
6848
|
+
component: R(k(() => import("./MainLayout-DpZC6o3R.js"))),
|
|
6834
6849
|
meta: {
|
|
6835
6850
|
validationManifest: {
|
|
6836
6851
|
requiredCaslPermissions: [
|
|
@@ -6845,13 +6860,13 @@ const Yt = [
|
|
|
6845
6860
|
{
|
|
6846
6861
|
path: "/transaction",
|
|
6847
6862
|
name: _["$connect-TRANSACTION"],
|
|
6848
|
-
component: () => import("./Transaction-
|
|
6863
|
+
component: () => import("./Transaction-CK9Igmnp.js")
|
|
6849
6864
|
}
|
|
6850
6865
|
]
|
|
6851
6866
|
},
|
|
6852
6867
|
{
|
|
6853
6868
|
path: "/marketing",
|
|
6854
|
-
component: k(
|
|
6869
|
+
component: R(k(() => import("./MainLayout-DpZC6o3R.js"))),
|
|
6855
6870
|
meta: {
|
|
6856
6871
|
validationManifest: {
|
|
6857
6872
|
requiredCaslPermissions: [
|
|
@@ -6866,13 +6881,13 @@ const Yt = [
|
|
|
6866
6881
|
{
|
|
6867
6882
|
path: "/marketing",
|
|
6868
6883
|
name: _["$connect-MARKETING"],
|
|
6869
|
-
component: () => import("./Marketing-
|
|
6884
|
+
component: () => import("./Marketing-XAmIlYCx.js")
|
|
6870
6885
|
}
|
|
6871
6886
|
]
|
|
6872
6887
|
},
|
|
6873
6888
|
{
|
|
6874
6889
|
path: "/reward",
|
|
6875
|
-
component: k(
|
|
6890
|
+
component: R(k(() => import("./MainLayout-DpZC6o3R.js"))),
|
|
6876
6891
|
meta: {
|
|
6877
6892
|
validationManifest: {
|
|
6878
6893
|
requiredCaslPermissions: [
|
|
@@ -6887,13 +6902,13 @@ const Yt = [
|
|
|
6887
6902
|
{
|
|
6888
6903
|
path: "/reward",
|
|
6889
6904
|
name: _["$connect-REWARD_TEMPLATE"],
|
|
6890
|
-
component: () => import("./Reward-
|
|
6905
|
+
component: () => import("./Reward-DLNijsC9.js")
|
|
6891
6906
|
}
|
|
6892
6907
|
]
|
|
6893
6908
|
},
|
|
6894
6909
|
{
|
|
6895
6910
|
path: "/setting",
|
|
6896
|
-
component: k(
|
|
6911
|
+
component: R(k(() => import("./MainLayout-DpZC6o3R.js"))),
|
|
6897
6912
|
meta: {
|
|
6898
6913
|
validationManifest: {
|
|
6899
6914
|
requiredCaslPermissions: [
|
|
@@ -6908,18 +6923,39 @@ const Yt = [
|
|
|
6908
6923
|
{
|
|
6909
6924
|
path: "/setting",
|
|
6910
6925
|
name: _["$connect-SETTING"],
|
|
6911
|
-
component: () => import("./Setting-
|
|
6926
|
+
component: () => import("./Setting-GTro0uCw.js")
|
|
6927
|
+
}
|
|
6928
|
+
]
|
|
6929
|
+
},
|
|
6930
|
+
{
|
|
6931
|
+
path: "/bin",
|
|
6932
|
+
component: R(k(() => import("./MainLayout-DpZC6o3R.js"))),
|
|
6933
|
+
meta: {
|
|
6934
|
+
validationManifest: {
|
|
6935
|
+
requiredCaslPermissions: [
|
|
6936
|
+
{
|
|
6937
|
+
action: x.Action.manage,
|
|
6938
|
+
subject: x.Subject.Business.membership
|
|
6939
|
+
}
|
|
6940
|
+
]
|
|
6941
|
+
}
|
|
6942
|
+
},
|
|
6943
|
+
children: [
|
|
6944
|
+
{
|
|
6945
|
+
path: "/bin",
|
|
6946
|
+
name: _["$connect-BIN"],
|
|
6947
|
+
component: () => import("./Bin-BoolyqZn.js")
|
|
6912
6948
|
}
|
|
6913
6949
|
]
|
|
6914
6950
|
}
|
|
6915
6951
|
], Qt = {
|
|
6916
6952
|
"en-US": De,
|
|
6917
|
-
"zh-CN":
|
|
6953
|
+
"zh-CN": $e,
|
|
6918
6954
|
"th-TH": qe,
|
|
6919
6955
|
"zh-Hant": Ye
|
|
6920
|
-
},
|
|
6956
|
+
}, ei = () => import("./App-DfbUtaeM.js").then((i) => i.default);
|
|
6921
6957
|
export {
|
|
6922
|
-
|
|
6958
|
+
ei as F,
|
|
6923
6959
|
_ as R,
|
|
6924
6960
|
c as Z,
|
|
6925
6961
|
l as a,
|