@cling-se/widget 0.19.7 → 0.19.9
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/CHANGELOG.md +18 -0
- package/dist/{AddClientCallout-BdGevuQo.js → AddClientCallout-C400wpa7.js} +19 -19
- package/dist/{AnswerModal-DfjF-RVP.js → AnswerModal-C_vekdpA.js} +80 -80
- package/dist/{AttachmentItem-BEd3qVAo.js → AttachmentItem-CYeH1VVw.js} +14 -14
- package/dist/{BaseUpload-Zm4EX8ir.js → BaseUpload-DGLogqK4.js} +256 -256
- package/dist/{BlockMedia-ZHaA4OMV.js → BlockMedia-Hbm0GWNw.js} +33 -32
- package/dist/{CCallout-BlglVZrm.js → CCallout-BPCwr3uM.js} +15 -15
- package/dist/{CCurrencyDropdown-BzvKsm1N.js → CCurrencyDropdown-CZXWH0mA.js} +13 -13
- package/dist/{CDropdownItem-B5rgSee7.js → CDropdownItem-B9dja0RC.js} +11 -11
- package/dist/{CFormField.vue_vue_type_script_setup_true_lang-CVy64zGe.js → CFormField.vue_vue_type_script_setup_true_lang-HLxgkrxm.js} +17 -17
- package/dist/{CPhoneFormat-DaDNMlmK.js → CPhoneFormat-C1cjsMVZ.js} +1 -1
- package/dist/{CPhoneInput-BUogm59J.js → CPhoneInput-DwcIFaqz.js} +23 -23
- package/dist/{CPriceInput-Cd5OHMJS.js → CPriceInput-C_PfAhRb.js} +12 -12
- package/dist/{CSelect-CmoAbVkP.js → CSelect-D4A_clvT.js} +15 -15
- package/dist/{CSkeleton-BF6EYj8H.js → CSkeleton-h81Vudx0.js} +16 -16
- package/dist/{ClientAutocomplete-CHfp4YiV.js → ClientAutocomplete-B_R7zgvM.js} +24 -24
- package/dist/{ClientModal-Com23Qgc.js → ClientModal-CBJgrb_y.js} +44 -44
- package/dist/{ColorPicker-BzdHtZep.js → ColorPicker-a5yTVc0q.js} +66 -66
- package/dist/{CompanyModal-CGjSgTEJ.js → CompanyModal-sRTrUPOY.js} +18 -18
- package/dist/{ContentWrapper-CS-Bh4Bk.js → ContentWrapper-Cwd6t51-.js} +16 -16
- package/dist/{CoverBlockSettings-DDHQzLdc.js → CoverBlockSettings-8tjji9f1.js} +39 -39
- package/dist/{DocAnswer-Cmdsw_CW.js → DocAnswer-D1ZIH1Hn.js} +4 -4
- package/dist/{DocDetails-C5Vzh550.js → DocDetails-B5_hBzC-.js} +56 -56
- package/dist/{DocForm-DEUVV11n.js → DocForm-BKQvY0Ie.js} +821 -829
- package/dist/{DocFormSend-Dt7N3wCz.js → DocFormSend-z0W-xRJP.js} +11 -11
- package/dist/{DocLinks-C6-Er0rk.js → DocLinks-BgbDU24h.js} +6 -6
- package/dist/{DocModalBase-DbuJwHXi.js → DocModalBase-CNo1u8TK.js} +1 -1
- package/dist/{DocPrint-D_uxg7qD.js → DocPrint--UV846r0.js} +15 -15
- package/dist/{DocReceipt-D6LP9UAa.js → DocReceipt-BAkWIKbC.js} +23 -23
- package/dist/{DocSendReminder-DopLhyjz.js → DocSendReminder-Bk6IVg0R.js} +10 -10
- package/dist/{DocTextEditor-DeZtzbgm.js → DocTextEditor-D5zDbbXV.js} +4499 -4438
- package/dist/{DocTimeline-DAWZu_KT.js → DocTimeline-KG4zJJOW.js} +16 -16
- package/dist/{DocumentClient-kxnT6k9s.js → DocumentClient-CXSxwjOt.js} +12 -12
- package/dist/DocumentLayout-C-V_5p3r.js +595 -0
- package/dist/{DocumentLogotype-G-a7gBIC.js → DocumentLogotype-H0f7bO0E.js} +18 -18
- package/dist/{DocumentVoided-SG_ShMmc.js → DocumentVoided-3F7DChD4.js} +4 -4
- package/dist/{EmbedInput-CJL5y3Zj.js → EmbedInput-iG-cDNzZ.js} +8 -8
- package/dist/{EmbedSettings-B0X6A9Uy.js → EmbedSettings-DhwFGdKH.js} +12 -12
- package/dist/{ErrorCallout-xCSfpQWV.js → ErrorCallout-CyqQ9iRV.js} +10 -10
- package/dist/{FilePreviewModal-Da_pMUoO.js → FilePreviewModal-CEUhUuh4.js} +7 -7
- package/dist/{Flag-wXawyyMO.js → Flag-Bza5Ltob.js} +4 -4
- package/dist/{HeaderSettings-CD3y6-uY.js → HeaderSettings-kEbuiv0n.js} +36 -36
- package/dist/{ImageSelectModal-DatnXHH1.js → ImageSelectModal-MDduQIdS.js} +16 -16
- package/dist/{ImageUploadWrapper-CwKe3Iq7.js → ImageUploadWrapper-CKJXUAkn.js} +72 -72
- package/dist/{Index-BbVHxVFJ.js → Index--_tbiloB.js} +33 -33
- package/dist/{Index-y_AJP61r.js → Index-437smvNJ.js} +11 -11
- package/dist/{Index-ezY0DbcB.js → Index-8CyLDQv2.js} +5 -5
- package/dist/{Index-Cjg3X74T.js → Index-B1tFrOfN.js} +7 -7
- package/dist/{Index-Ct735UtM.js → Index-BFwz1G_7.js} +2 -2
- package/dist/{Index-BlownK7_.js → Index-BXqNV8F_.js} +7 -7
- package/dist/{Index-B53eUt7Y.js → Index-Bege0Vce.js} +15 -15
- package/dist/{Index-BTDQax0X.js → Index-Bg1kzWCp.js} +60 -59
- package/dist/{Index-9ZFW8Ka7.js → Index-C46cWm4W.js} +7 -7
- package/dist/{Index-C2-s62x7.js → Index-CGhWvSf9.js} +11 -11
- package/dist/{Index-D-gJQEAD.js → Index-CHIQWumi.js} +6 -6
- package/dist/{Index-CQboLS2e.js → Index-CNQhKXtr.js} +8 -8
- package/dist/{Index-COF0evH4.js → Index-CUDi4SEx.js} +6 -6
- package/dist/{Index-Bb6JZC8l.js → Index-ClA923dR.js} +11 -11
- package/dist/{Index-1WPEpaVr.js → Index-D2A8evjo.js} +7 -7
- package/dist/{Index-BvAqglwa.js → Index-D4XDugcf.js} +27 -27
- package/dist/{Index-GPliVrhC.js → Index-DB3keB-X.js} +7 -7
- package/dist/{Index-BJf4YdYB.js → Index-DQLLCnjH.js} +29 -29
- package/dist/{Index-Dfy0PsiW.js → Index-DUM-3B1l.js} +29 -29
- package/dist/{Index-Ck-_9woY.js → Index-DdZo8evS.js} +456 -461
- package/dist/{Index-CTrX3VRa.js → Index-Doc7K3kL.js} +5 -5
- package/dist/{Index-DfuzxXzD.js → Index-Dqfwe7SG.js} +2 -2
- package/dist/{Index-NnBwJv9v.js → Index-DtCuzght.js} +9 -9
- package/dist/{Index-DOeHci16.js → Index-DtDRffCY.js} +7 -7
- package/dist/{Index-C-EUJjuk.js → Index-DzKdZg0G.js} +2 -2
- package/dist/{Index-yS5OPrJJ.js → Index-DzugmOmj.js} +2 -2
- package/dist/{Index-DjfbgA_7.js → Index-E7OzmtR_.js} +30 -27
- package/dist/{Index-DkQ8_VkX.js → Index-MmvJQvLm.js} +194 -218
- package/dist/{Index-Dxg4gEKd.js → Index-Rb5n5XoO.js} +18 -18
- package/dist/{Index-DAkq_7Ws.js → Index-dTgmxz_A.js} +18 -18
- package/dist/{Index-Ciy9lnhS.js → Index-eJiQmHhr.js} +2 -2
- package/dist/Index-jQsYOOC3.js +4 -0
- package/dist/{Index-DzdEqsZB.js → Index-rINXTjpt.js} +16 -16
- package/dist/Index-zRXdiRpy.js +49 -0
- package/dist/{Index.vue_vue_type_script_lang-B3RoDZmC.js → Index.vue_vue_type_script_lang-B9979oeS.js} +2 -2
- package/dist/{InputToggleRow-D5rvQpAw.js → InputToggleRow-CO4fZnAC.js} +15 -15
- package/dist/{ManualPopover-Bd-GsLGT.js → ManualPopover-DT4iXoSI.js} +6 -6
- package/dist/{MediaWrapper-Ci0XPCcb.js → MediaWrapper-CP_1JzGI.js} +4 -4
- package/dist/{NotBindingText-DhndGZE3.js → NotBindingText-D9Um3Agp.js} +2 -2
- package/dist/{PackageGroup-4Jt9ClVO.js → PackageGroup-BtH12jVM.js} +103 -103
- package/dist/{PdfTerms-CGeJDJpQ.js → PdfTerms-sQh93Xit.js} +9 -9
- package/dist/{PdfViewer-o2vb6Fya.js → PdfViewer-DMAcTVND.js} +71 -71
- package/dist/{PlainHtml.vue_vue_type_script_setup_true_lang-BtnMqKcE.js → PlainHtml.vue_vue_type_script_setup_true_lang-tY-SurWr.js} +2 -2
- package/dist/{PriceHeader-BsObxLHK.js → PriceHeader-CG6el7O_.js} +31 -31
- package/dist/{SearchApi-ZczKsBb7.js → SearchApi-B39mMGKy.js} +6 -6
- package/dist/{SendForm-D5jqkofo.js → SendForm-F5aQPz8w.js} +780 -778
- package/dist/{Setup-CdZzn0qW.js → Setup-DuHU2eHC.js} +4 -4
- package/dist/{SmartList-B36ffGAZ.js → SmartList-myMj6QGe.js} +1 -1
- package/dist/{Sortable.vue_vue_type_script_setup_true_lang-Di1urzqu.js → Sortable.vue_vue_type_script_setup_true_lang-Bb2Nqdsz.js} +118 -118
- package/dist/{TermsSettings-CmAHVOuX.js → TermsSettings-Cb6Xms3f.js} +16 -16
- package/dist/{ThemeColorRow-CScTIcPB.js → ThemeColorRow-oW3xS1pa.js} +13 -13
- package/dist/{ToggleBinding-CVZZlpBR.js → ToggleBinding-B-F9_nAf.js} +7 -7
- package/dist/{UploadModal-2tXsmGMM.js → UploadModal-eBx4Vqyo.js} +19 -19
- package/dist/{VideoPlayerInput-BDzjZ2St.js → VideoPlayerInput-CtTe4JW4.js} +10 -10
- package/dist/{VideoPlayerSettings-BLAEZw4C.js → VideoPlayerSettings-Cvz5B4JX.js} +9 -9
- package/dist/{VideoSelectModal-iqgmg85K.js → VideoSelectModal-CXI0aN4g.js} +19 -19
- package/dist/{focusDrawerMixin-BmyahQiE.js → focusDrawerMixin-DlcYhFw8.js} +1 -1
- package/dist/{formDrawerState-B7ASfNsk.js → formDrawerState-Cf6Q5cuR.js} +1 -1
- package/dist/{helpers-BVP2Pul1.js → helpers-Cf9wqfZh.js} +4 -4
- package/dist/{index-D0Qee2OX.js → index-BSCAjn53.js} +31 -31
- package/dist/{index-Cd4S4J-L.js → index-BStFMzD9.js} +56 -56
- package/dist/{index-BDb4bM0D.js → index-BytsFarx.js} +24 -24
- package/dist/{index-DXNrJnEc.js → index-Co_PpOtI.js} +10 -10
- package/dist/{index-BH5vwOzR.js → index-DPlBYqKB.js} +9 -9
- package/dist/{index-B86TZXOh.js → index-DsvlNA3Q.js} +94 -94
- package/dist/{index-CsbYpQqP.js → index-r5v1Gv17.js} +57 -57
- package/dist/index.es.js +2 -2
- package/dist/index.umd.js +153 -158
- package/dist/{main-C2Q8_T2Y.js → main-BkjAGG46.js} +14298 -14373
- package/dist/{mapFormMixin-CjfqZnmd.js → mapFormMixin-DLFNPgNO.js} +34 -40
- package/dist/omit-CvOSNZN7.js +56 -0
- package/dist/{publicSenderState-C3ELW8Cw.js → publicSenderState-DeC1m0ps.js} +4 -4
- package/dist/{splitpanes-CuxtOZyV.js → splitpanes-CsJipBiG.js} +6 -6
- package/dist/{template-DzrGrOEa.js → template-Cvzvayl5.js} +6 -6
- package/dist/{tippy.esm-Bf86qEue.js → tippy.esm-JEjGtE5F.js} +273 -275
- package/dist/{useTermsModal-Be4HLDDm.js → useTermsModal-D2gYy-TP.js} +7 -7
- package/dist/{utils-a_Odlqb5.js → utils-DarTPA8c.js} +1 -1
- package/dist/{validation-38muBV6x.js → validation-K11g55ZB.js} +4 -4
- package/dist/widget.css +1 -1
- package/package.json +2 -2
- package/dist/DocumentLayout-DaVz9SGF.js +0 -1434
- package/dist/Index-CXjLkK_n.js +0 -49
- package/dist/Index-qFx0G3fC.js +0 -4
- package/dist/omit-DzlbtNCX.js +0 -56
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import re from "./BaseUpload-
|
|
2
|
-
import { o as w,
|
|
1
|
+
import re from "./BaseUpload-DGLogqK4.js";
|
|
2
|
+
import { c as y, o as w, T as B, b as T, f as R, w as $, F as Et, n as Ct, ap as nt, u as Bt, v as Ut, R as st, e as ft, an as Rt, _ as kt, d as Ft, j as pt, q as ae, t as he, aB as ce } from "./main-BkjAGG46.js";
|
|
3
3
|
function Tt(t, e) {
|
|
4
4
|
var i = Object.keys(t);
|
|
5
5
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -122,11 +122,11 @@ function gt(t, e, i) {
|
|
|
122
122
|
}, c;
|
|
123
123
|
}
|
|
124
124
|
gt.debounce = gt;
|
|
125
|
-
var vt = gt,
|
|
126
|
-
return
|
|
125
|
+
var vt = gt, f = function() {
|
|
126
|
+
return f = Object.assign || function(t) {
|
|
127
127
|
for (var e, i = 1, s = arguments.length; i < s; i++) for (var o in e = arguments[i]) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
|
|
128
128
|
return t;
|
|
129
|
-
},
|
|
129
|
+
}, f.apply(this, arguments);
|
|
130
130
|
};
|
|
131
131
|
/*! *****************************************************************************
|
|
132
132
|
Copyright (c) Microsoft Corporation.
|
|
@@ -169,7 +169,7 @@ function bt(t, e, i) {
|
|
|
169
169
|
A(t[o]) ? s[o] = e[o] : it(e[o]) ? it(t[o]) ? s[o] = bt(t[o], e[o], i[o]) : s[o] = t[o] ? e[o] : i[o] : e[o] === !0 || e[o] === !1 ? s[o] = !!t[o] : s[o] = t[o];
|
|
170
170
|
}), s) : t ? e : i;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function K(t) {
|
|
173
173
|
var e = Number(t);
|
|
174
174
|
return Number.isNaN(e) ? t : e;
|
|
175
175
|
}
|
|
@@ -190,7 +190,7 @@ var q = function(t, e) {
|
|
|
190
190
|
e === void 0 && (e = {}), this.type = "resize", this.directions = t, this.params = e;
|
|
191
191
|
}, At = function(t) {
|
|
192
192
|
this.type = "move", this.directions = t;
|
|
193
|
-
},
|
|
193
|
+
}, me = function() {
|
|
194
194
|
function t(e, i, s, o, n) {
|
|
195
195
|
this.type = "drag", this.nativeEvent = e, this.position = s, this.previousPosition = o, this.element = i, this.anchor = n;
|
|
196
196
|
}
|
|
@@ -238,7 +238,7 @@ var q = function(t, e) {
|
|
|
238
238
|
if (this.touches.length) {
|
|
239
239
|
if (this.touches.length === 1 && i.length === 1) {
|
|
240
240
|
var s = this.$refs.draggable;
|
|
241
|
-
this.$emit("drag", new
|
|
241
|
+
this.$emit("drag", new me(t, s, { left: i[0].clientX, top: i[0].clientY }, { left: this.touches[0].clientX, top: this.touches[0].clientY }, this.anchor));
|
|
242
242
|
}
|
|
243
243
|
this.touches = i;
|
|
244
244
|
}
|
|
@@ -278,9 +278,9 @@ Vt.render = function(t, e, i, s, o, n) {
|
|
|
278
278
|
return [B(t.$slots, "default")];
|
|
279
279
|
}), _: 3 }, 8, ["class"])], 2);
|
|
280
280
|
};
|
|
281
|
-
var
|
|
281
|
+
var fe = O("vue-line-wrapper"), qt = { name: "LineWrapper", components: { DraggableElement: Mt }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {
|
|
282
282
|
var t;
|
|
283
|
-
return
|
|
283
|
+
return fe((C(t = {}, this.position, !0), C(t, "disabled", this.disabled), t));
|
|
284
284
|
} }, emits: ["leave", "enter", "drag", "drag-end"] };
|
|
285
285
|
qt.render = function(t, e, i, s, o, n) {
|
|
286
286
|
var a = T("DraggableElement");
|
|
@@ -325,7 +325,7 @@ function ot(t) {
|
|
|
325
325
|
return { left: -t.left, top: -t.top };
|
|
326
326
|
}
|
|
327
327
|
function x(t, e) {
|
|
328
|
-
return
|
|
328
|
+
return f(f({}, t), { left: t.left + e.left, top: t.top + e.top });
|
|
329
329
|
}
|
|
330
330
|
function W(t, e, i, s) {
|
|
331
331
|
if (e !== 1) {
|
|
@@ -376,7 +376,7 @@ function wt(t) {
|
|
|
376
376
|
return { width: t.right !== void 0 && t.left !== void 0 ? t.right - t.left : 1 / 0, height: t.bottom !== void 0 && t.top !== void 0 ? t.bottom - t.top : 1 / 0 };
|
|
377
377
|
}
|
|
378
378
|
function we(t, e) {
|
|
379
|
-
return
|
|
379
|
+
return f(f({}, t), { minWidth: Math.min(e.width, t.minWidth), minHeight: Math.min(e.height, t.minHeight), maxWidth: Math.min(e.width, t.maxWidth), maxHeight: Math.min(e.height, t.maxHeight) });
|
|
380
380
|
}
|
|
381
381
|
function Qt(t, e, i) {
|
|
382
382
|
i === void 0 && (i = !0);
|
|
@@ -404,7 +404,7 @@ function P(t) {
|
|
|
404
404
|
}, null);
|
|
405
405
|
}
|
|
406
406
|
var h = [];
|
|
407
|
-
[o.minimum, o.maximum].forEach(function(c) {
|
|
407
|
+
o && [o.minimum, o.maximum].forEach(function(c) {
|
|
408
408
|
c && h.push({ width: n.width, height: n.width / c, correctRatio: !0 }, { width: n.height * c, height: n.height, correctRatio: !0 });
|
|
409
409
|
}), Ht({ size: n, aspectRatio: o, sizeRestrictions: s }) && h.push(n);
|
|
410
410
|
var r = a(h) || a(h, !0);
|
|
@@ -417,13 +417,13 @@ function yt(t) {
|
|
|
417
417
|
function ye(t) {
|
|
418
418
|
var e = t.coordinates, i = t.transform, s = t.imageSize, o = t.sizeRestrictions, n = t.positionRestrictions, a = t.aspectRatio, h = t.visibleArea, r = function(l, u) {
|
|
419
419
|
return yt({ coordinates: l, positionRestrictions: n, event: new At({ left: u.left - l.left, top: u.top - l.top }) });
|
|
420
|
-
}, c =
|
|
420
|
+
}, c = f({}, e);
|
|
421
421
|
return (Array.isArray(i) ? i : [i]).forEach(function(l) {
|
|
422
422
|
var u = {};
|
|
423
|
-
A((u = typeof l == "function" ? l({ coordinates: c, imageSize: s, visibleArea: h }) : l).width) && A(u.height) || (c = function(d,
|
|
424
|
-
var p =
|
|
423
|
+
A((u = typeof l == "function" ? l({ coordinates: c, imageSize: s, visibleArea: h }) : l).width) && A(u.height) || (c = function(d, m) {
|
|
424
|
+
var p = f(f(f({}, d), P({ width: m.width, height: m.height, sizeRestrictions: o, aspectRatio: a })), { left: 0, top: 0 });
|
|
425
425
|
return r(p, { left: d.left, top: d.top });
|
|
426
|
-
}(c,
|
|
426
|
+
}(c, f(f({}, c), u))), A(u.left) && A(u.top) || (c = r(c, f(f({}, c), u)));
|
|
427
427
|
}), c;
|
|
428
428
|
}
|
|
429
429
|
function ze(t) {
|
|
@@ -432,9 +432,9 @@ function ze(t) {
|
|
|
432
432
|
t.aspectRatio;
|
|
433
433
|
var n = t.stencilSize, a = t.sizeRestrictions, h = t.positionRestrictions;
|
|
434
434
|
t.stencilReference;
|
|
435
|
-
var r, c, l, u =
|
|
436
|
-
r = b(
|
|
437
|
-
var p = rt(d = W(d, u.width * i.width / (d.width *
|
|
435
|
+
var r, c, l, u = f({}, s), d = f({}, o), m = f({}, n);
|
|
436
|
+
r = b(m), c = b(u), l === void 0 && (l = 1e-3), (r === 0 || c === 0 ? Math.abs(c - r) < l : Math.abs(c / r) < 1 + l && Math.abs(c / r) > 1 - l) || (u = f(f({}, u), P({ sizeRestrictions: a, width: u.width, height: u.height, aspectRatio: { minimum: b(m), maximum: b(m) } })));
|
|
437
|
+
var p = rt(d = W(d, u.width * i.width / (d.width * m.width)), e({ visibleArea: d, type: "resize" }));
|
|
438
438
|
return p !== 1 && (d = W(d, p), u = W(u, p)), d = S(d = x(d, X(M(u), M(d))), e({ visibleArea: d, type: "move" })), { coordinates: u = S(u, at(H(d), h)), visibleArea: d };
|
|
439
439
|
}
|
|
440
440
|
function Re(t) {
|
|
@@ -442,7 +442,7 @@ function Re(t) {
|
|
|
442
442
|
t.aspectRatio, t.stencilSize, t.sizeRestrictions;
|
|
443
443
|
var a = t.positionRestrictions;
|
|
444
444
|
t.stencilReference;
|
|
445
|
-
var h =
|
|
445
|
+
var h = f({}, o), r = f({}, n);
|
|
446
446
|
if (o && n && e.type !== "manipulateImage") {
|
|
447
447
|
var c = { width: 0, height: 0 };
|
|
448
448
|
r.width, s.width, b(s) > b(h) ? (c.height = 0.8 * s.height, c.width = c.height * b(h)) : (c.width = 0.8 * s.width, c.height = c.width * b(h));
|
|
@@ -452,7 +452,7 @@ function Re(t) {
|
|
|
452
452
|
return { coordinates: h, visibleArea: r };
|
|
453
453
|
}
|
|
454
454
|
function Ae(t) {
|
|
455
|
-
var e = t.event, i = t.coordinates, s = t.visibleArea, o = t.getAreaRestrictions, n =
|
|
455
|
+
var e = t.event, i = t.coordinates, s = t.visibleArea, o = t.getAreaRestrictions, n = f({}, s), a = f({}, i);
|
|
456
456
|
if (e.type === "setCoordinates") {
|
|
457
457
|
var h = Math.max(0, a.width - n.width), r = Math.max(0, a.height - n.height);
|
|
458
458
|
h > r ? n = W(n, Math.min(a.width / n.width, Y(n, o({ visibleArea: n, type: "resize" })))) : r > h && (n = W(n, Math.min(a.height / n.height, Y(n, o({ visibleArea: n, type: "resize" }))))), n = S(n = x(n, ot(N(a, H(n)))), o({ visibleArea: n, type: "move" }));
|
|
@@ -465,7 +465,7 @@ function Me(t) {
|
|
|
465
465
|
}
|
|
466
466
|
function Se(t) {
|
|
467
467
|
var e = t.imageSize, i = t.visibleArea, s = t.aspectRatio, o = t.sizeRestrictions, n = i || e, a = Math.min(s.maximum || 1 / 0, Math.max(s.minimum || 0, b(n))), h = n.width < n.height ? { width: 0.8 * n.width, height: 0.8 * n.width / a } : { height: 0.8 * n.height, width: 0.8 * n.height * a };
|
|
468
|
-
return P(
|
|
468
|
+
return P(f(f({}, h), { aspectRatio: s, sizeRestrictions: o }));
|
|
469
469
|
}
|
|
470
470
|
function xe(t) {
|
|
471
471
|
var e, i, s = t.imageSize, o = t.visibleArea, n = t.boundaries, a = t.aspectRatio, h = t.sizeRestrictions, r = t.stencilSize, c = o || s;
|
|
@@ -474,37 +474,37 @@ function xe(t) {
|
|
|
474
474
|
function Ee(t) {
|
|
475
475
|
var e = t.getAreaRestrictions, i = t.coordinates, s = t.imageSize, o = b(t.boundaries);
|
|
476
476
|
if (i) {
|
|
477
|
-
var n = { height: Math.max(i.height, s.height), width: Math.max(i.width, s.width) }, a = Zt({ width: b(n) > o ? n.width : n.height * o, height: b(n) > o ? n.width / o : n.height }, wt(e())), h = { left: i.left + i.width / 2 - a.width / 2, top: i.top + i.height / 2 - a.height / 2, width: a.width, height: a.height }, r = Z(i, H(
|
|
477
|
+
var n = { height: Math.max(i.height, s.height), width: Math.max(i.width, s.width) }, a = Zt({ width: b(n) > o ? n.width : n.height * o, height: b(n) > o ? n.width / o : n.height }, wt(e())), h = { left: i.left + i.width / 2 - a.width / 2, top: i.top + i.height / 2 - a.height / 2, width: a.width, height: a.height }, r = Z(i, H(f({ left: 0, top: 0 }, s))), c = {};
|
|
478
478
|
return !r.left && !r.right && h.width <= s.width && (c.left = 0, c.right = s.width), !r.top && !r.bottom && h.height <= s.height && (c.top = 0, c.bottom = s.height), S(h, c);
|
|
479
479
|
}
|
|
480
480
|
var l = b(s);
|
|
481
481
|
return a = { height: l > o ? s.height : s.width / o, width: l > o ? s.height * o : s.width }, { left: s.width / 2 - a.width / 2, top: s.height / 2 - a.height / 2, width: a.width, height: a.height };
|
|
482
482
|
}
|
|
483
|
-
function
|
|
483
|
+
function J(t, e) {
|
|
484
484
|
return Qt(t, H(e));
|
|
485
485
|
}
|
|
486
486
|
function Ce(t) {
|
|
487
|
-
var e = t.event, i = t.coordinates, s = t.visibleArea, o = t.sizeRestrictions, n = t.getAreaRestrictions, a = t.positionRestrictions, h = t.adjustStencil, r = e.scale, c = e.move, l =
|
|
487
|
+
var e = t.event, i = t.coordinates, s = t.visibleArea, o = t.sizeRestrictions, n = t.getAreaRestrictions, a = t.positionRestrictions, h = t.adjustStencil, r = e.scale, c = e.move, l = f({}, s), u = f({}, i), d = 1, m = 1, p = r.factor && Math.abs(r.factor - 1) > 1e-3;
|
|
488
488
|
l = x(l, { left: c.left || 0, top: c.top || 0 });
|
|
489
489
|
var g = { stencil: { minimum: Math.max(o.minWidth ? o.minWidth / u.width : 0, o.minHeight ? o.minHeight / u.height : 0), maximum: Math.min(o.maxWidth ? o.maxWidth / u.width : 1 / 0, o.maxHeight ? o.maxHeight / u.height : 1 / 0, Y(u, a)) }, area: { maximum: Y(l, n({ visibleArea: l, type: "resize" })) } };
|
|
490
|
-
r.factor && p && (r.factor < 1 ? (
|
|
490
|
+
r.factor && p && (r.factor < 1 ? (m = Math.max(r.factor, g.stencil.minimum)) > 1 && (m = 1) : r.factor > 1 && (m = Math.min(r.factor, Math.min(g.area.maximum, g.stencil.maximum))) < 1 && (m = 1)), m && (l = W(l, m, r.center));
|
|
491
491
|
var E = i.left - s.left, j = s.width + s.left - (i.width + i.left), _ = i.top - s.top, G = s.height + s.top - (i.height + i.top);
|
|
492
|
-
return l = S(l = x(l, N(l, { left: a.left !== void 0 ? a.left - E *
|
|
492
|
+
return l = S(l = x(l, N(l, { left: a.left !== void 0 ? a.left - E * m : void 0, top: a.top !== void 0 ? a.top - _ * m : void 0, bottom: a.bottom !== void 0 ? a.bottom + G * m : void 0, right: a.right !== void 0 ? a.right + j * m : void 0 })), n({ visibleArea: l, type: "move" })), u.width = u.width * m, u.height = u.height * m, u.left = l.left + E * m, u.top = l.top + _ * m, u = S(u, at(H(l), a)), r.factor && p && h && (r.factor > 1 ? d = Math.min(g.area.maximum, r.factor) / m : r.factor < 1 && (d = Math.max(u.height / l.height, u.width / l.width, r.factor / m)), d !== 1 && (l = x(l = S(l = W(l, d, r.factor > 1 ? r.center : M(u)), n({ visibleArea: l, type: "move" })), ot(N(u, H(l)))))), { coordinates: u, visibleArea: l };
|
|
493
493
|
}
|
|
494
494
|
function Te(t) {
|
|
495
|
-
var e = t.aspectRatio, i = t.getAreaRestrictions, s = t.coordinates, o = t.visibleArea, n = t.sizeRestrictions, a = t.positionRestrictions, h = t.imageSize, r = t.previousImageSize, c = t.angle, l =
|
|
496
|
-
return (l =
|
|
495
|
+
var e = t.aspectRatio, i = t.getAreaRestrictions, s = t.coordinates, o = t.visibleArea, n = t.sizeRestrictions, a = t.positionRestrictions, h = t.imageSize, r = t.previousImageSize, c = t.angle, l = f({}, s), u = f({}, o), d = U(M(f({ left: 0, top: 0 }, r)), c);
|
|
496
|
+
return (l = f(f({}, P({ sizeRestrictions: n, aspectRatio: e, width: l.width, height: l.height })), U(M(l), c))).left -= d.left - h.width / 2 + l.width / 2, l.top -= d.top - h.height / 2 + l.height / 2, u = W(u, rt(u, i({ visibleArea: u, type: "resize" }))), { coordinates: l = S(l, a), visibleArea: u = S(u = x(u, X(M(l), M(s))), i({ visibleArea: u, type: "move" })) };
|
|
497
497
|
}
|
|
498
498
|
function We(t) {
|
|
499
|
-
var e = t.flip, i = t.previousFlip, s = t.rotate, o = t.getAreaRestrictions, n = t.coordinates, a = t.visibleArea, h = t.imageSize, r =
|
|
499
|
+
var e = t.flip, i = t.previousFlip, s = t.rotate, o = t.getAreaRestrictions, n = t.coordinates, a = t.visibleArea, h = t.imageSize, r = f({}, n), c = f({}, a), l = i.horizontal !== e.horizontal, u = i.vertical !== e.vertical;
|
|
500
500
|
if (l || u) {
|
|
501
|
-
var d = U({ left: h.width / 2, top: h.height / 2 }, -s),
|
|
502
|
-
r = x(r, X(p, M(r))),
|
|
501
|
+
var d = U({ left: h.width / 2, top: h.height / 2 }, -s), m = U(M(r), -s), p = U({ left: l ? d.left - (m.left - d.left) : m.left, top: u ? d.top - (m.top - d.top) : m.top }, s);
|
|
502
|
+
r = x(r, X(p, M(r))), m = U(M(c), -s), c = S(c = x(c, X(p = U({ left: l ? d.left - (m.left - d.left) : m.left, top: u ? d.top - (m.top - d.top) : m.top }, s), M(c))), o({ visibleArea: c, type: "move" }));
|
|
503
503
|
}
|
|
504
504
|
return { coordinates: r, visibleArea: c };
|
|
505
505
|
}
|
|
506
506
|
function Lt(t) {
|
|
507
|
-
var e = t.directions, i = t.coordinates, s = t.positionRestrictions, o = s === void 0 ? {} : s, n = t.sizeRestrictions, a = t.preserveRatio, h = t.compensate, r =
|
|
507
|
+
var e = t.directions, i = t.coordinates, s = t.positionRestrictions, o = s === void 0 ? {} : s, n = t.sizeRestrictions, a = t.preserveRatio, h = t.compensate, r = f({}, e), c = D(i, r).width, l = D(i, r).height;
|
|
508
508
|
c < 0 && (r.left < 0 && r.right < 0 ? (r.left = -(i.width - n.minWidth) / (r.left / r.right), r.right = -(i.width - n.minWidth) / (r.right / r.left)) : r.left < 0 ? r.left = -(i.width - n.minWidth) : r.right < 0 && (r.right = -(i.width - n.minWidth))), l < 0 && (r.top < 0 && r.bottom < 0 ? (r.top = -(i.height - n.minHeight) / (r.top / r.bottom), r.bottom = -(i.height - n.minHeight) / (r.bottom / r.top)) : r.top < 0 ? r.top = -(i.height - n.minHeight) : r.bottom < 0 && (r.bottom = -(i.height - n.minHeight)));
|
|
509
509
|
var u = Z(D(i, r), o);
|
|
510
510
|
h && (u.left && u.left > 0 && u.right === 0 ? (r.right += u.left, r.left -= u.left) : u.right && u.right > 0 && u.left === 0 && (r.left += u.right, r.right -= u.right), u.top && u.top > 0 && u.bottom === 0 ? (r.bottom += u.top, r.top -= u.top) : u.bottom && u.bottom > 0 && u.top === 0 && (r.top += u.bottom, r.bottom -= u.bottom), u = Z(D(i, r), o));
|
|
@@ -513,11 +513,11 @@ function Lt(t) {
|
|
|
513
513
|
var E = u[g];
|
|
514
514
|
E && r[g] && (d[g] = Math.max(0, 1 - E / r[g]));
|
|
515
515
|
}), a) {
|
|
516
|
-
var
|
|
516
|
+
var m = Math.min.apply(null, I.map(function(g) {
|
|
517
517
|
return d[g];
|
|
518
518
|
}));
|
|
519
|
-
|
|
520
|
-
r[g] *=
|
|
519
|
+
m !== 1 / 0 && I.forEach(function(g) {
|
|
520
|
+
r[g] *= m;
|
|
521
521
|
});
|
|
522
522
|
} else I.forEach(function(g) {
|
|
523
523
|
d[g] !== 1 / 0 && (r[g] *= d[g]);
|
|
@@ -576,7 +576,7 @@ xt.render = function(t, e, i, s, o, n) {
|
|
|
576
576
|
return [R("div", { class: n.classes.root }, null, 2)];
|
|
577
577
|
}), _: 1 }, 8, ["class", "position", "disabled", "onDrag", "onDragEnd", "onEnter", "onLeave"]);
|
|
578
578
|
};
|
|
579
|
-
var ut = O("vue-bounding-box"), He = ["east", "west", null], je = ["south", "north", null],
|
|
579
|
+
var ut = O("vue-bounding-box"), He = ["east", "west", null], je = ["south", "north", null], Kt = { name: "BoundingBox", props: { width: { type: Number }, height: { type: Number }, transitions: { type: Object }, handlers: { type: Object, default: function() {
|
|
580
580
|
return { eastNorth: !0, north: !0, westNorth: !0, west: !0, westSouth: !0, south: !0, eastSouth: !0, east: !0 };
|
|
581
581
|
} }, handlersComponent: { type: [Object, String], default: function() {
|
|
582
582
|
return St;
|
|
@@ -637,7 +637,7 @@ var ut = O("vue-bounding-box"), He = ["east", "west", null], je = ["south", "nor
|
|
|
637
637
|
var s, o = t.shift(), n = o.left, a = o.top, h = { left: 0, right: 0, top: 0, bottom: 0 };
|
|
638
638
|
e === "west" ? h.left -= n : e === "east" && (h.right += n), i === "north" ? h.top -= a : i === "south" && (h.bottom += a), !i && e ? s = "width" : i && !e && (s = "height"), this.resizable && this.$emit("resize", new de(h, { allowedDirections: { left: e === "west" || !e, right: e === "east" || !e, bottom: i === "south" || !i, top: i === "north" || !i }, preserveAspectRatio: t.nativeEvent && t.nativeEvent.shiftKey, respectDirection: s }));
|
|
639
639
|
} }, emits: ["resize", "resize-end"] };
|
|
640
|
-
|
|
640
|
+
Kt.render = function(t, e, i, s, o, n) {
|
|
641
641
|
return w(), y("div", { ref: "box", class: n.classes.root, style: n.style }, [B(t.$slots, "default"), R("div", null, [(w(!0), y(Et, null, Ct(n.lineNodes, function(a) {
|
|
642
642
|
return w(), y(nt(a.component), { key: a.name, "default-class": a.class, "hover-class": a.hoverClass, "wrapper-class": a.wrapperClass, position: a.name, disabled: a.disabled, onDrag: function(h) {
|
|
643
643
|
return n.onHandlerDrag(h, a.horizontalDirection, a.verticalDirection);
|
|
@@ -652,7 +652,7 @@ Jt.render = function(t, e, i, s, o, n) {
|
|
|
652
652
|
}) }, null, 8, ["default-class", "hover-class", "wrapper-class", "horizontal-position", "vertical-position", "disabled", "onDrag"]))], 6);
|
|
653
653
|
}), 128))], 6);
|
|
654
654
|
};
|
|
655
|
-
var Le = O("vue-draggable-area"),
|
|
655
|
+
var Le = O("vue-draggable-area"), Jt = { name: "DraggableArea", props: { movable: { type: Boolean, default: !0 }, activationDistance: { type: Number, default: 20 } }, computed: { classnames: function() {
|
|
656
656
|
return { default: Le() };
|
|
657
657
|
} }, beforeMount: function() {
|
|
658
658
|
window.addEventListener("mouseup", this.onMouseUp, { passive: !1 }), window.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), window.addEventListener("touchmove", this.onTouchMove, { passive: !1 }), window.addEventListener("touchend", this.onTouchEnd, { passive: !1 });
|
|
@@ -690,7 +690,7 @@ var Le = O("vue-draggable-area"), Kt = { name: "DraggableArea", props: { movable
|
|
|
690
690
|
}, processEnd: function() {
|
|
691
691
|
this.touches.length && this.$emit("move-end"), this.touches = [];
|
|
692
692
|
} }, emits: ["move", "move-end"] };
|
|
693
|
-
|
|
693
|
+
Jt.render = function(t, e, i, s, o, n) {
|
|
694
694
|
return w(), y("div", { ref: "container", onTouchstart: e[1] || (e[1] = function() {
|
|
695
695
|
return n.onTouchStart && n.onTouchStart.apply(n, arguments);
|
|
696
696
|
}), onMousedown: e[2] || (e[2] = function() {
|
|
@@ -706,7 +706,7 @@ function Pe(t) {
|
|
|
706
706
|
try {
|
|
707
707
|
if (t) if (/^data:/i.test(t)) e(function(r) {
|
|
708
708
|
r = r.replace(/^data:([^;]+);base64,/gim, "");
|
|
709
|
-
for (var c = atob(r), l = c.length, u = new ArrayBuffer(l), d = new Uint8Array(u),
|
|
709
|
+
for (var c = atob(r), l = c.length, u = new ArrayBuffer(l), d = new Uint8Array(u), m = 0; m < l; m++) d[m] = c.charCodeAt(m);
|
|
710
710
|
return u;
|
|
711
711
|
}(t));
|
|
712
712
|
else if (/^blob:/i.test(t)) {
|
|
@@ -747,9 +747,9 @@ function Be(t) {
|
|
|
747
747
|
}
|
|
748
748
|
r++;
|
|
749
749
|
}
|
|
750
|
-
if (n && (s = n + 10, function(
|
|
750
|
+
if (n && (s = n + 10, function(m, p, g) {
|
|
751
751
|
var E, j = "";
|
|
752
|
-
for (E = p, g += p; E < g; E++) j += String.fromCharCode(
|
|
752
|
+
for (E = p, g += p; E < g; E++) j += String.fromCharCode(m.getUint8(E));
|
|
753
753
|
return j;
|
|
754
754
|
}(i, n + 4, 4) === "Exif")) {
|
|
755
755
|
var c = i.getUint16(s);
|
|
@@ -905,7 +905,7 @@ ne.render = function(t, e, i, s, o, n) {
|
|
|
905
905
|
var a = T("preview");
|
|
906
906
|
return w(), y(a, st(t.$attrs, { fill: !0 }), null, 16);
|
|
907
907
|
};
|
|
908
|
-
var
|
|
908
|
+
var mt = O("vue-rectangle-stencil"), se = { name: "RectangleStencil", components: { StencilPreview: ne, BoundingBox: Kt, DraggableArea: Jt }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {
|
|
909
909
|
return St;
|
|
910
910
|
} }, lines: { type: Object }, linesComponent: { type: [Object, String], default: function() {
|
|
911
911
|
return xt;
|
|
@@ -920,7 +920,7 @@ var ft = O("vue-rectangle-stencil"), se = { name: "RectangleStencil", components
|
|
|
920
920
|
} } }, data: function() {
|
|
921
921
|
return { moving: !1, resizing: !1 };
|
|
922
922
|
}, computed: { classes: function() {
|
|
923
|
-
return { stencil: z(
|
|
923
|
+
return { stencil: z(mt({ movable: this.movable, moving: this.moving, resizing: this.resizing }), this.moving && this.movingClass, this.resizing && this.resizingClass), preview: z(mt("preview"), this.previewClass), boundingBox: z(mt("bounding-box"), this.boundingBoxClass) };
|
|
924
924
|
}, style: function() {
|
|
925
925
|
var t = this.stencilCoordinates, e = t.height, i = t.width, s = t.left, o = t.top, n = { width: "".concat(i, "px"), height: "".concat(e, "px"), transform: "translate(".concat(s, "px, ").concat(o, "px)") };
|
|
926
926
|
return this.transitions && this.transitions.enabled && (n.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), n;
|
|
@@ -954,20 +954,20 @@ var Ue = ["transitions"], L = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
954
954
|
} }, roundResult: { type: Boolean, default: !0 }, defaultSize: { type: [Function, Object] }, defaultPosition: { type: [Function, Object] }, defaultVisibleArea: { type: [Function, Object] }, defaultTransforms: { type: [Function, Object] }, defaultBoundaries: { type: [Function, String], validator: function(t) {
|
|
955
955
|
return !(typeof t == "string" && t !== "fill" && t !== "fit");
|
|
956
956
|
} }, priority: { type: String, default: "coordinates" }, stencilSize: { type: [Object, Function] }, resizeImage: { type: [Boolean, Object], default: !0 }, moveImage: { type: [Boolean, Object], default: !0 }, autoZoomAlgorithm: { type: Function }, resizeAlgorithm: { type: Function, default: function(t) {
|
|
957
|
-
var e = t.event, i = t.coordinates, s = t.aspectRatio, o = t.positionRestrictions, n = t.sizeRestrictions, a =
|
|
957
|
+
var e = t.event, i = t.coordinates, s = t.aspectRatio, o = t.positionRestrictions, n = t.sizeRestrictions, a = f(f({}, i), { right: i.left + i.width, bottom: i.top + i.height }), h = e.params || {}, r = f({}, e.directions), c = h.allowedDirections || { left: !0, right: !0, bottom: !0, top: !0 };
|
|
958
958
|
n.widthFrozen && (r.left = 0, r.right = 0), n.heightFrozen && (r.top = 0, r.bottom = 0), I.forEach(function(V) {
|
|
959
959
|
c[V] || (r[V] = 0);
|
|
960
960
|
});
|
|
961
961
|
var l = D(a, r = Lt({ coordinates: a, directions: r, sizeRestrictions: n, positionRestrictions: o })).width, u = D(a, r).height, d = h.preserveRatio ? b(a) : lt(l / u, s);
|
|
962
962
|
if (d) {
|
|
963
|
-
var
|
|
964
|
-
if (
|
|
963
|
+
var m = h.respectDirection;
|
|
964
|
+
if (m || (m = a.width >= a.height || d === 1 ? "width" : "height"), m === "width") {
|
|
965
965
|
var p = l / d - a.height;
|
|
966
966
|
if (c.top && c.bottom) {
|
|
967
967
|
var g = r.top, E = r.bottom;
|
|
968
968
|
r.bottom = tt(p, E, g), r.top = tt(p, g, E);
|
|
969
969
|
} else c.bottom ? r.bottom = p : c.top ? r.top = p : c.right ? r.right = 0 : c.left && (r.left = 0);
|
|
970
|
-
} else if (
|
|
970
|
+
} else if (m === "height") {
|
|
971
971
|
var j = a.width - u * d;
|
|
972
972
|
if (c.left && c.right) {
|
|
973
973
|
var _ = r.left, G = r.right;
|
|
@@ -983,10 +983,10 @@ var Ue = ["transitions"], L = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
983
983
|
var e = t.stretcher, i = t.imageSize, s = b(i);
|
|
984
984
|
e.style.width = i.width + "px", e.style.height = e.clientWidth / s + "px", e.style.width = e.clientWidth + "px";
|
|
985
985
|
} }, fitCoordinates: { type: Function, default: function(t) {
|
|
986
|
-
var e = t.visibleArea, i = t.coordinates, s = t.aspectRatio, o = t.sizeRestrictions, n = t.positionRestrictions, a =
|
|
986
|
+
var e = t.visibleArea, i = t.coordinates, s = t.aspectRatio, o = t.sizeRestrictions, n = t.positionRestrictions, a = f(f({}, i), P({ width: i.width, height: i.height, aspectRatio: s, sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minHeight: Math.min(e.height, o.minHeight), minWidth: Math.min(e.width, o.minWidth) } }));
|
|
987
987
|
return a = S(a = x(a, X(M(i), M(a))), at(H(e), n));
|
|
988
988
|
} }, fitVisibleArea: { type: Function, default: function(t) {
|
|
989
|
-
var e = t.visibleArea, i = t.boundaries, s = t.getAreaRestrictions, o = t.coordinates, n =
|
|
989
|
+
var e = t.visibleArea, i = t.boundaries, s = t.getAreaRestrictions, o = t.coordinates, n = f({}, e);
|
|
990
990
|
n.height = n.width / b(i), n.top += (e.height - n.height) / 2, (o.height - n.height > 0 || o.width - n.width > 0) && (n = W(n, Math.max(o.height / n.height, o.width / n.width)));
|
|
991
991
|
var a = ot(N(o, H(n = W(n, rt(n, s({ visibleArea: n, type: "resize" }))))));
|
|
992
992
|
return n.width < o.width && (a.left = 0), n.height < o.height && (a.top = 0), n = S(n = x(n, a), s({ visibleArea: n, type: "move" }));
|
|
@@ -1022,9 +1022,9 @@ var Ue = ["transitions"], L = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
1022
1022
|
return { enabled: this.transitionsActive, timingFunction: "ease-in-out", time: 350 };
|
|
1023
1023
|
}, sizeRestrictions: function() {
|
|
1024
1024
|
if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {
|
|
1025
|
-
var t = this.sizeRestrictionsAlgorithm({ imageSize: this.imageSize, minWidth: A(this.minWidth) ? 0 :
|
|
1025
|
+
var t = this.sizeRestrictionsAlgorithm({ imageSize: this.imageSize, minWidth: A(this.minWidth) ? 0 : K(this.minWidth), minHeight: A(this.minHeight) ? 0 : K(this.minHeight), maxWidth: A(this.maxWidth) ? 1 / 0 : K(this.maxWidth), maxHeight: A(this.maxHeight) ? 1 / 0 : K(this.maxHeight) });
|
|
1026
1026
|
if (t = function(s) {
|
|
1027
|
-
var o = s.areaRestrictions, n = s.sizeRestrictions, a = s.boundaries, h = s.positionRestrictions, r =
|
|
1027
|
+
var o = s.areaRestrictions, n = s.sizeRestrictions, a = s.boundaries, h = s.positionRestrictions, r = f(f({}, n), { minWidth: n.minWidth !== void 0 ? n.minWidth : 0, minHeight: n.minHeight !== void 0 ? n.minHeight : 0, maxWidth: n.maxWidth !== void 0 ? n.maxWidth : 1 / 0, maxHeight: n.maxHeight !== void 0 ? n.maxHeight : 1 / 0 });
|
|
1028
1028
|
h.left !== void 0 && h.right !== void 0 && (r.maxWidth = Math.min(r.maxWidth, h.right - h.left)), h.bottom !== void 0 && h.top !== void 0 && (r.maxHeight = Math.min(r.maxHeight, h.bottom - h.top));
|
|
1029
1029
|
var c = wt(o), l = Zt(a, c);
|
|
1030
1030
|
return c.width < 1 / 0 && (!r.maxWidth || r.maxWidth > l.width) && (r.maxWidth = Math.min(r.maxWidth, l.width)), c.height < 1 / 0 && (!r.maxHeight || r.maxHeight > l.height) && (r.maxHeight = Math.min(r.maxHeight, l.height)), r.minWidth > r.maxWidth && (r.minWidth = r.maxWidth, r.widthFrozen = !0), r.minHeight > r.maxHeight && (r.minHeight = r.maxHeight, r.heightFrozen = !0), r;
|
|
@@ -1119,7 +1119,7 @@ var Ue = ["transitions"], L = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
1119
1119
|
return this.roundResult ? function(e) {
|
|
1120
1120
|
var i = e.coordinates, s = e.sizeRestrictions, o = e.positionRestrictions, n = { width: Math.round(i.width), height: Math.round(i.height), left: Math.round(i.left), top: Math.round(i.top) };
|
|
1121
1121
|
return n.width > s.maxWidth ? n.width = Math.floor(i.width) : n.width < s.minWidth && (n.width = Math.ceil(i.width)), n.height > s.maxHeight ? n.height = Math.floor(i.height) : n.height < s.minHeight && (n.height = Math.ceil(i.height)), S(n, o);
|
|
1122
|
-
}(v(v({}, this.getPublicProperties()), {}, { positionRestrictions:
|
|
1122
|
+
}(v(v({}, this.getPublicProperties()), {}, { positionRestrictions: J(this.positionRestrictions, this.visibleArea), coordinates: t })) : t;
|
|
1123
1123
|
}, processAutoZoom: function(t, e, i, s) {
|
|
1124
1124
|
var o = this.autoZoomAlgorithm;
|
|
1125
1125
|
o || (o = this.stencilSize ? ze : this.autoZoom ? Re : Ae);
|
|
@@ -1131,15 +1131,15 @@ var Ue = ["transitions"], L = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
1131
1131
|
}, normalizeEvent: function(t) {
|
|
1132
1132
|
return function(e) {
|
|
1133
1133
|
var i = e.event, s = e.visibleArea, o = e.coefficient;
|
|
1134
|
-
if (i.type === "manipulateImage") return
|
|
1134
|
+
if (i.type === "manipulateImage") return f(f({}, i), { move: { left: i.move && i.move.left ? o * i.move.left : 0, top: i.move && i.move.top ? o * i.move.top : 0 }, scale: { factor: i.scale && i.scale.factor ? i.scale.factor : 1, center: i.scale && i.scale.center ? { left: i.scale.center.left * o + s.left, top: i.scale.center.top * o + s.top } : null } });
|
|
1135
1135
|
if (i.type === "resize") {
|
|
1136
|
-
var n =
|
|
1136
|
+
var n = f(f({}, i), { directions: f({}, i.directions) });
|
|
1137
1137
|
return I.forEach(function(h) {
|
|
1138
1138
|
n.directions[h] *= o;
|
|
1139
1139
|
}), n;
|
|
1140
1140
|
}
|
|
1141
1141
|
if (i.type === "move") {
|
|
1142
|
-
var a =
|
|
1142
|
+
var a = f(f({}, i), { directions: f({}, i.directions) });
|
|
1143
1143
|
return ve.forEach(function(h) {
|
|
1144
1144
|
a.directions[h] *= o;
|
|
1145
1145
|
}), a;
|
|
@@ -1149,10 +1149,10 @@ var Ue = ["transitions"], L = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
1149
1149
|
}, getCanvas: function() {
|
|
1150
1150
|
if (this.$refs.canvas) {
|
|
1151
1151
|
var t = this.$refs.canvas, e = this.$refs.image, i = this.imageTransforms.rotate !== 0 || this.imageTransforms.flip.horizontal || this.imageTransforms.flip.vertical ? function(h, r, c) {
|
|
1152
|
-
var l = c.rotate, u = c.flip, d = { width: r.naturalWidth, height: r.naturalHeight },
|
|
1153
|
-
h.height =
|
|
1154
|
-
var g = U(M(
|
|
1155
|
-
return p.translate(-(g.left -
|
|
1152
|
+
var l = c.rotate, u = c.flip, d = { width: r.naturalWidth, height: r.naturalHeight }, m = Gt(d, l), p = h.getContext("2d");
|
|
1153
|
+
h.height = m.height, h.width = m.width, p.save();
|
|
1154
|
+
var g = U(M(f({ left: 0, top: 0 }, d)), l);
|
|
1155
|
+
return p.translate(-(g.left - m.width / 2), -(g.top - m.height / 2)), p.rotate(l * Math.PI / 180), p.translate(u.horizontal ? d.width : 0, u.vertical ? d.height : 0), p.scale(u.horizontal ? -1 : 1, u.vertical ? -1 : 1), p.drawImage(r, 0, 0, d.width, d.height), p.restore(), h;
|
|
1156
1156
|
}(this.$refs.sourceCanvas, e, this.imageTransforms) : e, s = v({ minWidth: 0, minHeight: 0, maxWidth: 1 / 0, maxHeight: 1 / 0, maxArea: this.maxCanvasSize, imageSmoothingEnabled: !0, imageSmoothingQuality: "high", fillColor: "transparent" }, this.canvas), o = function(h) {
|
|
1157
1157
|
return h.find(function(r) {
|
|
1158
1158
|
return c = r, !Number.isNaN(parseFloat(c)) && isFinite(c);
|
|
@@ -1167,14 +1167,14 @@ var Ue = ["transitions"], L = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
1167
1167
|
h.width = l ? l.width : c.width, h.height = l ? l.height : c.height;
|
|
1168
1168
|
var d = h.getContext("2d");
|
|
1169
1169
|
d.clearRect(0, 0, h.width, h.height), u && (u.imageSmoothingEnabled && (d.imageSmoothingEnabled = u.imageSmoothingEnabled), u.imageSmoothingQuality && (d.imageSmoothingQuality = u.imageSmoothingQuality), u.fillColor && (d.fillStyle = u.fillColor, d.fillRect(0, 0, h.width, h.height), d.save()));
|
|
1170
|
-
var
|
|
1171
|
-
d.drawImage(r, c.left +
|
|
1170
|
+
var m = c.left < 0 ? -c.left : 0, p = c.top < 0 ? -c.top : 0;
|
|
1171
|
+
d.drawImage(r, c.left + m, c.top + p, c.width, c.height, m * (h.width / c.width), p * (h.height / c.height), h.width, h.height);
|
|
1172
1172
|
}(t, i, this.coordinates, n, s), t;
|
|
1173
1173
|
}
|
|
1174
1174
|
}, update: function() {
|
|
1175
1175
|
this.$emit("change", this.getResult());
|
|
1176
1176
|
}, applyTransform: function(t) {
|
|
1177
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], i = this.visibleArea && e ? we(this.sizeRestrictions, this.visibleArea) : this.sizeRestrictions, s = this.visibleArea && e ?
|
|
1177
|
+
var e = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], i = this.visibleArea && e ? we(this.sizeRestrictions, this.visibleArea) : this.sizeRestrictions, s = this.visibleArea && e ? J(this.positionRestrictions, this.visibleArea) : this.positionRestrictions;
|
|
1178
1178
|
return ye({ transform: t, coordinates: this.coordinates, imageSize: this.imageSize, sizeRestrictions: i, positionRestrictions: s, aspectRatio: this.getAspectRatio(), visibleArea: this.visibleArea });
|
|
1179
1179
|
}, resetCoordinates: function() {
|
|
1180
1180
|
var t = this;
|
|
@@ -1217,7 +1217,7 @@ var Ue = ["transitions"], L = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
1217
1217
|
return this.appliedImageTransforms = v(v({}, this.defaultImageTransforms), {}, { flip: v({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then(function() {
|
|
1218
1218
|
t.priority !== "visible-area" && (t.visibleArea = null, t.resetCoordinates());
|
|
1219
1219
|
var e, i, s, o, n, a, h = t.defaultVisibleArea || Ee;
|
|
1220
|
-
t.visibleArea = F(h) ? h({ imageSize: t.imageSize, boundaries: t.boundaries, coordinates: t.priority !== "visible-area" ? t.coordinates : null, getAreaRestrictions: t.getAreaRestrictions, stencilSize: t.getStencilSize() }) : t.defaultVisibleArea, t.visibleArea = (e = { visibleArea: t.visibleArea, boundaries: t.boundaries, getAreaRestrictions: t.getAreaRestrictions }, i = e.visibleArea, s = e.boundaries, o = e.getAreaRestrictions, n =
|
|
1220
|
+
t.visibleArea = F(h) ? h({ imageSize: t.imageSize, boundaries: t.boundaries, coordinates: t.priority !== "visible-area" ? t.coordinates : null, getAreaRestrictions: t.getAreaRestrictions, stencilSize: t.getStencilSize() }) : t.defaultVisibleArea, t.visibleArea = (e = { visibleArea: t.visibleArea, boundaries: t.boundaries, getAreaRestrictions: t.getAreaRestrictions }, i = e.visibleArea, s = e.boundaries, o = e.getAreaRestrictions, n = f({}, i), a = b(s), n.width / n.height !== a && (n.height = n.width / a), S(n, o({ visibleArea: n, type: "move" }))), t.priority === "visible-area" ? t.resetCoordinates() : t.coordinates = t.fitCoordinates({ visibleArea: t.visibleArea, coordinates: t.coordinates, aspectRatio: t.getAspectRatio(), positionRestrictions: t.positionRestrictions, sizeRestrictions: t.sizeRestrictions }), t.runAutoZoom("resetVisibleArea");
|
|
1221
1221
|
}).catch(function() {
|
|
1222
1222
|
t.visibleArea = null;
|
|
1223
1223
|
});
|
|
@@ -1313,13 +1313,13 @@ var Ue = ["transitions"], L = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
1313
1313
|
}, onMove: function(t) {
|
|
1314
1314
|
var e = this;
|
|
1315
1315
|
this.transitionsOptions.enabled || this.awaitRender(function() {
|
|
1316
|
-
e.coordinates = e.moveAlgorithm(v(v({}, e.getPublicProperties()), {}, { positionRestrictions:
|
|
1316
|
+
e.coordinates = e.moveAlgorithm(v(v({}, e.getPublicProperties()), {}, { positionRestrictions: J(e.positionRestrictions, e.visibleArea), coordinates: e.coordinates, event: e.normalizeEvent(t) })), e.onChange();
|
|
1317
1317
|
});
|
|
1318
1318
|
}, onResize: function(t) {
|
|
1319
1319
|
var e = this;
|
|
1320
1320
|
this.transitionsOptions.enabled || this.stencilSize && !this.autoZoom || this.awaitRender(function() {
|
|
1321
1321
|
var i = e.sizeRestrictions, s = Math.min(e.coordinates.width, e.coordinates.height, 20 * e.coefficient);
|
|
1322
|
-
e.coordinates = e.resizeAlgorithm(v(v({}, e.getPublicProperties()), {}, { positionRestrictions:
|
|
1322
|
+
e.coordinates = e.resizeAlgorithm(v(v({}, e.getPublicProperties()), {}, { positionRestrictions: J(e.positionRestrictions, e.visibleArea), sizeRestrictions: { maxWidth: Math.min(i.maxWidth, e.visibleArea.width), maxHeight: Math.min(i.maxHeight, e.visibleArea.height), minWidth: Math.max(i.minWidth, s), minHeight: Math.max(i.minHeight, s) }, event: e.normalizeEvent(t) })), e.onChange(), e.ticking = !1;
|
|
1323
1323
|
});
|
|
1324
1324
|
}, onManipulateImage: function(t) {
|
|
1325
1325
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
@@ -1372,7 +1372,7 @@ var Ue = ["transitions"], L = O("vue-advanced-cropper"), oe = { name: "Cropper",
|
|
|
1372
1372
|
oe.render = function(t, e, i, s, o, n) {
|
|
1373
1373
|
return w(), y("div", { ref: "cropper", class: n.classes.cropper }, [R("div", { ref: "stretcher", class: n.classes.stretcher }, null, 2), R("div", { class: n.classes.boundaries, style: n.boundariesStyle }, [(w(), y(nt(i.backgroundWrapperComponent), { class: n.classes.cropperWrapper, "wheel-resize": n.settings.resizeImage.wheel, "touch-resize": n.settings.resizeImage.touch, "touch-move": n.settings.moveImage.touch, "mouse-move": n.settings.moveImage.mouse, onMove: n.onManipulateImage, onResize: n.onManipulateImage }, { default: $(function() {
|
|
1374
1374
|
return [R("div", { class: n.classes.background, style: n.boundariesStyle }, null, 6), R("div", { class: n.classes.imageWrapper }, [R("img", { ref: "image", crossorigin: o.imageAttributes.crossOrigin, src: o.imageAttributes.src, class: n.classes.image, style: n.imageStyle, onMousedown: e[1] || (e[1] = Rt(function() {
|
|
1375
|
-
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), R("div", { class: n.classes.foreground, style: n.boundariesStyle }, null, 6), Bt((w(), y(nt(i.stencilComponent), st({ ref: "stencil", image: n.image, coordinates: o.coordinates, "stencil-coordinates": n.stencilCoordinates, transitions: n.transitionsOptions }, i.stencilProps, { onResize: n.onResize, onResizeEnd: n.onResizeEnd, onMove: n.onMove, onMoveEnd: n.onMoveEnd }), null, 16, ["image", "coordinates", "stencil-coordinates", "transitions", "onResize", "onResizeEnd", "onMove", "onMoveEnd"])), [[Ut, o.imageLoaded]]), i.canvas ? (w(), y("canvas", ke, null, 512)) :
|
|
1375
|
+
}, ["prevent"])) }, null, 46, ["crossorigin", "src"])], 2), R("div", { class: n.classes.foreground, style: n.boundariesStyle }, null, 6), Bt((w(), y(nt(i.stencilComponent), st({ ref: "stencil", image: n.image, coordinates: o.coordinates, "stencil-coordinates": n.stencilCoordinates, transitions: n.transitionsOptions }, i.stencilProps, { onResize: n.onResize, onResizeEnd: n.onResizeEnd, onMove: n.onMove, onMoveEnd: n.onMoveEnd }), null, 16, ["image", "coordinates", "stencil-coordinates", "transitions", "onResize", "onResizeEnd", "onMove", "onMoveEnd"])), [[Ut, o.imageLoaded]]), i.canvas ? (w(), y("canvas", ke, null, 512)) : ft("", !0), i.canvas ? (w(), y("canvas", Fe, null, 512)) : ft("", !0)];
|
|
1376
1376
|
}), _: 1 }, 8, ["class", "wheel-resize", "touch-resize", "touch-move", "mouse-move", "onMove", "onResize"]))], 6)], 2);
|
|
1377
1377
|
};
|
|
1378
1378
|
const Xe = {
|
|
@@ -1567,7 +1567,7 @@ function Ze(t, e, i, s, o, n) {
|
|
|
1567
1567
|
})
|
|
1568
1568
|
}), {
|
|
1569
1569
|
default: $(() => [
|
|
1570
|
-
t.$slots.image ? B(t.$slots, "image", { key: 0 }, void 0, !0) :
|
|
1570
|
+
t.$slots.image ? B(t.$slots, "image", { key: 0 }, void 0, !0) : ft("", !0)
|
|
1571
1571
|
]),
|
|
1572
1572
|
_: 3
|
|
1573
1573
|
}, 16, ["model-value"]),
|
|
@@ -1579,7 +1579,7 @@ function Ze(t, e, i, s, o, n) {
|
|
|
1579
1579
|
])
|
|
1580
1580
|
]);
|
|
1581
1581
|
}
|
|
1582
|
-
const
|
|
1582
|
+
const Ke = /* @__PURE__ */ kt(qe, [["render", Ze], ["__scopeId", "data-v-714387c8"]]);
|
|
1583
1583
|
export {
|
|
1584
|
-
|
|
1584
|
+
Ke as default
|
|
1585
1585
|
};
|