@feedmepos/mf-media 1.0.2-dev.3 → 2.0.2-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiStudio-2cced8ce.js → AiStudio-6f993b76.js} +74 -74
- package/dist/AssetLibrary-4168fa7a.js +350 -0
- package/dist/app.js +181 -160
- package/dist/{media-picker-1cd70533.js → media-picker-fdef87dc.js} +1467 -1449
- package/dist/src/api/businesses.d.ts +9 -0
- package/dist/src/app.d.ts +21 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/AssetLibrary-b9219b4e.js +0 -306
package/dist/app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isRef as We, ref as K, shallowRef as ze, watchEffect as ke, computed as Ne, h as J, defineComponent as k, unref as h, openBlock as N, createBlock as
|
|
1
|
+
import { isRef as We, ref as K, shallowRef as ze, watchEffect as ke, computed as Ne, h as J, defineComponent as k, unref as h, openBlock as N, createBlock as ne, renderSlot as Te, createCommentVNode as Re, createElementBlock as Ue, createElementVNode as H, toDisplayString as L, defineAsyncComponent as S } from "vue";
|
|
2
2
|
import { useRoute as Ke, RouterView as Je } from "vue-router";
|
|
3
3
|
import { useCoreStore as Le, useI18n as Se } from "@feedmepos/mf-common";
|
|
4
4
|
const _e = {
|
|
@@ -91,8 +91,11 @@ const _e = {
|
|
|
91
91
|
},
|
|
92
92
|
library: {
|
|
93
93
|
uploadButton: "Upload Media",
|
|
94
|
+
viewAllBusinessesButton: "View All",
|
|
95
|
+
backToMyBusinessButton: "Back to My Business",
|
|
94
96
|
testPickerButton: "Test Picker Dialog",
|
|
95
97
|
searchPlaceholder: "Search file name…",
|
|
98
|
+
allBusinessesOption: "All businesses",
|
|
96
99
|
allRestaurantsOption: "All restaurants",
|
|
97
100
|
allRefTypesOption: "All types",
|
|
98
101
|
selectAllButton: "Select All",
|
|
@@ -201,8 +204,11 @@ const _e = {
|
|
|
201
204
|
},
|
|
202
205
|
library: {
|
|
203
206
|
uploadButton: "Importer des médias",
|
|
207
|
+
viewAllBusinessesButton: "Tout afficher",
|
|
208
|
+
backToMyBusinessButton: "Retour à mon entreprise",
|
|
204
209
|
testPickerButton: "Tester la fenêtre de sélection",
|
|
205
210
|
searchPlaceholder: "Rechercher un nom de fichier…",
|
|
211
|
+
allBusinessesOption: "Toutes les entreprises",
|
|
206
212
|
allRestaurantsOption: "Tous les restaurants",
|
|
207
213
|
allRefTypesOption: "Tous les types",
|
|
208
214
|
selectAllButton: "Tout sélectionner",
|
|
@@ -311,8 +317,11 @@ const _e = {
|
|
|
311
317
|
},
|
|
312
318
|
library: {
|
|
313
319
|
uploadButton: "Unggah Media",
|
|
320
|
+
viewAllBusinessesButton: "Lihat Semua",
|
|
321
|
+
backToMyBusinessButton: "Kembali ke Bisnis Saya",
|
|
314
322
|
testPickerButton: "Uji Dialog Pemilih",
|
|
315
323
|
searchPlaceholder: "Cari nama file…",
|
|
324
|
+
allBusinessesOption: "Semua bisnis",
|
|
316
325
|
allRestaurantsOption: "Semua restoran",
|
|
317
326
|
allRefTypesOption: "Semua jenis",
|
|
318
327
|
selectAllButton: "Pilih Semua",
|
|
@@ -421,8 +430,11 @@ const _e = {
|
|
|
421
430
|
},
|
|
422
431
|
library: {
|
|
423
432
|
uploadButton: "メディアをアップロード",
|
|
433
|
+
viewAllBusinessesButton: "すべて表示",
|
|
434
|
+
backToMyBusinessButton: "自分のビジネスに戻る",
|
|
424
435
|
testPickerButton: "画像選択ダイアログのテスト",
|
|
425
436
|
searchPlaceholder: "ファイル名で検索…",
|
|
437
|
+
allBusinessesOption: "すべてのビジネス",
|
|
426
438
|
allRestaurantsOption: "すべての店舗",
|
|
427
439
|
allRefTypesOption: "すべての種類",
|
|
428
440
|
selectAllButton: "すべて選択",
|
|
@@ -439,9 +451,9 @@ const _e = {
|
|
|
439
451
|
deleteBulkMessage: "選択した {count} 件の素材を削除しますか?{disclaimer}",
|
|
440
452
|
deleteConfirmButton: "削除"
|
|
441
453
|
}
|
|
442
|
-
}, rt = {
|
|
443
|
-
media: At
|
|
444
454
|
}, nt = {
|
|
455
|
+
media: At
|
|
456
|
+
}, rt = {
|
|
445
457
|
title: "คลังสื่อ",
|
|
446
458
|
tabs: {
|
|
447
459
|
library: "คลังสื่อ",
|
|
@@ -531,8 +543,11 @@ const _e = {
|
|
|
531
543
|
},
|
|
532
544
|
library: {
|
|
533
545
|
uploadButton: "อัปโหลดสื่อ",
|
|
546
|
+
viewAllBusinessesButton: "ดูทั้งหมด",
|
|
547
|
+
backToMyBusinessButton: "กลับไปที่ธุรกิจของฉัน",
|
|
534
548
|
testPickerButton: "ทดสอบหน้าต่างเลือกรูป",
|
|
535
549
|
searchPlaceholder: "ค้นหาชื่อไฟล์…",
|
|
550
|
+
allBusinessesOption: "ทุกธุรกิจ",
|
|
536
551
|
allRestaurantsOption: "ทุกร้าน",
|
|
537
552
|
allRefTypesOption: "ทุกประเภท",
|
|
538
553
|
selectAllButton: "เลือกทั้งหมด",
|
|
@@ -550,7 +565,7 @@ const _e = {
|
|
|
550
565
|
deleteConfirmButton: "ลบ"
|
|
551
566
|
}
|
|
552
567
|
}, ot = {
|
|
553
|
-
media:
|
|
568
|
+
media: rt
|
|
554
569
|
}, it = {
|
|
555
570
|
title: "素材库",
|
|
556
571
|
tabs: {
|
|
@@ -641,8 +656,11 @@ const _e = {
|
|
|
641
656
|
},
|
|
642
657
|
library: {
|
|
643
658
|
uploadButton: "上传素材",
|
|
659
|
+
viewAllBusinessesButton: "查看全部",
|
|
660
|
+
backToMyBusinessButton: "返回本商户",
|
|
644
661
|
testPickerButton: "测试选图弹窗",
|
|
645
662
|
searchPlaceholder: "搜索文件名…",
|
|
663
|
+
allBusinessesOption: "全部商户",
|
|
646
664
|
allRestaurantsOption: "全部门店",
|
|
647
665
|
allRefTypesOption: "全部类型",
|
|
648
666
|
selectAllButton: "全选",
|
|
@@ -751,8 +769,11 @@ const _e = {
|
|
|
751
769
|
},
|
|
752
770
|
library: {
|
|
753
771
|
uploadButton: "上傳素材",
|
|
772
|
+
viewAllBusinessesButton: "查看全部",
|
|
773
|
+
backToMyBusinessButton: "返回本商戶",
|
|
754
774
|
testPickerButton: "測試選圖彈窗",
|
|
755
775
|
searchPlaceholder: "搜尋檔案名稱…",
|
|
776
|
+
allBusinessesOption: "全部商戶",
|
|
756
777
|
allRestaurantsOption: "全部門店",
|
|
757
778
|
allRefTypesOption: "全部類型",
|
|
758
779
|
selectAllButton: "全選",
|
|
@@ -772,8 +793,8 @@ const _e = {
|
|
|
772
793
|
}, gt = {
|
|
773
794
|
media: lt
|
|
774
795
|
};
|
|
775
|
-
var
|
|
776
|
-
const
|
|
796
|
+
var re = /* @__PURE__ */ ((e) => (e[e.feedMe = 0] = "feedMe", e[e.business = 1] = "business", e[e.restaurant = 2] = "restaurant", e))(re || {}), t = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(t || {}), oe = /* @__PURE__ */ ((e) => (e.all = "all", e.restaurant = "restaurant", e.business = "business", e.delivery = "delivery", e.agent = "agent", e))(oe || {}), ie = /* @__PURE__ */ ((e) => (e.quota = "quota", e.owner = "owner", e))(ie || {}), s = /* @__PURE__ */ ((e) => (e.miniProgram_profile = "business::miniProgram::profile", e.miniProgram_brandkit = "business::miniProgram::brandkit", e.miniProgram_template = "business::miniProgram::template", e.miniProgram_publish = "business::miniProgram::publish", e.miniProgram_assets = "business::miniProgram::assets", e.miniProgram_nativeCredentials = "business::miniProgram::nativeCredentials", e.crm = "business::crm", e.crm_promotion = "business::crm::promotion", e.crm_voucher = "business::crm::voucher", e.crm_membership = "business::crm::membership", e.crm_analytic = "business::crm::analytic", e.crm_tier = "business::crm::tier", e.crm_title = "business::crm::title", e.crm_broadcast = "business::crm::broadcast", e.crm_point = "business::crm::point", e.crm_credit = "business::crm::credit", e.crm_experience = "business::crm::experience", e.crm_game = "business::crm::game", e.crm_mission = "business::crm::mission", e.crm_loyaltyMember = "business::crm::loyaltyMember", e.crm_loyaltySegment = "business::crm::loyaltySegment", e.crm_loyaltyCard = "business::crm::loyaltyCard", e.crm_referral = "business::crm::referral", e.crm_store = "business::crm::store", e.crm_transaction = "business::crm::transaction", e.crm_setting = "business::crm::setting", e.crm_bin = "business::crm::bin", e.crm_marketingMaterial = "business::crm::marketingMaterial", e.payment = "business::payment", e.payment_payoutAccount = "business::payment::payoutAccount", e.payment_paymentOnboarding = "business::payment::paymentOnboarding", e.payment_transactions = "business::payment::transactions", e.payment_settlements = "business::payment::settlements", e.inventory_stock = "business::inventory::stock", e.inventory_stockBalance = "business::inventory::stockBalance", e.inventory_stockAdjustment = "business::inventory::stockAdjustment", e.inventory_unitCostHistory = "business::inventory::unitCostHistory", e.inventory_wastageTemplate = "business::inventory::wastageTemplate", e.inventory_closingHistory = "business::inventory::closingHistory", e.inventory_closingTemplate = "business::inventory::closingTemplate", e.inventory_closingDraft = "business::inventory::closingDraft", e.inventory_ingredient = "business::inventory::ingredient", e.inventory_ingredientGroup = "business::inventory::ingredientGroup", e.inventory_recipe = "business::inventory::recipe", e.inventory_unit = "business::inventory::unit", e.inventory_purchaseTransfer = "business::inventory::purchaseTransfer", e.inventory_orderDraftApproval = "business::inventory::orderDraftApproval", e.inventory_transferOut = "business::inventory::transferOut", e.inventory_surcharge = "business::inventory::surcharge", e.inventory_orderTemplate = "business::inventory::orderTemplate", e.inventory_supplier = "business::inventory::supplier", e.inventory_warehouse = "business::inventory::warehouse", e.inventory_publish = "business::inventory::publish", e.inventory_import = "business::inventory::import", e.inventory_integration = "business::inventory::integration", e.hrm = "business::hrm", e.hrm_employee = "business::hrm::employee", e.hrm_teamMember = "business::hrm::teamMember", e.hrm_auditLog = "business::hrm::auditLog", e.menu = "business::menu", e.menu_item = "business::menu::item", e.menu_catalog = "business::menu::catalog", e.menu_category = "business::menu::category", e.menu_subCategory = "business::menu::subCategory", e.menu_group = "business::menu::group", e.menu_takeaway = "business::menu::takeaway", e.menu_scheduler = "business::menu::scheduler", e.menu_variant = "business::menu::variant", e.menu_cookingGuide = "business::menu::cookingGuide", e.menu_printRoute = "business::menu::printRoute", e.menu_servingSequence = "business::menu::servingSequence", e.menu_settings = "business::menu::settings", e.menu_publish = "business::menu::publish", e.menu_menuManagement = "business::menu::menuManagement", e.menu_importExport = "business::menu::importExport", e.menu_unit = "business::menu::unit", e.menu_ingredient = "business::menu::ingredient", e.menu_recipe = "business::menu::recipe", e.restaurant = "business::restaurant", e.role = "business::role", e.mdm_deviceManagement = "business::mdm::deviceManagement", e.mdm_createDevice = "business::mdm::createDevice", e.mdm_deviceBinding = "business::mdm::deviceBinding", e.mdm_customerDisplay = "business::mdm::customerDisplay", e.kiosk_deviceManagement = "business::kiosk::deviceManagement", e.kiosk_deviceBinding = "business::kiosk::deviceBinding", e.eInvoice_management = "business::eInvoice::management", e.eInvoice_integration = "business::eInvoice::integration", e.profile = "business::profile", e.report_createReport = "business::report::createReport", e.report_accessInsight = "business::report::accessInsight", e.report_accessSetting = "business::report::accessSetting", e.report_accessIntegration = "business::report::accessIntegration", e.report_accessOverview = "business::report::accessOverview", e.report_reports_allDefaultReports = "business::report::allDefaultReports", e.report_reports_allCustomReports = "business::report::allCustomReports", e.operation_receipt = "business::operation::receipt", e.operation_tableManagement = "business::operation::tableManagement", e.operation_offlinePayment = "business::operation::offlinePayment", e.operation_reasonTemplate = "business::operation::reasonTemplate", e.operation_discountRule = "business::operation::discountRule", e.operation_serviceCharge = "business::operation::serviceCharge", e.operation_kitchenPrintTemplate = "business::operation::kitchenPrintTemplate", e.operation_orderSetting = "business::operation::orderSetting", e.media_assets = "business::media::assets", e))(s || {}), b = /* @__PURE__ */ ((e) => (e.profile = "business::profile", e.restaurant = "business::restaurant", e.menu = "business::menu", e.promotion = "business::promotion", e.voucher = "business::voucher", e.membership = "business::membership", e.stock = "business::stock", e.permission = "business::permission", e.role = "business::role", e.wastageTemplate = "business::wastageTemplate", e.closingTemplate = "business::closingTemplate", e.orderTemplate = "business::orderTemplate", e.ingredient = "business::ingredient", e.recipe = "business::recipe", e.unit = "business::unit", e.supplier = "business::supplier", e.warehouse = "business::warehouse", e.publish = "business::publish", e.integration = "business::integration", e.orderDraft = "business::orderDraft", e.unitCostHistory = "business::unitCostHistory", e))(b || {}), ce = /* @__PURE__ */ ((e) => (e.restaurant = "restaurant", e))(ce || {});
|
|
797
|
+
const r = {
|
|
777
798
|
general: "General",
|
|
778
799
|
inventory: "Inventory",
|
|
779
800
|
hrm: "HRM",
|
|
@@ -788,7 +809,7 @@ const n = {
|
|
|
788
809
|
miniProgram: "Mini Program",
|
|
789
810
|
media: "Media"
|
|
790
811
|
}, ut = "access-denied", _ = {
|
|
791
|
-
Level:
|
|
812
|
+
Level: re,
|
|
792
813
|
Action: t,
|
|
793
814
|
Subject: {
|
|
794
815
|
Feedme: oe,
|
|
@@ -815,7 +836,7 @@ const n = {
|
|
|
815
836
|
[b.orderDraft]: s.inventory_orderDraftApproval,
|
|
816
837
|
[b.unitCostHistory]: s.inventory_unitCostHistory
|
|
817
838
|
};
|
|
818
|
-
s.restaurant, t.manage,
|
|
839
|
+
s.restaurant, t.manage, r.general, s.menu_item, t.manage, r.menu, s.menu_catalog, t.manage, r.menu, s.menu_category, t.manage, r.menu, s.menu_subCategory, t.manage, r.menu, s.menu_group, t.manage, r.menu, s.menu_takeaway, t.manage, r.menu, s.menu_scheduler, t.manage, r.menu, s.menu_variant, t.manage, r.menu, s.menu_cookingGuide, t.manage, r.menu, s.menu_printRoute, t.manage, r.menu, s.menu_servingSequence, t.manage, r.menu, s.menu_unit, t.manage, r.menu, s.menu_ingredient, t.manage, r.menu, s.menu_recipe, t.manage, r.menu, s.menu_settings, t.manage, r.menu, s.menu_publish, t.manage, r.menu, s.menu_menuManagement, t.manage, r.menu, s.menu_importExport, t.manage, r.menu, s.inventory_stockBalance, t.manage, r.inventory, s.inventory_stockAdjustment, t.manage, r.inventory, s.inventory_unitCostHistory, t.manage, r.inventory, s.inventory_wastageTemplate, t.manage, r.inventory, s.inventory_closingHistory, t.manage, r.inventory, s.inventory_closingTemplate, t.manage, r.inventory, s.inventory_closingDraft, t.manage, r.inventory, s.inventory_ingredient, t.manage, r.inventory, s.inventory_ingredientGroup, t.manage, r.inventory, s.inventory_recipe, t.manage, r.inventory, s.inventory_unit, t.manage, r.inventory, s.inventory_purchaseTransfer, t.manage, r.inventory, s.inventory_orderDraftApproval, t.manage, r.inventory, s.inventory_transferOut, t.manage, r.inventory, s.inventory_surcharge, t.manage, r.inventory, s.inventory_orderTemplate, t.manage, r.inventory, s.inventory_supplier, t.manage, r.inventory, s.inventory_warehouse, t.manage, r.inventory, s.inventory_publish, t.manage, r.inventory, s.inventory_import, t.manage, r.inventory, s.inventory_integration, t.manage, r.inventory, s.crm_membership, t.manage, r.crm, s.crm_promotion, t.manage, r.crm, s.crm_voucher, t.manage, r.crm, s.crm_analytic, t.manage, r.crm, s.crm_tier, t.manage, r.crm, s.crm_title, t.manage, r.crm, s.crm_broadcast, t.manage, r.crm, s.crm_point, t.manage, r.crm, s.crm_credit, t.manage, r.crm, s.crm_experience, t.manage, r.crm, s.crm_game, t.manage, r.crm, s.crm_mission, t.manage, r.crm, s.crm_loyaltyMember, t.manage, r.crm, s.crm_loyaltySegment, t.manage, r.crm, s.crm_loyaltyCard, t.manage, r.crm, s.crm_referral, t.manage, r.crm, s.crm_store, t.manage, r.crm, s.crm_transaction, t.manage, r.crm, s.crm_setting, t.manage, r.crm, s.crm_bin, t.manage, r.crm, s.crm_marketingMaterial, t.manage, r.crm, s.payment_payoutAccount, t.manage, r.payment, s.payment_paymentOnboarding, t.manage, r.payment, s.payment_transactions, t.manage, r.payment, s.payment_settlements, t.manage, r.payment, s.hrm_teamMember, t.manage, r.hrm, s.hrm_employee, t.manage, r.hrm, s.hrm_auditLog, t.manage, r.hrm, s.report_createReport, t.manage, r.report, s.report_accessOverview, t.manage, r.report, s.report_accessInsight, t.manage, r.report, s.report_accessSetting, t.manage, r.report, s.report_accessIntegration, t.manage, r.report, s.report_reports_allDefaultReports, t.manage, t.read, t.create, r.reports, s.report_reports_allCustomReports, t.manage, t.read, t.create, t.update, t.delete, r.customReports, s.mdm_deviceManagement, t.manage, r.settings, s.mdm_createDevice, t.manage, r.settings, s.mdm_deviceBinding, t.manage, r.settings, s.mdm_customerDisplay, t.manage, t.read, t.update, r.settings, s.kiosk_deviceManagement, t.manage, r.settings, s.kiosk_deviceBinding, t.manage, r.settings, s.eInvoice_management, t.manage, r.settings, s.eInvoice_integration, t.manage, r.settings, s.operation_receipt, t.manage, r.operation, s.operation_tableManagement, t.manage, r.operation, s.operation_offlinePayment, t.manage, r.operation, s.operation_reasonTemplate, t.manage, r.operation, s.operation_discountRule, t.manage, r.operation, s.operation_serviceCharge, t.manage, r.operation, s.operation_kitchenPrintTemplate, t.manage, r.operation, s.operation_orderSetting, t.manage, r.operation, s.miniProgram_profile, t.manage, r.miniProgram, s.miniProgram_brandkit, t.manage, r.miniProgram, s.miniProgram_template, t.manage, r.miniProgram, s.miniProgram_publish, t.manage, r.miniProgram, s.miniProgram_assets, t.manage, r.miniProgram, s.miniProgram_nativeCredentials, t.manage, r.miniProgram, s.media_assets, t.manage, r.media;
|
|
819
840
|
var u = /* @__PURE__ */ ((e) => (e.crm = "crm", e.crm_user = "crm::user", e.crm_segmentation = "crm::segmentation", e.crm_queue = "crm::queue", e.crm_transaction = "crm::transaction", e.crm_store = "crm::store", e.crm_location = "crm::location", e.crm_effect = "crm::effect", e.crm_setting = "crm::setting", e.crm_reward = "crm::reward", e.crm_campaign = "crm::campaign", e.crm_referral = "crm::referral", e.crm_marketingMaterial = "crm::marketingMaterial", e.crm_voucher = "crm::voucher", e.crm_membership = "crm::membership", e.crm_analytic = "crm::analytic", e.crm_tier = "crm::tier", e.crm_title = "crm::title", e.crm_broadcast = "crm::broadcast", e.crm_point = "crm::point", e.crm_credit = "crm::credit", e.crm_experience = "crm::experience", e.crm_game = "crm::game", e.crm_mission = "crm::mission", e.crm_loyaltyMember = "crm::loyaltyMember", e.crm_loyaltySegment = "crm::loyaltySegment", e.crm_loyaltyCard = "crm::loyaltyCard", e.crm_bin = "crm::bin", e))(u || {});
|
|
820
841
|
const m = [
|
|
821
842
|
{
|
|
@@ -914,7 +935,7 @@ const m = [
|
|
|
914
935
|
t.delete
|
|
915
936
|
]
|
|
916
937
|
}
|
|
917
|
-
],
|
|
938
|
+
], M = [
|
|
918
939
|
...m,
|
|
919
940
|
{
|
|
920
941
|
label: "Campaign",
|
|
@@ -969,7 +990,7 @@ const m = [
|
|
|
969
990
|
t.delete
|
|
970
991
|
]
|
|
971
992
|
}
|
|
972
|
-
],
|
|
993
|
+
], Mt = [
|
|
973
994
|
...m,
|
|
974
995
|
{
|
|
975
996
|
label: "Title",
|
|
@@ -981,7 +1002,7 @@ const m = [
|
|
|
981
1002
|
t.delete
|
|
982
1003
|
]
|
|
983
1004
|
}
|
|
984
|
-
],
|
|
1005
|
+
], Dt = [
|
|
985
1006
|
...m,
|
|
986
1007
|
{
|
|
987
1008
|
label: "Broadcast",
|
|
@@ -1097,34 +1118,34 @@ const m = [
|
|
|
1097
1118
|
actions: [t.read, t.update, t.delete]
|
|
1098
1119
|
}
|
|
1099
1120
|
], fe = y(
|
|
1100
|
-
|
|
1121
|
+
M,
|
|
1101
1122
|
yt
|
|
1102
1123
|
), ye = y(
|
|
1103
|
-
|
|
1104
|
-
Dt
|
|
1105
|
-
), De = y(
|
|
1106
|
-
D,
|
|
1124
|
+
M,
|
|
1107
1125
|
Mt
|
|
1108
1126
|
), Me = y(
|
|
1109
|
-
|
|
1127
|
+
M,
|
|
1128
|
+
Dt
|
|
1129
|
+
), De = y(
|
|
1130
|
+
M,
|
|
1110
1131
|
Ct
|
|
1111
1132
|
), Ce = y(
|
|
1112
|
-
|
|
1133
|
+
M,
|
|
1113
1134
|
vt
|
|
1114
1135
|
), ve = y(
|
|
1115
|
-
|
|
1136
|
+
M,
|
|
1116
1137
|
Yt
|
|
1117
1138
|
), Ye = y(
|
|
1118
|
-
|
|
1139
|
+
M,
|
|
1119
1140
|
Gt
|
|
1120
1141
|
), Ge = y(
|
|
1121
|
-
|
|
1142
|
+
M,
|
|
1122
1143
|
ht
|
|
1123
1144
|
), jt = y(
|
|
1124
|
-
|
|
1145
|
+
M,
|
|
1125
1146
|
ue
|
|
1126
1147
|
), he = y(
|
|
1127
|
-
|
|
1148
|
+
M,
|
|
1128
1149
|
wt
|
|
1129
1150
|
), Vt = [
|
|
1130
1151
|
...m,
|
|
@@ -1162,8 +1183,8 @@ const m = [
|
|
|
1162
1183
|
de,
|
|
1163
1184
|
fe,
|
|
1164
1185
|
ye,
|
|
1165
|
-
De,
|
|
1166
1186
|
Me,
|
|
1187
|
+
De,
|
|
1167
1188
|
Ce,
|
|
1168
1189
|
ve,
|
|
1169
1190
|
Ye,
|
|
@@ -1173,11 +1194,11 @@ const m = [
|
|
|
1173
1194
|
pe,
|
|
1174
1195
|
we
|
|
1175
1196
|
), Ht = y(
|
|
1176
|
-
|
|
1197
|
+
M,
|
|
1177
1198
|
ue,
|
|
1178
1199
|
me
|
|
1179
1200
|
), xt = y(
|
|
1180
|
-
|
|
1201
|
+
M,
|
|
1181
1202
|
Vt
|
|
1182
1203
|
), Qt = y(Et), Xt = {
|
|
1183
1204
|
[`set_${s.crm}`]: {
|
|
@@ -1218,12 +1239,12 @@ const m = [
|
|
|
1218
1239
|
[`set_${s.crm_broadcast}`]: {
|
|
1219
1240
|
key: "sys:crm:broadcast",
|
|
1220
1241
|
name: "CRM Broadcast",
|
|
1221
|
-
permissions:
|
|
1242
|
+
permissions: Me
|
|
1222
1243
|
},
|
|
1223
1244
|
[`set_${s.crm_point}`]: {
|
|
1224
1245
|
key: "sys:crm:point",
|
|
1225
1246
|
name: "CRM Point",
|
|
1226
|
-
permissions:
|
|
1247
|
+
permissions: De
|
|
1227
1248
|
},
|
|
1228
1249
|
[`set_${s.crm_credit}`]: {
|
|
1229
1250
|
key: "sys:crm:credit",
|
|
@@ -1298,7 +1319,7 @@ const f = [
|
|
|
1298
1319
|
subject: l.inventory,
|
|
1299
1320
|
actions: [t.read]
|
|
1300
1321
|
}
|
|
1301
|
-
],
|
|
1322
|
+
], T = [
|
|
1302
1323
|
...f,
|
|
1303
1324
|
{
|
|
1304
1325
|
label: "Stock",
|
|
@@ -1348,11 +1369,11 @@ const f = [
|
|
|
1348
1369
|
}
|
|
1349
1370
|
];
|
|
1350
1371
|
[
|
|
1351
|
-
...
|
|
1372
|
+
...T,
|
|
1352
1373
|
...je,
|
|
1353
1374
|
...Ve
|
|
1354
1375
|
];
|
|
1355
|
-
const
|
|
1376
|
+
const R = [
|
|
1356
1377
|
...f,
|
|
1357
1378
|
{
|
|
1358
1379
|
label: "Closing",
|
|
@@ -1415,7 +1436,7 @@ const T = [
|
|
|
1415
1436
|
}
|
|
1416
1437
|
];
|
|
1417
1438
|
[
|
|
1418
|
-
...
|
|
1439
|
+
...R,
|
|
1419
1440
|
...Ee,
|
|
1420
1441
|
...Fe
|
|
1421
1442
|
];
|
|
@@ -1608,14 +1629,14 @@ const zt = [
|
|
|
1608
1629
|
subject: l.inventory,
|
|
1609
1630
|
actions: [t.read, t.update]
|
|
1610
1631
|
}
|
|
1611
|
-
],
|
|
1632
|
+
], Tt = [
|
|
1612
1633
|
...f,
|
|
1613
1634
|
{
|
|
1614
1635
|
label: "Inventory",
|
|
1615
1636
|
subject: l.inventory,
|
|
1616
1637
|
actions: [t.update]
|
|
1617
1638
|
}
|
|
1618
|
-
],
|
|
1639
|
+
], Rt = [
|
|
1619
1640
|
...f,
|
|
1620
1641
|
{
|
|
1621
1642
|
label: "Integration",
|
|
@@ -1625,14 +1646,14 @@ const zt = [
|
|
|
1625
1646
|
];
|
|
1626
1647
|
[
|
|
1627
1648
|
...f,
|
|
1628
|
-
...
|
|
1629
|
-
...
|
|
1649
|
+
...T,
|
|
1650
|
+
...R
|
|
1630
1651
|
];
|
|
1631
1652
|
const Ut = {
|
|
1632
1653
|
[`set_${s.inventory_stockBalance}`]: {
|
|
1633
1654
|
key: "sys:inventory:stock_balance",
|
|
1634
1655
|
name: "Stock Balance",
|
|
1635
|
-
permissions:
|
|
1656
|
+
permissions: T
|
|
1636
1657
|
},
|
|
1637
1658
|
[`set_${s.inventory_stockAdjustment}`]: {
|
|
1638
1659
|
key: "sys:inventory:stock_adjustment",
|
|
@@ -1652,7 +1673,7 @@ const Ut = {
|
|
|
1652
1673
|
[`set_${s.inventory_closingHistory}`]: {
|
|
1653
1674
|
key: "sys:inventory:closing_history",
|
|
1654
1675
|
name: "Closing History",
|
|
1655
|
-
permissions:
|
|
1676
|
+
permissions: R
|
|
1656
1677
|
},
|
|
1657
1678
|
[`set_${s.inventory_closingTemplate}`]: {
|
|
1658
1679
|
key: "sys:inventory:closing_template",
|
|
@@ -1727,12 +1748,12 @@ const Ut = {
|
|
|
1727
1748
|
[`set_${s.inventory_import}`]: {
|
|
1728
1749
|
key: "sys:inventory:import",
|
|
1729
1750
|
name: "Import",
|
|
1730
|
-
permissions:
|
|
1751
|
+
permissions: Tt
|
|
1731
1752
|
},
|
|
1732
1753
|
[`set_${s.inventory_integration}`]: {
|
|
1733
1754
|
key: "sys:inventory:integration",
|
|
1734
1755
|
name: "Integration",
|
|
1735
|
-
permissions:
|
|
1756
|
+
permissions: Rt
|
|
1736
1757
|
}
|
|
1737
1758
|
};
|
|
1738
1759
|
var G = /* @__PURE__ */ ((e) => (e.hrm_posRole = "hrm::posRole", e.hrm_portalUsers = "hrm::portalUsers", e.hrm_restaurant = "hrm::restaurant", e))(G || {});
|
|
@@ -1855,8 +1876,8 @@ function qe(e) {
|
|
|
1855
1876
|
function E(e) {
|
|
1856
1877
|
return Object.prototype.toString.call(e) === "[object Array]";
|
|
1857
1878
|
}
|
|
1858
|
-
function
|
|
1859
|
-
return e instanceof Date ? e.getTime() : E(e) ? e.map(
|
|
1879
|
+
function D(e) {
|
|
1880
|
+
return e instanceof Date ? e.getTime() : E(e) ? e.map(D) : e && typeof e.toJSON == "function" ? e.toJSON() : e;
|
|
1860
1881
|
}
|
|
1861
1882
|
function C(e, a) {
|
|
1862
1883
|
return qe(e.get) ? e.get(a) : e[a];
|
|
@@ -1865,8 +1886,8 @@ function j(e) {
|
|
|
1865
1886
|
return function(a, A) {
|
|
1866
1887
|
if (!E(A) || !A.length)
|
|
1867
1888
|
return e(a, A);
|
|
1868
|
-
for (var
|
|
1869
|
-
if (e(a, C(A,
|
|
1889
|
+
for (var n = 0, o = A.length; n < o; n++)
|
|
1890
|
+
if (e(a, C(A, n)))
|
|
1870
1891
|
return !0;
|
|
1871
1892
|
return !1;
|
|
1872
1893
|
};
|
|
@@ -1875,14 +1896,14 @@ function St(e) {
|
|
|
1875
1896
|
return function(a, A) {
|
|
1876
1897
|
if (!E(A) || !A.length)
|
|
1877
1898
|
return e(a, A);
|
|
1878
|
-
for (var
|
|
1879
|
-
if (!e(a, C(A,
|
|
1899
|
+
for (var n = 0, o = A.length; n < o; n++)
|
|
1900
|
+
if (!e(a, C(A, n)))
|
|
1880
1901
|
return !1;
|
|
1881
1902
|
return !0;
|
|
1882
1903
|
};
|
|
1883
1904
|
}
|
|
1884
|
-
function v(e, a, A,
|
|
1885
|
-
return e.v(e.a, a, A,
|
|
1905
|
+
function v(e, a, A, n) {
|
|
1906
|
+
return e.v(e.a, a, A, n);
|
|
1886
1907
|
}
|
|
1887
1908
|
var x = {
|
|
1888
1909
|
/**
|
|
@@ -1898,22 +1919,22 @@ var x = {
|
|
|
1898
1919
|
/**
|
|
1899
1920
|
*/
|
|
1900
1921
|
$gt: j(function(e, a) {
|
|
1901
|
-
return X(
|
|
1922
|
+
return X(D(a), e) > 0;
|
|
1902
1923
|
}),
|
|
1903
1924
|
/**
|
|
1904
1925
|
*/
|
|
1905
1926
|
$gte: j(function(e, a) {
|
|
1906
|
-
return X(
|
|
1927
|
+
return X(D(a), e) >= 0;
|
|
1907
1928
|
}),
|
|
1908
1929
|
/**
|
|
1909
1930
|
*/
|
|
1910
1931
|
$lt: j(function(e, a) {
|
|
1911
|
-
return X(
|
|
1932
|
+
return X(D(a), e) < 0;
|
|
1912
1933
|
}),
|
|
1913
1934
|
/**
|
|
1914
1935
|
*/
|
|
1915
1936
|
$lte: j(function(e, a) {
|
|
1916
|
-
return X(
|
|
1937
|
+
return X(D(a), e) <= 0;
|
|
1917
1938
|
}),
|
|
1918
1939
|
/**
|
|
1919
1940
|
*/
|
|
@@ -1925,16 +1946,16 @@ var x = {
|
|
|
1925
1946
|
$in: function(e, a) {
|
|
1926
1947
|
if (a instanceof Array) {
|
|
1927
1948
|
for (var A = a.length; A--; )
|
|
1928
|
-
if (~e.indexOf(
|
|
1949
|
+
if (~e.indexOf(D(C(a, A))))
|
|
1929
1950
|
return !0;
|
|
1930
1951
|
} else {
|
|
1931
|
-
var
|
|
1932
|
-
if (
|
|
1952
|
+
var n = D(a);
|
|
1953
|
+
if (n === a && typeof a == "object") {
|
|
1933
1954
|
for (var A = e.length; A--; )
|
|
1934
1955
|
if (String(e[A]) === String(a) && String(a) !== "[object Object]")
|
|
1935
1956
|
return !0;
|
|
1936
1957
|
}
|
|
1937
|
-
if (typeof
|
|
1958
|
+
if (typeof n > "u") {
|
|
1938
1959
|
for (var A = e.length; A--; )
|
|
1939
1960
|
if (e[A] == null)
|
|
1940
1961
|
return !0;
|
|
@@ -1944,19 +1965,19 @@ var x = {
|
|
|
1944
1965
|
if (i && String(i) !== "[object Object]" && String(a) !== "[object Object]")
|
|
1945
1966
|
return !0;
|
|
1946
1967
|
}
|
|
1947
|
-
return !!~e.indexOf(
|
|
1968
|
+
return !!~e.indexOf(n);
|
|
1948
1969
|
}
|
|
1949
1970
|
return !1;
|
|
1950
1971
|
},
|
|
1951
1972
|
/**
|
|
1952
1973
|
*/
|
|
1953
|
-
$nin: function(e, a, A,
|
|
1954
|
-
return !x.$in(e, a, A,
|
|
1974
|
+
$nin: function(e, a, A, n) {
|
|
1975
|
+
return !x.$in(e, a, A, n);
|
|
1955
1976
|
},
|
|
1956
1977
|
/**
|
|
1957
1978
|
*/
|
|
1958
|
-
$not: function(e, a, A,
|
|
1959
|
-
return !v(e, a, A,
|
|
1979
|
+
$not: function(e, a, A, n) {
|
|
1980
|
+
return !v(e, a, A, n);
|
|
1960
1981
|
},
|
|
1961
1982
|
/**
|
|
1962
1983
|
*/
|
|
@@ -1965,8 +1986,8 @@ var x = {
|
|
|
1965
1986
|
},
|
|
1966
1987
|
/**
|
|
1967
1988
|
*/
|
|
1968
|
-
$all: function(e, a, A,
|
|
1969
|
-
return x.$and(e, a, A,
|
|
1989
|
+
$all: function(e, a, A, n) {
|
|
1990
|
+
return x.$and(e, a, A, n);
|
|
1970
1991
|
},
|
|
1971
1992
|
/**
|
|
1972
1993
|
*/
|
|
@@ -1975,22 +1996,22 @@ var x = {
|
|
|
1975
1996
|
},
|
|
1976
1997
|
/**
|
|
1977
1998
|
*/
|
|
1978
|
-
$or: function(e, a, A,
|
|
1999
|
+
$or: function(e, a, A, n) {
|
|
1979
2000
|
for (var o = 0, i = e.length; o < i; o++)
|
|
1980
|
-
if (v(C(e, o), a, A,
|
|
2001
|
+
if (v(C(e, o), a, A, n))
|
|
1981
2002
|
return !0;
|
|
1982
2003
|
return !1;
|
|
1983
2004
|
},
|
|
1984
2005
|
/**
|
|
1985
2006
|
*/
|
|
1986
|
-
$nor: function(e, a, A,
|
|
1987
|
-
return !x.$or(e, a, A,
|
|
2007
|
+
$nor: function(e, a, A, n) {
|
|
2008
|
+
return !x.$or(e, a, A, n);
|
|
1988
2009
|
},
|
|
1989
2010
|
/**
|
|
1990
2011
|
*/
|
|
1991
|
-
$and: function(e, a, A,
|
|
2012
|
+
$and: function(e, a, A, n) {
|
|
1992
2013
|
for (var o = 0, i = e.length; o < i; o++)
|
|
1993
|
-
if (!v(C(e, o), a, A,
|
|
2014
|
+
if (!v(C(e, o), a, A, n))
|
|
1994
2015
|
return !1;
|
|
1995
2016
|
return !0;
|
|
1996
2017
|
},
|
|
@@ -2001,18 +2022,18 @@ var x = {
|
|
|
2001
2022
|
}),
|
|
2002
2023
|
/**
|
|
2003
2024
|
*/
|
|
2004
|
-
$where: function(e, a, A,
|
|
2005
|
-
return e.call(a, a, A,
|
|
2025
|
+
$where: function(e, a, A, n) {
|
|
2026
|
+
return e.call(a, a, A, n);
|
|
2006
2027
|
},
|
|
2007
2028
|
/**
|
|
2008
2029
|
*/
|
|
2009
|
-
$elemMatch: function(e, a, A,
|
|
2010
|
-
return E(a) ? !!~_t(a, e) : v(e, a, A,
|
|
2030
|
+
$elemMatch: function(e, a, A, n) {
|
|
2031
|
+
return E(a) ? !!~_t(a, e) : v(e, a, A, n);
|
|
2011
2032
|
},
|
|
2012
2033
|
/**
|
|
2013
2034
|
*/
|
|
2014
|
-
$exists: function(e, a, A,
|
|
2015
|
-
return
|
|
2035
|
+
$exists: function(e, a, A, n) {
|
|
2036
|
+
return n.hasOwnProperty(A) === e;
|
|
2016
2037
|
}
|
|
2017
2038
|
}, Z = {
|
|
2018
2039
|
/**
|
|
@@ -2025,7 +2046,7 @@ var x = {
|
|
|
2025
2046
|
} : e === null ? function(a) {
|
|
2026
2047
|
return a == null;
|
|
2027
2048
|
} : function(a) {
|
|
2028
|
-
return X(
|
|
2049
|
+
return X(D(a), D(e)) === 0;
|
|
2029
2050
|
};
|
|
2030
2051
|
},
|
|
2031
2052
|
/**
|
|
@@ -2091,8 +2112,8 @@ function ee(e, a) {
|
|
|
2091
2112
|
function $t(e, a) {
|
|
2092
2113
|
var A = [];
|
|
2093
2114
|
if (I(a, e.k, 0, a, A), A.length === 1) {
|
|
2094
|
-
var
|
|
2095
|
-
return v(e.nv,
|
|
2115
|
+
var n = A[0];
|
|
2116
|
+
return v(e.nv, n[0], n[1], n[2]);
|
|
2096
2117
|
}
|
|
2097
2118
|
for (var o = e && e.q && typeof e.q.$ne < "u", i = o, c = 0; c < A.length; c++) {
|
|
2098
2119
|
var g = A[c], B = v(e.nv, g[0], g[1], g[2]);
|
|
@@ -2100,9 +2121,9 @@ function $t(e, a) {
|
|
|
2100
2121
|
}
|
|
2101
2122
|
return i;
|
|
2102
2123
|
}
|
|
2103
|
-
function I(e, a, A,
|
|
2124
|
+
function I(e, a, A, n, o) {
|
|
2104
2125
|
if (A === a.length || e == null) {
|
|
2105
|
-
o.push([e, a[A - 1],
|
|
2126
|
+
o.push([e, a[A - 1], n]);
|
|
2106
2127
|
return;
|
|
2107
2128
|
}
|
|
2108
2129
|
var i = C(a, A);
|
|
@@ -2119,17 +2140,17 @@ function ta(e) {
|
|
|
2119
2140
|
return e && e.constructor === Object;
|
|
2120
2141
|
}
|
|
2121
2142
|
function V(e) {
|
|
2122
|
-
e =
|
|
2143
|
+
e = D(e), (!e || !ta(e)) && (e = { $eq: e });
|
|
2123
2144
|
var a = [];
|
|
2124
2145
|
for (var A in e) {
|
|
2125
|
-
var
|
|
2146
|
+
var n = e[A];
|
|
2126
2147
|
if (A !== "$options")
|
|
2127
2148
|
if (x[A])
|
|
2128
|
-
Z[A] && (
|
|
2149
|
+
Z[A] && (n = Z[A](n, e)), a.push(ee(D(n), x[A]));
|
|
2129
2150
|
else {
|
|
2130
2151
|
if (A.charCodeAt(0) === 36)
|
|
2131
2152
|
throw new Error("Unknown operation " + A);
|
|
2132
|
-
a.push(ea(A.split("."), V(
|
|
2153
|
+
a.push(ea(A.split("."), V(n), n));
|
|
2133
2154
|
}
|
|
2134
2155
|
}
|
|
2135
2156
|
return a.length === 1 ? a[0] : ee(a, x.$and);
|
|
@@ -2138,16 +2159,16 @@ function Ze(e, a) {
|
|
|
2138
2159
|
var A = V(e);
|
|
2139
2160
|
return a && (A = {
|
|
2140
2161
|
a: A,
|
|
2141
|
-
v: function(
|
|
2142
|
-
return v(
|
|
2162
|
+
v: function(n, o, i, c) {
|
|
2163
|
+
return v(n, a(o), i, c);
|
|
2143
2164
|
}
|
|
2144
2165
|
}), A;
|
|
2145
2166
|
}
|
|
2146
2167
|
function aa(e, a, A) {
|
|
2147
2168
|
qe(a) && (A = a, a = void 0);
|
|
2148
|
-
var
|
|
2169
|
+
var n = Ze(e, A);
|
|
2149
2170
|
function o(i, c, g) {
|
|
2150
|
-
return v(
|
|
2171
|
+
return v(n, i, c, g);
|
|
2151
2172
|
}
|
|
2152
2173
|
return a ? a.filter(o) : o;
|
|
2153
2174
|
}
|
|
@@ -2163,8 +2184,8 @@ function X(e, a) {
|
|
|
2163
2184
|
}
|
|
2164
2185
|
function te(e, a) {
|
|
2165
2186
|
for (var A = 0; A < a.length; A++) {
|
|
2166
|
-
var
|
|
2167
|
-
|
|
2187
|
+
var n = a[A];
|
|
2188
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
|
|
2168
2189
|
}
|
|
2169
2190
|
}
|
|
2170
2191
|
function sa(e, a, A) {
|
|
@@ -2183,20 +2204,20 @@ function Aa(e) {
|
|
|
2183
2204
|
var a = typeof e == "object" ? e.constructor : e;
|
|
2184
2205
|
return a.modelName || a.name;
|
|
2185
2206
|
}
|
|
2186
|
-
function
|
|
2207
|
+
function na(e) {
|
|
2187
2208
|
return JSON.parse(JSON.stringify(e));
|
|
2188
2209
|
}
|
|
2189
|
-
var
|
|
2210
|
+
var ra = /[-/\\^$+?.()|[\]{}]/g, oa = /\.?\*+\.?/g, ia = /\*+/, ca = /\./g;
|
|
2190
2211
|
function la(e, a, A) {
|
|
2191
|
-
var
|
|
2212
|
+
var n = A[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", o = e.indexOf("**") === -1 ? "[^.]" : ".", i = e.replace(ca, "\\$&").replace(ia, o + n);
|
|
2192
2213
|
return a + e.length === A.length ? "(?:" + i + ")?" : i;
|
|
2193
2214
|
}
|
|
2194
2215
|
function ga(e, a, A) {
|
|
2195
2216
|
return e === "." && (A[a - 1] === "*" || A[a + 1] === "*") ? e : "\\" + e;
|
|
2196
2217
|
}
|
|
2197
2218
|
function ua(e) {
|
|
2198
|
-
var a = e.map(function(
|
|
2199
|
-
return
|
|
2219
|
+
var a = e.map(function(n) {
|
|
2220
|
+
return n.replace(ra, ga).replace(oa, la);
|
|
2200
2221
|
}), A = a.length > 1 ? "(?:" + a.join("|") + ")" : a[0];
|
|
2201
2222
|
return new RegExp("^" + A + "$");
|
|
2202
2223
|
}
|
|
@@ -2210,12 +2231,12 @@ var ma = /* @__PURE__ */ function() {
|
|
|
2210
2231
|
}), this.reason = A.reason;
|
|
2211
2232
|
}
|
|
2212
2233
|
var a = e.prototype;
|
|
2213
|
-
return a.matches = function(
|
|
2214
|
-
return this._matches ? typeof
|
|
2215
|
-
}, a.isRelevantFor = function(
|
|
2234
|
+
return a.matches = function(n) {
|
|
2235
|
+
return this._matches ? typeof n == "string" ? !this.inverted : this._matches(n) : !0;
|
|
2236
|
+
}, a.isRelevantFor = function(n, o) {
|
|
2216
2237
|
return this.fields ? o ? this.matchesField(o) : !this.inverted : !0;
|
|
2217
|
-
}, a.matchesField = function(
|
|
2218
|
-
return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : ua(this.fields)), this._fieldsPattern === null ||
|
|
2238
|
+
}, a.matchesField = function(n) {
|
|
2239
|
+
return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : ua(this.fields)), this._fieldsPattern === null || n.indexOf("*") !== -1 ? this.fields.indexOf(n) !== -1 : this._fieldsPattern.test(n);
|
|
2219
2240
|
}, e;
|
|
2220
2241
|
}(), w = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(), ae = {
|
|
2221
2242
|
crud: ["create", "read", "update", "delete"]
|
|
@@ -2224,15 +2245,15 @@ function se(e, a) {
|
|
|
2224
2245
|
return e === a || Array.isArray(a) && a.indexOf(e) !== -1;
|
|
2225
2246
|
}
|
|
2226
2247
|
var Oe = /* @__PURE__ */ function() {
|
|
2227
|
-
e.addAlias = function(
|
|
2228
|
-
if (
|
|
2248
|
+
e.addAlias = function(n, o) {
|
|
2249
|
+
if (n === "manage" || se("manage", o))
|
|
2229
2250
|
throw new Error('Cannot add alias for "manage" action because it represents any action');
|
|
2230
|
-
if (se(
|
|
2231
|
-
throw new Error("Attempt to alias action to itself: " +
|
|
2232
|
-
return ae[
|
|
2251
|
+
if (se(n, o))
|
|
2252
|
+
throw new Error("Attempt to alias action to itself: " + n + " -> " + o.toString());
|
|
2253
|
+
return ae[n] = o, this;
|
|
2233
2254
|
};
|
|
2234
|
-
function e(A,
|
|
2235
|
-
var o =
|
|
2255
|
+
function e(A, n) {
|
|
2256
|
+
var o = n === void 0 ? {} : n, i = o.RuleType, c = i === void 0 ? ma : i, g = o.subjectName, B = g === void 0 ? Aa : g;
|
|
2236
2257
|
this[w] = {
|
|
2237
2258
|
RuleType: c,
|
|
2238
2259
|
subjectName: B,
|
|
@@ -2241,23 +2262,23 @@ var Oe = /* @__PURE__ */ function() {
|
|
|
2241
2262
|
indexedRules: /* @__PURE__ */ Object.create(null),
|
|
2242
2263
|
mergedRules: /* @__PURE__ */ Object.create(null),
|
|
2243
2264
|
events: {},
|
|
2244
|
-
aliases:
|
|
2265
|
+
aliases: na(ae)
|
|
2245
2266
|
}, this.update(A);
|
|
2246
2267
|
}
|
|
2247
2268
|
var a = e.prototype;
|
|
2248
|
-
return a.update = function(
|
|
2249
|
-
if (!Array.isArray(
|
|
2269
|
+
return a.update = function(n) {
|
|
2270
|
+
if (!Array.isArray(n))
|
|
2250
2271
|
return this;
|
|
2251
2272
|
var o = {
|
|
2252
|
-
rules:
|
|
2273
|
+
rules: n,
|
|
2253
2274
|
ability: this
|
|
2254
2275
|
};
|
|
2255
|
-
this.emit("update", o), this[w].originalRules =
|
|
2256
|
-
var i = this.buildIndexFor(
|
|
2257
|
-
return process.env.NODE_ENV !== "production" && i.isAllInverted &&
|
|
2258
|
-
}, a.buildIndexFor = function(
|
|
2259
|
-
for (var o = /* @__PURE__ */ Object.create(null), i = this[w].RuleType, c = !0, g = !1, B = 0; B <
|
|
2260
|
-
var p = new i(
|
|
2276
|
+
this.emit("update", o), this[w].originalRules = n.slice(0), this[w].mergedRules = /* @__PURE__ */ Object.create(null);
|
|
2277
|
+
var i = this.buildIndexFor(n);
|
|
2278
|
+
return process.env.NODE_ENV !== "production" && i.isAllInverted && n.length && console.warn("[casl]: Ability contains only inverted rules. That means user will not be able to do any actions. This will be changed to Error throw in the next major version"), this[w].indexedRules = i.rules, this[w].hasPerFieldRules = i.hasPerFieldRules, this.emit("updated", o), this;
|
|
2279
|
+
}, a.buildIndexFor = function(n) {
|
|
2280
|
+
for (var o = /* @__PURE__ */ Object.create(null), i = this[w].RuleType, c = !0, g = !1, B = 0; B < n.length; B++) {
|
|
2281
|
+
var p = new i(n[B]), d = this.expandActions(p.actions), P = W(p.subject), q = n.length - B - 1;
|
|
2261
2282
|
c = !!(c && p.inverted), !g && p.fields && (g = !0);
|
|
2262
2283
|
for (var F = 0; F < P.length; F++) {
|
|
2263
2284
|
var Y = P[F];
|
|
@@ -2273,40 +2294,40 @@ var Oe = /* @__PURE__ */ function() {
|
|
|
2273
2294
|
hasPerFieldRules: g,
|
|
2274
2295
|
rules: o
|
|
2275
2296
|
};
|
|
2276
|
-
}, a.expandActions = function(
|
|
2277
|
-
for (var o = this[w].aliases, i = W(
|
|
2297
|
+
}, a.expandActions = function(n) {
|
|
2298
|
+
for (var o = this[w].aliases, i = W(n), c = 0; c < i.length; ) {
|
|
2278
2299
|
var g = i[c++];
|
|
2279
2300
|
o.hasOwnProperty(g) && (i = i.concat(o[g]));
|
|
2280
2301
|
}
|
|
2281
2302
|
return i;
|
|
2282
|
-
}, a.can = function(
|
|
2303
|
+
}, a.can = function(n, o, i) {
|
|
2283
2304
|
if (i && typeof i != "string")
|
|
2284
2305
|
throw new Error("Ability.can expects 3rd parameter to be a string. See https://stalniy.github.io/casl/abilities/2017/07/21/check-abilities.html#checking-fields for details");
|
|
2285
|
-
var c = this.relevantRuleFor(
|
|
2306
|
+
var c = this.relevantRuleFor(n, o, i);
|
|
2286
2307
|
return !!c && !c.inverted;
|
|
2287
|
-
}, a.relevantRuleFor = function(
|
|
2288
|
-
for (var c = this.rulesFor(
|
|
2308
|
+
}, a.relevantRuleFor = function(n, o, i) {
|
|
2309
|
+
for (var c = this.rulesFor(n, o, i), g = 0; g < c.length; g++)
|
|
2289
2310
|
if (c[g].matches(o))
|
|
2290
2311
|
return c[g];
|
|
2291
2312
|
return null;
|
|
2292
|
-
}, a.possibleRulesFor = function(
|
|
2293
|
-
var i = this[w].subjectName(o), c = this[w].mergedRules, g = i + "_" +
|
|
2294
|
-
return c[g] || (c[g] = this.mergeRulesFor(
|
|
2295
|
-
}, a.mergeRulesFor = function(
|
|
2313
|
+
}, a.possibleRulesFor = function(n, o) {
|
|
2314
|
+
var i = this[w].subjectName(o), c = this[w].mergedRules, g = i + "_" + n;
|
|
2315
|
+
return c[g] || (c[g] = this.mergeRulesFor(n, i)), c[g];
|
|
2316
|
+
}, a.mergeRulesFor = function(n, o) {
|
|
2296
2317
|
var i = this[w].indexedRules, c = [o, "all"].reduce(function(g, B) {
|
|
2297
2318
|
var p = i[B];
|
|
2298
|
-
return p ? Object.assign(g, p[
|
|
2319
|
+
return p ? Object.assign(g, p[n], p.manage) : g;
|
|
2299
2320
|
}, []);
|
|
2300
2321
|
return c.filter(Boolean);
|
|
2301
|
-
}, a.rulesFor = function(
|
|
2302
|
-
var c = this.possibleRulesFor(
|
|
2322
|
+
}, a.rulesFor = function(n, o, i) {
|
|
2323
|
+
var c = this.possibleRulesFor(n, o);
|
|
2303
2324
|
return this[w].hasPerFieldRules ? c.filter(function(g) {
|
|
2304
2325
|
return g.isRelevantFor(o, i);
|
|
2305
2326
|
}) : c;
|
|
2306
2327
|
}, a.cannot = function() {
|
|
2307
2328
|
return !this.can.apply(this, arguments);
|
|
2308
2329
|
}, a.throwUnlessCan = function() {
|
|
2309
|
-
for (var
|
|
2330
|
+
for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++)
|
|
2310
2331
|
o[i] = arguments[i];
|
|
2311
2332
|
var c = this.relevantRuleFor.apply(this, o);
|
|
2312
2333
|
if (!c || c.inverted) {
|
|
@@ -2318,16 +2339,16 @@ var Oe = /* @__PURE__ */ function() {
|
|
|
2318
2339
|
field: p
|
|
2319
2340
|
});
|
|
2320
2341
|
}
|
|
2321
|
-
}, a.on = function(
|
|
2342
|
+
}, a.on = function(n, o) {
|
|
2322
2343
|
var i = this[w].events, c = !0;
|
|
2323
|
-
return i[
|
|
2344
|
+
return i[n] || (i[n] = []), i[n].push(o), function() {
|
|
2324
2345
|
if (c) {
|
|
2325
|
-
var g = i[
|
|
2326
|
-
i[
|
|
2346
|
+
var g = i[n].indexOf(o);
|
|
2347
|
+
i[n].splice(g, 1), c = !1;
|
|
2327
2348
|
}
|
|
2328
2349
|
};
|
|
2329
|
-
}, a.emit = function(
|
|
2330
|
-
var i = this[w].events[
|
|
2350
|
+
}, a.emit = function(n, o) {
|
|
2351
|
+
var i = this[w].events[n];
|
|
2331
2352
|
i && i.slice(0).forEach(function(c) {
|
|
2332
2353
|
return c(o);
|
|
2333
2354
|
});
|
|
@@ -2359,7 +2380,7 @@ function ba(e) {
|
|
|
2359
2380
|
});
|
|
2360
2381
|
}
|
|
2361
2382
|
function pa(e, a, A) {
|
|
2362
|
-
const
|
|
2383
|
+
const n = Array.isArray(e) ? e : [e], o = A !== void 0 ? ba(a) : Ba(a), i = (d) => A !== void 0 ? { subjectType: d.subject, ...A } : d.subject, c = (d) => o.can(d.action, i(d), d.field) ? !0 : d.coverSubject !== void 0 ? o.can(d.action, d.coverSubject, d.field) : !1, g = n.find((d) => !c(d));
|
|
2363
2384
|
if (g) {
|
|
2364
2385
|
const d = o.relevantRuleFor(
|
|
2365
2386
|
g.action,
|
|
@@ -2372,23 +2393,23 @@ function pa(e, a, A) {
|
|
|
2372
2393
|
decisiveRule: d ?? null
|
|
2373
2394
|
};
|
|
2374
2395
|
}
|
|
2375
|
-
const B =
|
|
2396
|
+
const B = n[0], p = o.relevantRuleFor(B.action, i(B), B.field);
|
|
2376
2397
|
return { granted: !0, decisivePermission: B, decisiveRule: p ?? null };
|
|
2377
2398
|
}
|
|
2378
2399
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2379
2400
|
const wa = () => {
|
|
2380
2401
|
};
|
|
2381
2402
|
function fa(e, a, A) {
|
|
2382
|
-
let
|
|
2383
|
-
We(A) ?
|
|
2403
|
+
let n;
|
|
2404
|
+
We(A) ? n = {
|
|
2384
2405
|
evaluating: A
|
|
2385
|
-
} :
|
|
2406
|
+
} : n = A || {};
|
|
2386
2407
|
const {
|
|
2387
2408
|
lazy: o = !1,
|
|
2388
2409
|
evaluating: i = void 0,
|
|
2389
2410
|
shallow: c = !0,
|
|
2390
2411
|
onError: g = wa
|
|
2391
|
-
} =
|
|
2412
|
+
} = n, B = K(!o), p = c ? ze(a) : K(a);
|
|
2392
2413
|
let d = 0;
|
|
2393
2414
|
return ke(async (P) => {
|
|
2394
2415
|
if (!B.value)
|
|
@@ -2414,10 +2435,10 @@ function fa(e, a, A) {
|
|
|
2414
2435
|
}), o ? Ne(() => (B.value = !0, p.value)) : p;
|
|
2415
2436
|
}
|
|
2416
2437
|
async function ya(e) {
|
|
2417
|
-
const { sessionUser: a, validationManifest: A } = e, { requiredRoles:
|
|
2438
|
+
const { sessionUser: a, validationManifest: A } = e, { requiredRoles: n, requiredCaslPermissions: o, customValidationFunction: i } = A;
|
|
2418
2439
|
if (!a)
|
|
2419
2440
|
return { canAccess: !1 };
|
|
2420
|
-
if (
|
|
2441
|
+
if (n && n.length > 0 && !n.includes(a._role || ""))
|
|
2421
2442
|
return Promise.resolve({
|
|
2422
2443
|
canAccess: !1,
|
|
2423
2444
|
message: "User does not have permission to access"
|
|
@@ -2437,17 +2458,17 @@ async function ya(e) {
|
|
|
2437
2458
|
}
|
|
2438
2459
|
return Promise.resolve({ canAccess: !0 });
|
|
2439
2460
|
}
|
|
2440
|
-
async function
|
|
2461
|
+
async function Ma(e, a) {
|
|
2441
2462
|
for (const A of e.matched)
|
|
2442
2463
|
if (A.meta.validationManifest) {
|
|
2443
|
-
const
|
|
2464
|
+
const n = await ya({
|
|
2444
2465
|
sessionUser: a,
|
|
2445
2466
|
validationManifest: A.meta.validationManifest
|
|
2446
2467
|
});
|
|
2447
|
-
if (!
|
|
2468
|
+
if (!n.canAccess)
|
|
2448
2469
|
return {
|
|
2449
2470
|
canAccess: !1,
|
|
2450
|
-
message:
|
|
2471
|
+
message: n.message,
|
|
2451
2472
|
redirectTo: ut
|
|
2452
2473
|
};
|
|
2453
2474
|
}
|
|
@@ -2456,7 +2477,7 @@ async function Da(e, a) {
|
|
|
2456
2477
|
};
|
|
2457
2478
|
}
|
|
2458
2479
|
var z = /* @__PURE__ */ ((e) => (e.Loading = "loading", e.Allowed = "allowed", e.Denied = "denied", e))(z || {});
|
|
2459
|
-
function
|
|
2480
|
+
function Da() {
|
|
2460
2481
|
const e = Ke(), { sessionUser: a } = Le();
|
|
2461
2482
|
return fa(
|
|
2462
2483
|
async () => {
|
|
@@ -2467,7 +2488,7 @@ function Ma() {
|
|
|
2467
2488
|
if (!A)
|
|
2468
2489
|
return "denied";
|
|
2469
2490
|
try {
|
|
2470
|
-
return (await
|
|
2491
|
+
return (await Ma(e, A)).canAccess ? "allowed" : "denied";
|
|
2471
2492
|
} catch {
|
|
2472
2493
|
return "denied";
|
|
2473
2494
|
}
|
|
@@ -2507,7 +2528,7 @@ const Ca = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
2507
2528
|
"th-TH": Fa
|
|
2508
2529
|
}
|
|
2509
2530
|
});
|
|
2510
|
-
return (A,
|
|
2531
|
+
return (A, n) => (N(), Ue("div", Ha, [
|
|
2511
2532
|
H("div", xa, [
|
|
2512
2533
|
H("div", Qa, [
|
|
2513
2534
|
H("img", {
|
|
@@ -2525,8 +2546,8 @@ const Ca = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
2525
2546
|
}), Oa = /* @__PURE__ */ k({
|
|
2526
2547
|
__name: "PermissionWrapper",
|
|
2527
2548
|
setup(e) {
|
|
2528
|
-
const a =
|
|
2529
|
-
return (A,
|
|
2549
|
+
const a = Da();
|
|
2550
|
+
return (A, n) => h(a) === h(z).Denied ? (N(), ne(Za, { key: 0 })) : h(a) === h(z).Allowed ? Te(A.$slots, "default", { key: 1 }) : Re("", !0);
|
|
2530
2551
|
}
|
|
2531
2552
|
});
|
|
2532
2553
|
function Ae(e) {
|
|
@@ -2545,7 +2566,7 @@ const ka = [
|
|
|
2545
2566
|
{
|
|
2546
2567
|
path: "/library",
|
|
2547
2568
|
name: "$media-library",
|
|
2548
|
-
component: Ae(S(() => import("./AssetLibrary-
|
|
2569
|
+
component: Ae(S(() => import("./AssetLibrary-4168fa7a.js"))),
|
|
2549
2570
|
meta: {
|
|
2550
2571
|
validationManifest: {
|
|
2551
2572
|
requiredCaslPermissions: [
|
|
@@ -2560,7 +2581,7 @@ const ka = [
|
|
|
2560
2581
|
{
|
|
2561
2582
|
path: "/studio",
|
|
2562
2583
|
name: "$media-studio",
|
|
2563
|
-
component: Ae(S(() => import("./AiStudio-
|
|
2584
|
+
component: Ae(S(() => import("./AiStudio-6f993b76.js"))),
|
|
2564
2585
|
meta: {
|
|
2565
2586
|
validationManifest: {
|
|
2566
2587
|
requiredCaslPermissions: [
|
|
@@ -2577,19 +2598,19 @@ const ka = [
|
|
|
2577
2598
|
], Na = /* @__PURE__ */ k({
|
|
2578
2599
|
__name: "App",
|
|
2579
2600
|
setup(e) {
|
|
2580
|
-
return (a, A) => (N(),
|
|
2601
|
+
return (a, A) => (N(), ne(h(Je)));
|
|
2581
2602
|
}
|
|
2582
|
-
}),
|
|
2603
|
+
}), Ta = {
|
|
2583
2604
|
"en-US": $e,
|
|
2584
2605
|
"zh-CN": ct,
|
|
2585
2606
|
"zh-Hant": gt,
|
|
2586
2607
|
"th-TH": ot,
|
|
2587
|
-
"ja-JP":
|
|
2608
|
+
"ja-JP": nt,
|
|
2588
2609
|
"id-ID": st,
|
|
2589
2610
|
"fr-MA": tt
|
|
2590
2611
|
};
|
|
2591
2612
|
export {
|
|
2592
2613
|
Na as FmApp,
|
|
2593
|
-
|
|
2614
|
+
Ta as i18nMessages,
|
|
2594
2615
|
ka as routers
|
|
2595
2616
|
};
|