@feedmepos/mf-connect 0.1.0-beta.14 → 0.1.0-beta.15
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-DxTc7gte.js → Analytic-BudPZ7yo.js} +9 -9
- package/dist/{App-MM8u0qvP.js → App-BeD6_T_Z.js} +6 -6
- package/dist/{Broadcast-DLjZUfcr.js → Broadcast-Di-DP7MU.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-ByKi5J-l.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BszRUIC8.js} +8 -8
- package/dist/{Card-Cc8TtCxD.js → Card-BSUIJ4V3.js} +83 -83
- package/dist/{Collections-CB43gu1C.js → Collections-kplzfC-n.js} +4 -4
- package/dist/{Credit-Bp0tXt3W.js → Credit-DrZdTG27.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-z5G1F4rO.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DTxdtvAX.js} +24 -24
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Bi3mzBfa.js → EffectSheet.vue_vue_type_style_index_0_lang-DE7rq_ro.js} +6 -6
- package/dist/{Experience-aylihZhv.js → Experience-BQz_RASv.js} +8 -8
- package/dist/{Game-E1hBMx9B.js → Game-C5RUfcwo.js} +8 -8
- package/dist/{Marketing-C75GsPO0.js → Marketing-Ca00_q-k.js} +578 -587
- package/dist/{Member-DIM0L2ir.js → Member-B-9P7bbG.js} +4 -4
- package/dist/{MemberList-BQ9l2rT-.js → MemberList-DoAOs_FC.js} +14 -14
- package/dist/{MemberTransactions-BIeKePR1.js → MemberTransactions-D-qjANZL.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CthdVonu.js → MessageInput.vue_vue_type_script_setup_true_lang-DgWXNnd_.js} +2 -2
- package/dist/{Mission-DLjAZCB4.js → Mission-DrKEtkuB.js} +8 -8
- package/dist/{Point-DHV_rUEE.js → Point-vO06ComP.js} +8 -8
- package/dist/{Promotion-BVmx40iz.js → Promotion-DiJLB7iq.js} +9 -9
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DIrOBrhU.js → RuleGroup.vue_vue_type_script_setup_true_lang-BO8_N-Hl.js} +14 -14
- package/dist/{Segment-DWroRkTd.js → Segment-x3OLFugO.js} +13 -13
- package/dist/{Setting-M40REBId.js → Setting-C27PXvat.js} +8 -8
- package/dist/{Store-BGOMWZbC.js → Store-Dn2A_coC.js} +13 -13
- package/dist/{StoreRewards-ChquI2r8.js → StoreRewards-CZMCXl-k.js} +12 -12
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CaRCrBJq.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DMsmMCOw.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DX5xyafo.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-j8UbHQpT.js} +1 -1
- package/dist/{Tier-CXO0TUgB.js → Tier-BnbE3qLA.js} +15 -15
- package/dist/{Title-CMcEfHJa.js → Title-BAGSqm5D.js} +15 -15
- package/dist/{Transaction-DkrsndMM.js → Transaction-DWvA09mr.js} +2 -2
- package/dist/{Voucher-CqNxcmJo.js → Voucher-CLgdPRSd.js} +11 -11
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-2Z2TG2vR.js → ZodTextField.vue_vue_type_script_setup_true_lang-DweS66z_.js} +1 -1
- package/dist/{app-ogyiuzNx.js → app-CEoOXnMP.js} +24 -24
- package/dist/{app-BzXchd46.js → app-DbEoLwS2.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-B6IYUBfz.js → business-DIsK1ZSi.js} +1 -1
- package/dist/{campaign-DJhUnUbx.js → campaign-DilFl2u4.js} +2 -2
- package/dist/{collection.fn-bmKn9D9l.js → collection.fn-DOGveN-U.js} +2 -2
- package/dist/{dto-DaUD9ea4.js → dto-D146MexX.js} +9 -9
- package/dist/{effect-BvPRfurd.js → effect-BAoY-7Mo.js} +1 -1
- package/dist/{email-addresses-jLZnlSfX.js → email-addresses-D4ptdJi7.js} +1 -1
- package/dist/{export-CsvSurEw.js → export-ZdS0ijA0.js} +3 -3
- package/dist/{helper-C_efRMNS.js → helper-CYBvYPRB.js} +1 -1
- package/dist/{index-DT6Xb5Xc.js → index-BJNzAvF6.js} +1 -1
- package/dist/{index-9A8cUiXS.js → index-CBd5MdRb.js} +1 -1
- package/dist/{index-qNnyh15c.js → index-CyvTJWa0.js} +1 -1
- package/dist/{index-CjUyqTlF.js → index-D5OipTW2.js} +3 -3
- package/dist/{index-CsBwKvG4.js → index-DXwoelMh.js} +3 -3
- package/dist/{index-gZr8cOWc.js → index-Dw-QQGVh.js} +1 -1
- package/dist/{index-BmDAVnzz.js → index-Dwsdu9aR.js} +5 -5
- package/dist/{index-BEE6Fe4T.js → index-RKVC43XB.js} +1 -1
- package/dist/{index-CPiO27Uo.js → index-VOFTSIqj.js} +2 -2
- package/dist/{index-Bu-lsaBh.js → index-fSC0-_uQ.js} +5 -5
- package/dist/{index-xaFFKjJi.js → index-r3--ddX3.js} +1 -1
- package/dist/{index-DoePEBOk.js → index-sJUCCkLn.js} +2 -2
- package/dist/{index.esm2017-Bv33d2Yv.js → index.esm2017-ClQvLeXO.js} +1 -1
- package/dist/{loading-BiEkXHTA.js → loading-DyvR-Q2q.js} +4 -4
- package/dist/{membership-giTCy-g8.js → membership-DjHOR91O.js} +3 -3
- package/dist/{money-CobGBrLU.js → money-C9nfcrN2.js} +1 -1
- package/dist/{number-BBRHZBYI.js → number-BH4v9H5s.js} +1 -1
- package/dist/{rule-CqOf5s0o.js → rule-DdzmxL5G.js} +3 -3
- package/dist/{rule-builder-BVtZOrOZ.js → rule-builder-C3LgxTPd.js} +1 -1
- package/dist/{template-C4KzHdbK.js → template-CTOkKogt.js} +4 -4
- package/dist/{usePagination-CxXG5hyx.js → usePagination-BLsmsO5l.js} +1 -1
- package/dist/{vue-i18n-DA4uJ1Yi.js → vue-i18n-Dw456kF3.js} +2 -2
- package/package.json +1 -1
|
@@ -1,139 +1,132 @@
|
|
|
1
|
-
import { defineComponent as bt, mergeModels as Lt, useModel as Dt,
|
|
2
|
-
import { _ as
|
|
3
|
-
import { useSnackbar as Nt, useDialog as
|
|
4
|
-
import { u as ie, p as
|
|
5
|
-
import { defineStore as
|
|
6
|
-
import { F as $t } from "./index-
|
|
1
|
+
import { ref as gt, reactive as he, defineComponent as bt, mergeModels as Lt, useModel as Dt, onMounted as Gt, resolveComponent as ft, openBlock as Q, createBlock as vt, withCtx as pt, createElementVNode as Y, createVNode as ot, unref as X, createElementBlock as ut, Fragment as xt, renderList as Ot, normalizeClass as kt, toDisplayString as Tt, Transition as ce, withDirectives as wt, renderSlot as ee, vShow as Pt, isRef as At, computed as Ct, watch as jt, resolveDirective as ue, createTextVNode as Kt, vModelText as te, createCommentVNode as Et, nextTick as fe, normalizeStyle as Ft, createStaticVNode as de, h as ge } from "vue";
|
|
2
|
+
import { _ as me } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useSnackbar as Nt, useDialog as pe, components as ve } from "@feedmepos/ui-library";
|
|
4
|
+
import { u as ie, p as ye } from "./loading-DyvR-Q2q.js";
|
|
5
|
+
import { defineStore as _e } from "pinia";
|
|
6
|
+
import { F as $t } from "./index-RKVC43XB.js";
|
|
7
7
|
import { useCoreStore as Jt } from "@feedmepos/mf-common";
|
|
8
|
-
import { g as Wt, S as ne, b as
|
|
9
|
-
import { _ as
|
|
8
|
+
import { g as Wt, S as ne, b as Ce, r as qt } from "./index-D5OipTW2.js";
|
|
9
|
+
import { _ as xe } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
|
|
10
10
|
import { Y as Yt } from "./remy-vue-client-Cpppk9h-.js";
|
|
11
11
|
import { s as re, c as zt } from "./index-CsaQJMAR.js";
|
|
12
|
-
import { u as se } from "./campaign-
|
|
13
|
-
import { _ as
|
|
14
|
-
import { h as
|
|
15
|
-
import { u as
|
|
16
|
-
var
|
|
12
|
+
import { u as se } from "./campaign-DilFl2u4.js";
|
|
13
|
+
import { _ as be } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
import { h as Se } from "./moment-BWErdI6_.js";
|
|
15
|
+
import { u as we } from "./vue-i18n-Dw456kF3.js";
|
|
16
|
+
var Te = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
|
|
17
17
|
const Vt = () => {
|
|
18
|
-
const
|
|
19
|
-
if (!
|
|
20
|
-
return
|
|
21
|
-
url:
|
|
18
|
+
const P = ne.getBusinessId();
|
|
19
|
+
if (!P) throw new Error("Invalid business ID");
|
|
20
|
+
return Ce(`businesses/${P}/marketing-materials/`, {
|
|
21
|
+
url: Te.backendUrl,
|
|
22
22
|
noIdRequired: !0
|
|
23
23
|
});
|
|
24
24
|
}, Ut = {
|
|
25
25
|
async read() {
|
|
26
26
|
return Wt(await Vt().get(""));
|
|
27
27
|
},
|
|
28
|
-
async createMarketing(
|
|
29
|
-
return Wt(await Vt().post("",
|
|
28
|
+
async createMarketing(P) {
|
|
29
|
+
return Wt(await Vt().post("", P));
|
|
30
30
|
},
|
|
31
31
|
// add id
|
|
32
|
-
async updateMarketing(
|
|
32
|
+
async updateMarketing(P, f) {
|
|
33
33
|
return Wt(
|
|
34
|
-
await Vt().put(
|
|
34
|
+
await Vt().put(P, f)
|
|
35
35
|
);
|
|
36
36
|
},
|
|
37
|
-
async deleteMarketing(
|
|
38
|
-
return Wt(await Vt().delete(
|
|
37
|
+
async deleteMarketing(P) {
|
|
38
|
+
return Wt(await Vt().delete(P));
|
|
39
39
|
}
|
|
40
|
-
}, Bt =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
40
|
+
}, Bt = _e("mf-connect-marketing", () => {
|
|
41
|
+
var tt, lt;
|
|
42
|
+
const P = gt([]), f = he({
|
|
43
|
+
_id: void 0,
|
|
44
|
+
business: ((lt = (tt = Jt().currentBusiness) == null ? void 0 : tt.value) == null ? void 0 : lt._id) ?? "",
|
|
45
|
+
name: "",
|
|
46
|
+
campaign: null,
|
|
47
|
+
keywords: "",
|
|
48
|
+
image: "",
|
|
49
|
+
headline: {
|
|
50
|
+
content: "",
|
|
51
|
+
key: void 0
|
|
52
|
+
},
|
|
53
|
+
assets: [
|
|
54
|
+
{
|
|
55
|
+
platform: $t.enum.FACEBOOK,
|
|
56
|
+
contents: [
|
|
57
57
|
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
height: 1080
|
|
65
|
-
},
|
|
66
|
-
images: []
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
type: "STORY",
|
|
70
|
-
size: {
|
|
71
|
-
width: 1080,
|
|
72
|
-
height: 1920
|
|
73
|
-
},
|
|
74
|
-
images: []
|
|
75
|
-
}
|
|
76
|
-
]
|
|
58
|
+
type: "POST",
|
|
59
|
+
size: {
|
|
60
|
+
width: 1920,
|
|
61
|
+
height: 1080
|
|
62
|
+
},
|
|
63
|
+
images: []
|
|
77
64
|
},
|
|
78
65
|
{
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
type: "REEL",
|
|
99
|
-
size: {
|
|
100
|
-
width: 1080,
|
|
101
|
-
height: 1920
|
|
102
|
-
},
|
|
103
|
-
images: []
|
|
104
|
-
}
|
|
105
|
-
]
|
|
66
|
+
type: "STORY",
|
|
67
|
+
size: {
|
|
68
|
+
width: 1080,
|
|
69
|
+
height: 1920
|
|
70
|
+
},
|
|
71
|
+
images: []
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
platform: $t.enum.INSTAGRAM,
|
|
77
|
+
contents: [
|
|
78
|
+
{
|
|
79
|
+
type: "POST",
|
|
80
|
+
size: {
|
|
81
|
+
width: 1080,
|
|
82
|
+
height: 1080
|
|
83
|
+
},
|
|
84
|
+
images: []
|
|
106
85
|
},
|
|
107
86
|
{
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
87
|
+
type: "STORY",
|
|
88
|
+
size: {
|
|
89
|
+
width: 1080,
|
|
90
|
+
height: 1920
|
|
91
|
+
},
|
|
92
|
+
images: []
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: "REEL",
|
|
96
|
+
size: {
|
|
97
|
+
width: 1080,
|
|
98
|
+
height: 1920
|
|
99
|
+
},
|
|
100
|
+
images: []
|
|
119
101
|
}
|
|
120
|
-
]
|
|
121
|
-
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
platform: $t.enum.BRAND_APP,
|
|
106
|
+
contents: [
|
|
107
|
+
{
|
|
108
|
+
type: "IMAGE",
|
|
109
|
+
size: {
|
|
110
|
+
width: 1080,
|
|
111
|
+
height: 1920
|
|
112
|
+
},
|
|
113
|
+
images: []
|
|
114
|
+
}
|
|
115
|
+
]
|
|
122
116
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
getters: {
|
|
132
|
-
state(k) {
|
|
133
|
-
return k;
|
|
134
|
-
}
|
|
117
|
+
],
|
|
118
|
+
captions: [{ language: "en", content: "" }]
|
|
119
|
+
});
|
|
120
|
+
async function nt() {
|
|
121
|
+
const H = await Ut.read();
|
|
122
|
+
P.value = H;
|
|
135
123
|
}
|
|
136
|
-
|
|
124
|
+
return {
|
|
125
|
+
marketing: P,
|
|
126
|
+
defaultMarketing: f,
|
|
127
|
+
readMarketingMaterial: nt
|
|
128
|
+
};
|
|
129
|
+
}), Zt = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.6%207.6C8.17076%206.94229%208.5%205.5%208.5%205.5C8.5%205.5%208.81356%206.87361%209.35714%207.5C9.92948%208.15953%2011.5%208.5%2011.5%208.5C11.5%208.5%209.92948%208.69761%209.35714%209.35714C8.81356%209.98354%208.5%2011.5%208.5%2011.5C8.5%2011.5%208.32076%2010.1888%207.75%209.59091C7.14905%208.96136%205.5%208.5%205.5%208.5C5.5%208.5%206.99905%208.29251%207.6%207.6Z'%20fill='%231C1C1E'/%3e%3cpath%20d='M12.2%2012.2C13.3415%2010.8846%2014%208%2014%208C14%208%2014.6271%2010.7472%2015.7143%2012C16.859%2013.3191%2020%2014%2020%2014C20%2014%2016.859%2014.3952%2015.7143%2015.7143C14.6271%2016.9671%2014%2020%2014%2020C14%2020%2013.6415%2017.3777%2012.5%2016.1818C11.2981%2014.9227%208%2014%208%2014C8%2014%2010.9981%2013.585%2012.2%2012.2Z'%20fill='%231C1C1E'/%3e%3cpath%20d='M7.6%207.6C8.17076%206.94229%208.5%205.5%208.5%205.5C8.5%205.5%208.81356%206.87361%209.35714%207.5C9.92948%208.15953%2011.5%208.5%2011.5%208.5C11.5%208.5%209.92948%208.69761%209.35714%209.35714C8.81356%209.98354%208.5%2011.5%208.5%2011.5C8.5%2011.5%208.32076%2010.1888%207.75%209.59091C7.14905%208.96136%205.5%208.5%205.5%208.5C5.5%208.5%206.99905%208.29251%207.6%207.6Z'%20stroke='%231C1C1E'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.2%2012.2C13.3415%2010.8846%2014%208%2014%208C14%208%2014.6271%2010.7472%2015.7143%2012C16.859%2013.3191%2020%2014%2020%2014C20%2014%2016.859%2014.3952%2015.7143%2015.7143C14.6271%2016.9671%2014%2020%2014%2020C14%2020%2013.6415%2017.3777%2012.5%2016.1818C11.2981%2014.9227%208%2014%208%2014C8%2014%2010.9981%2013.585%2012.2%2012.2Z'%20stroke='%231C1C1E'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e", Oe = { class: "flex gap-2" }, ke = { class: "grid grid-cols-2 gap-x-[16px] gap-y-[24px]" }, Pe = ["src"], Ee = { class: "p-[8px] absolute bottom-0 w-full bg-white fm-typo-en-body-lg-600" }, Me = /* @__PURE__ */ bt({
|
|
137
130
|
__name: "ImageSideSheet",
|
|
138
131
|
props: /* @__PURE__ */ Lt({
|
|
139
132
|
imageRef: { type: [File, String] },
|
|
@@ -143,8 +136,8 @@ const Vt = () => {
|
|
|
143
136
|
modelModifiers: {}
|
|
144
137
|
}),
|
|
145
138
|
emits: /* @__PURE__ */ Lt(["isOpen"], ["update:modelValue"]),
|
|
146
|
-
setup(
|
|
147
|
-
const nt = Dt(
|
|
139
|
+
setup(P, { emit: f }) {
|
|
140
|
+
const nt = Dt(P, "modelValue"), tt = P, lt = f, H = Nt(), J = gt(), c = gt([]);
|
|
148
141
|
Gt(async () => {
|
|
149
142
|
const o = await Yt.getMarketingMaterialThemes();
|
|
150
143
|
o && (c.value = o);
|
|
@@ -154,7 +147,7 @@ const Vt = () => {
|
|
|
154
147
|
H.open({ message: "Please select a theme.", type: "info" });
|
|
155
148
|
return;
|
|
156
149
|
}
|
|
157
|
-
if (!
|
|
150
|
+
if (!tt.imageRef) {
|
|
158
151
|
H.open({ message: "Please upload an image.", type: "info" });
|
|
159
152
|
return;
|
|
160
153
|
}
|
|
@@ -166,13 +159,13 @@ const Vt = () => {
|
|
|
166
159
|
return (o, e) => {
|
|
167
160
|
const i = ft("FmButton"), t = ft("FmCard"), r = ft("FmSideSheet");
|
|
168
161
|
return Q(), vt(r, {
|
|
169
|
-
"model-value":
|
|
162
|
+
"model-value": P.isOpen,
|
|
170
163
|
header: "Generate image",
|
|
171
164
|
"max-width": 560,
|
|
172
165
|
"onUpdate:modelValue": e[1] || (e[1] = (a) => lt("isOpen", a))
|
|
173
166
|
}, {
|
|
174
167
|
"side-sheet-footer": pt(() => [
|
|
175
|
-
Y("div",
|
|
168
|
+
Y("div", Oe, [
|
|
176
169
|
ot(i, {
|
|
177
170
|
label: "Generate",
|
|
178
171
|
disabled: X(J) === void 0,
|
|
@@ -187,7 +180,7 @@ const Vt = () => {
|
|
|
187
180
|
]),
|
|
188
181
|
default: pt(() => [
|
|
189
182
|
e[2] || (e[2] = Y("p", { class: "fm-typo-en-title-sm-800" }, "Select theme", -1)),
|
|
190
|
-
Y("div",
|
|
183
|
+
Y("div", ke, [
|
|
191
184
|
(Q(!0), ut(xt, null, Ot(X(c), (a, n) => (Q(), vt(t, {
|
|
192
185
|
variant: "outlined",
|
|
193
186
|
key: `theme_${n}`,
|
|
@@ -202,8 +195,8 @@ const Vt = () => {
|
|
|
202
195
|
src: a.image,
|
|
203
196
|
style: { aspectRatio: 3 / 2, objectFit: "fill" },
|
|
204
197
|
class: "w-full h-full"
|
|
205
|
-
}, null, 8,
|
|
206
|
-
Y("p",
|
|
198
|
+
}, null, 8, Pe),
|
|
199
|
+
Y("p", Ee, Tt(X(re)(a.key)), 1)
|
|
207
200
|
]),
|
|
208
201
|
_: 2
|
|
209
202
|
}, 1032, ["class", "onClick"]))), 128))
|
|
@@ -213,7 +206,7 @@ const Vt = () => {
|
|
|
213
206
|
}, 8, ["model-value"]);
|
|
214
207
|
};
|
|
215
208
|
}
|
|
216
|
-
}),
|
|
209
|
+
}), Ae = /* @__PURE__ */ bt({
|
|
217
210
|
__name: "SlideUpDown",
|
|
218
211
|
props: {
|
|
219
212
|
modelValue: {
|
|
@@ -223,9 +216,9 @@ const Vt = () => {
|
|
|
223
216
|
modelModifiers: {}
|
|
224
217
|
},
|
|
225
218
|
emits: ["update:modelValue"],
|
|
226
|
-
setup(
|
|
227
|
-
const f = Dt(
|
|
228
|
-
return (nt,
|
|
219
|
+
setup(P) {
|
|
220
|
+
const f = Dt(P, "modelValue");
|
|
221
|
+
return (nt, tt) => (Q(), vt(ce, { name: "slide-fade" }, {
|
|
229
222
|
default: pt(() => [
|
|
230
223
|
wt(Y("div", null, [
|
|
231
224
|
ee(nt.$slots, "default")
|
|
@@ -236,7 +229,7 @@ const Vt = () => {
|
|
|
236
229
|
_: 3
|
|
237
230
|
}));
|
|
238
231
|
}
|
|
239
|
-
}),
|
|
232
|
+
}), Fe = { class: "flex flex-row justify-center items-center p-[16px]" }, De = { class: "fm-typo-en-body-lg-600" }, Le = { class: "pl-[32px]" }, Ie = /* @__PURE__ */ bt({
|
|
240
233
|
__name: "RewardDropDown",
|
|
241
234
|
props: {
|
|
242
235
|
type: { type: String, required: !0 },
|
|
@@ -245,13 +238,13 @@ const Vt = () => {
|
|
|
245
238
|
required: !0
|
|
246
239
|
}
|
|
247
240
|
},
|
|
248
|
-
setup(
|
|
249
|
-
const f = gt(!0), nt =
|
|
250
|
-
return (
|
|
241
|
+
setup(P) {
|
|
242
|
+
const f = gt(!0), nt = P;
|
|
243
|
+
return (tt, lt) => {
|
|
251
244
|
const H = ft("FmButton"), J = ft("FmRadio");
|
|
252
245
|
return Q(), ut(xt, null, [
|
|
253
|
-
Y("div",
|
|
254
|
-
Y("p",
|
|
246
|
+
Y("div", Fe, [
|
|
247
|
+
Y("p", De, Tt(nt.type), 1),
|
|
255
248
|
lt[2] || (lt[2] = Y("div", { class: "grow" }, null, -1)),
|
|
256
249
|
ot(H, {
|
|
257
250
|
icon: X(f) ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
@@ -259,13 +252,13 @@ const Vt = () => {
|
|
|
259
252
|
onClick: lt[0] || (lt[0] = (c) => f.value = !X(f))
|
|
260
253
|
}, null, 8, ["icon"])
|
|
261
254
|
]),
|
|
262
|
-
Y("div",
|
|
263
|
-
ot(
|
|
255
|
+
Y("div", Le, [
|
|
256
|
+
ot(Ae, {
|
|
264
257
|
modelValue: X(f),
|
|
265
258
|
"onUpdate:modelValue": lt[1] || (lt[1] = (c) => At(f) ? f.value = c : null)
|
|
266
259
|
}, {
|
|
267
260
|
default: pt(() => [
|
|
268
|
-
(Q(!0), ut(xt, null, Ot(
|
|
261
|
+
(Q(!0), ut(xt, null, Ot(P.items, (c, s) => (Q(), vt(J, {
|
|
269
262
|
key: `item_${s}`,
|
|
270
263
|
value: c._id,
|
|
271
264
|
label: c.name
|
|
@@ -277,7 +270,7 @@ const Vt = () => {
|
|
|
277
270
|
], 64);
|
|
278
271
|
};
|
|
279
272
|
}
|
|
280
|
-
}),
|
|
273
|
+
}), je = { class: "flex" }, Re = { class: "py-[16px] px-[24px]" }, Be = { class: "flex flex-col gap-[40px] px-[24px] py-[16px]" }, Xe = /* @__PURE__ */ bt({
|
|
281
274
|
__name: "LinkRewardSideSheet",
|
|
282
275
|
props: /* @__PURE__ */ Lt({
|
|
283
276
|
campaigns: {
|
|
@@ -289,14 +282,14 @@ const Vt = () => {
|
|
|
289
282
|
modelModifiers: {}
|
|
290
283
|
}),
|
|
291
284
|
emits: ["update:modelValue"],
|
|
292
|
-
setup(
|
|
293
|
-
const f =
|
|
285
|
+
setup(P) {
|
|
286
|
+
const f = P, nt = Ct(
|
|
294
287
|
() => f.campaigns.filter(
|
|
295
288
|
(e) => e.name.toLowerCase().indexOf(c.value) !== -1
|
|
296
289
|
)
|
|
297
|
-
),
|
|
290
|
+
), tt = Ct(
|
|
298
291
|
() => f.campaigns.reduce((e, i) => (e.hasOwnProperty(i.type) || (e[i.type] = i.type), e), {})
|
|
299
|
-
), lt = Dt(
|
|
292
|
+
), lt = Dt(P, "modelValue"), H = gt(lt.value), J = gt(!1), c = gt(""), s = Nt();
|
|
300
293
|
function l() {
|
|
301
294
|
if (H.value === "") {
|
|
302
295
|
s.open({
|
|
@@ -337,7 +330,7 @@ const Vt = () => {
|
|
|
337
330
|
})
|
|
338
331
|
]),
|
|
339
332
|
"side-sheet-footer": pt(() => [
|
|
340
|
-
Y("div",
|
|
333
|
+
Y("div", je, [
|
|
341
334
|
ot(a, {
|
|
342
335
|
label: "Add",
|
|
343
336
|
disabled: lt.value === void 0,
|
|
@@ -351,7 +344,7 @@ const Vt = () => {
|
|
|
351
344
|
])
|
|
352
345
|
]),
|
|
353
346
|
default: pt(() => [
|
|
354
|
-
Y("div",
|
|
347
|
+
Y("div", Re, [
|
|
355
348
|
ot(n, {
|
|
356
349
|
modelValue: X(c),
|
|
357
350
|
"onUpdate:modelValue": i[1] || (i[1] = (d) => At(c) ? c.value = d : null),
|
|
@@ -363,14 +356,14 @@ const Vt = () => {
|
|
|
363
356
|
"onUpdate:modelValue": i[2] || (i[2] = (d) => At(H) ? H.value = d : null)
|
|
364
357
|
}, {
|
|
365
358
|
default: pt(() => [
|
|
366
|
-
Y("div",
|
|
367
|
-
(Q(!0), ut(xt, null, Ot(X(
|
|
359
|
+
Y("div", Be, [
|
|
360
|
+
(Q(!0), ut(xt, null, Ot(X(tt), (d, g) => (Q(), vt(r, {
|
|
368
361
|
variant: "outlined",
|
|
369
362
|
key: `theme_${g}`,
|
|
370
363
|
class: "flex flex-col"
|
|
371
364
|
}, {
|
|
372
365
|
default: pt(() => [
|
|
373
|
-
ot(
|
|
366
|
+
ot(Ie, {
|
|
374
367
|
type: d,
|
|
375
368
|
items: X(nt).filter((m) => m.type === d)
|
|
376
369
|
}, null, 8, ["type", "items"])
|
|
@@ -386,7 +379,7 @@ const Vt = () => {
|
|
|
386
379
|
}, 8, ["modelValue"]);
|
|
387
380
|
};
|
|
388
381
|
}
|
|
389
|
-
}),
|
|
382
|
+
}), ze = { class: "flex gap-2" }, Ye = { class: "grid grid-cols-2 gap-x-[16px] gap-y-[24px] pt-8" }, We = ["src"], Ve = { class: "p-[8px] absolute bottom-0 w-full bg-white fm-typo-en-body-lg-600" }, He = /* @__PURE__ */ bt({
|
|
390
383
|
__name: "HeadlineStyleSideSheet",
|
|
391
384
|
props: /* @__PURE__ */ Lt({
|
|
392
385
|
isOpen: { type: Boolean, required: !0, default: !1 },
|
|
@@ -400,28 +393,28 @@ const Vt = () => {
|
|
|
400
393
|
modelModifiers: {}
|
|
401
394
|
}),
|
|
402
395
|
emits: /* @__PURE__ */ Lt(["isOpen"], ["update:modelValue"]),
|
|
403
|
-
setup(
|
|
404
|
-
const nt = Dt(
|
|
396
|
+
setup(P, { emit: f }) {
|
|
397
|
+
const nt = Dt(P, "modelValue"), tt = f, lt = Nt(), H = gt();
|
|
405
398
|
function J() {
|
|
406
399
|
if (H.value === void 0) {
|
|
407
400
|
lt.open({ message: "Please select a style.", type: "info" });
|
|
408
401
|
return;
|
|
409
402
|
}
|
|
410
|
-
nt.value = H.value,
|
|
403
|
+
nt.value = H.value, tt("isOpen", !1);
|
|
411
404
|
}
|
|
412
405
|
function c() {
|
|
413
|
-
|
|
406
|
+
tt("isOpen", !1);
|
|
414
407
|
}
|
|
415
408
|
return (s, l) => {
|
|
416
409
|
const o = ft("FmButton"), e = ft("FmCard"), i = ft("FmSideSheet");
|
|
417
410
|
return Q(), vt(i, {
|
|
418
|
-
"model-value":
|
|
411
|
+
"model-value": P.isOpen,
|
|
419
412
|
header: "Generate headline",
|
|
420
413
|
"max-width": 560,
|
|
421
|
-
"onUpdate:modelValue": l[1] || (l[1] = (t) =>
|
|
414
|
+
"onUpdate:modelValue": l[1] || (l[1] = (t) => tt("isOpen", t))
|
|
422
415
|
}, {
|
|
423
416
|
"side-sheet-footer": pt(() => [
|
|
424
|
-
Y("div",
|
|
417
|
+
Y("div", ze, [
|
|
425
418
|
ot(o, {
|
|
426
419
|
label: "Generate",
|
|
427
420
|
disabled: X(H) === void 0,
|
|
@@ -436,8 +429,8 @@ const Vt = () => {
|
|
|
436
429
|
]),
|
|
437
430
|
default: pt(() => [
|
|
438
431
|
l[2] || (l[2] = Y("p", { class: "fm-typo-en-title-sm-800" }, "Select font style", -1)),
|
|
439
|
-
Y("div",
|
|
440
|
-
(Q(!0), ut(xt, null, Ot(
|
|
432
|
+
Y("div", Ye, [
|
|
433
|
+
(Q(!0), ut(xt, null, Ot(P.styles, (t, r) => (Q(), vt(e, {
|
|
441
434
|
variant: "outlined",
|
|
442
435
|
key: `style_${r}`,
|
|
443
436
|
class: kt([
|
|
@@ -451,8 +444,8 @@ const Vt = () => {
|
|
|
451
444
|
src: t.image,
|
|
452
445
|
style: { aspectRatio: 3 / 2, objectFit: "fill" },
|
|
453
446
|
class: "w-full h-full"
|
|
454
|
-
}, null, 8,
|
|
455
|
-
Y("p",
|
|
447
|
+
}, null, 8, We),
|
|
448
|
+
Y("p", Ve, Tt(X(re)(t.key)), 1)
|
|
456
449
|
]),
|
|
457
450
|
_: 2
|
|
458
451
|
}, 1032, ["class", "onClick"]))), 128))
|
|
@@ -462,17 +455,17 @@ const Vt = () => {
|
|
|
462
455
|
}, 8, ["model-value"]);
|
|
463
456
|
};
|
|
464
457
|
}
|
|
465
|
-
}),
|
|
458
|
+
}), Ue = { class: "flex flex-col gap-[8px]" }, Ge = { class: "fm-typo-en-body-lg-400" }, Ne = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $e = { class: "flex w-[250px] h-[250px]" }, qe = { class: "flex flex-col gap-[8px]" }, Ke = {
|
|
466
459
|
key: 1,
|
|
467
460
|
src: Zt,
|
|
468
461
|
class: "w-[24px] h-[24px]"
|
|
469
|
-
},
|
|
462
|
+
}, Ze = { class: "flex flex-col gap-[8px]" }, Je = {
|
|
470
463
|
key: 1,
|
|
471
464
|
class: "flex flex-row gap-4"
|
|
472
|
-
},
|
|
465
|
+
}, Qe = { class: "flex flex-col gap-[8px]" }, ti = { class: "flex flex-row gap-4 justify-between" }, ei = {
|
|
473
466
|
key: 2,
|
|
474
467
|
class: "flex flex-row gap-4"
|
|
475
|
-
},
|
|
468
|
+
}, ii = ".png, .jpg, .jpeg", ni = /* @__PURE__ */ bt({
|
|
476
469
|
__name: "LeftSheet",
|
|
477
470
|
props: /* @__PURE__ */ Lt({
|
|
478
471
|
headlineStyles: {
|
|
@@ -497,12 +490,12 @@ const Vt = () => {
|
|
|
497
490
|
isLoadingImageModifiers: {}
|
|
498
491
|
}),
|
|
499
492
|
emits: ["update:marketingMaterial", "update:captionIndex", "update:isLoadingImage"],
|
|
500
|
-
setup(
|
|
501
|
-
const f = Dt(
|
|
493
|
+
setup(P) {
|
|
494
|
+
const f = Dt(P, "marketingMaterial"), nt = Dt(P, "captionIndex"), tt = Dt(P, "isLoadingImage"), lt = Ct(
|
|
502
495
|
() => f.value.captions.map((p) => p.language)
|
|
503
496
|
), H = gt(""), J = gt(f.value.image), c = gt(!1), s = gt(!1), l = se(), { global: o } = ie;
|
|
504
497
|
Gt(async () => {
|
|
505
|
-
|
|
498
|
+
tt.value = !1, await o(async () => {
|
|
506
499
|
await l.read();
|
|
507
500
|
});
|
|
508
501
|
});
|
|
@@ -510,7 +503,7 @@ const Vt = () => {
|
|
|
510
503
|
(p) => f.value.campaign !== null && p._id === f.value.campaign
|
|
511
504
|
));
|
|
512
505
|
function i() {
|
|
513
|
-
|
|
506
|
+
tt.value || (c.value = !0);
|
|
514
507
|
}
|
|
515
508
|
async function t(p) {
|
|
516
509
|
if (p === null) {
|
|
@@ -567,7 +560,7 @@ const Vt = () => {
|
|
|
567
560
|
if (typeof J.value == "string" ? p = await fetch(J.value).then((w) => w.blob()).then((w) => new File([w], "image", { type: w.type })) : p = J.value, !p)
|
|
568
561
|
return;
|
|
569
562
|
try {
|
|
570
|
-
|
|
563
|
+
tt.value = !0;
|
|
571
564
|
const v = await Yt.getMarketingMaterialAssets({
|
|
572
565
|
image: p,
|
|
573
566
|
themes: [H.value],
|
|
@@ -575,13 +568,13 @@ const Vt = () => {
|
|
|
575
568
|
});
|
|
576
569
|
f.value.assets = v.assets, f.value.image = v.raw;
|
|
577
570
|
} finally {
|
|
578
|
-
|
|
571
|
+
tt.value = !1;
|
|
579
572
|
}
|
|
580
573
|
}
|
|
581
574
|
},
|
|
582
575
|
{ immediate: !0 }
|
|
583
576
|
), (p, v) => {
|
|
584
|
-
const w = ft("FmTextField"), E = ft("FmButton"), L = ft("FmCard"), U = ft("FmCircularProgress"), q = ft("FmIcon"), Z =
|
|
577
|
+
const w = ft("FmTextField"), E = ft("FmButton"), L = ft("FmCard"), U = ft("FmCircularProgress"), q = ft("FmIcon"), Z = ue("ripple");
|
|
585
578
|
return Q(), vt(L, { class: "w-1/2 p-[24px] flex flex-col gap-[40px]" }, {
|
|
586
579
|
default: pt(() => [
|
|
587
580
|
ot(w, {
|
|
@@ -590,7 +583,7 @@ const Vt = () => {
|
|
|
590
583
|
label: "Material name",
|
|
591
584
|
placeholder: "Enter marketing name"
|
|
592
585
|
}, null, 8, ["modelValue"]),
|
|
593
|
-
Y("div",
|
|
586
|
+
Y("div", Ue, [
|
|
594
587
|
v[13] || (v[13] = Y("p", { class: "fm-typo-en-title-sm-800" }, [
|
|
595
588
|
Kt(" Link campaign "),
|
|
596
589
|
Y("span", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "(optional)")
|
|
@@ -604,14 +597,14 @@ const Vt = () => {
|
|
|
604
597
|
var W, N;
|
|
605
598
|
return [
|
|
606
599
|
Y("div", null, [
|
|
607
|
-
Y("p",
|
|
608
|
-
Y("p",
|
|
600
|
+
Y("p", Ge, Tt(X(zt)(((W = X(e)) == null ? void 0 : W.type) ?? "")), 1),
|
|
601
|
+
Y("p", Ne, Tt((N = X(e)) == null ? void 0 : N.name), 1)
|
|
609
602
|
]),
|
|
610
603
|
v[12] || (v[12] = Y("div", { class: "grow" }, null, -1)),
|
|
611
604
|
ot(E, {
|
|
612
605
|
icon: "link_off",
|
|
613
606
|
variant: "tertiary",
|
|
614
|
-
onClick: v[1] || (v[1] = (
|
|
607
|
+
onClick: v[1] || (v[1] = (et) => f.value.campaign = null)
|
|
615
608
|
})
|
|
616
609
|
];
|
|
617
610
|
}),
|
|
@@ -619,7 +612,7 @@ const Vt = () => {
|
|
|
619
612
|
}, 512), [
|
|
620
613
|
[Pt, f.value.campaign !== null]
|
|
621
614
|
]),
|
|
622
|
-
wt(ot(
|
|
615
|
+
wt(ot(Xe, {
|
|
623
616
|
modelValue: f.value.campaign,
|
|
624
617
|
"onUpdate:modelValue": v[2] || (v[2] = (W) => f.value.campaign = W),
|
|
625
618
|
campaigns: X(l).campaigns.all
|
|
@@ -627,36 +620,36 @@ const Vt = () => {
|
|
|
627
620
|
[Pt, f.value.campaign === null]
|
|
628
621
|
])
|
|
629
622
|
]),
|
|
630
|
-
Y("div",
|
|
631
|
-
ot(
|
|
623
|
+
Y("div", $e, [
|
|
624
|
+
ot(xe, {
|
|
632
625
|
label: "Upload your image",
|
|
633
|
-
accept:
|
|
626
|
+
accept: ii,
|
|
634
627
|
"aspect-ratio": "1/1",
|
|
635
628
|
"recommended-size": "250px X 250px max size 8mb",
|
|
636
629
|
thumbnail: f.value.image,
|
|
637
630
|
"onUpdate:file": t
|
|
638
631
|
}, null, 8, ["thumbnail"])
|
|
639
632
|
]),
|
|
640
|
-
Y("div",
|
|
633
|
+
Y("div", qe, [
|
|
641
634
|
v[15] || (v[15] = Y("p", { class: "fm-typo-en-title-sm-800" }, "Generated image", -1)),
|
|
642
635
|
v[16] || (v[16] = Y("p", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Generated image will identify based on your uploaded image and selected theme. ", -1)),
|
|
643
636
|
ot(L, {
|
|
644
637
|
variant: "outlined",
|
|
645
|
-
class: kt(["px-[12px] py-[8px] gap-[8px] flex justify-center items-center hover:bg-fm-color-opacity-sm h-[36px] min-w-[200px] w-fit cursor-pointer relative",
|
|
638
|
+
class: kt(["px-[12px] py-[8px] gap-[8px] flex justify-center items-center hover:bg-fm-color-opacity-sm h-[36px] min-w-[200px] w-fit cursor-pointer relative", tt.value ? "bg-white text-fm-color-typo-disabled" : ""]),
|
|
646
639
|
onClick: i
|
|
647
640
|
}, {
|
|
648
641
|
default: pt(() => [
|
|
649
|
-
|
|
642
|
+
tt.value ? (Q(), vt(U, {
|
|
650
643
|
key: 0,
|
|
651
644
|
size: "md"
|
|
652
|
-
})) : (Q(), ut("img",
|
|
645
|
+
})) : (Q(), ut("img", Ke)),
|
|
653
646
|
Y("p", {
|
|
654
|
-
class: kt(["fm-typo-cn-body-lg-600", `${
|
|
647
|
+
class: kt(["fm-typo-cn-body-lg-600", `${tt.value ? "text-fm-color-typo-disabled" : ""}`])
|
|
655
648
|
}, " Generated Image ", 2)
|
|
656
649
|
]),
|
|
657
650
|
_: 1
|
|
658
651
|
}, 8, ["class"]),
|
|
659
|
-
ot(
|
|
652
|
+
ot(Me, {
|
|
660
653
|
modelValue: X(H),
|
|
661
654
|
"onUpdate:modelValue": v[3] || (v[3] = (W) => At(H) ? H.value = W : null),
|
|
662
655
|
"image-ref": X(J),
|
|
@@ -664,7 +657,7 @@ const Vt = () => {
|
|
|
664
657
|
onIsOpen: v[4] || (v[4] = (W) => c.value = W)
|
|
665
658
|
}, null, 8, ["modelValue", "image-ref", "is-open"])
|
|
666
659
|
]),
|
|
667
|
-
Y("div",
|
|
660
|
+
Y("div", Ze, [
|
|
668
661
|
v[17] || (v[17] = Y("p", { class: "fm-typo-en-title-sm-800" }, "Generated headline", -1)),
|
|
669
662
|
v[18] || (v[18] = Y("p", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Generated headline will identify based on your marketing strategies and image. ", -1)),
|
|
670
663
|
v[19] || (v[19] = Y("div", { class: "fm-typo-en-body-lg-400 flex gap-4 text-fm-color-typo-primary" }, " Headline ", -1)),
|
|
@@ -685,7 +678,7 @@ const Vt = () => {
|
|
|
685
678
|
X(m) ? (Q(), vt(U, {
|
|
686
679
|
key: 0,
|
|
687
680
|
size: "md"
|
|
688
|
-
})) : (Q(), ut("div",
|
|
681
|
+
})) : (Q(), ut("div", Je, [
|
|
689
682
|
wt(ot(q, {
|
|
690
683
|
name: "image",
|
|
691
684
|
outline: "",
|
|
@@ -700,10 +693,10 @@ const Vt = () => {
|
|
|
700
693
|
onClick: n
|
|
701
694
|
})
|
|
702
695
|
])),
|
|
703
|
-
ot(
|
|
696
|
+
ot(He, {
|
|
704
697
|
modelValue: f.value.headline.key,
|
|
705
698
|
"onUpdate:modelValue": v[6] || (v[6] = (W) => f.value.headline.key = W),
|
|
706
|
-
styles:
|
|
699
|
+
styles: P.headlineStyles,
|
|
707
700
|
"is-open": X(s),
|
|
708
701
|
onIsOpen: v[7] || (v[7] = (W) => s.value = W)
|
|
709
702
|
}, null, 8, ["modelValue", "styles", "is-open"])
|
|
@@ -711,7 +704,7 @@ const Vt = () => {
|
|
|
711
704
|
_: 1
|
|
712
705
|
}, 8, ["class"])
|
|
713
706
|
]),
|
|
714
|
-
Y("div",
|
|
707
|
+
Y("div", Qe, [
|
|
715
708
|
v[20] || (v[20] = Y("p", { class: "fm-typo-en-title-sm-800" }, "Generated caption", -1)),
|
|
716
709
|
v[21] || (v[21] = Y("p", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Generated captions will identify based on your marketing strategies and image. ", -1)),
|
|
717
710
|
ot(w, {
|
|
@@ -736,7 +729,7 @@ const Vt = () => {
|
|
|
736
729
|
}, null, 544), [
|
|
737
730
|
[te, f.value.captions[nt.value].content]
|
|
738
731
|
]),
|
|
739
|
-
Y("div",
|
|
732
|
+
Y("div", ti, [
|
|
740
733
|
X(g) ? (Q(), vt(U, {
|
|
741
734
|
key: 0,
|
|
742
735
|
size: "md"
|
|
@@ -746,7 +739,7 @@ const Vt = () => {
|
|
|
746
739
|
class: "w-[24px] h-[24px] cursor-pointer hover:bg-fm-color-opacity-sm rounded-xl",
|
|
747
740
|
onClick: a
|
|
748
741
|
})),
|
|
749
|
-
X(lt).length > 1 ? (Q(), ut("div",
|
|
742
|
+
X(lt).length > 1 ? (Q(), ut("div", ei, [
|
|
750
743
|
(Q(!0), ut(xt, null, Ot(X(lt), (W, N) => (Q(), vt(L, {
|
|
751
744
|
variant: "outlined",
|
|
752
745
|
class: "px-12 cursor-pointer",
|
|
@@ -769,15 +762,15 @@ const Vt = () => {
|
|
|
769
762
|
});
|
|
770
763
|
};
|
|
771
764
|
}
|
|
772
|
-
}),
|
|
765
|
+
}), ri = "data:image/svg+xml,%3csvg%20width='21'%20height='14'%20viewBox='0%200%2021%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%2027'%3e%3ccircle%20id='Ellipse%209'%20cx='1.5'%20cy='7'%20r='1.5'%20fill='%23AEAEB2'/%3e%3cpath%20id='Vector'%20d='M14.5%200.5C10.9101%200.5%208%203.41006%208%207C8%2010.5899%2010.9101%2013.5%2014.5%2013.5C18.0899%2013.5%2021%2010.5899%2021%207C21%203.41006%2018.0899%200.5%2014.5%200.5ZM18.6935%206.14819V6.32982C18.6935%206.48367%2018.6065%206.62441%2018.4689%206.69308L18.0656%206.8949C18.0015%206.92696%2017.9301%206.94149%2017.8586%206.93703C17.7871%206.93256%2017.7181%206.90926%2017.6585%206.86948L17.1812%206.55129C17.1298%206.517%2017.0711%206.4949%2017.0098%206.48668C16.9485%206.47846%2016.8861%206.48433%2016.8274%206.50385L16.758%206.52692C16.5037%206.61157%2016.3999%206.91456%2016.5485%207.1376L16.8956%207.65812C16.9708%207.77109%2017.0976%207.83897%2017.2334%207.83897H17.4486C17.6729%207.83897%2017.8548%208.02087%2017.8548%208.24522V8.54244C17.8548%208.63024%2017.8263%208.71595%2017.7736%208.78619L17.2824%209.44091C17.2452%209.49071%2017.2198%209.54837%2017.2082%209.60944L17.0955%2010.2078C17.0793%2010.294%2017.0355%2010.3727%2016.9708%2010.4322C16.7224%2010.6596%2016.5024%2010.9162%2016.3155%2011.1964L15.974%2011.7088C15.9076%2011.8085%2015.8176%2011.8902%2015.7121%2011.9467C15.6065%2012.0032%2015.4886%2012.0328%2015.3689%2012.0328C15.0934%2012.0328%2014.8415%2011.8771%2014.7183%2011.6307C14.5747%2011.3435%2014.5%2011.0269%2014.5%2010.7058V9.92238C14.5%209.69802%2014.3181%209.51613%2014.0938%209.51613H13.4154C13.0357%209.51613%2012.6716%209.36516%2012.403%209.09677C12.1345%208.8282%2011.9837%208.46403%2011.9836%208.08429V7.71579C11.9836%207.26524%2012.1959%206.84091%2012.5563%206.57042L13.2792%206.02814C13.527%205.84227%2013.8285%205.74175%2014.1383%205.74167H14.1616C14.3839%205.74167%2014.6033%205.79331%2014.8019%205.8929L15.1877%206.08581C15.2842%206.13403%2015.3956%206.1419%2015.4978%206.10782L16.7378%205.6945C16.9037%205.63919%2017.0156%205.48403%2017.0156%205.30921C17.0156%205.08486%2016.8337%204.90296%2016.6094%204.90296H16.3449C16.2372%204.90296%2016.1339%204.86024%2016.0576%204.78397L15.8763%204.6026C15.8386%204.56487%2015.7938%204.53494%2015.7445%204.51452C15.6952%204.4941%2015.6424%204.4836%2015.589%204.48361H13.2288C13.0045%204.48361%2012.8226%204.30171%2012.8226%204.07736V3.96204C12.8226%203.77569%2012.9494%203.61319%2013.1303%203.56784L13.509%203.47323C13.607%203.44859%2013.6925%203.38857%2013.7486%203.30444L13.9603%202.98704C14.0356%202.87407%2014.1624%202.80619%2014.2982%202.80619H14.9327C15.1571%202.80619%2015.339%202.62429%2015.339%202.39994V1.83119C17.4153%202.16772%2019.083%203.72431%2019.5828%205.74194H19.0998C18.8754%205.74194%2018.6935%205.92383%2018.6935%206.14819Z'%20fill='%23AEAEB2'/%3e%3c/g%3e%3c/svg%3e";
|
|
773
766
|
var Ht = {};
|
|
774
767
|
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */
|
|
775
|
-
(function(
|
|
768
|
+
(function(P) {
|
|
776
769
|
var f = f || { version: "5.4.2" };
|
|
777
|
-
if (
|
|
770
|
+
if (P.fabric = f, typeof document < "u" && typeof window < "u")
|
|
778
771
|
document instanceof (typeof HTMLDocument < "u" ? HTMLDocument : Document) ? f.document = document : f.document = document.implementation.createHTMLDocument(""), f.window = window;
|
|
779
772
|
else {
|
|
780
|
-
var nt = qt,
|
|
773
|
+
var nt = qt, tt = new nt.JSDOM(
|
|
781
774
|
decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"),
|
|
782
775
|
{
|
|
783
776
|
features: {
|
|
@@ -786,7 +779,7 @@ var Ht = {};
|
|
|
786
779
|
resources: "usable"
|
|
787
780
|
}
|
|
788
781
|
).window;
|
|
789
|
-
f.document =
|
|
782
|
+
f.document = tt.document, f.jsdomImplForWrapper = qt.implForWrapper, f.nodeCanvas = qt.Canvas, f.window = tt, DOMParser = f.window.DOMParser;
|
|
790
783
|
}
|
|
791
784
|
f.isTouchSupported = "ontouchstart" in f.window || "ontouchstart" in f.document || f.window && f.window.navigator && f.window.navigator.maxTouchPoints > 0, f.isLikelyNode = typeof Buffer < "u" && typeof window > "u", f.SHARED_ATTRIBUTES = [
|
|
792
785
|
"display",
|
|
@@ -2004,7 +1997,7 @@ var Ht = {};
|
|
|
2004
1997
|
return u;
|
|
2005
1998
|
}
|
|
2006
1999
|
};
|
|
2007
|
-
}(
|
|
2000
|
+
}(P), function() {
|
|
2008
2001
|
var c = Array.prototype.join, s = {
|
|
2009
2002
|
m: 2,
|
|
2010
2003
|
l: 2,
|
|
@@ -2019,8 +2012,8 @@ var Ht = {};
|
|
|
2019
2012
|
m: "l",
|
|
2020
2013
|
M: "L"
|
|
2021
2014
|
};
|
|
2022
|
-
function o(y, S, b, x, M, C, _, T,
|
|
2023
|
-
var z = f.util.cos(y), G = f.util.sin(y), $ = f.util.cos(S), F = f.util.sin(S), O = b * M * $ - x * C * F + _, I = x * M * $ + b * C * F + T, B = j +
|
|
2015
|
+
function o(y, S, b, x, M, C, _, T, k, j, A) {
|
|
2016
|
+
var z = f.util.cos(y), G = f.util.sin(y), $ = f.util.cos(S), F = f.util.sin(S), O = b * M * $ - x * C * F + _, I = x * M * $ + b * C * F + T, B = j + k * (-b * M * G - x * C * z), D = A + k * (-x * M * G + b * C * z), V = O + k * (b * M * F + x * C * $), K = I + k * (x * M * F - b * C * $);
|
|
2024
2017
|
return [
|
|
2025
2018
|
"C",
|
|
2026
2019
|
B,
|
|
@@ -2032,7 +2025,7 @@ var Ht = {};
|
|
|
2032
2025
|
];
|
|
2033
2026
|
}
|
|
2034
2027
|
function e(y, S, b, x, M, C, _) {
|
|
2035
|
-
var T = Math.PI,
|
|
2028
|
+
var T = Math.PI, k = _ * T / 180, j = f.util.sin(k), A = f.util.cos(k), z = 0, G = 0;
|
|
2036
2029
|
b = Math.abs(b), x = Math.abs(x);
|
|
2037
2030
|
var $ = -A * y * 0.5 - j * S * 0.5, F = -A * S * 0.5 + j * y * 0.5, O = b * b, I = x * x, B = F * F, D = $ * $, V = O * I - O * B - I * D, K = 0;
|
|
2038
2031
|
if (V < 0) {
|
|
@@ -2051,9 +2044,9 @@ var Ht = {};
|
|
|
2051
2044
|
return C >= M ? C - M : 2 * Math.PI - (M - C);
|
|
2052
2045
|
}
|
|
2053
2046
|
function t(y, S, b, x, M, C, _, T) {
|
|
2054
|
-
var
|
|
2055
|
-
if (f.cachesBoundsOfCurve && (
|
|
2056
|
-
return f.boundsOfCurveCache[
|
|
2047
|
+
var k;
|
|
2048
|
+
if (f.cachesBoundsOfCurve && (k = c.call(arguments), f.boundsOfCurveCache[k]))
|
|
2049
|
+
return f.boundsOfCurveCache[k];
|
|
2057
2050
|
var j = Math.sqrt, A = Math.min, z = Math.max, G = Math.abs, $ = [], F = [[], []], O, I, B, D, V, K, ht, rt;
|
|
2058
2051
|
I = 6 * y - 12 * b + 6 * M, O = -3 * y + 9 * b - 9 * M + 3 * _, B = 3 * b - 3 * y;
|
|
2059
2052
|
for (var R = 0; R < 2; ++R) {
|
|
@@ -2078,17 +2071,17 @@ var Ht = {};
|
|
|
2078
2071
|
y: z.apply(null, F[1])
|
|
2079
2072
|
}
|
|
2080
2073
|
];
|
|
2081
|
-
return f.cachesBoundsOfCurve && (f.boundsOfCurveCache[
|
|
2074
|
+
return f.cachesBoundsOfCurve && (f.boundsOfCurveCache[k] = St), St;
|
|
2082
2075
|
}
|
|
2083
2076
|
function r(y, S, b) {
|
|
2084
|
-
for (var x = b[1], M = b[2], C = b[3], _ = b[4], T = b[5],
|
|
2077
|
+
for (var x = b[1], M = b[2], C = b[3], _ = b[4], T = b[5], k = b[6], j = b[7], A = e(k - y, j - S, x, M, _, T, C), z = 0, G = A.length; z < G; z++)
|
|
2085
2078
|
A[z][1] += y, A[z][2] += S, A[z][3] += y, A[z][4] += S, A[z][5] += y, A[z][6] += S;
|
|
2086
2079
|
return A;
|
|
2087
2080
|
}
|
|
2088
2081
|
function a(y) {
|
|
2089
|
-
var S = 0, b = 0, x = y.length, M = 0, C = 0, _, T,
|
|
2082
|
+
var S = 0, b = 0, x = y.length, M = 0, C = 0, _, T, k, j = [], A, z, G;
|
|
2090
2083
|
for (T = 0; T < x; ++T) {
|
|
2091
|
-
switch (
|
|
2084
|
+
switch (k = !1, _ = y[T].slice(0), _[0]) {
|
|
2092
2085
|
case "l":
|
|
2093
2086
|
_[0] = "L", _[1] += S, _[2] += b;
|
|
2094
2087
|
case "L":
|
|
@@ -2132,14 +2125,14 @@ var Ht = {};
|
|
|
2132
2125
|
case "a":
|
|
2133
2126
|
_[0] = "A", _[6] += S, _[7] += b;
|
|
2134
2127
|
case "A":
|
|
2135
|
-
|
|
2128
|
+
k = !0, j = j.concat(r(S, b, _)), S = _[6], b = _[7];
|
|
2136
2129
|
break;
|
|
2137
2130
|
case "z":
|
|
2138
2131
|
case "Z":
|
|
2139
2132
|
S = M, b = C;
|
|
2140
2133
|
break;
|
|
2141
2134
|
}
|
|
2142
|
-
|
|
2135
|
+
k || j.push(_), A = _[0];
|
|
2143
2136
|
}
|
|
2144
2137
|
return j;
|
|
2145
2138
|
}
|
|
@@ -2159,8 +2152,8 @@ var Ht = {};
|
|
|
2159
2152
|
return (1 - y) * (1 - y) * (1 - y);
|
|
2160
2153
|
}
|
|
2161
2154
|
function m(y, S, b, x, M, C, _, T) {
|
|
2162
|
-
return function(
|
|
2163
|
-
var j = h(
|
|
2155
|
+
return function(k) {
|
|
2156
|
+
var j = h(k), A = u(k), z = d(k), G = g(k);
|
|
2164
2157
|
return {
|
|
2165
2158
|
x: _ * j + M * A + b * z + y * G,
|
|
2166
2159
|
y: T * j + C * A + x * z + S * G
|
|
@@ -2168,8 +2161,8 @@ var Ht = {};
|
|
|
2168
2161
|
};
|
|
2169
2162
|
}
|
|
2170
2163
|
function p(y, S, b, x, M, C, _, T) {
|
|
2171
|
-
return function(
|
|
2172
|
-
var j = 1 -
|
|
2164
|
+
return function(k) {
|
|
2165
|
+
var j = 1 - k, A = 3 * j * j * (b - y) + 6 * j * k * (M - b) + 3 * k * k * (_ - M), z = 3 * j * j * (x - S) + 6 * j * k * (C - x) + 3 * k * k * (T - C);
|
|
2173
2166
|
return Math.atan2(z, A);
|
|
2174
2167
|
};
|
|
2175
2168
|
}
|
|
@@ -2184,17 +2177,17 @@ var Ht = {};
|
|
|
2184
2177
|
}
|
|
2185
2178
|
function L(y, S, b, x, M, C) {
|
|
2186
2179
|
return function(_) {
|
|
2187
|
-
var T = v(_),
|
|
2180
|
+
var T = v(_), k = w(_), j = E(_);
|
|
2188
2181
|
return {
|
|
2189
|
-
x: M * T + b *
|
|
2190
|
-
y: C * T + x *
|
|
2182
|
+
x: M * T + b * k + y * j,
|
|
2183
|
+
y: C * T + x * k + S * j
|
|
2191
2184
|
};
|
|
2192
2185
|
};
|
|
2193
2186
|
}
|
|
2194
2187
|
function U(y, S, b, x, M, C) {
|
|
2195
2188
|
return function(_) {
|
|
2196
|
-
var T = 1 - _,
|
|
2197
|
-
return Math.atan2(j,
|
|
2189
|
+
var T = 1 - _, k = 2 * T * (b - y) + 2 * _ * (M - b), j = 2 * T * (x - S) + 2 * _ * (C - x);
|
|
2190
|
+
return Math.atan2(j, k);
|
|
2198
2191
|
};
|
|
2199
2192
|
}
|
|
2200
2193
|
function q(y, S, b) {
|
|
@@ -2204,12 +2197,12 @@ var Ht = {};
|
|
|
2204
2197
|
return C;
|
|
2205
2198
|
}
|
|
2206
2199
|
function Z(y, S) {
|
|
2207
|
-
for (var b = 0, x = 0, M = y.iterator, C = { x: y.x, y: y.y }, _, T,
|
|
2208
|
-
_ = M(b), A = b, T = n(C.x, C.y, _.x, _.y), T + x > S ? (b -=
|
|
2200
|
+
for (var b = 0, x = 0, M = y.iterator, C = { x: y.x, y: y.y }, _, T, k = 0.01, j = y.angleFinder, A; x < S && k > 1e-4; )
|
|
2201
|
+
_ = M(b), A = b, T = n(C.x, C.y, _.x, _.y), T + x > S ? (b -= k, k /= 2) : (C = _, b += k, x += T);
|
|
2209
2202
|
return _.angle = j(A), _;
|
|
2210
2203
|
}
|
|
2211
2204
|
function W(y) {
|
|
2212
|
-
for (var S = 0, b = y.length, x, M = 0, C = 0, _ = 0, T = 0,
|
|
2205
|
+
for (var S = 0, b = y.length, x, M = 0, C = 0, _ = 0, T = 0, k = [], j, A, z, G = 0; G < b; G++) {
|
|
2213
2206
|
switch (x = y[G], A = {
|
|
2214
2207
|
x: M,
|
|
2215
2208
|
y: C,
|
|
@@ -2264,37 +2257,37 @@ var Ht = {};
|
|
|
2264
2257
|
A.destX = _, A.destY = T, A.length = n(M, C, _, T), M = _, C = T;
|
|
2265
2258
|
break;
|
|
2266
2259
|
}
|
|
2267
|
-
S += A.length,
|
|
2260
|
+
S += A.length, k.push(A);
|
|
2268
2261
|
}
|
|
2269
|
-
return
|
|
2262
|
+
return k.push({ length: S, x: M, y: C }), k;
|
|
2270
2263
|
}
|
|
2271
2264
|
function N(y, S, b) {
|
|
2272
2265
|
b || (b = W(y));
|
|
2273
2266
|
for (var x = 0; S - b[x].length > 0 && x < b.length - 2; )
|
|
2274
2267
|
S -= b[x].length, x++;
|
|
2275
|
-
var M = b[x], C = S / M.length, _ = M.command, T = y[x],
|
|
2268
|
+
var M = b[x], C = S / M.length, _ = M.command, T = y[x], k;
|
|
2276
2269
|
switch (_) {
|
|
2277
2270
|
case "M":
|
|
2278
2271
|
return { x: M.x, y: M.y, angle: 0 };
|
|
2279
2272
|
case "Z":
|
|
2280
2273
|
case "z":
|
|
2281
|
-
return
|
|
2274
|
+
return k = new f.Point(M.x, M.y).lerp(
|
|
2282
2275
|
new f.Point(M.destX, M.destY),
|
|
2283
2276
|
C
|
|
2284
|
-
),
|
|
2277
|
+
), k.angle = Math.atan2(M.destY - M.y, M.destX - M.x), k;
|
|
2285
2278
|
case "L":
|
|
2286
|
-
return
|
|
2279
|
+
return k = new f.Point(M.x, M.y).lerp(
|
|
2287
2280
|
new f.Point(T[1], T[2]),
|
|
2288
2281
|
C
|
|
2289
|
-
),
|
|
2282
|
+
), k.angle = Math.atan2(T[2] - M.y, T[1] - M.x), k;
|
|
2290
2283
|
case "C":
|
|
2291
2284
|
return Z(M, S);
|
|
2292
2285
|
case "Q":
|
|
2293
2286
|
return Z(M, S);
|
|
2294
2287
|
}
|
|
2295
2288
|
}
|
|
2296
|
-
function
|
|
2297
|
-
var S = [], b = [], x, M, C = f.rePathCommand, _ = "[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?\\s*", T = "(" + _ + ")" + f.commaWsp,
|
|
2289
|
+
function et(y) {
|
|
2290
|
+
var S = [], b = [], x, M, C = f.rePathCommand, _ = "[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?\\s*", T = "(" + _ + ")" + f.commaWsp, k = "([01])" + f.commaWsp + "?", j = T + "?" + T + "?" + T + k + k + T + "?(" + _ + ")", A = new RegExp(j, "g"), z, G, $;
|
|
2298
2291
|
if (!y || !y.match)
|
|
2299
2292
|
return S;
|
|
2300
2293
|
$ = y.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi);
|
|
@@ -2320,17 +2313,17 @@ var Ht = {};
|
|
|
2320
2313
|
return S;
|
|
2321
2314
|
}
|
|
2322
2315
|
function st(y, S) {
|
|
2323
|
-
var b = [], x, M = new f.Point(y[0].x, y[0].y), C = new f.Point(y[1].x, y[1].y), _ = y.length, T = 1,
|
|
2324
|
-
for (S = S || 0, j && (T = y[2].x < C.x ? -1 : y[2].x === C.x ? 0 : 1,
|
|
2316
|
+
var b = [], x, M = new f.Point(y[0].x, y[0].y), C = new f.Point(y[1].x, y[1].y), _ = y.length, T = 1, k = 0, j = _ > 2;
|
|
2317
|
+
for (S = S || 0, j && (T = y[2].x < C.x ? -1 : y[2].x === C.x ? 0 : 1, k = y[2].y < C.y ? -1 : y[2].y === C.y ? 0 : 1), b.push(["M", M.x - T * S, M.y - k * S]), x = 1; x < _; x++) {
|
|
2325
2318
|
if (!M.eq(C)) {
|
|
2326
2319
|
var A = M.midPointFrom(C);
|
|
2327
2320
|
b.push(["Q", M.x, M.y, A.x, A.y]);
|
|
2328
2321
|
}
|
|
2329
2322
|
M = y[x], x + 1 < y.length && (C = y[x + 1]);
|
|
2330
2323
|
}
|
|
2331
|
-
return j && (T = M.x > y[x - 2].x ? 1 : M.x === y[x - 2].x ? 0 : -1,
|
|
2324
|
+
return j && (T = M.x > y[x - 2].x ? 1 : M.x === y[x - 2].x ? 0 : -1, k = M.y > y[x - 2].y ? 1 : M.y === y[x - 2].y ? 0 : -1), b.push(["L", M.x + T * S, M.y + k * S]), b;
|
|
2332
2325
|
}
|
|
2333
|
-
function
|
|
2326
|
+
function it(y, S, b) {
|
|
2334
2327
|
return b && (S = f.util.multiplyTransformMatrices(
|
|
2335
2328
|
S,
|
|
2336
2329
|
[1, 0, 0, 1, -b.x, -b.y]
|
|
@@ -2344,7 +2337,7 @@ var Ht = {};
|
|
|
2344
2337
|
return y.map(function(S) {
|
|
2345
2338
|
return S.join(" ");
|
|
2346
2339
|
}).join(" ");
|
|
2347
|
-
}, f.util.parsePath =
|
|
2340
|
+
}, f.util.parsePath = et, f.util.makePathSimpler = a, f.util.getSmoothPathFromPoints = st, f.util.getPathSegmentsInfo = W, f.util.getBoundsOfCurve = t, f.util.getPointOnPath = N, f.util.transformPath = it;
|
|
2348
2341
|
}(), function() {
|
|
2349
2342
|
var c = Array.prototype.slice;
|
|
2350
2343
|
function s(t, r) {
|
|
@@ -2732,10 +2725,10 @@ var Ht = {};
|
|
|
2732
2725
|
completionRate: 0,
|
|
2733
2726
|
durationRate: 0
|
|
2734
2727
|
}), f.runningAnimations.push(d), a(function(m) {
|
|
2735
|
-
var p = m || +/* @__PURE__ */ new Date(), v = h.duration || 500, w = p + v, E, L = h.onChange || o, U = h.abort || o, q = h.onComplete || o, Z = h.easing || e, W = "startValue" in h ? h.startValue.length > 0 : !1, N = "startValue" in h ? h.startValue : 0,
|
|
2736
|
-
return
|
|
2737
|
-
}) :
|
|
2738
|
-
h.onStart && h.onStart(), function
|
|
2728
|
+
var p = m || +/* @__PURE__ */ new Date(), v = h.duration || 500, w = p + v, E, L = h.onChange || o, U = h.abort || o, q = h.onComplete || o, Z = h.easing || e, W = "startValue" in h ? h.startValue.length > 0 : !1, N = "startValue" in h ? h.startValue : 0, et = "endValue" in h ? h.endValue : 100, st = h.byValue || (W ? N.map(function(it, y) {
|
|
2729
|
+
return et[y] - N[y];
|
|
2730
|
+
}) : et - N);
|
|
2731
|
+
h.onStart && h.onStart(), function it(y) {
|
|
2739
2732
|
E = y || +/* @__PURE__ */ new Date();
|
|
2740
2733
|
var S = E > w ? v : E - p, b = S / v, x = W ? N.map(function(C, _) {
|
|
2741
2734
|
return Z(S, N[_], st[_], v);
|
|
@@ -2746,10 +2739,10 @@ var Ht = {};
|
|
|
2746
2739
|
return;
|
|
2747
2740
|
}
|
|
2748
2741
|
if (E > w) {
|
|
2749
|
-
d.currentValue = W ?
|
|
2742
|
+
d.currentValue = W ? et.slice() : et, d.completionRate = 1, d.durationRate = 1, L(W ? et.slice() : et, 1, 1), q(et, 1, 1), g();
|
|
2750
2743
|
return;
|
|
2751
2744
|
} else
|
|
2752
|
-
L(x, M, b), a(
|
|
2745
|
+
L(x, M, b), a(it);
|
|
2753
2746
|
}
|
|
2754
2747
|
}(p);
|
|
2755
2748
|
}), d.cancel;
|
|
@@ -2900,14 +2893,14 @@ var Ht = {};
|
|
|
2900
2893
|
function N(y, S, b, x, M) {
|
|
2901
2894
|
return M === void 0 && (M = 1.70158), y /= x / 2, y < 1 ? b / 2 * (y * y * (((M *= 1.525) + 1) * y - M)) + S : b / 2 * ((y -= 2) * y * (((M *= 1.525) + 1) * y + M) + 2) + S;
|
|
2902
2895
|
}
|
|
2903
|
-
function
|
|
2896
|
+
function et(y, S, b, x) {
|
|
2904
2897
|
return b - st(x - y, 0, b, x) + S;
|
|
2905
2898
|
}
|
|
2906
2899
|
function st(y, S, b, x) {
|
|
2907
2900
|
return (y /= x) < 1 / 2.75 ? b * (7.5625 * y * y) + S : y < 2 / 2.75 ? b * (7.5625 * (y -= 1.5 / 2.75) * y + 0.75) + S : y < 2.5 / 2.75 ? b * (7.5625 * (y -= 2.25 / 2.75) * y + 0.9375) + S : b * (7.5625 * (y -= 2.625 / 2.75) * y + 0.984375) + S;
|
|
2908
2901
|
}
|
|
2909
|
-
function
|
|
2910
|
-
return y < x / 2 ?
|
|
2902
|
+
function it(y, S, b, x) {
|
|
2903
|
+
return y < x / 2 ? et(y * 2, 0, b, x) * 0.5 + S : st(y * 2 - x, 0, b, x) * 0.5 + b * 0.5 + S;
|
|
2911
2904
|
}
|
|
2912
2905
|
f.util.ease = {
|
|
2913
2906
|
/**
|
|
@@ -2961,9 +2954,9 @@ var Ht = {};
|
|
|
2961
2954
|
easeInBack: Z,
|
|
2962
2955
|
easeOutBack: W,
|
|
2963
2956
|
easeInOutBack: N,
|
|
2964
|
-
easeInBounce:
|
|
2957
|
+
easeInBounce: et,
|
|
2965
2958
|
easeOutBounce: st,
|
|
2966
|
-
easeInOutBounce:
|
|
2959
|
+
easeInOutBounce: it
|
|
2967
2960
|
};
|
|
2968
2961
|
}(), function(c) {
|
|
2969
2962
|
var s = c.fabric || (c.fabric = {}), l = s.util.object.extend, o = s.util.object.clone, e = s.util.toFixed, i = s.util.parseUnit, t = s.util.multiplyTransformMatrices, r = [
|
|
@@ -3015,7 +3008,7 @@ var Ht = {};
|
|
|
3015
3008
|
function p(C) {
|
|
3016
3009
|
return C in u ? u[C] : C;
|
|
3017
3010
|
}
|
|
3018
|
-
function v(C, _, T,
|
|
3011
|
+
function v(C, _, T, k) {
|
|
3019
3012
|
var j = Array.isArray(_), A;
|
|
3020
3013
|
if ((C === "fill" || C === "stroke") && _ === "none")
|
|
3021
3014
|
_ = "";
|
|
@@ -3036,7 +3029,7 @@ var Ht = {};
|
|
|
3036
3029
|
else if (C === "textAnchor")
|
|
3037
3030
|
_ = _ === "start" ? "left" : _ === "end" ? "right" : "center";
|
|
3038
3031
|
else if (C === "charSpacing")
|
|
3039
|
-
A = i(_,
|
|
3032
|
+
A = i(_, k) / k * 1e3;
|
|
3040
3033
|
else if (C === "paintFirst") {
|
|
3041
3034
|
var z = _.indexOf("fill"), G = _.indexOf("stroke"), _ = "fill";
|
|
3042
3035
|
(z > -1 && G > -1 && G < z || z === -1 && G > -1) && (_ = "stroke");
|
|
@@ -3045,7 +3038,7 @@ var Ht = {};
|
|
|
3045
3038
|
return _;
|
|
3046
3039
|
if (C === "imageSmoothing")
|
|
3047
3040
|
return _ === "optimizeQuality";
|
|
3048
|
-
A = j ? _.map(i) : i(_,
|
|
3041
|
+
A = j ? _.map(i) : i(_, k);
|
|
3049
3042
|
}
|
|
3050
3043
|
}
|
|
3051
3044
|
return !j && isNaN(A) ? _ : A;
|
|
@@ -3069,10 +3062,10 @@ var Ht = {};
|
|
|
3069
3062
|
return C;
|
|
3070
3063
|
}
|
|
3071
3064
|
function L(C, _) {
|
|
3072
|
-
var T,
|
|
3065
|
+
var T, k = [], j, A, z;
|
|
3073
3066
|
for (A = 0, z = _.length; A < z; A++)
|
|
3074
|
-
T = _[A], j = C.getElementsByTagName(T),
|
|
3075
|
-
return
|
|
3067
|
+
T = _[A], j = C.getElementsByTagName(T), k = k.concat(Array.prototype.slice.call(j));
|
|
3068
|
+
return k;
|
|
3076
3069
|
}
|
|
3077
3070
|
s.parseTransformAttribute = function() {
|
|
3078
3071
|
function C(R, at) {
|
|
@@ -3086,7 +3079,7 @@ var Ht = {};
|
|
|
3086
3079
|
function T(R, at, ct) {
|
|
3087
3080
|
R[ct] = Math.tan(s.util.degreesToRadians(at[0]));
|
|
3088
3081
|
}
|
|
3089
|
-
function
|
|
3082
|
+
function k(R, at) {
|
|
3090
3083
|
R[4] = at[0], at.length === 2 && (R[5] = at[1]);
|
|
3091
3084
|
}
|
|
3092
3085
|
var j = s.iMatrix, A = s.reNum, z = s.commaWsp, G = "(?:(skewX)\\s*\\(\\s*(" + A + ")\\s*\\))", $ = "(?:(skewY)\\s*\\(\\s*(" + A + ")\\s*\\))", F = "(?:(rotate)\\s*\\(\\s*(" + A + ")(?:" + z + "(" + A + ")" + z + "(" + A + "))?\\s*\\))", O = "(?:(scale)\\s*\\(\\s*(" + A + ")(?:" + z + "(" + A + "))?\\s*\\))", I = "(?:(translate)\\s*\\(\\s*(" + A + ")(?:" + z + "(" + A + "))?\\s*\\))", B = "(?:(matrix)\\s*\\(\\s*(" + A + ")" + z + "(" + A + ")" + z + "(" + A + ")" + z + "(" + A + ")" + z + "(" + A + ")" + z + "(" + A + ")\\s*\\))", D = "(?:" + B + "|" + I + "|" + O + "|" + F + "|" + G + "|" + $ + ")", V = "(?:" + D + "(?:" + z + "*" + D + ")*)", K = "^\\s*(?:" + V + "?)\\s*$", ht = new RegExp(K), rt = new RegExp(D, "g");
|
|
@@ -3100,7 +3093,7 @@ var Ht = {};
|
|
|
3100
3093
|
}), St = mt[1], _t = mt.slice(2).map(parseFloat);
|
|
3101
3094
|
switch (St) {
|
|
3102
3095
|
case "translate":
|
|
3103
|
-
|
|
3096
|
+
k(at, _t);
|
|
3104
3097
|
break;
|
|
3105
3098
|
case "rotate":
|
|
3106
3099
|
_t[0] = s.util.degreesToRadians(_t[0]), C(at, _t);
|
|
@@ -3126,56 +3119,56 @@ var Ht = {};
|
|
|
3126
3119
|
};
|
|
3127
3120
|
}();
|
|
3128
3121
|
function U(C, _) {
|
|
3129
|
-
var T,
|
|
3122
|
+
var T, k;
|
|
3130
3123
|
C.replace(/;\s*$/, "").split(";").forEach(function(j) {
|
|
3131
3124
|
var A = j.split(":");
|
|
3132
|
-
T = A[0].trim().toLowerCase(),
|
|
3125
|
+
T = A[0].trim().toLowerCase(), k = A[1].trim(), _[T] = k;
|
|
3133
3126
|
});
|
|
3134
3127
|
}
|
|
3135
3128
|
function q(C, _) {
|
|
3136
|
-
var T,
|
|
3129
|
+
var T, k;
|
|
3137
3130
|
for (var j in C)
|
|
3138
|
-
typeof C[j] > "u" || (T = j.toLowerCase(),
|
|
3131
|
+
typeof C[j] > "u" || (T = j.toLowerCase(), k = C[j], _[T] = k);
|
|
3139
3132
|
}
|
|
3140
3133
|
function Z(C, _) {
|
|
3141
3134
|
var T = {};
|
|
3142
|
-
for (var
|
|
3143
|
-
if (W(C,
|
|
3144
|
-
for (var j in s.cssRules[_][
|
|
3145
|
-
T[j] = s.cssRules[_][
|
|
3135
|
+
for (var k in s.cssRules[_])
|
|
3136
|
+
if (W(C, k.split(" ")))
|
|
3137
|
+
for (var j in s.cssRules[_][k])
|
|
3138
|
+
T[j] = s.cssRules[_][k][j];
|
|
3146
3139
|
return T;
|
|
3147
3140
|
}
|
|
3148
3141
|
function W(C, _) {
|
|
3149
|
-
var T,
|
|
3150
|
-
return T =
|
|
3142
|
+
var T, k = !0;
|
|
3143
|
+
return T = et(C, _.pop()), T && _.length && (k = N(C, _)), T && k && _.length === 0;
|
|
3151
3144
|
}
|
|
3152
3145
|
function N(C, _) {
|
|
3153
|
-
for (var T,
|
|
3154
|
-
|
|
3146
|
+
for (var T, k = !0; C.parentNode && C.parentNode.nodeType === 1 && _.length; )
|
|
3147
|
+
k && (T = _.pop()), C = C.parentNode, k = et(C, T);
|
|
3155
3148
|
return _.length === 0;
|
|
3156
3149
|
}
|
|
3157
|
-
function
|
|
3158
|
-
var T = C.nodeName,
|
|
3159
|
-
if (A = new RegExp("^" + T, "i"), _ = _.replace(A, ""), j && _.length && (A = new RegExp("#" + j + "(?![a-zA-Z\\-]+)", "i"), _ = _.replace(A, "")),
|
|
3160
|
-
for (
|
|
3161
|
-
A = new RegExp("\\." +
|
|
3150
|
+
function et(C, _) {
|
|
3151
|
+
var T = C.nodeName, k = C.getAttribute("class"), j = C.getAttribute("id"), A, z;
|
|
3152
|
+
if (A = new RegExp("^" + T, "i"), _ = _.replace(A, ""), j && _.length && (A = new RegExp("#" + j + "(?![a-zA-Z\\-]+)", "i"), _ = _.replace(A, "")), k && _.length)
|
|
3153
|
+
for (k = k.split(" "), z = k.length; z--; )
|
|
3154
|
+
A = new RegExp("\\." + k[z] + "(?![a-zA-Z\\-]+)", "i"), _ = _.replace(A, "");
|
|
3162
3155
|
return _.length === 0;
|
|
3163
3156
|
}
|
|
3164
3157
|
function st(C, _) {
|
|
3165
3158
|
var T;
|
|
3166
3159
|
if (C.getElementById && (T = C.getElementById(_)), T)
|
|
3167
3160
|
return T;
|
|
3168
|
-
var
|
|
3161
|
+
var k, j, A, z = C.getElementsByTagName("*");
|
|
3169
3162
|
for (j = 0, A = z.length; j < A; j++)
|
|
3170
|
-
if (
|
|
3171
|
-
return
|
|
3163
|
+
if (k = z[j], _ === k.getAttribute("id"))
|
|
3164
|
+
return k;
|
|
3172
3165
|
}
|
|
3173
|
-
function
|
|
3166
|
+
function it(C) {
|
|
3174
3167
|
for (var _ = L(C, ["use", "svg:use"]), T = 0; _.length && T < _.length; ) {
|
|
3175
|
-
var
|
|
3168
|
+
var k = _[T], j = k.getAttribute("xlink:href") || k.getAttribute("href");
|
|
3176
3169
|
if (j === null)
|
|
3177
3170
|
return;
|
|
3178
|
-
var A = j.slice(1), z =
|
|
3171
|
+
var A = j.slice(1), z = k.getAttribute("x") || 0, G = k.getAttribute("y") || 0, $ = st(C, A).cloneNode(!0), F = ($.getAttribute("transform") || "") + " translate(" + z + ", " + G + ")", O, I = _.length, B, D, V, K, ht = s.svgNS;
|
|
3179
3172
|
if (S($), /^svg$/i.test($.nodeName)) {
|
|
3180
3173
|
var rt = $.ownerDocument.createElementNS(ht, "g");
|
|
3181
3174
|
for (D = 0, V = $.attributes, K = V.length; D < K; D++)
|
|
@@ -3184,9 +3177,9 @@ var Ht = {};
|
|
|
3184
3177
|
rt.appendChild($.firstChild);
|
|
3185
3178
|
$ = rt;
|
|
3186
3179
|
}
|
|
3187
|
-
for (D = 0, V =
|
|
3180
|
+
for (D = 0, V = k.attributes, K = V.length; D < K; D++)
|
|
3188
3181
|
B = V.item(D), !(B.nodeName === "x" || B.nodeName === "y" || B.nodeName === "xlink:href" || B.nodeName === "href") && (B.nodeName === "transform" ? F = B.nodeValue + " " + F : $.setAttribute(B.nodeName, B.nodeValue));
|
|
3189
|
-
$.setAttribute("transform", F), $.setAttribute("instantiated_by_use", "1"), $.removeAttribute("id"), O =
|
|
3182
|
+
$.setAttribute("transform", F), $.setAttribute("instantiated_by_use", "1"), $.removeAttribute("id"), O = k.parentNode, O.replaceChild($, k), _.length === I && T++;
|
|
3190
3183
|
}
|
|
3191
3184
|
}
|
|
3192
3185
|
var y = new RegExp(
|
|
@@ -3195,14 +3188,14 @@ var Ht = {};
|
|
|
3195
3188
|
function S(C) {
|
|
3196
3189
|
if (!s.svgViewBoxElementsRegEx.test(C.nodeName))
|
|
3197
3190
|
return {};
|
|
3198
|
-
var _ = C.getAttribute("viewBox"), T = 1,
|
|
3191
|
+
var _ = C.getAttribute("viewBox"), T = 1, k = 1, j = 0, A = 0, z, G, $, F, O = C.getAttribute("width"), I = C.getAttribute("height"), B = C.getAttribute("x") || 0, D = C.getAttribute("y") || 0, V = C.getAttribute("preserveAspectRatio") || "", K = !_ || !(_ = _.match(y)), ht = !O || !I || O === "100%" || I === "100%", rt = K && ht, R = {}, at = "", ct = 0, dt = 0;
|
|
3199
3192
|
if (R.width = 0, R.height = 0, R.toBeParsed = rt, K && (B || D) && C.parentNode && C.parentNode.nodeName !== "#document" && (at = " translate(" + i(B) + " " + i(D) + ") ", $ = (C.getAttribute("transform") || "") + at, C.setAttribute("transform", $), C.removeAttribute("x"), C.removeAttribute("y")), rt)
|
|
3200
3193
|
return R;
|
|
3201
3194
|
if (K)
|
|
3202
3195
|
return R.width = i(O), R.height = i(I), R;
|
|
3203
|
-
if (j = -parseFloat(_[1]), A = -parseFloat(_[2]), z = parseFloat(_[3]), G = parseFloat(_[4]), R.minX = j, R.minY = A, R.viewBoxWidth = z, R.viewBoxHeight = G, ht ? (R.width = z, R.height = G) : (R.width = i(O), R.height = i(I), T = R.width / z,
|
|
3196
|
+
if (j = -parseFloat(_[1]), A = -parseFloat(_[2]), z = parseFloat(_[3]), G = parseFloat(_[4]), R.minX = j, R.minY = A, R.viewBoxWidth = z, R.viewBoxHeight = G, ht ? (R.width = z, R.height = G) : (R.width = i(O), R.height = i(I), T = R.width / z, k = R.height / G), V = s.util.parsePreserveAspectRatioAttribute(V), V.alignX !== "none" && (V.meetOrSlice === "meet" && (k = T = T > k ? k : T), V.meetOrSlice === "slice" && (k = T = T > k ? T : k), ct = R.width - z * T, dt = R.height - G * T, V.alignX === "Mid" && (ct /= 2), V.alignY === "Mid" && (dt /= 2), V.alignX === "Min" && (ct = 0), V.alignY === "Min" && (dt = 0)), T === 1 && k === 1 && j === 0 && A === 0 && B === 0 && D === 0)
|
|
3204
3197
|
return R;
|
|
3205
|
-
if ((B || D) && C.parentNode.nodeName !== "#document" && (at = " translate(" + i(B) + " " + i(D) + ") "), $ = at + " matrix(" + T + " 0 0 " +
|
|
3198
|
+
if ((B || D) && C.parentNode.nodeName !== "#document" && (at = " translate(" + i(B) + " " + i(D) + ") "), $ = at + " matrix(" + T + " 0 0 " + k + " " + (j * T + ct) + " " + (A * k + dt) + ") ", C.nodeName === "svg") {
|
|
3206
3199
|
for (F = C.ownerDocument.createElementNS(s.svgNS, "g"); C.firstChild; )
|
|
3207
3200
|
F.appendChild(C.firstChild);
|
|
3208
3201
|
C.appendChild(F);
|
|
@@ -3216,11 +3209,11 @@ var Ht = {};
|
|
|
3216
3209
|
return !0;
|
|
3217
3210
|
return !1;
|
|
3218
3211
|
}
|
|
3219
|
-
s.parseSVGDocument = function(C, _, T,
|
|
3212
|
+
s.parseSVGDocument = function(C, _, T, k) {
|
|
3220
3213
|
if (C) {
|
|
3221
|
-
|
|
3214
|
+
it(C);
|
|
3222
3215
|
var j = s.Object.__uid++, A, z, G = S(C), $ = s.util.toArray(C.getElementsByTagName("*"));
|
|
3223
|
-
if (G.crossOrigin =
|
|
3216
|
+
if (G.crossOrigin = k && k.crossOrigin, G.svgUid = j, $.length === 0 && s.isLikelyNode) {
|
|
3224
3217
|
$ = C.selectNodes('//*[name(.)!="svg"]');
|
|
3225
3218
|
var F = [];
|
|
3226
3219
|
for (A = 0, z = $.length; A < z; A++)
|
|
@@ -3244,17 +3237,17 @@ var Ht = {};
|
|
|
3244
3237
|
});
|
|
3245
3238
|
}), s.gradientDefs[j] = s.getGradientDefs(C), s.cssRules[j] = s.getCSSRules(C), s.clipPaths[j] = I, s.parseElements(O, function(B, D) {
|
|
3246
3239
|
_ && (_(B, G, D, $), delete s.gradientDefs[j], delete s.cssRules[j], delete s.clipPaths[j]);
|
|
3247
|
-
}, o(G), T,
|
|
3240
|
+
}, o(G), T, k);
|
|
3248
3241
|
}
|
|
3249
3242
|
};
|
|
3250
3243
|
function x(C, _) {
|
|
3251
|
-
var T = ["gradientTransform", "x1", "x2", "y1", "y2", "gradientUnits", "cx", "cy", "r", "fx", "fy"],
|
|
3252
|
-
if (A && A.getAttribute(
|
|
3244
|
+
var T = ["gradientTransform", "x1", "x2", "y1", "y2", "gradientUnits", "cx", "cy", "r", "fx", "fy"], k = "xlink:href", j = _.getAttribute(k).slice(1), A = st(C, j);
|
|
3245
|
+
if (A && A.getAttribute(k) && x(C, A), T.forEach(function(G) {
|
|
3253
3246
|
A && !_.hasAttribute(G) && A.hasAttribute(G) && _.setAttribute(G, A.getAttribute(G));
|
|
3254
3247
|
}), !_.children.length)
|
|
3255
3248
|
for (var z = A.cloneNode(!0); z.firstChild; )
|
|
3256
3249
|
_.appendChild(z.firstChild);
|
|
3257
|
-
_.removeAttribute(
|
|
3250
|
+
_.removeAttribute(k);
|
|
3258
3251
|
}
|
|
3259
3252
|
var M = new RegExp(
|
|
3260
3253
|
"(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*(" + s.reNum + "(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|" + s.reNum + "))?\\s+(.*)"
|
|
@@ -3271,8 +3264,8 @@ var Ht = {};
|
|
|
3271
3264
|
parseFontDeclaration: function(C, _) {
|
|
3272
3265
|
var T = C.match(M);
|
|
3273
3266
|
if (T) {
|
|
3274
|
-
var
|
|
3275
|
-
|
|
3267
|
+
var k = T[1], j = T[3], A = T[4], z = T[5], G = T[6];
|
|
3268
|
+
k && (_.fontStyle = k), j && (_.fontWeight = isNaN(parseFloat(j)) ? j : parseFloat(j)), A && (_.fontSize = i(A)), G && (_.fontFamily = G), z && (_.lineHeight = z === "normal" ? 1 : z);
|
|
3276
3269
|
}
|
|
3277
3270
|
},
|
|
3278
3271
|
/**
|
|
@@ -3289,9 +3282,9 @@ var Ht = {};
|
|
|
3289
3282
|
"radialGradient",
|
|
3290
3283
|
"svg:linearGradient",
|
|
3291
3284
|
"svg:radialGradient"
|
|
3292
|
-
], T = L(C, _),
|
|
3285
|
+
], T = L(C, _), k, j = 0, A = {};
|
|
3293
3286
|
for (j = T.length; j--; )
|
|
3294
|
-
|
|
3287
|
+
k = T[j], k.getAttribute("xlink:href") && x(C, k), A[k.getAttribute("id")] = k;
|
|
3295
3288
|
return A;
|
|
3296
3289
|
},
|
|
3297
3290
|
/**
|
|
@@ -3305,10 +3298,10 @@ var Ht = {};
|
|
|
3305
3298
|
*/
|
|
3306
3299
|
parseAttributes: function(C, _, T) {
|
|
3307
3300
|
if (C) {
|
|
3308
|
-
var
|
|
3301
|
+
var k, j = {}, A, z;
|
|
3309
3302
|
typeof T > "u" && (T = C.getAttribute("svgUid")), C.parentNode && s.svgValidParentsRegEx.test(C.parentNode.nodeName) && (j = s.parseAttributes(C.parentNode, _, T));
|
|
3310
3303
|
var G = _.reduce(function(V, K) {
|
|
3311
|
-
return
|
|
3304
|
+
return k = C.getAttribute(K), k && (V[K] = k), V;
|
|
3312
3305
|
}, {}), $ = l(
|
|
3313
3306
|
Z(C, T),
|
|
3314
3307
|
s.parseStyleAttribute(C)
|
|
@@ -3334,8 +3327,8 @@ var Ht = {};
|
|
|
3334
3327
|
* @param {Object} [options] Options object
|
|
3335
3328
|
* @param {Function} [reviver] Method for further parsing of SVG elements, called after each fabric object created.
|
|
3336
3329
|
*/
|
|
3337
|
-
parseElements: function(C, _, T,
|
|
3338
|
-
new s.ElementsParser(C, _, T,
|
|
3330
|
+
parseElements: function(C, _, T, k, j) {
|
|
3331
|
+
new s.ElementsParser(C, _, T, k, j).parse();
|
|
3339
3332
|
},
|
|
3340
3333
|
/**
|
|
3341
3334
|
* Parses "style" attribute, retuning an object with values
|
|
@@ -3359,8 +3352,8 @@ var Ht = {};
|
|
|
3359
3352
|
if (!C)
|
|
3360
3353
|
return null;
|
|
3361
3354
|
C = C.replace(/,/g, " ").trim(), C = C.split(/\s+/);
|
|
3362
|
-
var _ = [], T,
|
|
3363
|
-
for (T = 0,
|
|
3355
|
+
var _ = [], T, k;
|
|
3356
|
+
for (T = 0, k = C.length; T < k; T += 2)
|
|
3364
3357
|
_.push({
|
|
3365
3358
|
x: parseFloat(C[T]),
|
|
3366
3359
|
y: parseFloat(C[T + 1])
|
|
@@ -3376,8 +3369,8 @@ var Ht = {};
|
|
|
3376
3369
|
* @return {Object} CSS rules of this document
|
|
3377
3370
|
*/
|
|
3378
3371
|
getCSSRules: function(C) {
|
|
3379
|
-
var _ = C.getElementsByTagName("style"), T,
|
|
3380
|
-
for (T = 0,
|
|
3372
|
+
var _ = C.getElementsByTagName("style"), T, k, j = {}, A;
|
|
3373
|
+
for (T = 0, k = _.length; T < k; T++) {
|
|
3381
3374
|
var z = _[T].textContent;
|
|
3382
3375
|
z = z.replace(/\/\*[\s\S]*?\*\//g, ""), z.trim() !== "" && (A = z.split("}"), A = A.filter(function(G) {
|
|
3383
3376
|
return G.trim();
|
|
@@ -3385,7 +3378,7 @@ var Ht = {};
|
|
|
3385
3378
|
var $ = G.split("{"), F = {}, O = $[1].trim(), I = O.split(";").filter(function(K) {
|
|
3386
3379
|
return K.trim();
|
|
3387
3380
|
});
|
|
3388
|
-
for (T = 0,
|
|
3381
|
+
for (T = 0, k = I.length; T < k; T++) {
|
|
3389
3382
|
var B = I[T].split(":"), D = B[0].trim(), V = B[1].trim();
|
|
3390
3383
|
F[D] = V;
|
|
3391
3384
|
}
|
|
@@ -3406,7 +3399,7 @@ var Ht = {};
|
|
|
3406
3399
|
* @param {Object} [options] Object containing options for parsing
|
|
3407
3400
|
* @param {String} [options.crossOrigin] crossOrigin crossOrigin setting to use for external resources
|
|
3408
3401
|
*/
|
|
3409
|
-
loadSVGFromURL: function(C, _, T,
|
|
3402
|
+
loadSVGFromURL: function(C, _, T, k) {
|
|
3410
3403
|
C = C.replace(/^\n\s*/, "").trim(), new s.util.request(C, {
|
|
3411
3404
|
method: "get",
|
|
3412
3405
|
onComplete: j
|
|
@@ -3417,7 +3410,7 @@ var Ht = {};
|
|
|
3417
3410
|
return _ && _(null), !1;
|
|
3418
3411
|
s.parseSVGDocument(z.documentElement, function(G, $, F, O) {
|
|
3419
3412
|
_ && _(G, $, F, O);
|
|
3420
|
-
}, T,
|
|
3413
|
+
}, T, k);
|
|
3421
3414
|
}
|
|
3422
3415
|
},
|
|
3423
3416
|
/**
|
|
@@ -3429,14 +3422,14 @@ var Ht = {};
|
|
|
3429
3422
|
* @param {Object} [options] Object containing options for parsing
|
|
3430
3423
|
* @param {String} [options.crossOrigin] crossOrigin crossOrigin setting to use for external resources
|
|
3431
3424
|
*/
|
|
3432
|
-
loadSVGFromString: function(C, _, T,
|
|
3425
|
+
loadSVGFromString: function(C, _, T, k) {
|
|
3433
3426
|
var j = new s.window.DOMParser(), A = j.parseFromString(C.trim(), "text/xml");
|
|
3434
3427
|
s.parseSVGDocument(A.documentElement, function(z, G, $, F) {
|
|
3435
3428
|
_(z, G, $, F);
|
|
3436
|
-
}, T,
|
|
3429
|
+
}, T, k);
|
|
3437
3430
|
}
|
|
3438
3431
|
});
|
|
3439
|
-
}(
|
|
3432
|
+
}(P), f.ElementsParser = function(c, s, l, o, e, i) {
|
|
3440
3433
|
this.elements = c, this.callback = s, this.options = l, this.reviver = o, this.svgUid = l && l.svgUid || 0, this.parsingOptions = e, this.regexUrl = /^url\(['"]?#([^'"]+)['"]?\)/g, this.doc = i;
|
|
3441
3434
|
}, function(c) {
|
|
3442
3435
|
c.parse = function() {
|
|
@@ -3766,7 +3759,7 @@ var Ht = {};
|
|
|
3766
3759
|
return new l(this.x, this.y);
|
|
3767
3760
|
}
|
|
3768
3761
|
};
|
|
3769
|
-
}(
|
|
3762
|
+
}(P), function(c) {
|
|
3770
3763
|
var s = c.fabric || (c.fabric = {});
|
|
3771
3764
|
if (s.Intersection) {
|
|
3772
3765
|
s.warn("fabric.Intersection is already defined");
|
|
@@ -3820,7 +3813,7 @@ var Ht = {};
|
|
|
3820
3813
|
var t = e.min(i), r = e.max(i), a = new s.Point(r.x, t.y), n = new s.Point(t.x, r.y), h = l.intersectLinePolygon(t, a, o), u = l.intersectLinePolygon(a, r, o), d = l.intersectLinePolygon(r, n, o), g = l.intersectLinePolygon(n, t, o), m = new l();
|
|
3821
3814
|
return m.appendPoints(h.points), m.appendPoints(u.points), m.appendPoints(d.points), m.appendPoints(g.points), m.points.length > 0 && (m.status = "Intersection"), m;
|
|
3822
3815
|
};
|
|
3823
|
-
}(
|
|
3816
|
+
}(P), function(c) {
|
|
3824
3817
|
var s = c.fabric || (c.fabric = {});
|
|
3825
3818
|
if (s.Color) {
|
|
3826
3819
|
s.warn("fabric.Color is already defined.");
|
|
@@ -4181,7 +4174,7 @@ var Ht = {};
|
|
|
4181
4174
|
var i = new l();
|
|
4182
4175
|
return i.setSource(e), i;
|
|
4183
4176
|
};
|
|
4184
|
-
}(
|
|
4177
|
+
}(P), function(c) {
|
|
4185
4178
|
var s = c.fabric || (c.fabric = {}), l = ["e", "se", "s", "sw", "w", "nw", "n", "ne", "e"], o = ["ns", "nesw", "ew", "nwse"], e = {}, i = "left", t = "top", r = "right", a = "bottom", n = "center", h = {
|
|
4186
4179
|
top: a,
|
|
4187
4180
|
bottom: t,
|
|
@@ -4253,7 +4246,7 @@ var Ht = {};
|
|
|
4253
4246
|
return V.setPositionByOrigin(ht, I.originX, I.originY), rt;
|
|
4254
4247
|
};
|
|
4255
4248
|
}
|
|
4256
|
-
function
|
|
4249
|
+
function et(F, O) {
|
|
4257
4250
|
return function(I, B, D, V) {
|
|
4258
4251
|
var K = O(I, B, D, V);
|
|
4259
4252
|
return K && m(F, W(I, B, D, V)), K;
|
|
@@ -4263,7 +4256,7 @@ var Ht = {};
|
|
|
4263
4256
|
var V = F.target, K = V.controls[F.corner], ht = V.canvas.getZoom(), rt = V.padding / ht, R = V.toLocalPoint(new s.Point(B, D), O, I);
|
|
4264
4257
|
return R.x >= rt && (R.x -= rt), R.x <= -rt && (R.x += rt), R.y >= rt && (R.y -= rt), R.y <= rt && (R.y += rt), R.x -= K.offsetX, R.y -= K.offsetY, R;
|
|
4265
4258
|
}
|
|
4266
|
-
function
|
|
4259
|
+
function it(F) {
|
|
4267
4260
|
return F.flipX !== F.flipY;
|
|
4268
4261
|
}
|
|
4269
4262
|
function y(F, O, I, B, D) {
|
|
@@ -4276,7 +4269,7 @@ var Ht = {};
|
|
|
4276
4269
|
var D = O.target, V = D._getTransformedDimensions(0, D.skewY), K = st(O, O.originX, O.originY, I, B), ht = Math.abs(K.x * 2) - V.x, rt = D.skewX, R;
|
|
4277
4270
|
ht < 2 ? R = 0 : (R = u(
|
|
4278
4271
|
Math.atan2(ht / D.scaleX, V.y / D.scaleY)
|
|
4279
|
-
), O.originX === i && O.originY === a && (R = -R), O.originX === r && O.originY === t && (R = -R),
|
|
4272
|
+
), O.originX === i && O.originY === a && (R = -R), O.originX === r && O.originY === t && (R = -R), it(D) && (R = -R));
|
|
4280
4273
|
var at = rt !== R;
|
|
4281
4274
|
if (at) {
|
|
4282
4275
|
var ct = D._getTransformedDimensions().y;
|
|
@@ -4288,7 +4281,7 @@ var Ht = {};
|
|
|
4288
4281
|
var D = O.target, V = D._getTransformedDimensions(D.skewX, 0), K = st(O, O.originX, O.originY, I, B), ht = Math.abs(K.y * 2) - V.y, rt = D.skewY, R;
|
|
4289
4282
|
ht < 2 ? R = 0 : (R = u(
|
|
4290
4283
|
Math.atan2(ht / D.scaleY, V.x / D.scaleX)
|
|
4291
|
-
), O.originX === i && O.originY === a && (R = -R), O.originX === r && O.originY === t && (R = -R),
|
|
4284
|
+
), O.originX === i && O.originY === a && (R = -R), O.originX === r && O.originY === t && (R = -R), it(D) && (R = -R));
|
|
4292
4285
|
var at = rt !== R;
|
|
4293
4286
|
if (at) {
|
|
4294
4287
|
var ct = D._getTransformedDimensions().x;
|
|
@@ -4304,9 +4297,9 @@ var Ht = {};
|
|
|
4304
4297
|
var rt = st(O, n, n, I, B);
|
|
4305
4298
|
rt.x > 0 ? K = i : K = r;
|
|
4306
4299
|
} else
|
|
4307
|
-
V > 0 && (K = ht === t ? i : r), V < 0 && (K = ht === t ? r : i),
|
|
4300
|
+
V > 0 && (K = ht === t ? i : r), V < 0 && (K = ht === t ? r : i), it(D) && (K = K === i ? r : i);
|
|
4308
4301
|
O.originX = K;
|
|
4309
|
-
var R =
|
|
4302
|
+
var R = et("skewing", N(S));
|
|
4310
4303
|
return R(F, O, I, B);
|
|
4311
4304
|
}
|
|
4312
4305
|
function M(F, O, I, B) {
|
|
@@ -4317,9 +4310,9 @@ var Ht = {};
|
|
|
4317
4310
|
var rt = st(O, n, n, I, B);
|
|
4318
4311
|
rt.y > 0 ? K = t : K = a;
|
|
4319
4312
|
} else
|
|
4320
|
-
V > 0 && (K = ht === i ? t : a), V < 0 && (K = ht === i ? a : t),
|
|
4313
|
+
V > 0 && (K = ht === i ? t : a), V < 0 && (K = ht === i ? a : t), it(D) && (K = K === t ? a : t);
|
|
4321
4314
|
O.originY = K;
|
|
4322
|
-
var R =
|
|
4315
|
+
var R = et("skewing", N(b));
|
|
4323
4316
|
return R(F, O, I, B);
|
|
4324
4317
|
}
|
|
4325
4318
|
function C(F, O, I, B) {
|
|
@@ -4356,7 +4349,7 @@ var Ht = {};
|
|
|
4356
4349
|
function T(F, O, I, B) {
|
|
4357
4350
|
return _(F, O, I, B);
|
|
4358
4351
|
}
|
|
4359
|
-
function
|
|
4352
|
+
function k(F, O, I, B) {
|
|
4360
4353
|
return _(F, O, I, B, { by: "x" });
|
|
4361
4354
|
}
|
|
4362
4355
|
function j(F, O, I, B) {
|
|
@@ -4376,8 +4369,8 @@ var Ht = {};
|
|
|
4376
4369
|
var D = O.target, V = I - O.offsetX, K = B - O.offsetY, ht = !D.get("lockMovementX") && D.left !== V, rt = !D.get("lockMovementY") && D.top !== K;
|
|
4377
4370
|
return ht && D.set("left", V), rt && D.set("top", K), (ht || rt) && m("moving", W(F, O, I, B)), ht || rt;
|
|
4378
4371
|
}
|
|
4379
|
-
e.scaleCursorStyleHandler = E, e.skewCursorStyleHandler = L, e.scaleSkewCursorStyleHandler = U, e.rotationWithSnapping =
|
|
4380
|
-
}(
|
|
4372
|
+
e.scaleCursorStyleHandler = E, e.skewCursorStyleHandler = L, e.scaleSkewCursorStyleHandler = U, e.rotationWithSnapping = et("rotating", N(C)), e.scalingEqually = et("scaling", N(T)), e.scalingX = et("scaling", N(k)), e.scalingY = et("scaling", N(j)), e.scalingYOrSkewingX = A, e.scalingXOrSkewingY = z, e.changeWidth = et("resizing", N(G)), e.skewHandlerX = x, e.skewHandlerY = M, e.dragHandler = $, e.scaleOrSkewActionName = q, e.rotationStyleHandler = Z, e.fireEvent = m, e.wrapWithFixedAnchor = N, e.wrapWithFireEvent = et, e.getLocalPoint = st, s.controlsUtils = e;
|
|
4373
|
+
}(P), function(c) {
|
|
4381
4374
|
var s = c.fabric || (c.fabric = {}), l = s.util.degreesToRadians, o = s.controlsUtils;
|
|
4382
4375
|
function e(t, r, a, n, h) {
|
|
4383
4376
|
n = n || {};
|
|
@@ -4390,7 +4383,7 @@ var Ht = {};
|
|
|
4390
4383
|
t.save(), t.fillStyle = n.cornerColor || h.cornerColor, t.strokeStyle = n.cornerStrokeColor || h.cornerStrokeColor, t.lineWidth = 1, t.translate(r, a), t.rotate(l(h.angle)), t[m + "Rect"](-v, -w, u, d), p && t.strokeRect(-v, -w, u, d), t.restore();
|
|
4391
4384
|
}
|
|
4392
4385
|
o.renderCircleControl = e, o.renderSquareControl = i;
|
|
4393
|
-
}(
|
|
4386
|
+
}(P), function(c) {
|
|
4394
4387
|
var s = c.fabric || (c.fabric = {});
|
|
4395
4388
|
function l(o) {
|
|
4396
4389
|
for (var e in o)
|
|
@@ -4673,7 +4666,7 @@ var Ht = {};
|
|
|
4673
4666
|
}
|
|
4674
4667
|
}
|
|
4675
4668
|
};
|
|
4676
|
-
}(
|
|
4669
|
+
}(P), function() {
|
|
4677
4670
|
function c(i, t) {
|
|
4678
4671
|
var r = i.getAttribute("style"), a = i.getAttribute("offset") || 0, n, h, u, d;
|
|
4679
4672
|
if (a = parseFloat(a) / (/%$/.test(a) ? 100 : 1), a = a < 0 ? 0 : a > 1 ? 1 : a, r) {
|
|
@@ -4818,8 +4811,8 @@ var Ht = {};
|
|
|
4818
4811
|
*/
|
|
4819
4812
|
toSVG: function(i, h) {
|
|
4820
4813
|
var r = o(this.coords, !0), a, n, h = h || {}, u, d, g = o(this.colorStops, !0), m = r.r1 > r.r2, p = this.gradientTransform ? this.gradientTransform.concat() : f.iMatrix.concat(), v = -this.offsetX, w = -this.offsetY, E = !!h.additionalTransform, L = this.gradientUnits === "pixels" ? "userSpaceOnUse" : "objectBoundingBox";
|
|
4821
|
-
if (g.sort(function(N,
|
|
4822
|
-
return N.offset -
|
|
4814
|
+
if (g.sort(function(N, et) {
|
|
4815
|
+
return N.offset - et.offset;
|
|
4823
4816
|
}), L === "objectBoundingBox" ? (v /= i.width, w /= i.height) : (v += i.width / 2, w += i.height / 2), i.type === "path" && this.gradientUnits !== "percentage" && (v -= i.pathOffset.x, w -= i.pathOffset.y), p[4] -= v, p[5] -= w, d = 'id="SVGID_' + this.id + '" gradientUnits="' + L + '"', d += ' gradientTransform="' + (E ? h.additionalTransform + " " : "") + f.util.matrixToSVG(p) + '" ', this.type === "linear" ? u = [
|
|
4824
4817
|
"<linearGradient ",
|
|
4825
4818
|
d,
|
|
@@ -5180,7 +5173,7 @@ var Ht = {};
|
|
|
5180
5173
|
}
|
|
5181
5174
|
}
|
|
5182
5175
|
), s.Shadow.reOffsetsAndBlur = /(?:\s|^)(-?\d+(?:\.\d*)?(?:px)?(?:\s?|$))?(-?\d+(?:\.\d*)?(?:px)?(?:\s?|$))?(\d+(?:\.\d*)?(?:px)?)?(?:\s?|$)(?:$|\s)/;
|
|
5183
|
-
}(
|
|
5176
|
+
}(P), function() {
|
|
5184
5177
|
if (f.StaticCanvas) {
|
|
5185
5178
|
f.warn("fabric.StaticCanvas is already defined.");
|
|
5186
5179
|
return;
|
|
@@ -9754,10 +9747,10 @@ var Ht = {};
|
|
|
9754
9747
|
skipOffscreen: !1
|
|
9755
9748
|
});
|
|
9756
9749
|
n.format === "jpeg" && (N.backgroundColor = "#fff"), this.setPositionByOrigin(new s.Point(N.width / 2, N.height / 2), "center", "center");
|
|
9757
|
-
var
|
|
9750
|
+
var et = this.canvas;
|
|
9758
9751
|
N.add(this);
|
|
9759
9752
|
var st = N.toCanvasElement(p || 1, n);
|
|
9760
|
-
return this.shadow = g, this.set("canvas",
|
|
9753
|
+
return this.shadow = g, this.set("canvas", et), d && (this.group = d), this.set(u).setCoords(), N._objects = [], N.dispose(), N = null, st;
|
|
9761
9754
|
},
|
|
9762
9755
|
/**
|
|
9763
9756
|
* Converts an object into a data-url-like string
|
|
@@ -9907,7 +9900,7 @@ var Ht = {};
|
|
|
9907
9900
|
});
|
|
9908
9901
|
});
|
|
9909
9902
|
}, s.Object.__uid = 0);
|
|
9910
|
-
}(
|
|
9903
|
+
}(P), function() {
|
|
9911
9904
|
var c = f.util.degreesToRadians, s = {
|
|
9912
9905
|
left: -0.5,
|
|
9913
9906
|
center: 0,
|
|
@@ -11343,7 +11336,7 @@ var Ht = {};
|
|
|
11343
11336
|
}
|
|
11344
11337
|
};
|
|
11345
11338
|
}
|
|
11346
|
-
}(
|
|
11339
|
+
}(P), function(c) {
|
|
11347
11340
|
var s = c.fabric || (c.fabric = {}), l = s.util.degreesToRadians;
|
|
11348
11341
|
if (s.Circle) {
|
|
11349
11342
|
s.warn("fabric.Circle is already defined.");
|
|
@@ -11480,7 +11473,7 @@ var Ht = {};
|
|
|
11480
11473
|
s.Circle.fromObject = function(e, i) {
|
|
11481
11474
|
s.Object._fromObject("Circle", e, i);
|
|
11482
11475
|
};
|
|
11483
|
-
}(
|
|
11476
|
+
}(P), function(c) {
|
|
11484
11477
|
var s = c.fabric || (c.fabric = {});
|
|
11485
11478
|
if (s.Triangle) {
|
|
11486
11479
|
s.warn("fabric.Triangle is already defined");
|
|
@@ -11541,7 +11534,7 @@ var Ht = {};
|
|
|
11541
11534
|
), s.Triangle.fromObject = function(l, o) {
|
|
11542
11535
|
return s.Object._fromObject("Triangle", l, o);
|
|
11543
11536
|
};
|
|
11544
|
-
}(
|
|
11537
|
+
}(P), function(c) {
|
|
11545
11538
|
var s = c.fabric || (c.fabric = {}), l = Math.PI * 2;
|
|
11546
11539
|
if (s.Ellipse) {
|
|
11547
11540
|
s.warn("fabric.Ellipse is already defined.");
|
|
@@ -11658,7 +11651,7 @@ var Ht = {};
|
|
|
11658
11651
|
}, s.Ellipse.fromObject = function(o, e) {
|
|
11659
11652
|
s.Object._fromObject("Ellipse", o, e);
|
|
11660
11653
|
};
|
|
11661
|
-
}(
|
|
11654
|
+
}(P), function(c) {
|
|
11662
11655
|
var s = c.fabric || (c.fabric = {}), l = s.util.object.extend;
|
|
11663
11656
|
if (s.Rect) {
|
|
11664
11657
|
s.warn("fabric.Rect is already defined");
|
|
@@ -11764,7 +11757,7 @@ var Ht = {};
|
|
|
11764
11757
|
}, s.Rect.fromObject = function(o, e) {
|
|
11765
11758
|
return s.Object._fromObject("Rect", o, e);
|
|
11766
11759
|
};
|
|
11767
|
-
}(
|
|
11760
|
+
}(P), function(c) {
|
|
11768
11761
|
var s = c.fabric || (c.fabric = {}), l = s.util.object.extend, o = s.util.array.min, e = s.util.array.max, i = s.util.toFixed, t = s.util.projectStrokeOnPoints;
|
|
11769
11762
|
if (s.Polyline) {
|
|
11770
11763
|
s.warn("fabric.Polyline is already defined");
|
|
@@ -11934,7 +11927,7 @@ var Ht = {};
|
|
|
11934
11927
|
}, s.Polyline.fromElement = s.Polyline.fromElementGenerator("Polyline"), s.Polyline.fromObject = function(r, a) {
|
|
11935
11928
|
return s.Object._fromObject("Polyline", r, a, "points");
|
|
11936
11929
|
};
|
|
11937
|
-
}(
|
|
11930
|
+
}(P), function(c) {
|
|
11938
11931
|
var s = c.fabric || (c.fabric = {}), l = s.util.projectStrokeOnPoints;
|
|
11939
11932
|
if (s.Polygon) {
|
|
11940
11933
|
s.warn("fabric.Polygon is already defined");
|
|
@@ -11967,7 +11960,7 @@ var Ht = {};
|
|
|
11967
11960
|
), s.Polygon.ATTRIBUTE_NAMES = s.SHARED_ATTRIBUTES.concat(), s.Polygon.fromElement = s.Polyline.fromElementGenerator("Polygon"), s.Polygon.fromObject = function(o, e) {
|
|
11968
11961
|
s.Object._fromObject("Polygon", o, e, "points");
|
|
11969
11962
|
};
|
|
11970
|
-
}(
|
|
11963
|
+
}(P), function(c) {
|
|
11971
11964
|
var s = c.fabric || (c.fabric = {}), l = s.util.array.min, o = s.util.array.max, e = s.util.object.extend, i = s.util.object.clone, t = s.util.toFixed;
|
|
11972
11965
|
if (s.Path) {
|
|
11973
11966
|
s.warn("fabric.Path is already defined");
|
|
@@ -12204,7 +12197,7 @@ var Ht = {};
|
|
|
12204
12197
|
var h = s.parseAttributes(r, s.Path.ATTRIBUTE_NAMES);
|
|
12205
12198
|
h.fromSVG = !0, a(new s.Path(h.d, e(h, n)));
|
|
12206
12199
|
};
|
|
12207
|
-
}(
|
|
12200
|
+
}(P), function(c) {
|
|
12208
12201
|
var s = c.fabric || (c.fabric = {}), l = s.util.array.min, o = s.util.array.max;
|
|
12209
12202
|
s.Group || (s.Group = s.util.createClass(
|
|
12210
12203
|
s.Object,
|
|
@@ -12585,7 +12578,7 @@ var Ht = {};
|
|
|
12585
12578
|
});
|
|
12586
12579
|
});
|
|
12587
12580
|
});
|
|
12588
|
-
}(
|
|
12581
|
+
}(P), function(c) {
|
|
12589
12582
|
var s = c.fabric || (c.fabric = {});
|
|
12590
12583
|
s.ActiveSelection || (s.ActiveSelection = s.util.createClass(
|
|
12591
12584
|
s.Group,
|
|
@@ -12678,7 +12671,7 @@ var Ht = {};
|
|
|
12678
12671
|
delete l.objects, o && o(new s.ActiveSelection(e, l, !0));
|
|
12679
12672
|
});
|
|
12680
12673
|
});
|
|
12681
|
-
}(
|
|
12674
|
+
}(P), function(c) {
|
|
12682
12675
|
var s = f.util.object.extend;
|
|
12683
12676
|
if (c.fabric || (c.fabric = {}), c.fabric.Image) {
|
|
12684
12677
|
f.warn("fabric.Image is already defined.");
|
|
@@ -13168,7 +13161,7 @@ var Ht = {};
|
|
|
13168
13161
|
s(e ? f.util.object.clone(e) : {}, i)
|
|
13169
13162
|
);
|
|
13170
13163
|
};
|
|
13171
|
-
}(
|
|
13164
|
+
}(P), f.util.object.extend(
|
|
13172
13165
|
f.Object.prototype,
|
|
13173
13166
|
/** @lends fabric.Object.prototype */
|
|
13174
13167
|
{
|
|
@@ -13870,7 +13863,7 @@ gl_FragColor = color;
|
|
|
13870
13863
|
}
|
|
13871
13864
|
}
|
|
13872
13865
|
), s.Image.filters.ColorMatrix.fromObject = s.Image.filters.BaseFilter.fromObject;
|
|
13873
|
-
}(
|
|
13866
|
+
}(P), function(c) {
|
|
13874
13867
|
var s = c.fabric || (c.fabric = {}), l = s.Image.filters, o = s.util.createClass;
|
|
13875
13868
|
l.Brightness = o(
|
|
13876
13869
|
l.BaseFilter,
|
|
@@ -13943,7 +13936,7 @@ gl_FragColor = color;
|
|
|
13943
13936
|
}
|
|
13944
13937
|
}
|
|
13945
13938
|
), s.Image.filters.Brightness.fromObject = s.Image.filters.BaseFilter.fromObject;
|
|
13946
|
-
}(
|
|
13939
|
+
}(P), function(c) {
|
|
13947
13940
|
var s = c.fabric || (c.fabric = {}), l = s.util.object.extend, o = s.Image.filters, e = s.util.createClass;
|
|
13948
13941
|
o.Convolute = e(
|
|
13949
13942
|
o.BaseFilter,
|
|
@@ -14128,12 +14121,12 @@ gl_FragColor.a = alpha;
|
|
|
14128
14121
|
* @param {ImageData} options.imageData The Uint8ClampedArray to be filtered.
|
|
14129
14122
|
*/
|
|
14130
14123
|
applyTo2d: function(i) {
|
|
14131
|
-
var t = i.imageData, r = t.data, a = this.matrix, n = Math.round(Math.sqrt(a.length)), h = Math.floor(n / 2), u = t.width, d = t.height, g = i.ctx.createImageData(u, d), m = g.data, p = this.opaque ? 1 : 0, v, w, E, L, U, q, Z, W, N,
|
|
14124
|
+
var t = i.imageData, r = t.data, a = this.matrix, n = Math.round(Math.sqrt(a.length)), h = Math.floor(n / 2), u = t.width, d = t.height, g = i.ctx.createImageData(u, d), m = g.data, p = this.opaque ? 1 : 0, v, w, E, L, U, q, Z, W, N, et, st, it, y;
|
|
14132
14125
|
for (st = 0; st < d; st++)
|
|
14133
|
-
for (
|
|
14134
|
-
for (U = (st * u +
|
|
14135
|
-
for (
|
|
14136
|
-
Z = st + y - h, q =
|
|
14126
|
+
for (et = 0; et < u; et++) {
|
|
14127
|
+
for (U = (st * u + et) * 4, v = 0, w = 0, E = 0, L = 0, y = 0; y < n; y++)
|
|
14128
|
+
for (it = 0; it < n; it++)
|
|
14129
|
+
Z = st + y - h, q = et + it - h, !(Z < 0 || Z >= d || q < 0 || q >= u) && (W = (Z * u + q) * 4, N = a[y * n + it], v += r[W] * N, w += r[W + 1] * N, E += r[W + 2] * N, p || (L += r[W + 3] * N));
|
|
14137
14130
|
m[U] = v, m[U + 1] = w, m[U + 2] = E, p ? m[U + 3] = r[U + 3] : m[U + 3] = L;
|
|
14138
14131
|
}
|
|
14139
14132
|
i.imageData = g;
|
|
@@ -14173,7 +14166,7 @@ gl_FragColor.a = alpha;
|
|
|
14173
14166
|
}
|
|
14174
14167
|
}
|
|
14175
14168
|
), s.Image.filters.Convolute.fromObject = s.Image.filters.BaseFilter.fromObject;
|
|
14176
|
-
}(
|
|
14169
|
+
}(P), function(c) {
|
|
14177
14170
|
var s = c.fabric || (c.fabric = {}), l = s.Image.filters, o = s.util.createClass;
|
|
14178
14171
|
l.Grayscale = o(
|
|
14179
14172
|
l.BaseFilter,
|
|
@@ -14276,7 +14269,7 @@ gl_FragColor = vec4(average, average, average, col.a);
|
|
|
14276
14269
|
}
|
|
14277
14270
|
}
|
|
14278
14271
|
), s.Image.filters.Grayscale.fromObject = s.Image.filters.BaseFilter.fromObject;
|
|
14279
|
-
}(
|
|
14272
|
+
}(P), function(c) {
|
|
14280
14273
|
var s = c.fabric || (c.fabric = {}), l = s.Image.filters, o = s.util.createClass;
|
|
14281
14274
|
l.Invert = o(
|
|
14282
14275
|
l.BaseFilter,
|
|
@@ -14349,7 +14342,7 @@ gl_FragColor = color;
|
|
|
14349
14342
|
}
|
|
14350
14343
|
}
|
|
14351
14344
|
), s.Image.filters.Invert.fromObject = s.Image.filters.BaseFilter.fromObject;
|
|
14352
|
-
}(
|
|
14345
|
+
}(P), function(c) {
|
|
14353
14346
|
var s = c.fabric || (c.fabric = {}), l = s.util.object.extend, o = s.Image.filters, e = s.util.createClass;
|
|
14354
14347
|
o.Noise = e(
|
|
14355
14348
|
o.BaseFilter,
|
|
@@ -14435,7 +14428,7 @@ gl_FragColor = color;
|
|
|
14435
14428
|
}
|
|
14436
14429
|
}
|
|
14437
14430
|
), s.Image.filters.Noise.fromObject = s.Image.filters.BaseFilter.fromObject;
|
|
14438
|
-
}(
|
|
14431
|
+
}(P), function(c) {
|
|
14439
14432
|
var s = c.fabric || (c.fabric = {}), l = s.Image.filters, o = s.util.createClass;
|
|
14440
14433
|
l.Pixelate = o(
|
|
14441
14434
|
l.BaseFilter,
|
|
@@ -14513,7 +14506,7 @@ gl_FragColor = color;
|
|
|
14513
14506
|
}
|
|
14514
14507
|
}
|
|
14515
14508
|
), s.Image.filters.Pixelate.fromObject = s.Image.filters.BaseFilter.fromObject;
|
|
14516
|
-
}(
|
|
14509
|
+
}(P), function(c) {
|
|
14517
14510
|
var s = c.fabric || (c.fabric = {}), l = s.util.object.extend, o = s.Image.filters, e = s.util.createClass;
|
|
14518
14511
|
o.RemoveColor = e(
|
|
14519
14512
|
o.BaseFilter,
|
|
@@ -14623,7 +14616,7 @@ gl_FragColor.a = 0.0;
|
|
|
14623
14616
|
}
|
|
14624
14617
|
}
|
|
14625
14618
|
), s.Image.filters.RemoveColor.fromObject = s.Image.filters.BaseFilter.fromObject;
|
|
14626
|
-
}(
|
|
14619
|
+
}(P), function(c) {
|
|
14627
14620
|
var s = c.fabric || (c.fabric = {}), l = s.Image.filters, o = s.util.createClass, e = {
|
|
14628
14621
|
Brownie: [
|
|
14629
14622
|
0.5997,
|
|
@@ -14809,7 +14802,7 @@ gl_FragColor.a = 0.0;
|
|
|
14809
14802
|
colorsOnly: !0
|
|
14810
14803
|
}
|
|
14811
14804
|
), s.Image.filters[i].fromObject = s.Image.filters.BaseFilter.fromObject;
|
|
14812
|
-
}(
|
|
14805
|
+
}(P), function(c) {
|
|
14813
14806
|
var s = c.fabric, l = s.Image.filters, o = s.util.createClass;
|
|
14814
14807
|
l.BlendColor = o(
|
|
14815
14808
|
l.BaseFilter,
|
|
@@ -14983,7 +14976,7 @@ if (color.a > 0.0) {
|
|
|
14983
14976
|
}
|
|
14984
14977
|
}
|
|
14985
14978
|
), s.Image.filters.BlendColor.fromObject = s.Image.filters.BaseFilter.fromObject;
|
|
14986
|
-
}(
|
|
14979
|
+
}(P), function(c) {
|
|
14987
14980
|
var s = c.fabric, l = s.Image.filters, o = s.util.createClass;
|
|
14988
14981
|
l.BlendImage = o(
|
|
14989
14982
|
l.BaseFilter,
|
|
@@ -15141,7 +15134,7 @@ gl_FragColor = color;
|
|
|
15141
15134
|
r.image = t, i(new s.Image.filters.BlendImage(r));
|
|
15142
15135
|
});
|
|
15143
15136
|
};
|
|
15144
|
-
}(
|
|
15137
|
+
}(P), function(c) {
|
|
15145
15138
|
var s = c.fabric || (c.fabric = {}), l = Math.pow, o = Math.floor, e = Math.sqrt, i = Math.abs, t = Math.round, r = Math.sin, a = Math.ceil, n = s.Image.filters, h = s.util.createClass;
|
|
15146
15139
|
n.Resize = h(
|
|
15147
15140
|
n.BaseFilter,
|
|
@@ -15299,10 +15292,10 @@ varying vec2 vTexCoord;
|
|
|
15299
15292
|
* @returns {ImageData}
|
|
15300
15293
|
*/
|
|
15301
15294
|
sliceByTwo: function(u, d, g, m, p) {
|
|
15302
|
-
var v = u.imageData, w = 0.5, E = !1, L = !1, U = d * w, q = g * w, Z = s.filterBackend.resources, W, N,
|
|
15295
|
+
var v = u.imageData, w = 0.5, E = !1, L = !1, U = d * w, q = g * w, Z = s.filterBackend.resources, W, N, et = 0, st = 0, it = d, y = 0;
|
|
15303
15296
|
for (Z.sliceByTwo || (Z.sliceByTwo = document.createElement("canvas")), W = Z.sliceByTwo, (W.width < d * 1.5 || W.height < g) && (W.width = d * 1.5, W.height = g), N = W.getContext("2d"), N.clearRect(0, 0, d * 1.5, g), N.putImageData(v, 0, 0), m = o(m), p = o(p); !E || !L; )
|
|
15304
|
-
d = U, g = q, m < o(U * w) ? U = o(U * w) : (U = m, E = !0), p < o(q * w) ? q = o(q * w) : (q = p, L = !0), N.drawImage(W,
|
|
15305
|
-
return N.getImageData(
|
|
15297
|
+
d = U, g = q, m < o(U * w) ? U = o(U * w) : (U = m, E = !0), p < o(q * w) ? q = o(q * w) : (q = p, L = !0), N.drawImage(W, et, st, d, g, it, y, U, q), et = it, st = y, y += q;
|
|
15298
|
+
return N.getImageData(et, st, m, p);
|
|
15306
15299
|
},
|
|
15307
15300
|
/**
|
|
15308
15301
|
* Filter lanczosResize
|
|
@@ -15315,19 +15308,19 @@ varying vec2 vTexCoord;
|
|
|
15315
15308
|
*/
|
|
15316
15309
|
lanczosResize: function(u, d, g, m, p) {
|
|
15317
15310
|
function v(b) {
|
|
15318
|
-
var x, M, C, _, T,
|
|
15311
|
+
var x, M, C, _, T, k, j, A, z, G, $;
|
|
15319
15312
|
for (y.x = (b + 0.5) * q, S.x = o(y.x), x = 0; x < p; x++) {
|
|
15320
|
-
for (y.y = (x + 0.5) * Z, S.y = o(y.y), T = 0,
|
|
15313
|
+
for (y.y = (x + 0.5) * Z, S.y = o(y.y), T = 0, k = 0, j = 0, A = 0, z = 0, M = S.x - et; M <= S.x + et; M++)
|
|
15321
15314
|
if (!(M < 0 || M >= d)) {
|
|
15322
|
-
G = o(1e3 * i(M - y.x)),
|
|
15315
|
+
G = o(1e3 * i(M - y.x)), it[G] || (it[G] = {});
|
|
15323
15316
|
for (var F = S.y - st; F <= S.y + st; F++)
|
|
15324
|
-
F < 0 || F >= g || ($ = o(1e3 * i(F - y.y)),
|
|
15317
|
+
F < 0 || F >= g || ($ = o(1e3 * i(F - y.y)), it[G][$] || (it[G][$] = U(e(l(G * W, 2) + l($ * N, 2)) / 1e3)), C = it[G][$], C > 0 && (_ = (F * d + M) * 4, T += C, k += C * w[_], j += C * w[_ + 1], A += C * w[_ + 2], z += C * w[_ + 3]));
|
|
15325
15318
|
}
|
|
15326
|
-
_ = (x * m + b) * 4, L[_] =
|
|
15319
|
+
_ = (x * m + b) * 4, L[_] = k / T, L[_ + 1] = j / T, L[_ + 2] = A / T, L[_ + 3] = z / T;
|
|
15327
15320
|
}
|
|
15328
15321
|
return ++b < m ? v(b) : E;
|
|
15329
15322
|
}
|
|
15330
|
-
var w = u.imageData.data, E = u.ctx.createImageData(m, p), L = E.data, U = this.lanczosCreate(this.lanczosLobes), q = this.rcpScaleX, Z = this.rcpScaleY, W = 2 / this.rcpScaleX, N = 2 / this.rcpScaleY,
|
|
15323
|
+
var w = u.imageData.data, E = u.ctx.createImageData(m, p), L = E.data, U = this.lanczosCreate(this.lanczosLobes), q = this.rcpScaleX, Z = this.rcpScaleY, W = 2 / this.rcpScaleX, N = 2 / this.rcpScaleY, et = a(q * this.lanczosLobes / 2), st = a(Z * this.lanczosLobes / 2), it = {}, y = {}, S = {};
|
|
15331
15324
|
return v(0);
|
|
15332
15325
|
},
|
|
15333
15326
|
/**
|
|
@@ -15340,11 +15333,11 @@ varying vec2 vTexCoord;
|
|
|
15340
15333
|
* @returns {ImageData}
|
|
15341
15334
|
*/
|
|
15342
15335
|
bilinearFiltering: function(u, d, g, m, p) {
|
|
15343
|
-
var v, w, E, L, U, q, Z, W, N,
|
|
15336
|
+
var v, w, E, L, U, q, Z, W, N, et, st, it, y = 0, S, b = this.rcpScaleX, x = this.rcpScaleY, M = 4 * (d - 1), C = u.imageData, _ = C.data, T = u.ctx.createImageData(m, p), k = T.data;
|
|
15344
15337
|
for (Z = 0; Z < p; Z++)
|
|
15345
15338
|
for (W = 0; W < m; W++)
|
|
15346
|
-
for (U = o(b * W), q = o(x * Z), N = b * W - U,
|
|
15347
|
-
v = _[S + st], w = _[S + 4 + st], E = _[S + M + st], L = _[S + M + 4 + st],
|
|
15339
|
+
for (U = o(b * W), q = o(x * Z), N = b * W - U, et = x * Z - q, S = 4 * (q * d + U), st = 0; st < 4; st++)
|
|
15340
|
+
v = _[S + st], w = _[S + 4 + st], E = _[S + M + st], L = _[S + M + 4 + st], it = v * (1 - N) * (1 - et) + w * N * (1 - et) + E * et * (1 - N) + L * N * et, k[y++] = it;
|
|
15348
15341
|
return T;
|
|
15349
15342
|
},
|
|
15350
15343
|
/**
|
|
@@ -15358,11 +15351,11 @@ varying vec2 vTexCoord;
|
|
|
15358
15351
|
*/
|
|
15359
15352
|
hermiteFastResize: function(u, d, g, m, p) {
|
|
15360
15353
|
for (var v = this.rcpScaleX, w = this.rcpScaleY, E = a(v / 2), L = a(w / 2), U = u.imageData, q = U.data, Z = u.ctx.createImageData(m, p), W = Z.data, N = 0; N < p; N++)
|
|
15361
|
-
for (var
|
|
15362
|
-
for (var st = (
|
|
15363
|
-
for (var
|
|
15354
|
+
for (var et = 0; et < m; et++) {
|
|
15355
|
+
for (var st = (et + N * m) * 4, it = 0, y = 0, S = 0, b = 0, x = 0, M = 0, C = 0, _ = (N + 0.5) * w, T = o(N * w); T < (N + 1) * w; T++)
|
|
15356
|
+
for (var k = i(_ - (T + 0.5)) / L, j = (et + 0.5) * v, A = k * k, z = o(et * v); z < (et + 1) * v; z++) {
|
|
15364
15357
|
var G = i(j - (z + 0.5)) / E, $ = e(A + G * G);
|
|
15365
|
-
$ > 1 && $ < -1 || (
|
|
15358
|
+
$ > 1 && $ < -1 || (it = 2 * $ * $ * $ - 3 * $ * $ + 1, it > 0 && (G = 4 * (z + T * d), C += it * q[G + 3], S += it, q[G + 3] < 255 && (it = it * q[G + 3] / 250), b += it * q[G], x += it * q[G + 1], M += it * q[G + 2], y += it));
|
|
15366
15359
|
}
|
|
15367
15360
|
W[st] = b / y, W[st + 1] = x / y, W[st + 2] = M / y, W[st + 3] = C / S;
|
|
15368
15361
|
}
|
|
@@ -15383,7 +15376,7 @@ varying vec2 vTexCoord;
|
|
|
15383
15376
|
}
|
|
15384
15377
|
}
|
|
15385
15378
|
), s.Image.filters.Resize.fromObject = s.Image.filters.BaseFilter.fromObject;
|
|
15386
|
-
}(
|
|
15379
|
+
}(P), function(c) {
|
|
15387
15380
|
var s = c.fabric || (c.fabric = {}), l = s.Image.filters, o = s.util.createClass;
|
|
15388
15381
|
l.Contrast = o(
|
|
15389
15382
|
l.BaseFilter,
|
|
@@ -15453,7 +15446,7 @@ gl_FragColor = color;
|
|
|
15453
15446
|
}
|
|
15454
15447
|
}
|
|
15455
15448
|
), s.Image.filters.Contrast.fromObject = s.Image.filters.BaseFilter.fromObject;
|
|
15456
|
-
}(
|
|
15449
|
+
}(P), function(c) {
|
|
15457
15450
|
var s = c.fabric || (c.fabric = {}), l = s.Image.filters, o = s.util.createClass;
|
|
15458
15451
|
l.Saturation = o(
|
|
15459
15452
|
l.BaseFilter,
|
|
@@ -15529,7 +15522,7 @@ gl_FragColor = color;
|
|
|
15529
15522
|
}
|
|
15530
15523
|
}
|
|
15531
15524
|
), s.Image.filters.Saturation.fromObject = s.Image.filters.BaseFilter.fromObject;
|
|
15532
|
-
}(
|
|
15525
|
+
}(P), function(c) {
|
|
15533
15526
|
var s = c.fabric || (c.fabric = {}), l = s.Image.filters, o = s.util.createClass;
|
|
15534
15527
|
l.Vibrance = o(
|
|
15535
15528
|
l.BaseFilter,
|
|
@@ -15606,7 +15599,7 @@ gl_FragColor = color;
|
|
|
15606
15599
|
}
|
|
15607
15600
|
}
|
|
15608
15601
|
), s.Image.filters.Vibrance.fromObject = s.Image.filters.BaseFilter.fromObject;
|
|
15609
|
-
}(
|
|
15602
|
+
}(P), function(c) {
|
|
15610
15603
|
var s = c.fabric || (c.fabric = {}), l = s.Image.filters, o = s.util.createClass;
|
|
15611
15604
|
l.Blur = o(
|
|
15612
15605
|
l.BaseFilter,
|
|
@@ -15712,7 +15705,7 @@ gl_FragColor = color / total;
|
|
|
15712
15705
|
}
|
|
15713
15706
|
}
|
|
15714
15707
|
), l.Blur.fromObject = s.Image.filters.BaseFilter.fromObject;
|
|
15715
|
-
}(
|
|
15708
|
+
}(P), function(c) {
|
|
15716
15709
|
var s = c.fabric || (c.fabric = {}), l = s.Image.filters, o = s.util.createClass;
|
|
15717
15710
|
l.Gamma = o(
|
|
15718
15711
|
l.BaseFilter,
|
|
@@ -15791,7 +15784,7 @@ gl_FragColor.rgb *= color.a;
|
|
|
15791
15784
|
}
|
|
15792
15785
|
}
|
|
15793
15786
|
), s.Image.filters.Gamma.fromObject = s.Image.filters.BaseFilter.fromObject;
|
|
15794
|
-
}(
|
|
15787
|
+
}(P), function(c) {
|
|
15795
15788
|
var s = c.fabric || (c.fabric = {}), l = s.Image.filters, o = s.util.createClass;
|
|
15796
15789
|
l.Composed = o(
|
|
15797
15790
|
l.BaseFilter,
|
|
@@ -15844,7 +15837,7 @@ gl_FragColor.rgb *= color.a;
|
|
|
15844
15837
|
}), a = new s.Image.filters.Composed({ subFilters: r });
|
|
15845
15838
|
return i && i(a), a;
|
|
15846
15839
|
};
|
|
15847
|
-
}(
|
|
15840
|
+
}(P), function(c) {
|
|
15848
15841
|
var s = c.fabric || (c.fabric = {}), l = s.Image.filters, o = s.util.createClass;
|
|
15849
15842
|
l.HueRotation = o(
|
|
15850
15843
|
l.ColorMatrix,
|
|
@@ -15921,7 +15914,7 @@ gl_FragColor.rgb *= color.a;
|
|
|
15921
15914
|
}
|
|
15922
15915
|
}
|
|
15923
15916
|
), s.Image.filters.HueRotation.fromObject = s.Image.filters.BaseFilter.fromObject;
|
|
15924
|
-
}(
|
|
15917
|
+
}(P), function(c) {
|
|
15925
15918
|
var s = c.fabric || (c.fabric = {}), l = s.util.object.clone;
|
|
15926
15919
|
if (s.Text) {
|
|
15927
15920
|
s.warn("fabric.Text is already defined");
|
|
@@ -16636,8 +16629,8 @@ gl_FragColor.rgb *= color.a;
|
|
|
16636
16629
|
this._renderChar(e, i, n, 0, t.join(""), r, a, h), i.restore();
|
|
16637
16630
|
return;
|
|
16638
16631
|
}
|
|
16639
|
-
for (var N = 0,
|
|
16640
|
-
w = N ===
|
|
16632
|
+
for (var N = 0, et = t.length - 1; N <= et; N++)
|
|
16633
|
+
w = N === et || this.charSpacing || E, m += t[N], p = this.__charBounds[n][N], v === 0 ? (r += q * (p.kernedWidth - p.width), v += p.width) : v += p.kernedWidth, u && !w && this._reSpaceAndTab.test(t[N]) && (w = !0), w || (d = d || this.getCompleteStyleDeclaration(n, N), g = this.getCompleteStyleDeclaration(n, N + 1), w = s.util.hasStyleChanged(d, g, !1)), w && (E ? (i.save(), i.translate(p.renderLeft, p.renderTop), i.rotate(p.angle), this._renderChar(e, i, n, N, m, -v / 2, 0, h), i.restore()) : (Z = r, this._renderChar(e, i, n, N, m, Z, a, h)), m = "", d = g, r += q * v, v = 0);
|
|
16641
16634
|
i.restore();
|
|
16642
16635
|
},
|
|
16643
16636
|
/**
|
|
@@ -16769,14 +16762,14 @@ gl_FragColor.rgb *= color.a;
|
|
|
16769
16762
|
_renderTextDecoration: function(e, i) {
|
|
16770
16763
|
if (!(!this[i] && !this.styleHas(i))) {
|
|
16771
16764
|
e.save(), (i === "overline" || i === "linethrough") && this._removeShadow(e);
|
|
16772
|
-
for (var t, r, a, n, h, u, d, g, m = this._getLeftOffset(), p = this._getTopOffset(), v, w, E, L, U, q, Z, W, N = this.path,
|
|
16773
|
-
if (t = this.getHeightOfLine(
|
|
16765
|
+
for (var t, r, a, n, h, u, d, g, m = this._getLeftOffset(), p = this._getTopOffset(), v, w, E, L, U, q, Z, W, N = this.path, et = this._getWidthOfCharSpacing(), st = this.offsets[i], it = 0, y = this._textLines.length; it < y; it++) {
|
|
16766
|
+
if (t = this.getHeightOfLine(it), !this[i] && !this.styleHas(i, it)) {
|
|
16774
16767
|
p += t;
|
|
16775
16768
|
continue;
|
|
16776
16769
|
}
|
|
16777
|
-
d = this._textLines[
|
|
16770
|
+
d = this._textLines[it], q = t / this.lineHeight, n = this._getLineLeftOffset(it), w = 0, E = 0, g = this.getValueOfPropertyAt(it, 0, i), W = this.getValueOfPropertyAt(it, 0, "fill"), v = p + q * (1 - this._fontSizeFraction), r = this.getHeightOfChar(it, 0), h = this.getValueOfPropertyAt(it, 0, "deltaY");
|
|
16778
16771
|
for (var S = 0, b = d.length; S < b; S++)
|
|
16779
|
-
if (L = this.__charBounds[
|
|
16772
|
+
if (L = this.__charBounds[it][S], U = this.getValueOfPropertyAt(it, S, i), Z = this.getValueOfPropertyAt(it, S, "fill"), a = this.getHeightOfChar(it, S), u = this.getValueOfPropertyAt(it, S, "deltaY"), N && U && Z)
|
|
16780
16773
|
e.save(), e.fillStyle = W, e.translate(L.renderLeft, L.renderTop), e.rotate(L.angle), e.fillRect(
|
|
16781
16774
|
-L.kernedWidth / 2,
|
|
16782
16775
|
st * a + u,
|
|
@@ -16797,7 +16790,7 @@ gl_FragColor.rgb *= color.a;
|
|
|
16797
16790
|
this.direction === "rtl" && (x = this.width - x - E), e.fillStyle = Z, U && Z && e.fillRect(
|
|
16798
16791
|
x,
|
|
16799
16792
|
v + st * r + h,
|
|
16800
|
-
E -
|
|
16793
|
+
E - et,
|
|
16801
16794
|
this.fontSize / 15
|
|
16802
16795
|
), p += t;
|
|
16803
16796
|
}
|
|
@@ -16901,7 +16894,7 @@ gl_FragColor.rgb *= color.a;
|
|
|
16901
16894
|
}, "path") : i(a);
|
|
16902
16895
|
}, "text");
|
|
16903
16896
|
}, s.Text.genericFonts = ["sans-serif", "serif", "cursive", "fantasy", "monospace"], s.util.createAccessors && s.util.createAccessors(s.Text);
|
|
16904
|
-
}(
|
|
16897
|
+
}(P), function() {
|
|
16905
16898
|
f.util.object.extend(
|
|
16906
16899
|
f.Text.prototype,
|
|
16907
16900
|
/** @lends fabric.Text.prototype */
|
|
@@ -18842,7 +18835,7 @@ gl_FragColor.rgb *= color.a;
|
|
|
18842
18835
|
}, "path") : o(t);
|
|
18843
18836
|
}, "text");
|
|
18844
18837
|
};
|
|
18845
|
-
}(
|
|
18838
|
+
}(P), function() {
|
|
18846
18839
|
var c = f.controlsUtils, s = c.scaleSkewCursorStyleHandler, l = c.scaleCursorStyleHandler, o = c.scalingEqually, e = c.scalingYOrSkewingX, i = c.scalingXOrSkewingY, t = c.scaleOrSkewActionName, r = f.Object.prototype.controls;
|
|
18847
18840
|
if (r.ml = new f.Control({
|
|
18848
18841
|
x: -0.5,
|
|
@@ -18914,7 +18907,7 @@ gl_FragColor.rgb *= color.a;
|
|
|
18914
18907
|
}
|
|
18915
18908
|
}();
|
|
18916
18909
|
})(Ht);
|
|
18917
|
-
const
|
|
18910
|
+
const si = { key: 1 }, ai = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
18918
18911
|
__name: "ImageCanvas",
|
|
18919
18912
|
props: {
|
|
18920
18913
|
headline: { type: String, required: !0, default: "" },
|
|
@@ -18940,14 +18933,14 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
18940
18933
|
required: !0
|
|
18941
18934
|
}
|
|
18942
18935
|
},
|
|
18943
|
-
setup(
|
|
18944
|
-
const f =
|
|
18936
|
+
setup(P) {
|
|
18937
|
+
const f = P, nt = Ct(() => `${f.size.width}/${f.size.height}`), tt = gt(null), lt = gt(null);
|
|
18945
18938
|
let H;
|
|
18946
18939
|
function J() {
|
|
18947
18940
|
var e, i;
|
|
18948
|
-
|
|
18949
|
-
width: ((e =
|
|
18950
|
-
height: ((i =
|
|
18941
|
+
tt.value && !H && (H = new Ht.fabric.Canvas(tt.value, {
|
|
18942
|
+
width: ((e = tt.value) == null ? void 0 : e.offsetWidth) || 0,
|
|
18943
|
+
height: ((i = tt.value) == null ? void 0 : i.offsetHeight) || 0
|
|
18951
18944
|
}), o = new Ht.fabric.Textbox(f.headline, {
|
|
18952
18945
|
selectable: !0,
|
|
18953
18946
|
textAlign: "center",
|
|
@@ -18986,7 +18979,7 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
18986
18979
|
}, { immediate: !0 }), jt(
|
|
18987
18980
|
[() => f.image, () => f.isLoading],
|
|
18988
18981
|
([e]) => {
|
|
18989
|
-
e &&
|
|
18982
|
+
e && fe(() => {
|
|
18990
18983
|
J(), H.setDimensions({
|
|
18991
18984
|
width: lt.value.offsetWidth,
|
|
18992
18985
|
height: lt.value.offsetHeight
|
|
@@ -19037,20 +19030,20 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19037
19030
|
class: "w-full bg-fm-color-neutral-gray-200 flex justify-center items-center",
|
|
19038
19031
|
style: Ft({ aspectRatio: X(nt) })
|
|
19039
19032
|
}, [
|
|
19040
|
-
|
|
19033
|
+
P.isLoading ? (Q(), vt(t, { key: 0 })) : (Q(), ut("p", si, "no selected image"))
|
|
19041
19034
|
], 4), [
|
|
19042
|
-
[Pt, !
|
|
19035
|
+
[Pt, !P.image || P.isLoading]
|
|
19043
19036
|
]),
|
|
19044
|
-
wt(Y("div",
|
|
19037
|
+
wt(Y("div", ai, [
|
|
19045
19038
|
Y("canvas", {
|
|
19046
19039
|
ref_key: "canvasRef",
|
|
19047
|
-
ref:
|
|
19040
|
+
ref: tt
|
|
19048
19041
|
}, null, 512)
|
|
19049
19042
|
], 512), [
|
|
19050
|
-
[Pt, !
|
|
19043
|
+
[Pt, !P.isLoading && P.image]
|
|
19051
19044
|
]),
|
|
19052
19045
|
ee(e.$slots, "default"),
|
|
19053
|
-
|
|
19046
|
+
P.image ? (Q(), ut("button", {
|
|
19054
19047
|
key: 0,
|
|
19055
19048
|
onClick: l,
|
|
19056
19049
|
class: "absolute flex gap-[8px] justify-center items-center bottom-[8px] right-[16px] bg-white rounded-lg py-[8px] px-[12px] hover:bg-fm-color-neutral-gray-200"
|
|
@@ -19062,7 +19055,7 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19062
19055
|
]);
|
|
19063
19056
|
};
|
|
19064
19057
|
}
|
|
19065
|
-
}),
|
|
19058
|
+
}), oi = { class: "max-w-[600px]" }, li = { class: "flex flex-col bg-white p-[24px] gap-[16px] w-full" }, hi = { class: "relative flex flex-row gap-[11px]" }, ci = ["src"], ui = { class: "flex flex-col justify-center align-middle" }, fi = { class: "fm-typo-en-body-lg-600" }, di = ["innerHTML"], gi = { class: "flex pt-[24px] gap-[24px]" }, mi = ["src", "onClick", "alt"], pi = /* @__PURE__ */ bt({
|
|
19066
19059
|
__name: "FacebookPost",
|
|
19067
19060
|
props: {
|
|
19068
19061
|
caption: { type: String, required: !0, default: "" },
|
|
@@ -19098,22 +19091,22 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19098
19091
|
required: !0
|
|
19099
19092
|
}
|
|
19100
19093
|
},
|
|
19101
|
-
setup(
|
|
19102
|
-
const f =
|
|
19103
|
-
return (lt, H) => (Q(), ut("div",
|
|
19104
|
-
Y("div",
|
|
19105
|
-
Y("div",
|
|
19094
|
+
setup(P) {
|
|
19095
|
+
const f = P, nt = gt(0), tt = Ct(() => f.images[nt.value]);
|
|
19096
|
+
return (lt, H) => (Q(), ut("div", oi, [
|
|
19097
|
+
Y("div", li, [
|
|
19098
|
+
Y("div", hi, [
|
|
19106
19099
|
Y("img", {
|
|
19107
19100
|
class: "h-[31px] w-[31px] rounded-xl",
|
|
19108
19101
|
src: f.businessIcon,
|
|
19109
19102
|
style: { objectFit: "cover" }
|
|
19110
|
-
}, null, 8,
|
|
19111
|
-
Y("div",
|
|
19112
|
-
Y("p",
|
|
19103
|
+
}, null, 8, ci),
|
|
19104
|
+
Y("div", ui, [
|
|
19105
|
+
Y("p", fi, Tt(f.businessName), 1),
|
|
19113
19106
|
H[0] || (H[0] = Y("div", { class: "flex flex-row items-center gap-[5px]" }, [
|
|
19114
19107
|
Y("p", { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-300" }, " 1 sec ago "),
|
|
19115
19108
|
Y("img", {
|
|
19116
|
-
src:
|
|
19109
|
+
src: ri,
|
|
19117
19110
|
class: "w-[24px] h-[24px]"
|
|
19118
19111
|
})
|
|
19119
19112
|
], -1))
|
|
@@ -19122,16 +19115,16 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19122
19115
|
Y("p", {
|
|
19123
19116
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary line-clamp-6 text-ellipsis",
|
|
19124
19117
|
innerHTML: f.caption
|
|
19125
|
-
}, null, 8,
|
|
19118
|
+
}, null, 8, di)
|
|
19126
19119
|
]),
|
|
19127
19120
|
ot(Rt, {
|
|
19128
|
-
"is-loading":
|
|
19129
|
-
image: X(
|
|
19130
|
-
size:
|
|
19131
|
-
headline:
|
|
19132
|
-
style: Ft(
|
|
19121
|
+
"is-loading": P.isLoading,
|
|
19122
|
+
image: X(tt),
|
|
19123
|
+
size: P.size,
|
|
19124
|
+
headline: P.headline,
|
|
19125
|
+
style: Ft(P.headlineStyle)
|
|
19133
19126
|
}, null, 8, ["is-loading", "image", "size", "headline", "style"]),
|
|
19134
|
-
wt(Y("div",
|
|
19127
|
+
wt(Y("div", gi, [
|
|
19135
19128
|
(Q(!0), ut(xt, null, Ot(f.images, (J, c) => (Q(), ut("img", {
|
|
19136
19129
|
src: J,
|
|
19137
19130
|
key: `image_${c}`,
|
|
@@ -19139,13 +19132,13 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19139
19132
|
onClick: (s) => nt.value = c,
|
|
19140
19133
|
alt: `ai_image_predict_${c}`,
|
|
19141
19134
|
style: { objectFit: "cover" }
|
|
19142
|
-
}, null, 10,
|
|
19135
|
+
}, null, 10, mi))), 128))
|
|
19143
19136
|
], 512), [
|
|
19144
|
-
[Pt, !
|
|
19137
|
+
[Pt, !P.isLoading]
|
|
19145
19138
|
])
|
|
19146
19139
|
]));
|
|
19147
19140
|
}
|
|
19148
|
-
}),
|
|
19141
|
+
}), vi = { class: "max-w-[375px]" }, yi = { class: "absolute w-full flex flex-col px-[12px] pt-[20px] text-white text-box-black-white" }, _i = { class: "flex flex-row w-full justify-center items-center gap-[8px] relative" }, Ci = { class: "relative" }, xi = ["src"], bi = { class: "fm-typo-en-body-sm-400" }, Si = { class: "flex pt-[24px] gap-[24px]" }, wi = ["src", "onClick", "alt"], Ti = /* @__PURE__ */ bt({
|
|
19149
19142
|
__name: "FacebookStory",
|
|
19150
19143
|
props: {
|
|
19151
19144
|
caption: { type: String, required: !0, default: "No selected caption." },
|
|
@@ -19181,29 +19174,29 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19181
19174
|
required: !0
|
|
19182
19175
|
}
|
|
19183
19176
|
},
|
|
19184
|
-
setup(
|
|
19185
|
-
const f =
|
|
19177
|
+
setup(P) {
|
|
19178
|
+
const f = P, nt = gt(0), tt = Ct(() => f.images[nt.value]);
|
|
19186
19179
|
return (lt, H) => {
|
|
19187
19180
|
const J = ft("FmIcon");
|
|
19188
|
-
return Q(), ut("div",
|
|
19181
|
+
return Q(), ut("div", vi, [
|
|
19189
19182
|
ot(Rt, {
|
|
19190
|
-
"is-loading":
|
|
19191
|
-
image: X(
|
|
19192
|
-
size:
|
|
19193
|
-
headline:
|
|
19194
|
-
style: Ft(
|
|
19183
|
+
"is-loading": P.isLoading,
|
|
19184
|
+
image: X(tt),
|
|
19185
|
+
size: P.size,
|
|
19186
|
+
headline: P.headline,
|
|
19187
|
+
style: Ft(P.headlineStyle)
|
|
19195
19188
|
}, {
|
|
19196
19189
|
default: pt(() => [
|
|
19197
|
-
Y("div",
|
|
19198
|
-
Y("div",
|
|
19199
|
-
Y("div",
|
|
19190
|
+
Y("div", yi, [
|
|
19191
|
+
Y("div", _i, [
|
|
19192
|
+
Y("div", Ci, [
|
|
19200
19193
|
Y("img", {
|
|
19201
19194
|
class: "rounded-xl h-[31px] w-[31px]",
|
|
19202
19195
|
src: f.businessIcon,
|
|
19203
19196
|
style: { objectFit: "cover" }
|
|
19204
|
-
}, null, 8,
|
|
19197
|
+
}, null, 8, xi)
|
|
19205
19198
|
]),
|
|
19206
|
-
Y("p",
|
|
19199
|
+
Y("p", bi, Tt(f.businessName), 1),
|
|
19207
19200
|
H[0] || (H[0] = Y("p", { class: "fm-typo-en-body-sm-400" }, "1 sec", -1)),
|
|
19208
19201
|
H[1] || (H[1] = Y("div", { class: "grow" }, null, -1)),
|
|
19209
19202
|
ot(J, { name: "more_horiz" }),
|
|
@@ -19214,7 +19207,7 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19214
19207
|
]),
|
|
19215
19208
|
_: 1
|
|
19216
19209
|
}, 8, ["is-loading", "image", "size", "headline", "style"]),
|
|
19217
|
-
wt(Y("div",
|
|
19210
|
+
wt(Y("div", Si, [
|
|
19218
19211
|
(Q(!0), ut(xt, null, Ot(f.images, (c, s) => (Q(), ut("img", {
|
|
19219
19212
|
src: c,
|
|
19220
19213
|
key: `image_${s}`,
|
|
@@ -19222,14 +19215,14 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19222
19215
|
onClick: (l) => nt.value = s,
|
|
19223
19216
|
alt: `ai_image_predict_${s}`,
|
|
19224
19217
|
style: { objectFit: "cover" }
|
|
19225
|
-
}, null, 10,
|
|
19218
|
+
}, null, 10, wi))), 128))
|
|
19226
19219
|
], 512), [
|
|
19227
|
-
[Pt, !
|
|
19220
|
+
[Pt, !P.isLoading]
|
|
19228
19221
|
])
|
|
19229
19222
|
]);
|
|
19230
19223
|
};
|
|
19231
19224
|
}
|
|
19232
|
-
}),
|
|
19225
|
+
}), Oi = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icons'%3e%3cpath%20id='Vector'%20d='M12.314%206.18333L11.6642%205.55288C11.5296%205.42238%2011.4002%205.29733%2011.2744%205.17585C11.0546%204.96351%2010.8461%204.76206%2010.6415%204.56141C9.00072%202.95363%206.74236%202.49843%204.93299%203.27967L4.93283%203.27973C3.11907%204.06244%201.85702%206.05591%201.90111%208.28774L1.90111%208.2878C1.93442%209.97965%202.64327%2011.4798%203.67634%2012.964L3.67663%2012.9644C5.93146%2016.2077%208.99036%2018.6439%2012.2533%2021.0298C14.6308%2019.2988%2016.895%2017.5125%2018.8503%2015.3974L19.5111%2016.0083L18.8503%2015.3974C20.5094%2013.6026%2021.8746%2011.7871%2022.4325%209.53909L22.4326%209.53886C23.0207%207.17223%2022.0148%204.70667%2020.1001%203.55451L12.314%206.18333ZM12.314%206.18333L12.9405%205.52971M12.314%206.18333L12.9405%205.52971M12.9405%205.52971C13.0847%205.37935%2013.212%205.24125%2013.3317%205.11141C13.5615%204.86221%2013.7633%204.64342%2014.0019%204.42667L14.0023%204.42636M12.9405%205.52971L14.0023%204.42636M14.0023%204.42636C15.8653%202.73241%2018.2782%202.4589%2020.1%203.55442L14.0023%204.42636ZM12.0873%2021.1505C12.0875%2021.1503%2012.0877%2021.1502%2012.088%2021.15C12.0878%2021.1501%2012.0875%2021.1503%2012.0873%2021.1504L12.0873%2021.1505ZM12.1764%2021.1002L12.1835%2021.0999C12.1896%2021.0997%2012.2038%2021.0997%2012.225%2021.1022C12.2453%2021.1045%2012.2813%2021.1102%2012.3278%2021.1253C12.3732%2021.1402%2012.444%2021.169%2012.5215%2021.2254L12.1764%2021.1002Z'%20fill='%23FE0135'%20stroke='%23FE0135'%20stroke-width='1.8'/%3e%3c/g%3e%3c/svg%3e", ki = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icons'%3e%3cg%20id='Union'%3e%3cmask%20id='path-1-inside-1_2770_16980'%20fill='white'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M21.4517%2017.6305C22.435%2015.9834%2023%2014.0577%2023%2012C23%205.92487%2018.0751%201%2012%201C5.92487%201%201%205.92487%201%2012C1%2018.0751%205.92487%2023%2012%2023C14.062%2023%2015.9915%2022.4326%2017.6409%2021.4455L22.8478%2022.8407L21.4517%2017.6305Z'/%3e%3c/mask%3e%3cpath%20d='M21.4517%2017.6305L19.9062%2016.7078C19.6568%2017.1255%2019.5871%2017.6264%2019.7131%2018.0963L21.4517%2017.6305ZM17.6409%2021.4455L18.1068%2019.7068C17.6362%2019.5807%2017.1346%2019.6508%2016.7165%2019.901L17.6409%2021.4455ZM22.8478%2022.8407L22.3819%2024.5793C23.0031%2024.7458%2023.6659%2024.5682%2024.1206%2024.1135C24.5753%2023.6587%2024.7529%2022.996%2024.5865%2022.3748L22.8478%2022.8407ZM21.2%2012C21.2%2013.7239%2020.7276%2015.3319%2019.9062%2016.7078L22.9973%2018.5531C24.1425%2016.6348%2024.8%2014.3915%2024.8%2012H21.2ZM12%202.8C17.081%202.8%2021.2%206.91898%2021.2%2012H24.8C24.8%204.93076%2019.0692%20-0.8%2012%20-0.8V2.8ZM2.8%2012C2.8%206.91898%206.91898%202.8%2012%202.8V-0.8C4.93076%20-0.8%20-0.8%204.93076%20-0.8%2012H2.8ZM12%2021.2C6.91898%2021.2%202.8%2017.081%202.8%2012H-0.8C-0.8%2019.0692%204.93076%2024.8%2012%2024.8V21.2ZM16.7165%2019.901C15.3387%2020.7256%2013.7275%2021.2%2012%2021.2V24.8C14.3965%2024.8%2016.6443%2024.1397%2018.5653%2022.99L16.7165%2019.901ZM17.175%2023.1842L22.3819%2024.5793L23.3137%2021.102L18.1068%2019.7068L17.175%2023.1842ZM24.5865%2022.3748L23.1904%2017.1646L19.7131%2018.0963L21.1091%2023.3065L24.5865%2022.3748Z'%20fill='black'%20mask='url(%23path-1-inside-1_2770_16980)'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Pi = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icons'%20clip-path='url(%23clip0_2770_16981)'%3e%3cpath%20id='Polygon%204'%20d='M2.68376%203.95005L21.5703%203.95005L12.1272%2020.306L9.36084%2011.2374C9.32085%2011.1063%209.25144%2010.9861%209.15792%2010.8859L2.68376%203.95005Z'%20stroke='black'%20stroke-width='1.8'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2770_16981'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", Ei = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icons'%3e%3cpath%20id='Rectangle%201438'%20d='M3.9%2021.0785V1.9H20.1V21.0785L12.5762%2014.8086C12.2424%2014.5305%2011.7576%2014.5305%2011.4238%2014.8086L3.9%2021.0785Z'%20stroke='black'%20stroke-width='1.8'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e", Mi = { class: "flex flex-col w-[375px] h-[538px]" }, Ai = { class: "flex flex-row bg-white p-[5px] gap-[8px] justify-center items-center" }, Fi = ["src"], Di = { class: "fm-typo-en-body-lg-600" }, Li = { class: "flex flex-col bg-white px-[10px] pt-[10px] pb-[24px]" }, Ii = ["innerHTML"], ji = { class: "flex pt-[24px] gap-[24px]" }, Ri = ["src", "onClick", "alt"], Bi = /* @__PURE__ */ bt({
|
|
19233
19226
|
__name: "InstagramPost",
|
|
19234
19227
|
props: {
|
|
19235
19228
|
caption: { type: String, required: !0, default: "No selected caption." },
|
|
@@ -19265,36 +19258,36 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19265
19258
|
required: !0
|
|
19266
19259
|
}
|
|
19267
19260
|
},
|
|
19268
|
-
setup(
|
|
19269
|
-
const f =
|
|
19261
|
+
setup(P) {
|
|
19262
|
+
const f = P, nt = gt(0), tt = Ct(() => f.images[nt.value]);
|
|
19270
19263
|
return (lt, H) => {
|
|
19271
19264
|
const J = ft("FmIcon");
|
|
19272
|
-
return Q(), ut("div",
|
|
19273
|
-
Y("div",
|
|
19265
|
+
return Q(), ut("div", Mi, [
|
|
19266
|
+
Y("div", Ai, [
|
|
19274
19267
|
Y("img", {
|
|
19275
19268
|
class: "h-[31px] w-[31px] rounded-xl",
|
|
19276
19269
|
src: f.businessIcon,
|
|
19277
19270
|
style: { objectFit: "cover" }
|
|
19278
|
-
}, null, 8,
|
|
19279
|
-
Y("p",
|
|
19271
|
+
}, null, 8, Fi),
|
|
19272
|
+
Y("p", Di, Tt(f.businessName), 1),
|
|
19280
19273
|
H[0] || (H[0] = Y("div", { class: "grow" }, null, -1)),
|
|
19281
19274
|
ot(J, { name: "more_horiz" })
|
|
19282
19275
|
]),
|
|
19283
19276
|
ot(Rt, {
|
|
19284
|
-
"is-loading":
|
|
19285
|
-
image: X(
|
|
19286
|
-
size:
|
|
19287
|
-
headline:
|
|
19288
|
-
style: Ft(
|
|
19277
|
+
"is-loading": P.isLoading,
|
|
19278
|
+
image: X(tt),
|
|
19279
|
+
size: P.size,
|
|
19280
|
+
headline: P.headline,
|
|
19281
|
+
style: Ft(P.headlineStyle)
|
|
19289
19282
|
}, null, 8, ["is-loading", "image", "size", "headline", "style"]),
|
|
19290
|
-
Y("div",
|
|
19291
|
-
H[1] || (H[1] =
|
|
19283
|
+
Y("div", Li, [
|
|
19284
|
+
H[1] || (H[1] = de('<div class="pb-[10px] flex flex-row pr-[5px] gap-[12px]"><img src="' + Oi + '" class="w-[24px] h-[24px]"><img src="' + ki + '" class="w-[24px] h-[24px]"><img src="' + Pi + '" class="w-[24px] h-[24px]"><div class="grow"></div><img src="' + Ei + '" class="w-[24px] h-[24px]"></div>', 1)),
|
|
19292
19285
|
Y("p", {
|
|
19293
19286
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary line-clamp-2 text-ellipsis",
|
|
19294
19287
|
innerHTML: f.caption
|
|
19295
|
-
}, null, 8,
|
|
19288
|
+
}, null, 8, Ii)
|
|
19296
19289
|
]),
|
|
19297
|
-
wt(Y("div",
|
|
19290
|
+
wt(Y("div", ji, [
|
|
19298
19291
|
(Q(!0), ut(xt, null, Ot(f.images, (c, s) => (Q(), ut("img", {
|
|
19299
19292
|
src: c,
|
|
19300
19293
|
key: `image_${s}`,
|
|
@@ -19302,14 +19295,14 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19302
19295
|
onClick: (l) => nt.value = s,
|
|
19303
19296
|
alt: `ai_image_predict_${s}`,
|
|
19304
19297
|
style: { objectFit: "cover" }
|
|
19305
|
-
}, null, 10,
|
|
19298
|
+
}, null, 10, Ri))), 128))
|
|
19306
19299
|
], 512), [
|
|
19307
|
-
[Pt, !
|
|
19300
|
+
[Pt, !P.isLoading]
|
|
19308
19301
|
])
|
|
19309
19302
|
]);
|
|
19310
19303
|
};
|
|
19311
19304
|
}
|
|
19312
|
-
}),
|
|
19305
|
+
}), Xi = { class: "max-w-[375px]" }, zi = { class: "absolute bottom-0 w-full flex flex-col px-[12px] gap-[12px] text-white text-box-white-black pt-[50px]" }, Yi = { class: "flex flex-row justify-start items-center" }, Wi = ["src"], Vi = { class: "fm-typo-en-body-sm-400" }, Hi = { class: "flex flex-row items-center px-[12px] pb-[24px]" }, Ui = ["innerHTML"], Gi = { class: "flex pt-[24px] gap-[24px]" }, Ni = ["src", "onClick", "alt"], $i = /* @__PURE__ */ bt({
|
|
19313
19306
|
__name: "InstagramReel",
|
|
19314
19307
|
props: {
|
|
19315
19308
|
caption: { type: String, required: !0, default: "No selected caption." },
|
|
@@ -19345,33 +19338,33 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19345
19338
|
required: !0
|
|
19346
19339
|
}
|
|
19347
19340
|
},
|
|
19348
|
-
setup(
|
|
19349
|
-
const f =
|
|
19341
|
+
setup(P) {
|
|
19342
|
+
const f = P, nt = gt(0), tt = Ct(() => f.images[nt.value]);
|
|
19350
19343
|
return (lt, H) => {
|
|
19351
19344
|
const J = ft("FmIcon");
|
|
19352
|
-
return Q(), ut("div",
|
|
19345
|
+
return Q(), ut("div", Xi, [
|
|
19353
19346
|
ot(Rt, {
|
|
19354
|
-
"is-loading":
|
|
19355
|
-
image: X(
|
|
19356
|
-
size:
|
|
19357
|
-
headline:
|
|
19358
|
-
style: Ft(
|
|
19347
|
+
"is-loading": P.isLoading,
|
|
19348
|
+
image: X(tt),
|
|
19349
|
+
size: P.size,
|
|
19350
|
+
headline: P.headline,
|
|
19351
|
+
style: Ft(P.headlineStyle)
|
|
19359
19352
|
}, {
|
|
19360
19353
|
default: pt(() => [
|
|
19361
|
-
Y("div",
|
|
19362
|
-
Y("div",
|
|
19354
|
+
Y("div", zi, [
|
|
19355
|
+
Y("div", Yi, [
|
|
19363
19356
|
Y("img", {
|
|
19364
19357
|
class: "h-[31px] w-[31px] rounded-xl",
|
|
19365
19358
|
src: f.businessIcon,
|
|
19366
19359
|
style: { objectFit: "cover" }
|
|
19367
|
-
}, null, 8,
|
|
19368
|
-
Y("p",
|
|
19360
|
+
}, null, 8, Wi),
|
|
19361
|
+
Y("p", Vi, Tt(f.businessName), 1)
|
|
19369
19362
|
]),
|
|
19370
|
-
Y("div",
|
|
19363
|
+
Y("div", Hi, [
|
|
19371
19364
|
Y("p", {
|
|
19372
19365
|
class: "fm-typo-en-body-lg-400 line-clamp-2 text-ellipsis",
|
|
19373
19366
|
innerHTML: f.caption
|
|
19374
|
-
}, null, 8,
|
|
19367
|
+
}, null, 8, Ui),
|
|
19375
19368
|
H[0] || (H[0] = Y("div", { class: "grow" }, null, -1)),
|
|
19376
19369
|
ot(J, { name: "more_horiz" })
|
|
19377
19370
|
])
|
|
@@ -19379,7 +19372,7 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19379
19372
|
]),
|
|
19380
19373
|
_: 1
|
|
19381
19374
|
}, 8, ["is-loading", "image", "size", "headline", "style"]),
|
|
19382
|
-
wt(Y("div",
|
|
19375
|
+
wt(Y("div", Gi, [
|
|
19383
19376
|
(Q(!0), ut(xt, null, Ot(f.images, (c, s) => (Q(), ut("img", {
|
|
19384
19377
|
src: c,
|
|
19385
19378
|
key: `image_${s}`,
|
|
@@ -19387,14 +19380,14 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19387
19380
|
onClick: (l) => nt.value = s,
|
|
19388
19381
|
alt: `ai_image_predict_${s}`,
|
|
19389
19382
|
style: { objectFit: "cover" }
|
|
19390
|
-
}, null, 10,
|
|
19383
|
+
}, null, 10, Ni))), 128))
|
|
19391
19384
|
], 512), [
|
|
19392
|
-
[Pt, !
|
|
19385
|
+
[Pt, !P.isLoading]
|
|
19393
19386
|
])
|
|
19394
19387
|
]);
|
|
19395
19388
|
};
|
|
19396
19389
|
}
|
|
19397
|
-
}),
|
|
19390
|
+
}), qi = { class: "max-w-[375px]" }, Ki = { class: "absolute w-full flex flex-col px-[12px] pt-[20px] text-white text-box-black-white" }, Zi = { class: "flex flex-row w-full justify-center items-center gap-[8px]" }, Ji = ["src"], Qi = { class: "fm-typo-en-body-sm-400" }, tn = { class: "flex pt-[24px] gap-[24px]" }, en = ["src", "onClick", "alt"], nn = /* @__PURE__ */ bt({
|
|
19398
19391
|
__name: "InstagramStory",
|
|
19399
19392
|
props: {
|
|
19400
19393
|
caption: { type: String, required: !0, default: "No selected caption." },
|
|
@@ -19430,27 +19423,27 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19430
19423
|
required: !0
|
|
19431
19424
|
}
|
|
19432
19425
|
},
|
|
19433
|
-
setup(
|
|
19434
|
-
const f =
|
|
19426
|
+
setup(P) {
|
|
19427
|
+
const f = P, nt = gt(0), tt = Ct(() => f.images[nt.value]);
|
|
19435
19428
|
return (lt, H) => {
|
|
19436
19429
|
const J = ft("FmIcon");
|
|
19437
|
-
return Q(), ut("div",
|
|
19430
|
+
return Q(), ut("div", qi, [
|
|
19438
19431
|
ot(Rt, {
|
|
19439
|
-
"is-loading":
|
|
19440
|
-
image: X(
|
|
19441
|
-
size:
|
|
19442
|
-
headline:
|
|
19443
|
-
style: Ft(
|
|
19432
|
+
"is-loading": P.isLoading,
|
|
19433
|
+
image: X(tt),
|
|
19434
|
+
size: P.size,
|
|
19435
|
+
headline: P.headline,
|
|
19436
|
+
style: Ft(P.headlineStyle)
|
|
19444
19437
|
}, {
|
|
19445
19438
|
default: pt(() => [
|
|
19446
|
-
Y("div",
|
|
19447
|
-
Y("div",
|
|
19439
|
+
Y("div", Ki, [
|
|
19440
|
+
Y("div", Zi, [
|
|
19448
19441
|
Y("img", {
|
|
19449
19442
|
class: "h-[31px] w-[31px] rounded-xl",
|
|
19450
19443
|
src: f.businessIcon,
|
|
19451
19444
|
style: { objectFit: "cover" }
|
|
19452
|
-
}, null, 8,
|
|
19453
|
-
Y("p",
|
|
19445
|
+
}, null, 8, Ji),
|
|
19446
|
+
Y("p", Qi, Tt(f.businessName), 1),
|
|
19454
19447
|
H[0] || (H[0] = Y("p", { class: "fm-typo-en-body-sm-400" }, "1 sec", -1)),
|
|
19455
19448
|
H[1] || (H[1] = Y("div", { class: "grow" }, null, -1)),
|
|
19456
19449
|
ot(J, { name: "more_horiz" }),
|
|
@@ -19461,7 +19454,7 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19461
19454
|
]),
|
|
19462
19455
|
_: 1
|
|
19463
19456
|
}, 8, ["is-loading", "image", "size", "headline", "style"]),
|
|
19464
|
-
wt(Y("div",
|
|
19457
|
+
wt(Y("div", tn, [
|
|
19465
19458
|
(Q(!0), ut(xt, null, Ot(f.images, (c, s) => (Q(), ut("img", {
|
|
19466
19459
|
src: c,
|
|
19467
19460
|
key: `image_${s}`,
|
|
@@ -19469,14 +19462,14 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19469
19462
|
onClick: (l) => nt.value = s,
|
|
19470
19463
|
alt: `ai_image_predict_${s}`,
|
|
19471
19464
|
style: { objectFit: "cover" }
|
|
19472
|
-
}, null, 10,
|
|
19465
|
+
}, null, 10, en))), 128))
|
|
19473
19466
|
], 512), [
|
|
19474
|
-
[Pt, !
|
|
19467
|
+
[Pt, !P.isLoading]
|
|
19475
19468
|
])
|
|
19476
19469
|
]);
|
|
19477
19470
|
};
|
|
19478
19471
|
}
|
|
19479
|
-
}),
|
|
19472
|
+
}), rn = { class: "max-w-[600px]" }, sn = { class: "flex flex-col w-full" }, an = { class: "flex pt-[24px] gap-[24px]" }, on = ["src", "onClick", "alt"], ln = /* @__PURE__ */ bt({
|
|
19480
19473
|
__name: "TvImage",
|
|
19481
19474
|
props: {
|
|
19482
19475
|
caption: { type: String, required: !0, default: "" },
|
|
@@ -19512,20 +19505,20 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19512
19505
|
required: !0
|
|
19513
19506
|
}
|
|
19514
19507
|
},
|
|
19515
|
-
setup(
|
|
19516
|
-
const f =
|
|
19508
|
+
setup(P) {
|
|
19509
|
+
const f = P, nt = gt(0), tt = Ct(
|
|
19517
19510
|
() => f.images[nt.value]
|
|
19518
19511
|
);
|
|
19519
|
-
return (lt, H) => (Q(), ut("div",
|
|
19520
|
-
Y("div",
|
|
19512
|
+
return (lt, H) => (Q(), ut("div", rn, [
|
|
19513
|
+
Y("div", sn, [
|
|
19521
19514
|
ot(Rt, {
|
|
19522
|
-
"is-loading":
|
|
19523
|
-
image: X(
|
|
19524
|
-
size:
|
|
19525
|
-
headline:
|
|
19526
|
-
style: Ft(
|
|
19515
|
+
"is-loading": P.isLoading,
|
|
19516
|
+
image: X(tt),
|
|
19517
|
+
size: P.size,
|
|
19518
|
+
headline: P.headline,
|
|
19519
|
+
style: Ft(P.headlineStyle)
|
|
19527
19520
|
}, null, 8, ["is-loading", "image", "size", "headline", "style"]),
|
|
19528
|
-
wt(Y("div",
|
|
19521
|
+
wt(Y("div", an, [
|
|
19529
19522
|
(Q(!0), ut(xt, null, Ot(f.images, (J, c) => (Q(), ut("img", {
|
|
19530
19523
|
src: J,
|
|
19531
19524
|
key: `image_${c}`,
|
|
@@ -19533,14 +19526,14 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19533
19526
|
onClick: (s) => nt.value = c,
|
|
19534
19527
|
alt: `ai_image_predict_${c}`,
|
|
19535
19528
|
style: { objectFit: "cover" }
|
|
19536
|
-
}, null, 10,
|
|
19529
|
+
}, null, 10, on))), 128))
|
|
19537
19530
|
], 512), [
|
|
19538
|
-
[Pt, !
|
|
19531
|
+
[Pt, !P.isLoading]
|
|
19539
19532
|
])
|
|
19540
19533
|
])
|
|
19541
19534
|
]));
|
|
19542
19535
|
}
|
|
19543
|
-
}),
|
|
19536
|
+
}), hn = { class: "max-w-[375px]" }, cn = { class: "flex pt-[24px] gap-[24px]" }, un = ["src", "onClick", "alt"], fn = /* @__PURE__ */ bt({
|
|
19544
19537
|
__name: "BrandAppImage",
|
|
19545
19538
|
props: {
|
|
19546
19539
|
caption: { type: String, required: !0, default: "No selected caption." },
|
|
@@ -19576,17 +19569,17 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19576
19569
|
required: !0
|
|
19577
19570
|
}
|
|
19578
19571
|
},
|
|
19579
|
-
setup(
|
|
19580
|
-
const f =
|
|
19581
|
-
return (lt, H) => (Q(), ut("div",
|
|
19572
|
+
setup(P) {
|
|
19573
|
+
const f = P, nt = gt(0), tt = Ct(() => f.images[nt.value]);
|
|
19574
|
+
return (lt, H) => (Q(), ut("div", hn, [
|
|
19582
19575
|
ot(Rt, {
|
|
19583
|
-
"is-loading":
|
|
19584
|
-
image: X(
|
|
19585
|
-
size:
|
|
19586
|
-
headline:
|
|
19587
|
-
style: Ft(
|
|
19576
|
+
"is-loading": P.isLoading,
|
|
19577
|
+
image: X(tt),
|
|
19578
|
+
size: P.size,
|
|
19579
|
+
headline: P.headline,
|
|
19580
|
+
style: Ft(P.headlineStyle)
|
|
19588
19581
|
}, null, 8, ["is-loading", "image", "size", "headline", "style"]),
|
|
19589
|
-
wt(Y("div",
|
|
19582
|
+
wt(Y("div", cn, [
|
|
19590
19583
|
(Q(!0), ut(xt, null, Ot(f.images, (J, c) => (Q(), ut("img", {
|
|
19591
19584
|
src: J,
|
|
19592
19585
|
key: `image_${c}`,
|
|
@@ -19594,13 +19587,13 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19594
19587
|
onClick: (s) => nt.value = c,
|
|
19595
19588
|
alt: `ai_image_predict_${c}`,
|
|
19596
19589
|
style: { objectFit: "cover" }
|
|
19597
|
-
}, null, 10,
|
|
19590
|
+
}, null, 10, un))), 128))
|
|
19598
19591
|
], 512), [
|
|
19599
|
-
[Pt, !
|
|
19592
|
+
[Pt, !P.isLoading]
|
|
19600
19593
|
])
|
|
19601
19594
|
]));
|
|
19602
19595
|
}
|
|
19603
|
-
}),
|
|
19596
|
+
}), dn = { class: "w-1/2 px-[32px] py-[24px] flex flex-col gap-[40px]" }, gn = { class: "flex flex-col gap-[8px]" }, mn = { class: "flex flex-col gap-[16px] w-full" }, pn = { class: "flex flex-col gap-[8px]" }, vn = /* @__PURE__ */ bt({
|
|
19604
19597
|
__name: "RightSheet",
|
|
19605
19598
|
props: {
|
|
19606
19599
|
caption: {
|
|
@@ -19626,16 +19619,16 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19626
19619
|
required: !0
|
|
19627
19620
|
}
|
|
19628
19621
|
},
|
|
19629
|
-
setup(
|
|
19630
|
-
const f =
|
|
19622
|
+
setup(P) {
|
|
19623
|
+
const f = P, nt = Ct(() => f.assets.map((e) => ({
|
|
19631
19624
|
platform: e.platform,
|
|
19632
19625
|
label: e.platform.replace(/_/g, " ")
|
|
19633
|
-
}))),
|
|
19626
|
+
}))), tt = gt(), lt = gt(), H = Ct(() => f.assets.find((e) => {
|
|
19634
19627
|
var i;
|
|
19635
19628
|
return e.platform === ((i = lt.value) == null ? void 0 : i.platform);
|
|
19636
19629
|
})), J = Ct(() => {
|
|
19637
19630
|
var e;
|
|
19638
|
-
return (e = H.value) == null ? void 0 : e.contents.find((i) => i.type ===
|
|
19631
|
+
return (e = H.value) == null ? void 0 : e.contents.find((i) => i.type === tt.value);
|
|
19639
19632
|
});
|
|
19640
19633
|
jt(nt, (e) => {
|
|
19641
19634
|
lt.value = e.find((i) => {
|
|
@@ -19644,7 +19637,7 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19644
19637
|
}) || e[0];
|
|
19645
19638
|
}, { immediate: !0 }), jt(H, (e) => {
|
|
19646
19639
|
const i = e == null ? void 0 : e.contents.map((t) => t.type);
|
|
19647
|
-
i && !i.includes(
|
|
19640
|
+
i && !i.includes(tt.value) && (tt.value = e == null ? void 0 : e.contents[0].type);
|
|
19648
19641
|
}, { immediate: !0 });
|
|
19649
19642
|
const c = (e, i) => {
|
|
19650
19643
|
for (; i !== 0; ) {
|
|
@@ -19661,10 +19654,10 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19661
19654
|
}
|
|
19662
19655
|
const { currentBusiness: o } = Jt();
|
|
19663
19656
|
return (e, i) => {
|
|
19664
|
-
var n, h, u, d, g, m, p, v, w, E, L, U, q, Z, W, N,
|
|
19657
|
+
var n, h, u, d, g, m, p, v, w, E, L, U, q, Z, W, N, et, st, it, y, S, b, x, M, C, _, T, k, j, A, z, G, $, F, O;
|
|
19665
19658
|
const t = ft("FmButtonGroup"), r = ft("FmRadio"), a = ft("FmRadioGroup");
|
|
19666
|
-
return Q(), ut("div",
|
|
19667
|
-
Y("div",
|
|
19659
|
+
return Q(), ut("div", dn, [
|
|
19660
|
+
Y("div", gn, [
|
|
19668
19661
|
i[2] || (i[2] = Y("p", { class: "fm-typo-en-title-sm-800" }, "Select platform", -1)),
|
|
19669
19662
|
i[3] || (i[3] = Y("p", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Generated image will adjust resolution according to selected platform. ", -1)),
|
|
19670
19663
|
ot(t, {
|
|
@@ -19674,8 +19667,8 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19674
19667
|
}, null, 8, ["modelValue", "items"]),
|
|
19675
19668
|
X(H) ? (Q(), vt(a, {
|
|
19676
19669
|
key: 0,
|
|
19677
|
-
modelValue: X(
|
|
19678
|
-
"onUpdate:modelValue": i[1] || (i[1] = (I) => At(
|
|
19670
|
+
modelValue: X(tt),
|
|
19671
|
+
"onUpdate:modelValue": i[1] || (i[1] = (I) => At(tt) ? tt.value = I : null)
|
|
19679
19672
|
}, {
|
|
19680
19673
|
default: pt(() => [
|
|
19681
19674
|
(Q(!0), ut(xt, null, Ot(X(H).contents, (I, B) => (Q(), vt(r, {
|
|
@@ -19688,23 +19681,23 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19688
19681
|
_: 1
|
|
19689
19682
|
}, 8, ["modelValue"])) : Et("", !0)
|
|
19690
19683
|
]),
|
|
19691
|
-
Y("div",
|
|
19692
|
-
Y("div",
|
|
19684
|
+
Y("div", mn, [
|
|
19685
|
+
Y("div", pn, [
|
|
19693
19686
|
i[4] || (i[4] = Y("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1)),
|
|
19694
19687
|
i[5] || (i[5] = Y("p", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Generated design here is for preview only. ", -1)),
|
|
19695
|
-
((n = X(H)) == null ? void 0 : n.platform) === "FACEBOOK" && X(
|
|
19688
|
+
((n = X(H)) == null ? void 0 : n.platform) === "FACEBOOK" && X(tt) === "POST" ? (Q(), vt(pi, {
|
|
19696
19689
|
key: 0,
|
|
19697
19690
|
class: "container",
|
|
19698
19691
|
caption: l(),
|
|
19699
|
-
headline:
|
|
19692
|
+
headline: P.headline,
|
|
19700
19693
|
images: (h = X(J)) == null ? void 0 : h.images,
|
|
19701
19694
|
size: (u = X(J)) == null ? void 0 : u.size,
|
|
19702
19695
|
"business-name": ((d = X(o)) == null ? void 0 : d.name) ?? "",
|
|
19703
19696
|
"business-icon": ((g = X(o)) == null ? void 0 : g.thumbnail) ?? "",
|
|
19704
|
-
"is-loading":
|
|
19705
|
-
"headline-style":
|
|
19697
|
+
"is-loading": P.isLoadingImage,
|
|
19698
|
+
"headline-style": P.headlineStyle
|
|
19706
19699
|
}, null, 8, ["caption", "headline", "images", "size", "business-name", "business-icon", "is-loading", "headline-style"])) : Et("", !0),
|
|
19707
|
-
((m = X(H)) == null ? void 0 : m.platform) === "FACEBOOK" && X(
|
|
19700
|
+
((m = X(H)) == null ? void 0 : m.platform) === "FACEBOOK" && X(tt) === "STORY" ? (Q(), vt(Ti, {
|
|
19708
19701
|
key: 1,
|
|
19709
19702
|
class: "container",
|
|
19710
19703
|
caption: l(),
|
|
@@ -19712,11 +19705,11 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19712
19705
|
size: (v = X(J)) == null ? void 0 : v.size,
|
|
19713
19706
|
"business-name": ((w = X(o)) == null ? void 0 : w.name) ?? "",
|
|
19714
19707
|
"business-icon": ((E = X(o)) == null ? void 0 : E.thumbnail) ?? "",
|
|
19715
|
-
"is-loading":
|
|
19716
|
-
headline:
|
|
19717
|
-
"headline-style":
|
|
19708
|
+
"is-loading": P.isLoadingImage,
|
|
19709
|
+
headline: P.headline,
|
|
19710
|
+
"headline-style": P.headlineStyle
|
|
19718
19711
|
}, null, 8, ["caption", "images", "size", "business-name", "business-icon", "is-loading", "headline", "headline-style"])) : Et("", !0),
|
|
19719
|
-
((L = X(H)) == null ? void 0 : L.platform) === "INSTAGRAM" && X(
|
|
19712
|
+
((L = X(H)) == null ? void 0 : L.platform) === "INSTAGRAM" && X(tt) === "POST" ? (Q(), vt(Bi, {
|
|
19720
19713
|
key: 2,
|
|
19721
19714
|
class: "container",
|
|
19722
19715
|
caption: l(),
|
|
@@ -19724,23 +19717,23 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19724
19717
|
size: (q = X(J)) == null ? void 0 : q.size,
|
|
19725
19718
|
"business-name": ((Z = X(o)) == null ? void 0 : Z.name) ?? "",
|
|
19726
19719
|
"business-icon": ((W = X(o)) == null ? void 0 : W.thumbnail) ?? "",
|
|
19727
|
-
"is-loading":
|
|
19728
|
-
headline:
|
|
19729
|
-
"headline-style":
|
|
19720
|
+
"is-loading": P.isLoadingImage,
|
|
19721
|
+
headline: P.headline,
|
|
19722
|
+
"headline-style": P.headlineStyle
|
|
19730
19723
|
}, null, 8, ["caption", "images", "size", "business-name", "business-icon", "is-loading", "headline", "headline-style"])) : Et("", !0),
|
|
19731
|
-
((N = X(H)) == null ? void 0 : N.platform) === "INSTAGRAM" && X(
|
|
19724
|
+
((N = X(H)) == null ? void 0 : N.platform) === "INSTAGRAM" && X(tt) === "STORY" ? (Q(), vt(nn, {
|
|
19732
19725
|
key: 3,
|
|
19733
19726
|
class: "container",
|
|
19734
19727
|
caption: l(),
|
|
19735
|
-
images: (
|
|
19728
|
+
images: (et = X(J)) == null ? void 0 : et.images,
|
|
19736
19729
|
size: (st = X(J)) == null ? void 0 : st.size,
|
|
19737
|
-
"business-name": ((
|
|
19730
|
+
"business-name": ((it = X(o)) == null ? void 0 : it.name) ?? "",
|
|
19738
19731
|
"business-icon": ((y = X(o)) == null ? void 0 : y.thumbnail) ?? "",
|
|
19739
|
-
"is-loading":
|
|
19740
|
-
headline:
|
|
19741
|
-
"headline-style":
|
|
19732
|
+
"is-loading": P.isLoadingImage,
|
|
19733
|
+
headline: P.headline,
|
|
19734
|
+
"headline-style": P.headlineStyle
|
|
19742
19735
|
}, null, 8, ["caption", "images", "size", "business-name", "business-icon", "is-loading", "headline", "headline-style"])) : Et("", !0),
|
|
19743
|
-
((S = X(H)) == null ? void 0 : S.platform) === "INSTAGRAM" && X(
|
|
19736
|
+
((S = X(H)) == null ? void 0 : S.platform) === "INSTAGRAM" && X(tt) === "REEL" ? (Q(), vt($i, {
|
|
19744
19737
|
key: 4,
|
|
19745
19738
|
class: "container",
|
|
19746
19739
|
caption: l(),
|
|
@@ -19748,23 +19741,23 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19748
19741
|
size: (x = X(J)) == null ? void 0 : x.size,
|
|
19749
19742
|
"business-name": ((M = X(o)) == null ? void 0 : M.name) ?? "",
|
|
19750
19743
|
"business-icon": ((C = X(o)) == null ? void 0 : C.thumbnail) ?? "",
|
|
19751
|
-
"is-loading":
|
|
19752
|
-
headline:
|
|
19753
|
-
"headline-style":
|
|
19744
|
+
"is-loading": P.isLoadingImage,
|
|
19745
|
+
headline: P.headline,
|
|
19746
|
+
"headline-style": P.headlineStyle
|
|
19754
19747
|
}, null, 8, ["caption", "images", "size", "business-name", "business-icon", "is-loading", "headline", "headline-style"])) : Et("", !0),
|
|
19755
|
-
((_ = X(H)) == null ? void 0 : _.platform) === "BRAND_APP" && X(
|
|
19748
|
+
((_ = X(H)) == null ? void 0 : _.platform) === "BRAND_APP" && X(tt) === "IMAGE" ? (Q(), vt(fn, {
|
|
19756
19749
|
key: 5,
|
|
19757
19750
|
class: "container",
|
|
19758
19751
|
caption: l(),
|
|
19759
19752
|
images: (T = X(J)) == null ? void 0 : T.images,
|
|
19760
|
-
size: (
|
|
19753
|
+
size: (k = X(J)) == null ? void 0 : k.size,
|
|
19761
19754
|
"business-name": ((j = X(o)) == null ? void 0 : j.name) ?? "",
|
|
19762
19755
|
"business-icon": ((A = X(o)) == null ? void 0 : A.thumbnail) ?? "",
|
|
19763
|
-
"is-loading":
|
|
19764
|
-
headline:
|
|
19765
|
-
"headline-style":
|
|
19756
|
+
"is-loading": P.isLoadingImage,
|
|
19757
|
+
headline: P.headline,
|
|
19758
|
+
"headline-style": P.headlineStyle
|
|
19766
19759
|
}, null, 8, ["caption", "images", "size", "business-name", "business-icon", "is-loading", "headline", "headline-style"])) : Et("", !0),
|
|
19767
|
-
((z = X(H)) == null ? void 0 : z.platform) === "TV" && X(
|
|
19760
|
+
((z = X(H)) == null ? void 0 : z.platform) === "TV" && X(tt) === "IMAGE" ? (Q(), vt(ln, {
|
|
19768
19761
|
key: 6,
|
|
19769
19762
|
class: "container",
|
|
19770
19763
|
caption: l(),
|
|
@@ -19772,16 +19765,16 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19772
19765
|
size: ($ = X(J)) == null ? void 0 : $.size,
|
|
19773
19766
|
"business-name": ((F = X(o)) == null ? void 0 : F.name) ?? "",
|
|
19774
19767
|
"business-icon": ((O = X(o)) == null ? void 0 : O.thumbnail) ?? "",
|
|
19775
|
-
"is-loading":
|
|
19776
|
-
headline:
|
|
19777
|
-
"headline-style":
|
|
19768
|
+
"is-loading": P.isLoadingImage,
|
|
19769
|
+
headline: P.headline,
|
|
19770
|
+
"headline-style": P.headlineStyle
|
|
19778
19771
|
}, null, 8, ["caption", "images", "size", "business-name", "business-icon", "is-loading", "headline", "headline-style"])) : Et("", !0)
|
|
19779
19772
|
])
|
|
19780
19773
|
])
|
|
19781
19774
|
]);
|
|
19782
19775
|
};
|
|
19783
19776
|
}
|
|
19784
|
-
}),
|
|
19777
|
+
}), yn = /* @__PURE__ */ be(vn, [["__scopeId", "data-v-893c9161"]]), _n = { class: "xs:hidden px-24 pb-[14px] pt-[22px] flex items-center justify-between w-full border-b" }, Cn = { class: "flex flex-row bg-fm-color-neutral-gray-100 h-full" }, xn = /* @__PURE__ */ bt({
|
|
19785
19778
|
__name: "MarketingSheet",
|
|
19786
19779
|
props: /* @__PURE__ */ Lt({
|
|
19787
19780
|
isOpen: { type: Boolean, default: !0, required: !0 }
|
|
@@ -19794,8 +19787,8 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19794
19787
|
modelModifiers: {}
|
|
19795
19788
|
}),
|
|
19796
19789
|
emits: /* @__PURE__ */ Lt(["update:is-open"], ["update:modelValue"]),
|
|
19797
|
-
setup(
|
|
19798
|
-
const nt =
|
|
19790
|
+
setup(P, { emit: f }) {
|
|
19791
|
+
const nt = pe(), tt = Nt(), lt = P, H = f, J = Dt(P, "modelValue"), c = gt([]), s = Ct(() => {
|
|
19799
19792
|
var a;
|
|
19800
19793
|
return c.value.find(
|
|
19801
19794
|
(n) => {
|
|
@@ -19829,7 +19822,7 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19829
19822
|
}
|
|
19830
19823
|
async function t(r) {
|
|
19831
19824
|
if (r.name === "") {
|
|
19832
|
-
|
|
19825
|
+
tt.open({ message: "Please enter a name", type: "error" });
|
|
19833
19826
|
return;
|
|
19834
19827
|
}
|
|
19835
19828
|
nt.open({
|
|
@@ -19856,7 +19849,7 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19856
19849
|
"onUpdate:modelValue": a[4] || (a[4] = (u) => H("update:is-open", u))
|
|
19857
19850
|
}, {
|
|
19858
19851
|
"top-sheet-header": pt(() => [
|
|
19859
|
-
Y("div",
|
|
19852
|
+
Y("div", _n, [
|
|
19860
19853
|
a[5] || (a[5] = Y("p", null, "Add Material", -1)),
|
|
19861
19854
|
a[6] || (a[6] = Y("div", { class: "grow" }, null, -1)),
|
|
19862
19855
|
ot(n, {
|
|
@@ -19871,8 +19864,8 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19871
19864
|
])
|
|
19872
19865
|
]),
|
|
19873
19866
|
default: pt(() => [
|
|
19874
|
-
Y("div",
|
|
19875
|
-
ot(
|
|
19867
|
+
Y("div", Cn, [
|
|
19868
|
+
ot(ni, {
|
|
19876
19869
|
"marketing-material": J.value,
|
|
19877
19870
|
"onUpdate:marketingMaterial": a[1] || (a[1] = (u) => J.value = u),
|
|
19878
19871
|
"is-loading-image": X(o),
|
|
@@ -19883,7 +19876,7 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19883
19876
|
class: "h-full overflow-scroll",
|
|
19884
19877
|
style: { borderRadius: 0 }
|
|
19885
19878
|
}, null, 8, ["marketing-material", "is-loading-image", "caption-index", "headline-styles"]),
|
|
19886
|
-
ot(
|
|
19879
|
+
ot(yn, {
|
|
19887
19880
|
caption: X(e),
|
|
19888
19881
|
class: "h-full overflow-scroll",
|
|
19889
19882
|
assets: J.value.assets,
|
|
@@ -19897,19 +19890,17 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19897
19890
|
}, 8, ["model-value"]);
|
|
19898
19891
|
};
|
|
19899
19892
|
}
|
|
19900
|
-
}),
|
|
19893
|
+
}), bn = { class: "px-24 flex flex-col gap-y-16" }, Sn = { class: "flex items-center justify-between w-full" }, wn = { class: "space-y-8" }, Tn = { class: "fm-typo-en-body-lg-600" }, On = { class: "fm-typo-en-body-lg-600" }, kn = { key: 0 }, Pn = { class: "fm-typo-en-title-sm-800" }, En = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary w-4/6 text-center" }, Un = /* @__PURE__ */ bt({
|
|
19901
19894
|
__name: "Marketing",
|
|
19902
|
-
setup(
|
|
19903
|
-
const { t: f } =
|
|
19895
|
+
setup(P) {
|
|
19896
|
+
const { t: f } = we(), nt = {
|
|
19904
19897
|
label: f("connect.marketing.create"),
|
|
19905
19898
|
value: "create",
|
|
19906
19899
|
isPrimary: !0,
|
|
19907
19900
|
prependIcon: "add"
|
|
19908
|
-
},
|
|
19901
|
+
}, tt = gt(!1), lt = Bt(), H = se(), { global: J, minor: c } = ie;
|
|
19909
19902
|
Gt(async () => {
|
|
19910
|
-
await
|
|
19911
|
-
await H.read(), await lt.readMarketingMaterial();
|
|
19912
|
-
});
|
|
19903
|
+
await H.read(), await lt.readMarketingMaterial();
|
|
19913
19904
|
});
|
|
19914
19905
|
const s = Ct(() => lt.marketing.filter(
|
|
19915
19906
|
(r) => r.name.includes(t.value.searchKey.toLowerCase())
|
|
@@ -19935,13 +19926,13 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19935
19926
|
const a = new Date(
|
|
19936
19927
|
parseInt(r._id.toString().substring(0, 8), 16) * 1e3
|
|
19937
19928
|
);
|
|
19938
|
-
return
|
|
19929
|
+
return Se(a).format("DD MMM YYYY");
|
|
19939
19930
|
}
|
|
19940
19931
|
},
|
|
19941
19932
|
{
|
|
19942
19933
|
header: f("connect.marketing.table.actions"),
|
|
19943
19934
|
cell(r) {
|
|
19944
|
-
return
|
|
19935
|
+
return ge(ve.FmButton, {
|
|
19945
19936
|
variant: "tertiary",
|
|
19946
19937
|
icon: "delete",
|
|
19947
19938
|
iconColor: "neutral-gray-400",
|
|
@@ -19953,7 +19944,7 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19953
19944
|
}
|
|
19954
19945
|
];
|
|
19955
19946
|
async function e(r) {
|
|
19956
|
-
await
|
|
19947
|
+
await ye.remove(
|
|
19957
19948
|
f("marketing.delete.confirm", { name: r.name })
|
|
19958
19949
|
) && await c(
|
|
19959
19950
|
async () => {
|
|
@@ -19968,7 +19959,7 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19968
19959
|
async function i(r) {
|
|
19969
19960
|
console.log("onEdit", r), r ? l.value = JSON.parse(JSON.stringify(r)) : l.value = JSON.parse(
|
|
19970
19961
|
JSON.stringify(Bt().defaultMarketing)
|
|
19971
|
-
),
|
|
19962
|
+
), tt.value = !0;
|
|
19972
19963
|
}
|
|
19973
19964
|
const t = gt({
|
|
19974
19965
|
searchKey: ""
|
|
@@ -19982,7 +19973,7 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19982
19973
|
actions: X(s).length > 0 ? [nt] : [],
|
|
19983
19974
|
"onClick:action": a[0] || (a[0] = () => i())
|
|
19984
19975
|
}, null, 8, ["title", "actions"]),
|
|
19985
|
-
Y("div",
|
|
19976
|
+
Y("div", bn, [
|
|
19986
19977
|
ot(h, {
|
|
19987
19978
|
modelValue: t.value.searchKey,
|
|
19988
19979
|
"onUpdate:modelValue": a[1] || (a[1] = (v) => t.value.searchKey = v),
|
|
@@ -19990,14 +19981,14 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
19990
19981
|
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
19991
19982
|
collapsible: ""
|
|
19992
19983
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
19993
|
-
ot(
|
|
19984
|
+
ot(xn, {
|
|
19994
19985
|
modelValue: l.value,
|
|
19995
19986
|
"onUpdate:modelValue": a[2] || (a[2] = (v) => l.value = v),
|
|
19996
|
-
"is-open":
|
|
19997
|
-
"onUpdate:isOpen": a[3] || (a[3] = (v) =>
|
|
19987
|
+
"is-open": tt.value,
|
|
19988
|
+
"onUpdate:isOpen": a[3] || (a[3] = (v) => tt.value = v)
|
|
19998
19989
|
}, null, 8, ["modelValue", "is-open"]),
|
|
19999
19990
|
X(s).length > 0 ? (Q(), ut(xt, { key: 0 }, [
|
|
20000
|
-
Y("div",
|
|
19991
|
+
Y("div", Sn, [
|
|
20001
19992
|
ot(h, {
|
|
20002
19993
|
modelValue: t.value.searchKey,
|
|
20003
19994
|
"onUpdate:modelValue": a[4] || (a[4] = (v) => t.value.searchKey = v),
|
|
@@ -20027,9 +20018,9 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
20027
20018
|
default: pt(() => {
|
|
20028
20019
|
var w;
|
|
20029
20020
|
return [
|
|
20030
|
-
Y("div",
|
|
20031
|
-
Y("div",
|
|
20032
|
-
Y("div",
|
|
20021
|
+
Y("div", wn, [
|
|
20022
|
+
Y("div", Tn, Tt(v.name), 1),
|
|
20023
|
+
Y("div", On, Tt(v.campaign === null || v.campaign === void 0 ? "-" : (w = X(H).campaigns.all.find(
|
|
20033
20024
|
(E) => E._id === v.campaign
|
|
20034
20025
|
)) == null ? void 0 : w.name), 1)
|
|
20035
20026
|
]),
|
|
@@ -20046,7 +20037,7 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
20046
20037
|
]),
|
|
20047
20038
|
_: 1
|
|
20048
20039
|
}),
|
|
20049
|
-
X(s).length == 0 ? (Q(), ut("div",
|
|
20040
|
+
X(s).length == 0 ? (Q(), ut("div", kn, a[7] || (a[7] = [
|
|
20050
20041
|
Y("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1)
|
|
20051
20042
|
]))) : Et("", !0)
|
|
20052
20043
|
], 64)) : (Q(), vt(p, {
|
|
@@ -20056,11 +20047,11 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
20056
20047
|
}, {
|
|
20057
20048
|
default: pt(() => [
|
|
20058
20049
|
a[8] || (a[8] = Y("img", {
|
|
20059
|
-
src:
|
|
20050
|
+
src: me,
|
|
20060
20051
|
class: "w-[150px]"
|
|
20061
20052
|
}, null, -1)),
|
|
20062
|
-
Y("p",
|
|
20063
|
-
Y("p",
|
|
20053
|
+
Y("p", Pn, Tt(X(f)("connect.marketing.emptyState.title")), 1),
|
|
20054
|
+
Y("p", En, Tt(X(f)("connect.marketing.emptyState.description")), 1),
|
|
20064
20055
|
ot(d, {
|
|
20065
20056
|
label: X(f)("connect.marketing.emptyState.action"),
|
|
20066
20057
|
"prepend-icon": "add",
|
|
@@ -20075,5 +20066,5 @@ const ri = { key: 1 }, si = { class: "w-full" }, Rt = /* @__PURE__ */ bt({
|
|
|
20075
20066
|
}
|
|
20076
20067
|
});
|
|
20077
20068
|
export {
|
|
20078
|
-
|
|
20069
|
+
Un as default
|
|
20079
20070
|
};
|