@cling-se/widget 0.13.0 → 0.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/README.md +27 -22
  2. package/dist/{AddClientCallout-92b43564.js → AddClientCallout-7LpWNu29.js} +11 -16
  3. package/dist/{AnswerModal-b22aab96.js → AnswerModal-DnTU4eo8.js} +1931 -1948
  4. package/dist/{AttachmentItem-39196508.js → AttachmentItem-DcwbrFUh.js} +15 -18
  5. package/dist/{BaseDatePicker-8be0c5ee.js → BaseDatePicker-BpyeJH3N.js} +139 -142
  6. package/dist/{BaseInput-779cb5b2.js → BaseInput-DJreiE5M.js} +77 -56
  7. package/dist/{BaseUpload-941ca869.js → BaseUpload-iosxX2-N.js} +208 -212
  8. package/dist/{BlockMedia-bf89f8a9.js → BlockMedia-DnbdVEZz.js} +6 -8
  9. package/dist/{CCallout-4239825f.js → CCallout-CgviPbdr.js} +26 -16
  10. package/dist/{CDropdownItem-d0cd42d6.js → CDropdownItem-CTJ55d4m.js} +51 -50
  11. package/dist/{CField-9b72b886.js → CField-FGP7ehRq.js} +75 -58
  12. package/dist/{CPhoneFormat-34b4c650.js → CPhoneFormat-8u5dmTPd.js} +5 -7
  13. package/dist/{CSlider.vue_vue_type_style_index_0_lang-c1638d8a.js → CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-Dc_pbPEA.js} +6 -8
  14. package/dist/{ClientAutocomplete-0d21002e.js → ClientAutocomplete-hcl0bJxO.js} +11 -13
  15. package/dist/{ClientModal-9b8173e2.js → ClientModal-B8PkUqY2.js} +25 -32
  16. package/dist/{ColorPicker-3d06f308.js → ColorPicker-6AIHrfJ5.js} +5 -7
  17. package/dist/{CompanyModal-2e203a3a.js → CompanyModal-H4hHfy7Y.js} +28 -30
  18. package/dist/{ContentWrapper-71bc374a.js → ContentWrapper-CHZtfhFI.js} +25 -43
  19. package/dist/{CoverBlockSettings-b6c200ee.js → CoverBlockSettings-etwL5N5l.js} +20 -31
  20. package/dist/{DocAnswer-d4ea9b74.js → DocAnswer-Udn1ItYd.js} +5 -12
  21. package/dist/{DocDetails-ea2635ac.js → DocDetails-BQz-is7P.js} +47 -59
  22. package/dist/{DocForm-cff1c78e.js → DocForm-Cvuxr89v.js} +4869 -4944
  23. package/dist/{DocFormSend-d0979323.js → DocFormSend-Bo6YPSMr.js} +15 -33
  24. package/dist/DocLinks-DlWyanFQ.js +38 -0
  25. package/dist/{DocModalBase-77df9b3d.js → DocModalBase-BnuOPozg.js} +8 -10
  26. package/dist/{DocPrint-d39100c7.js → DocPrint-Uw8zz2tr.js} +6 -10
  27. package/dist/{DocReceipt-cf0e772b.js → DocReceipt-DsRzRjD8.js} +11 -15
  28. package/dist/{DocSendReminder-dca2775e.js → DocSendReminder-BEEEh-L9.js} +2 -6
  29. package/dist/{DocTextEditor-5676c56f.js → DocTextEditor-C-qeLSQa.js} +2509 -2529
  30. package/dist/{DocTimeline-5911b608.js → DocTimeline-Bz29bHJu.js} +26 -37
  31. package/dist/{DocumentClient-eca72dd7.js → DocumentClient-1O7wxh-X.js} +15 -22
  32. package/dist/{DocumentLayout-8104d93d.js → DocumentLayout-BrN5peVY.js} +4510 -4527
  33. package/dist/{DocumentLogotype-c43c4bbb.js → DocumentLogotype-Bbas4MsY.js} +20 -22
  34. package/dist/DocumentVoided-Dy-pp_ng.js +25 -0
  35. package/dist/{EmbedInput-02971bf6.js → EmbedInput-bXXwMP4u.js} +9 -12
  36. package/dist/{EmbedSettings-575fae0e.js → EmbedSettings-BA2THNrd.js} +6 -9
  37. package/dist/ErrorCallout-Dvy9895L.js +28 -0
  38. package/dist/{FilePreviewModal-c1d2d5e7.js → FilePreviewModal-r84Ah3lE.js} +8 -14
  39. package/dist/{Flag-1aceeff5.js → Flag-CDN9A_59.js} +18 -20
  40. package/dist/{HeaderSettings-993f8c98.js → HeaderSettings-DoDFhLcR.js} +34 -49
  41. package/dist/{ImageSelectModal-5dfe4a29.js → ImageSelectModal-D6ifkvIw.js} +12 -20
  42. package/dist/{ImageUploadWrapper-1e38bbe2.js → ImageUploadWrapper-K0-MmL-L.js} +356 -384
  43. package/dist/{Index-a7779d2a.js → Index-3p6X7Ln-.js} +24 -26
  44. package/dist/{Index-57800d9c.js → Index-B26J4tXQ.js} +7 -9
  45. package/dist/{Index-7cbe4a17.js → Index-B6gB5CD3.js} +6 -8
  46. package/dist/{Index-ec8820ee.js → Index-B6u3OUGH.js} +20 -23
  47. package/dist/{Index-bc0d3abe.js → Index-BN64idjX.js} +18 -31
  48. package/dist/{Index-50b0a9b8.js → Index-BNGaREiU.js} +14 -21
  49. package/dist/{Index-fa4f462a.js → Index-BNeg0lcx.js} +13 -15
  50. package/dist/{Index-4350bb0f.js → Index-BQVjSt_5.js} +29 -29
  51. package/dist/Index-BVNgUe07.js +21 -0
  52. package/dist/{Index-be8b14a8.js → Index-Be-J2RvQ.js} +8 -11
  53. package/dist/{Index-33635702.js → Index-Btlub0dK.js} +11 -13
  54. package/dist/{Index-46b2296e.js → Index-BtzGGZEN.js} +459 -510
  55. package/dist/{Index-c6a8a298.js → Index-ByCpvqCC.js} +16 -21
  56. package/dist/{Index-8a956c1b.js → Index-CSg7HLqX.js} +8 -10
  57. package/dist/{Index-08737451.js → Index-CUZJomAi.js} +10 -12
  58. package/dist/{Index-9a0233b0.js → Index-Cj_3udAp.js} +12 -21
  59. package/dist/{Index-13e229bb.js → Index-CnOdi4ux.js} +4 -6
  60. package/dist/{Index-c1c7db19.js → Index-DT9AWIQ2.js} +12 -15
  61. package/dist/Index-DWHl_jys.js +24 -0
  62. package/dist/{Index-cfc393ae.js → Index-Di3ibm8r.js} +51 -58
  63. package/dist/Index-Dk-kPbWy.js +52 -0
  64. package/dist/Index-Dl87oWQa.js +49 -0
  65. package/dist/{Index-c4296623.js → Index-DnDY3FUU.js} +9 -11
  66. package/dist/{Index-45c7841a.js → Index-DoKh3I_O.js} +19 -26
  67. package/dist/{Index-2c960d57.js → Index-DvA5sZ1U.js} +7 -9
  68. package/dist/{Index-670097a7.js → Index-DwlzPadK.js} +233 -273
  69. package/dist/{Index-e9f705f3.js → Index-ID37TIgR.js} +2 -4
  70. package/dist/Index-TPRXPN4a.js +26 -0
  71. package/dist/{Index-9b7b4516.js → Index-YdyeCcFX.js} +80 -90
  72. package/dist/{Index-a1097b66.js → Index-b0dDsObZ.js} +5 -9
  73. package/dist/{Index-677b2c85.js → Index-bIYFzizT.js} +4 -6
  74. package/dist/{Index-04f332ec.js → Index-d5iMi4y5.js} +116 -118
  75. package/dist/{Index-2504f599.js → Index-oYQ9EfP9.js} +16 -18
  76. package/dist/{Index-cfa81e3f.js → Index-phsroK51.js} +6 -8
  77. package/dist/{InputToggleRow-a0dc7e03.js → InputToggleRow-ClHkgn7s.js} +3 -5
  78. package/dist/{ManualPopover-6cf3f592.js → ManualPopover-DrhgZvGC.js} +1 -3
  79. package/dist/{MediaWrapper-2c2e3d44.js → MediaWrapper-BxNEJOT7.js} +3 -6
  80. package/dist/{NotBindingText-12f78064.js → NotBindingText-BhKMdYBN.js} +5 -7
  81. package/dist/{PackageGroup-75a1ad26.js → PackageGroup--pDNkIMj.js} +35 -59
  82. package/dist/{PdfTerms-5686a37b.js → PdfTerms-BL34ex7f.js} +11 -18
  83. package/dist/{PdfViewer-d1d05125.js → PdfViewer-CPSINxc8.js} +25 -29
  84. package/dist/{PlainHtml-6cc2bace.js → PlainHtml-Dc76U4EV.js} +5 -7
  85. package/dist/{PriceHeader-e45b65bc.js → PriceHeader-CEGF-DO3.js} +113 -130
  86. package/dist/SearchApi-D4yY2KZj.js +161 -0
  87. package/dist/{Setup-bf823254.js → Setup-BJIY_mWN.js} +9 -11
  88. package/dist/{TermsSettings-7a077b22.js → TermsSettings-DM4pvL-n.js} +6 -12
  89. package/dist/{ThemeColorRow-aad0248e.js → ThemeColorRow-D7TCU3ap.js} +8 -10
  90. package/dist/{ToggleBinding-abd0832e.js → ToggleBinding-CSgFUF6o.js} +7 -9
  91. package/dist/{UploadModal-42302f2b.js → UploadModal-Cz7o7DeT.js} +16 -19
  92. package/dist/{VideoPlayerInput-1c6cbf06.js → VideoPlayerInput-Db0RRtb5.js} +6 -8
  93. package/dist/{VideoPlayerSettings-5ec723e1.js → VideoPlayerSettings-BgbNuWbP.js} +7 -11
  94. package/dist/{VideoSelectModal-16acfd43.js → VideoSelectModal-BIKeCzUZ.js} +20 -28
  95. package/dist/{answerDocumentMixin-97b33f14.js → answerDocumentMixin-Bqg9Of1S.js} +5 -5
  96. package/dist/{debounce-b0ffdee0.js → debounce-DceKdgy2.js} +3 -3
  97. package/dist/{dom-962579a6.js → dom-CPYqHOIw.js} +2 -2
  98. package/dist/{focusDrawerMixin-1d99a268.js → focusDrawerMixin-Cx41U1xU.js} +1 -1
  99. package/dist/{formComponentsInstall-6ccace37.js → formComponentsInstall-CWgaR4yB.js} +1198 -1171
  100. package/dist/{formDrawerState-a7b5832a.js → formDrawerState-DLCSwrgc.js} +1 -1
  101. package/dist/{formValidationMixin-7216cb94.js → formValidationMixin-CsLym0iM.js} +2 -2
  102. package/dist/{index-7690fb79.js → index-0kj8-T7-.js} +39 -44
  103. package/dist/{index-6caf947c.js → index-4MqvoLi4.js} +3 -5
  104. package/dist/{index-93d3e2cb.js → index-By9c7IPL.js} +41 -59
  105. package/dist/{index-d73fd8ca.js → index-C16hoSRM.js} +5 -3
  106. package/dist/{index-ef3da59c.js → index-C6C4uskP.js} +14 -16
  107. package/dist/{IsPremiumPreStep-42eeebac.js → index-Cp7dG8Zm.js} +531 -566
  108. package/dist/index.es.js +3 -3
  109. package/dist/index.umd.js +1019 -1028
  110. package/dist/{main-2c8b76b7.js → main-DBw231uy.js} +21733 -21943
  111. package/dist/{mapFormMixin-c2bc089c.js → mapFormMixin-BrtcYsT9.js} +1 -2
  112. package/dist/{vuedraggable.umd-e89c3d5e.js → omit-DQqb9hkZ.js} +143 -133
  113. package/dist/{publicSenderState-e6458640.js → publicSenderState-BysO0Mzz.js} +1 -1
  114. package/dist/{splitpanes-ba7897bf.js → splitpanes-BHUVsCZF.js} +38 -42
  115. package/dist/style.css +2 -2
  116. package/dist/{throttle-4f3f879a.js → throttle-DKrISvLg.js} +2 -2
  117. package/dist/{tinycolor-f780e5ca.js → tinycolor-Be3bF6zy.js} +6 -6
  118. package/dist/{tippy.esm-a855665a.js → tippy.esm-yjYH8SnL.js} +226 -232
  119. package/dist/{utils-4d39389a.js → utils-DP30AdJH.js} +1 -1
  120. package/package.json +3 -4
  121. package/dist/DocLinks-48aa6dd6.js +0 -41
  122. package/dist/DocumentVoided-2d93ef71.js +0 -27
  123. package/dist/ErrorCallout-05a4796b.js +0 -30
  124. package/dist/Index-1cb59290.js +0 -23
  125. package/dist/Index-2a88c858.js +0 -54
  126. package/dist/Index-5fb421de.js +0 -26
  127. package/dist/Index-6f6fc018.js +0 -28
  128. package/dist/Index-98c7217d.js +0 -61
  129. package/dist/SearchApi-410c081e.js +0 -167
  130. package/dist/index-805c56e4.js +0 -4
  131. package/dist/index-a1d51619.js +0 -14
  132. /package/dist/{CField.vue_vue_type_style_index_0_lang-4ed993c7.js → CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js} +0 -0
  133. /package/dist/{anime.es-e284c852.js → anime.es-BrPTThYb.js} +0 -0
  134. /package/dist/{color-c1606adc.js → color-TdtKxwVa.js} +0 -0
  135. /package/dist/{i18nMessages-6b279c15.js → i18nMessages-Chz_lxGG.js} +0 -0
  136. /package/dist/{vuex.esm-4a0fff7c.js → vuex.esm-DKGl8mcw.js} +0 -0
@@ -1,11 +1,11 @@
1
- import Xt from "./BaseUpload-941ca869.js";
2
- import { V as k, n as _t, L as Yt } from "./main-2c8b76b7.js";
1
+ import Xt from "./BaseUpload-iosxX2-N.js";
2
+ import { V as k, n as $t, L as Yt } from "./main-DBw231uy.js";
3
3
  function yt(t, e) {
4
4
  var i = Object.keys(t);
5
5
  if (Object.getOwnPropertySymbols) {
6
6
  var n = Object.getOwnPropertySymbols(t);
7
- e && (n = n.filter(function(o) {
8
- return Object.getOwnPropertyDescriptor(t, o).enumerable;
7
+ e && (n = n.filter(function(s) {
8
+ return Object.getOwnPropertyDescriptor(t, s).enumerable;
9
9
  })), i.push.apply(i, n);
10
10
  }
11
11
  return i;
@@ -27,22 +27,22 @@ function C(t, e, i) {
27
27
  function Nt(t, e) {
28
28
  if (t == null)
29
29
  return {};
30
- var i, n, o = function(a, h) {
30
+ var i, n, s = function(a, h) {
31
31
  if (a == null)
32
32
  return {};
33
- var r, c, l = {}, d = Object.keys(a);
34
- for (c = 0; c < d.length; c++)
35
- r = d[c], h.indexOf(r) >= 0 || (l[r] = a[r]);
33
+ var r, c, l = {}, u = Object.keys(a);
34
+ for (c = 0; c < u.length; c++)
35
+ r = u[c], h.indexOf(r) >= 0 || (l[r] = a[r]);
36
36
  return l;
37
37
  }(t, e);
38
38
  if (Object.getOwnPropertySymbols) {
39
- var s = Object.getOwnPropertySymbols(t);
40
- for (n = 0; n < s.length; n++)
41
- i = s[n], e.indexOf(i) >= 0 || Object.prototype.propertyIsEnumerable.call(t, i) && (o[i] = t[i]);
39
+ var o = Object.getOwnPropertySymbols(t);
40
+ for (n = 0; n < o.length; n++)
41
+ i = o[n], e.indexOf(i) >= 0 || Object.prototype.propertyIsEnumerable.call(t, i) && (s[i] = t[i]);
42
42
  }
43
- return o;
43
+ return s;
44
44
  }
45
- function H(t) {
45
+ function _(t) {
46
46
  return function(e) {
47
47
  if (Array.isArray(e))
48
48
  return ot(e);
@@ -79,23 +79,23 @@ var zt, Vt, V, w = (zt = function(t) {
79
79
  (function() {
80
80
  var e = {}.hasOwnProperty;
81
81
  function i() {
82
- for (var n = [], o = 0; o < arguments.length; o++) {
83
- var s = arguments[o];
84
- if (s) {
85
- var a = typeof s;
82
+ for (var n = [], s = 0; s < arguments.length; s++) {
83
+ var o = arguments[s];
84
+ if (o) {
85
+ var a = typeof o;
86
86
  if (a === "string" || a === "number")
87
- n.push(s);
88
- else if (Array.isArray(s)) {
89
- if (s.length) {
90
- var h = i.apply(null, s);
87
+ n.push(o);
88
+ else if (Array.isArray(o)) {
89
+ if (o.length) {
90
+ var h = i.apply(null, o);
91
91
  h && n.push(h);
92
92
  }
93
93
  } else if (a === "object")
94
- if (s.toString === Object.prototype.toString)
95
- for (var r in s)
96
- e.call(s, r) && s[r] && n.push(r);
94
+ if (o.toString === Object.prototype.toString)
95
+ for (var r in o)
96
+ e.call(o, r) && o[r] && n.push(r);
97
97
  else
98
- n.push(s.toString());
98
+ n.push(o.toString());
99
99
  }
100
100
  }
101
101
  return n.join(" ");
@@ -112,37 +112,37 @@ var zt, Vt, V, w = (zt = function(t) {
112
112
  return t;
113
113
  var n;
114
114
  typeof e == "string" ? n = e : i = e;
115
- var o = t;
116
- return n && (o += "__" + n), o + (i ? Object.keys(i).reduce(function(s, a) {
115
+ var s = t;
116
+ return n && (s += "__" + n), s + (i ? Object.keys(i).reduce(function(o, a) {
117
117
  var h = i[a];
118
- return h && (s += " " + (typeof h == "boolean" ? o + "--" + a : o + "--" + a + "_" + h)), s;
118
+ return h && (o += " " + (typeof h == "boolean" ? s + "--" + a : s + "--" + a + "_" + h)), o;
119
119
  }, "") : "");
120
120
  };
121
121
  };
122
122
  function mt(t, e, i) {
123
- var n, o, s, a, h;
123
+ var n, s, o, a, h;
124
124
  function r() {
125
125
  var l = Date.now() - a;
126
- l < e && l >= 0 ? n = setTimeout(r, e - l) : (n = null, i || (h = t.apply(s, o), s = o = null));
126
+ l < e && l >= 0 ? n = setTimeout(r, e - l) : (n = null, i || (h = t.apply(o, s), o = s = null));
127
127
  }
128
128
  e == null && (e = 100);
129
129
  var c = function() {
130
- s = this, o = arguments, a = Date.now();
130
+ o = this, s = arguments, a = Date.now();
131
131
  var l = i && !n;
132
- return n || (n = setTimeout(r, e)), l && (h = t.apply(s, o), s = o = null), h;
132
+ return n || (n = setTimeout(r, e)), l && (h = t.apply(o, s), o = s = null), h;
133
133
  };
134
134
  return c.clear = function() {
135
135
  n && (clearTimeout(n), n = null);
136
136
  }, c.flush = function() {
137
- n && (h = t.apply(s, o), s = o = null, clearTimeout(n), n = null);
137
+ n && (h = t.apply(o, s), o = s = null, clearTimeout(n), n = null);
138
138
  }, c;
139
139
  }
140
140
  mt.debounce = mt;
141
141
  var pt = mt, p = function() {
142
142
  return p = Object.assign || function(t) {
143
143
  for (var e, i = 1, n = arguments.length; i < n; i++)
144
- for (var o in e = arguments[i])
145
- Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
144
+ for (var s in e = arguments[i])
145
+ Object.prototype.hasOwnProperty.call(e, s) && (t[s] = e[s]);
146
146
  return t;
147
147
  }, p.apply(this, arguments);
148
148
  };
@@ -160,15 +160,15 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
160
160
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
161
161
  PERFORMANCE OF THIS SOFTWARE.
162
162
  ***************************************************************************** */
163
- function $t(t, e) {
163
+ function jt(t, e) {
164
164
  var i, n;
165
165
  return t && e ? (i = "" + t + e[0].toUpperCase() + e.slice(1), n = t + "-" + e) : (i = t || e, n = t || e), { name: i, classname: n };
166
166
  }
167
- function jt(t) {
167
+ function It(t) {
168
168
  return /^blob:/.test(t);
169
169
  }
170
170
  function Rt(t) {
171
- return jt(t) || function(e) {
171
+ return It(t) || function(e) {
172
172
  return /^data:/.test(e);
173
173
  }(t);
174
174
  }
@@ -181,10 +181,10 @@ function y(t) {
181
181
  function J(t) {
182
182
  return typeof t == "object" && t !== null;
183
183
  }
184
- function ft(t, e, i) {
184
+ function gt(t, e, i) {
185
185
  var n = {};
186
- return J(t) ? (Object.keys(e).forEach(function(o) {
187
- y(t[o]) ? n[o] = e[o] : J(e[o]) ? J(t[o]) ? n[o] = ft(t[o], e[o], i[o]) : n[o] = t[o] ? e[o] : i[o] : e[o] === !0 || e[o] === !1 ? n[o] = !!t[o] : n[o] = t[o];
186
+ return J(t) ? (Object.keys(e).forEach(function(s) {
187
+ y(t[s]) ? n[s] = e[s] : J(e[s]) ? J(t[s]) ? n[s] = gt(t[s], e[s], i[s]) : n[s] = t[s] ? e[s] : i[s] : e[s] === !0 || e[s] === !1 ? n[s] = !!t[s] : n[s] = t[s];
188
188
  }), n) : t ? e : i;
189
189
  }
190
190
  function q(t) {
@@ -192,14 +192,14 @@ function q(t) {
192
192
  return Number.isNaN(e) ? t : e;
193
193
  }
194
194
  function At(t) {
195
- return typeof (t == "number" || function(e) {
195
+ return typeof (t == "number" || /* @__PURE__ */ function(e) {
196
196
  return typeof e == "object" && e !== null;
197
- }(t) && toString.call(t) == "[object Number]") && !It(t);
197
+ }(t) && toString.call(t) == "[object Number]") && !Ht(t);
198
198
  }
199
- function It(t) {
199
+ function Ht(t) {
200
200
  return t != t;
201
201
  }
202
- function Ht(t, e) {
202
+ function _t(t, e) {
203
203
  return Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2));
204
204
  }
205
205
  var X = function(t, e) {
@@ -209,35 +209,18 @@ var X = function(t, e) {
209
209
  }, vt = function(t) {
210
210
  this.type = "move", this.directions = t;
211
211
  }, Zt = function() {
212
- function t(e, i, n, o, s) {
213
- this.type = "drag", this.nativeEvent = e, this.position = n, this.previousPosition = o, this.element = i, this.anchor = s;
212
+ function t(e, i, n, s, o) {
213
+ this.type = "drag", this.nativeEvent = e, this.position = n, this.previousPosition = s, this.element = i, this.anchor = o;
214
214
  }
215
215
  return t.prototype.shift = function() {
216
- var e = this, i = e.element, n = e.anchor, o = e.position, s = i.getBoundingClientRect(), a = s.left, h = s.top;
217
- return { left: o.left - a - n.left, top: o.top - h - n.top };
216
+ var e = this, i = e.element, n = e.anchor, s = e.position, o = i.getBoundingClientRect(), a = o.left, h = o.top;
217
+ return { left: s.left - a - n.left, top: s.top - h - n.top };
218
218
  }, t;
219
219
  }();
220
- function A(t, e, i, n, o, s, a, h, r, c) {
221
- typeof a != "boolean" && (r = h, h = a, a = !1);
220
+ function A(t, e, i, n, s, o, a, h, r, c) {
222
221
  const l = typeof i == "function" ? i.options : i;
223
- let d;
224
- if (t && t.render && (l.render = t.render, l.staticRenderFns = t.staticRenderFns, l._compiled = !0, o && (l.functional = !0)), n && (l._scopeId = n), s ? (d = function(u) {
225
- (u = u || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) || typeof __VUE_SSR_CONTEXT__ > "u" || (u = __VUE_SSR_CONTEXT__), e && e.call(this, r(u)), u && u._registeredComponents && u._registeredComponents.add(s);
226
- }, l._ssrRegister = d) : e && (d = a ? function(u) {
227
- e.call(this, c(u, this.$root.$options.shadowRoot));
228
- } : function(u) {
229
- e.call(this, h(u));
230
- }), d)
231
- if (l.functional) {
232
- const u = l.render;
233
- l.render = function(m, f) {
234
- return d.call(f), u(m, f);
235
- };
236
- } else {
237
- const u = l.beforeCreate;
238
- l.beforeCreate = u ? [].concat(u, d) : [d];
239
- }
240
- return i;
222
+ let u;
223
+ return t && t.render && (l.render = t.render, l.staticRenderFns = t.staticRenderFns, l._compiled = !0), i;
241
224
  }
242
225
  var Dt = A({ render: function() {
243
226
  var t = this, e = t.$createElement;
@@ -255,7 +238,7 @@ var Dt = A({ render: function() {
255
238
  }, onMouseLeave: function() {
256
239
  this.hovered && !this.touches.length && (this.hovered = !1, this.$emit("leave"));
257
240
  }, onTouchStart: function(t) {
258
- t.cancelable && !this.disabled && t.touches.length === 1 && (this.touches = H(t.touches), this.hovered || (this.$emit("enter"), this.hovered = !0), t.touches.length && this.initAnchor(this.touches.reduce(function(e, i) {
241
+ t.cancelable && !this.disabled && t.touches.length === 1 && (this.touches = _(t.touches), this.hovered || (this.$emit("enter"), this.hovered = !0), t.touches.length && this.initAnchor(this.touches.reduce(function(e, i) {
259
242
  return { clientX: e.clientX + i.clientX / t.touches.length, clientY: e.clientY + i.clientY / t.touches.length };
260
243
  }, { clientX: 0, clientY: 0 })), t.preventDefault && t.preventDefault(), t.stopPropagation());
261
244
  }, onTouchEnd: function() {
@@ -272,10 +255,10 @@ var Dt = A({ render: function() {
272
255
  }, onMouseUp: function() {
273
256
  this.processEnd();
274
257
  }, initAnchor: function(t) {
275
- var e = this.$refs.draggable.getBoundingClientRect(), i = e.left, n = e.right, o = e.bottom, s = e.top;
276
- this.anchor = { left: t.clientX - i, top: t.clientY - s, bottom: o - t.clientY, right: n - t.clientX };
258
+ var e = this.$refs.draggable.getBoundingClientRect(), i = e.left, n = e.right, s = e.bottom, o = e.top;
259
+ this.anchor = { left: t.clientX - i, top: t.clientY - o, bottom: s - t.clientY, right: n - t.clientX };
277
260
  }, processMove: function(t, e) {
278
- var i = H(e);
261
+ var i = _(e);
279
262
  if (this.touches.length) {
280
263
  if (this.touches.length === 1 && i.length === 1) {
281
264
  var n = this.$refs.draggable;
@@ -285,7 +268,7 @@ var Dt = A({ render: function() {
285
268
  }
286
269
  }, processEnd: function() {
287
270
  this.touches.length && this.$emit("drag-end"), this.hovered && (this.$emit("leave"), this.hovered = !1), this.touches = [];
288
- } } }], props: { classname: { type: String } } }, void 0, !1, void 0, !1, void 0, void 0, void 0), rt = M("vue-handler-wrapper"), Gt = A({ render: function() {
271
+ } } }], props: { classname: { type: String } } }, void 0, !1), rt = M("vue-handler-wrapper"), Gt = A({ render: function() {
289
272
  var t = this, e = t.$createElement, i = t._self._c || e;
290
273
  return i("div", { class: t.classes.root }, [i("DraggableElement", { class: t.classes.draggable, on: { drag: function(n) {
291
274
  return t.$emit("drag", n);
@@ -299,12 +282,12 @@ var Dt = A({ render: function() {
299
282
  }, staticRenderFns: [] }, void 0, { name: "HandlerWrapper", components: { DraggableElement: Dt }, props: { horizontalPosition: { type: String }, verticalPosition: { type: String }, disabled: { type: Boolean, default: !1 } }, computed: { classes: function() {
300
283
  var t;
301
284
  if (this.horizontalPosition || this.verticalPosition) {
302
- var e, i = $t(this.horizontalPosition, this.verticalPosition);
285
+ var e, i = jt(this.horizontalPosition, this.verticalPosition);
303
286
  t = rt((C(e = {}, i.classname, !0), C(e, "disabled", this.disabled), e));
304
287
  } else
305
288
  t = rt({ disabled: this.disabled });
306
289
  return { root: t, draggable: rt("draggable") };
307
- } } }, void 0, !1, void 0, !1, void 0, void 0, void 0), Qt = M("vue-line-wrapper"), Kt = A({ render: function() {
290
+ } } }, void 0, !1), Qt = M("vue-line-wrapper"), Kt = A({ render: function() {
308
291
  var t = this, e = t.$createElement;
309
292
  return (t._self._c || e)("DraggableElement", { class: t.classname, on: { drag: function(i) {
310
293
  return t.$emit("drag", i);
@@ -318,7 +301,7 @@ var Dt = A({ render: function() {
318
301
  }, staticRenderFns: [] }, void 0, { name: "LineWrapper", components: { DraggableElement: Dt }, props: { position: { type: String, required: !0 }, disabled: { type: Boolean, default: !1 } }, computed: { classname: function() {
319
302
  var t;
320
303
  return Qt((C(t = {}, this.position, !0), C(t, "disabled", this.disabled), t));
321
- } } }, void 0, !1, void 0, !1, void 0, void 0, void 0), W = ["left", "right", "top", "bottom"], Jt = ["left", "right"], te = ["top", "bottom"], ee = ["left", "top"], ie = ["fill-area", "fit-area", "stencil", "none"], xt = { left: 0, top: 0, width: 0, height: 0 };
304
+ } } }, void 0, !1), W = ["left", "right", "top", "bottom"], Jt = ["left", "right"], te = ["top", "bottom"], ee = ["left", "top"], ie = ["fill-area", "fit-area", "stencil", "none"], xt = { left: 0, top: 0, width: 0, height: 0 };
322
305
  function St(t, e, i) {
323
306
  return !(i = i || ["width", "height", "left", "top"]).some(function(n) {
324
307
  return t[n] !== e[n];
@@ -336,8 +319,8 @@ function R(t) {
336
319
  function Y(t, e) {
337
320
  var i = { left: 0, top: 0, right: 0, bottom: 0 };
338
321
  return W.forEach(function(n) {
339
- var o = e[n], s = T(t)[n];
340
- i[n] = o !== void 0 && s !== void 0 ? n === "left" || n === "top" ? Math.max(0, o - s) : Math.max(0, s - o) : 0;
322
+ var s = e[n], o = T(t)[n];
323
+ i[n] = s !== void 0 && o !== void 0 ? n === "left" || n === "top" ? Math.max(0, s - o) : Math.max(0, o - s) : 0;
341
324
  }), i;
342
325
  }
343
326
  function O(t, e) {
@@ -352,8 +335,8 @@ function x(t, e) {
352
335
  function E(t, e, i, n) {
353
336
  if (e !== 1) {
354
337
  if (i) {
355
- var o = R(t);
356
- return { width: t.width * e, height: t.height * e, left: t.left + t.width * (1 - e) / 2 + (i.left - o.left) * (n || 1 - e), top: t.top + t.height * (1 - e) / 2 + (i.top - o.top) * (n || 1 - e) };
338
+ var s = R(t);
339
+ return { width: t.width * e, height: t.height * e, left: t.left + t.width * (1 - e) / 2 + (i.left - s.left) * (1 - e), top: t.top + t.height * (1 - e) / 2 + (i.top - s.top) * (1 - e) };
357
340
  }
358
341
  return { width: t.width * e, height: t.height * e, left: t.left + t.width * (1 - e) / 2, top: t.top + t.height * (1 - e) / 2 };
359
342
  }
@@ -381,7 +364,7 @@ function bt(t, e) {
381
364
  var i = e * Math.PI / 180;
382
365
  return { width: Math.abs(t.width * Math.cos(i)) + Math.abs(t.height * Math.sin(i)), height: Math.abs(t.width * Math.sin(i)) + Math.abs(t.height * Math.cos(i)) };
383
366
  }
384
- function I(t, e) {
367
+ function H(t, e) {
385
368
  var i = e * Math.PI / 180;
386
369
  return { left: t.left * Math.cos(i) - t.top * Math.sin(i), top: t.left * Math.sin(i) + t.top * Math.cos(i) };
387
370
  }
@@ -403,69 +386,69 @@ function ne(t, e) {
403
386
  function Pt(t, e, i) {
404
387
  i === void 0 && (i = !0);
405
388
  var n = {};
406
- return W.forEach(function(o) {
407
- var s = t[o], a = e[o];
408
- s !== void 0 && a !== void 0 ? n[o] = o === "left" || o === "top" ? i ? Math.max(s, a) : Math.min(s, a) : i ? Math.min(s, a) : Math.max(s, a) : a !== void 0 ? n[o] = a : s !== void 0 && (n[o] = s);
389
+ return W.forEach(function(s) {
390
+ var o = t[s], a = e[s];
391
+ o !== void 0 && a !== void 0 ? n[s] = s === "left" || s === "top" ? i ? Math.max(o, a) : Math.min(o, a) : i ? Math.min(o, a) : Math.max(o, a) : a !== void 0 ? n[s] = a : o !== void 0 && (n[s] = o);
409
392
  }), n;
410
393
  }
411
394
  function it(t, e) {
412
395
  return Pt(t, e, !0);
413
396
  }
414
397
  function Ct(t) {
415
- var e = t.size, i = t.aspectRatio, n = t.ignoreMinimum, o = t.sizeRestrictions;
416
- return !!((e.correctRatio || b(e) >= i.minimum && b(e) <= i.maximum) && e.height <= o.maxHeight && e.width <= o.maxWidth && e.width && e.height && (n || e.height >= o.minHeight && e.width >= o.minWidth));
398
+ var e = t.size, i = t.aspectRatio, n = t.ignoreMinimum, s = t.sizeRestrictions;
399
+ return !!((e.correctRatio || b(e) >= i.minimum && b(e) <= i.maximum) && e.height <= s.maxHeight && e.width <= s.maxWidth && e.width && e.height && (n || e.height >= s.minHeight && e.width >= s.minWidth));
417
400
  }
418
401
  function Et(t, e) {
419
402
  return Math.pow(t.width - e.width, 2) + Math.pow(t.height - e.height, 2);
420
403
  }
421
- function j(t) {
422
- var e = t.width, i = t.height, n = t.sizeRestrictions, o = { minimum: t.aspectRatio && t.aspectRatio.minimum || 0, maximum: t.aspectRatio && t.aspectRatio.maximum || 1 / 0 }, s = { width: Math.max(n.minWidth, Math.min(n.maxWidth, e)), height: Math.max(n.minHeight, Math.min(n.maxHeight, i)) };
404
+ function I(t) {
405
+ var e = t.width, i = t.height, n = t.sizeRestrictions, s = { minimum: t.aspectRatio && t.aspectRatio.minimum || 0, maximum: t.aspectRatio && t.aspectRatio.maximum || 1 / 0 }, o = { width: Math.max(n.minWidth, Math.min(n.maxWidth, e)), height: Math.max(n.minHeight, Math.min(n.maxHeight, i)) };
423
406
  function a(c, l) {
424
- return l === void 0 && (l = !1), c.reduce(function(d, u) {
425
- return Ct({ size: u, aspectRatio: o, sizeRestrictions: n, ignoreMinimum: l }) && (!d || Et(u, { width: e, height: i }) < Et(d, { width: e, height: i })) ? u : d;
407
+ return l === void 0 && (l = !1), c.reduce(function(u, d) {
408
+ return Ct({ size: d, aspectRatio: s, sizeRestrictions: n, ignoreMinimum: l }) && (!u || Et(d, { width: e, height: i }) < Et(u, { width: e, height: i })) ? d : u;
426
409
  }, null);
427
410
  }
428
411
  var h = [];
429
- o && [o.minimum, o.maximum].forEach(function(c) {
430
- c && h.push({ width: s.width, height: s.width / c, correctRatio: !0 }, { width: s.height * c, height: s.height, correctRatio: !0 });
431
- }), Ct({ size: s, aspectRatio: o, sizeRestrictions: n }) && h.push(s);
412
+ s && [s.minimum, s.maximum].forEach(function(c) {
413
+ c && h.push({ width: o.width, height: o.width / c, correctRatio: !0 }, { width: o.height * c, height: o.height, correctRatio: !0 });
414
+ }), Ct({ size: o, aspectRatio: s, sizeRestrictions: n }) && h.push(o);
432
415
  var r = a(h) || a(h, !0);
433
416
  return r && { width: r.width, height: r.height };
434
417
  }
435
- function gt(t) {
436
- var e = t.event, i = t.coordinates, n = t.positionRestrictions, o = n === void 0 ? {} : n, s = x(i, e.directions);
437
- return x(s, F(s, o));
418
+ function ft(t) {
419
+ var e = t.event, i = t.coordinates, n = t.positionRestrictions, s = n === void 0 ? {} : n, o = x(i, e.directions);
420
+ return x(o, F(o, s));
438
421
  }
439
422
  function se(t) {
440
- var e = t.coordinates, i = t.transform, n = t.imageSize, o = t.sizeRestrictions, s = t.positionRestrictions, a = t.aspectRatio, h = t.visibleArea, r = function(l, d) {
441
- return gt({ coordinates: l, positionRestrictions: s, event: new vt({ left: d.left - l.left, top: d.top - l.top }) });
423
+ var e = t.coordinates, i = t.transform, n = t.imageSize, s = t.sizeRestrictions, o = t.positionRestrictions, a = t.aspectRatio, h = t.visibleArea, r = function(l, u) {
424
+ return ft({ coordinates: l, positionRestrictions: o, event: new vt({ left: u.left - l.left, top: u.top - l.top }) });
442
425
  }, c = p({}, e);
443
426
  return (Array.isArray(i) ? i : [i]).forEach(function(l) {
444
- var d = {};
445
- y((d = typeof l == "function" ? l({ coordinates: c, imageSize: n, visibleArea: h }) : l).width) && y(d.height) || (c = function(u, m) {
446
- var f = p(p(p({}, u), j({ width: m.width, height: m.height, sizeRestrictions: o, aspectRatio: a })), { left: 0, top: 0 });
447
- return r(f, { left: u.left, top: u.top });
448
- }(c, p(p({}, c), d))), y(d.left) && y(d.top) || (c = r(c, p(p({}, c), d)));
427
+ var u = {};
428
+ y((u = typeof l == "function" ? l({ coordinates: c, imageSize: n, visibleArea: h }) : l).width) && y(u.height) || (c = function(d, m) {
429
+ var g = p(p(p({}, d), I({ width: m.width, height: m.height, sizeRestrictions: s, aspectRatio: a })), { left: 0, top: 0 });
430
+ return r(g, { left: d.left, top: d.top });
431
+ }(c, p(p({}, c), u))), y(u.left) && y(u.top) || (c = r(c, p(p({}, c), u)));
449
432
  }), c;
450
433
  }
451
434
  function oe(t) {
452
435
  t.event;
453
- var e = t.getAreaRestrictions, i = t.boundaries, n = t.coordinates, o = t.visibleArea;
436
+ var e = t.getAreaRestrictions, i = t.boundaries, n = t.coordinates, s = t.visibleArea;
454
437
  t.aspectRatio;
455
- var s = t.stencilSize, a = t.sizeRestrictions, h = t.positionRestrictions;
438
+ var o = t.stencilSize, a = t.sizeRestrictions, h = t.positionRestrictions;
456
439
  t.stencilReference;
457
- var r, c, l, d = p({}, n), u = p({}, o), m = p({}, s);
458
- r = b(m), c = b(d), 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) || (d = p(p({}, d), j({ sizeRestrictions: a, width: d.width, height: d.height, aspectRatio: { minimum: b(m), maximum: b(m) } })));
459
- var f = et(u = E(u, d.width * i.width / (u.width * m.width)), e({ visibleArea: u, type: "resize" }));
460
- return f !== 1 && (u = E(u, f), d = E(d, f)), u = z(u = x(u, P(R(d), R(u))), e({ visibleArea: u, type: "move" })), { coordinates: d = z(d, it(T(u), h)), visibleArea: u };
440
+ var r, c, l, u = p({}, n), d = p({}, s), m = p({}, o);
441
+ 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 = p(p({}, u), I({ sizeRestrictions: a, width: u.width, height: u.height, aspectRatio: { minimum: b(m), maximum: b(m) } })));
442
+ var g = et(d = E(d, u.width * i.width / (d.width * m.width)), e({ visibleArea: d, type: "resize" }));
443
+ return g !== 1 && (d = E(d, g), u = E(u, g)), d = z(d = x(d, P(R(u), R(d))), e({ visibleArea: d, type: "move" })), { coordinates: u = z(u, it(T(d), h)), visibleArea: d };
461
444
  }
462
445
  function re(t) {
463
- var e = t.event, i = t.getAreaRestrictions, n = t.boundaries, o = t.coordinates, s = t.visibleArea;
446
+ var e = t.event, i = t.getAreaRestrictions, n = t.boundaries, s = t.coordinates, o = t.visibleArea;
464
447
  t.aspectRatio, t.stencilSize, t.sizeRestrictions;
465
448
  var a = t.positionRestrictions;
466
449
  t.stencilReference;
467
- var h = p({}, o), r = p({}, s);
468
- if (o && s && e.type !== "manipulateImage") {
450
+ var h = p({}, s), r = p({}, o);
451
+ if (s && o && e.type !== "manipulateImage") {
469
452
  var c = { width: 0, height: 0 };
470
453
  r.width, n.width, b(n) > b(h) ? (c.height = 0.8 * n.height, c.width = c.height * b(h)) : (c.width = 0.8 * n.width, c.height = c.width * b(h));
471
454
  var l = et(r = E(r, h.width * n.width / (r.width * c.width)), i({ visibleArea: r, type: "resize" }));
@@ -474,76 +457,74 @@ function re(t) {
474
457
  return { coordinates: h, visibleArea: r };
475
458
  }
476
459
  function ae(t) {
477
- var e = t.event, i = t.coordinates, n = t.visibleArea, o = t.getAreaRestrictions, s = p({}, n), a = p({}, i);
460
+ var e = t.event, i = t.coordinates, n = t.visibleArea, s = t.getAreaRestrictions, o = p({}, n), a = p({}, i);
478
461
  if (e.type === "setCoordinates") {
479
- var h = Math.max(0, a.width - s.width), r = Math.max(0, a.height - s.height);
480
- h > r ? s = E(s, Math.min(a.width / s.width, L(s, o({ visibleArea: s, type: "resize" })))) : r > h && (s = E(s, Math.min(a.height / s.height, L(s, o({ visibleArea: s, type: "resize" }))))), s = z(s = x(s, tt(F(a, T(s)))), o({ visibleArea: s, type: "move" }));
462
+ var h = Math.max(0, a.width - o.width), r = Math.max(0, a.height - o.height);
463
+ h > r ? o = E(o, Math.min(a.width / o.width, L(o, s({ visibleArea: o, type: "resize" })))) : r > h && (o = E(o, Math.min(a.height / o.height, L(o, s({ visibleArea: o, type: "resize" }))))), o = z(o = x(o, tt(F(a, T(o)))), s({ visibleArea: o, type: "move" }));
481
464
  }
482
- return { visibleArea: s, coordinates: a };
465
+ return { visibleArea: o, coordinates: a };
483
466
  }
484
467
  function he(t) {
485
- var e = t.imageSize, i = t.visibleArea, n = t.aspectRatio, o = t.sizeRestrictions, s = i || e, a = Math.min(n.maximum || 1 / 0, Math.max(n.minimum || 0, b(s))), h = s.width < s.height ? { width: 0.8 * s.width, height: 0.8 * s.width / a } : { height: 0.8 * s.height, width: 0.8 * s.height * a };
486
- return j(p(p({}, h), { aspectRatio: n, sizeRestrictions: o }));
468
+ var e = t.imageSize, i = t.visibleArea, n = t.aspectRatio, s = t.sizeRestrictions, o = i || e, a = Math.min(n.maximum || 1 / 0, Math.max(n.minimum || 0, b(o))), h = o.width < o.height ? { width: 0.8 * o.width, height: 0.8 * o.width / a } : { height: 0.8 * o.height, width: 0.8 * o.height * a };
469
+ return I(p(p({}, h), { aspectRatio: n, sizeRestrictions: s }));
487
470
  }
488
471
  function ce(t) {
489
- var e, i, n = t.imageSize, o = t.visibleArea, s = t.boundaries, a = t.aspectRatio, h = t.sizeRestrictions, r = t.stencilSize, c = o || n;
490
- return b(c) > b(s) ? i = (e = r.height * c.height / s.height) * b(r) : e = (i = r.width * c.width / s.width) / b(r), j({ width: i, height: e, aspectRatio: a, sizeRestrictions: h });
472
+ var e, i, n = t.imageSize, s = t.visibleArea, o = t.boundaries, a = t.aspectRatio, h = t.sizeRestrictions, r = t.stencilSize, c = s || n;
473
+ return b(c) > b(o) ? i = (e = r.height * c.height / o.height) * b(r) : e = (i = r.width * c.width / o.width) / b(r), I({ width: i, height: e, aspectRatio: a, sizeRestrictions: h });
491
474
  }
492
475
  function Z(t, e) {
493
476
  return Pt(t, T(e));
494
477
  }
495
478
  function le(t) {
496
- var e = t.event, i = t.coordinates, n = t.visibleArea, o = t.sizeRestrictions, s = t.getAreaRestrictions, a = t.positionRestrictions, h = t.adjustStencil, r = e.scale, c = e.move, l = p({}, n), d = p({}, i), u = 1, m = 1, f = r.factor && Math.abs(r.factor - 1) > 1e-3;
479
+ var e = t.event, i = t.coordinates, n = t.visibleArea, s = t.sizeRestrictions, o = t.getAreaRestrictions, a = t.positionRestrictions, h = t.adjustStencil, r = e.scale, c = e.move, l = p({}, n), u = p({}, i), d = 1, m = 1, g = r.factor && Math.abs(r.factor - 1) > 1e-3;
497
480
  l = x(l, { left: c.left || 0, top: c.top || 0 });
498
- var g = { stencil: { minimum: Math.max(o.minWidth ? o.minWidth / d.width : 0, o.minHeight ? o.minHeight / d.height : 0), maximum: Math.min(o.maxWidth ? o.maxWidth / d.width : 1 / 0, o.maxHeight ? o.maxHeight / d.height : 1 / 0, L(d, a)) }, area: { maximum: L(l, s({ visibleArea: l, type: "resize" })) } };
499
- r.factor && f && (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 = E(l, m, r.center));
500
- var S = i.left - n.left, _ = n.width + n.left - (i.width + i.left), B = i.top - n.top, N = n.height + n.top - (i.height + i.top);
501
- return l = z(l = x(l, F(l, { left: a.left !== void 0 ? a.left - S * m : void 0, top: a.top !== void 0 ? a.top - B * m : void 0, bottom: a.bottom !== void 0 ? a.bottom + N * m : void 0, right: a.right !== void 0 ? a.right + _ * m : void 0 })), s({ visibleArea: l, type: "move" })), d.width = d.width * m, d.height = d.height * m, d.left = l.left + S * m, d.top = l.top + B * m, d = z(d, it(T(l), a)), r.factor && f && h && (r.factor > 1 ? u = Math.min(g.area.maximum, r.factor) / m : r.factor < 1 && (u = Math.max(d.height / l.height, d.width / l.width, r.factor / m)), u !== 1 && (l = x(l = z(l = E(l, u, r.factor > 1 ? r.center : R(d)), s({ visibleArea: l, type: "move" })), tt(F(d, T(l)))))), { coordinates: d, visibleArea: l };
502
- }
503
- function de(t) {
504
- var e = t.aspectRatio, i = t.getAreaRestrictions, n = t.coordinates, o = t.visibleArea, s = t.sizeRestrictions, a = t.positionRestrictions, h = t.imageSize, r = t.previousImageSize, c = t.angle, l = p({}, n), d = p({}, o), u = I(R(p({ left: 0, top: 0 }, r)), c);
505
- return (l = p(p({}, j({ sizeRestrictions: s, aspectRatio: e, width: l.width, height: l.height })), I(R(l), c))).left -= u.left - h.width / 2 + l.width / 2, l.top -= u.top - h.height / 2 + l.height / 2, d = E(d, et(d, i({ visibleArea: d, type: "resize" }))), { coordinates: l = z(l, a), visibleArea: d = z(d = x(d, P(R(l), R(n))), i({ visibleArea: d, type: "move" })) };
481
+ var f = { stencil: { minimum: Math.max(s.minWidth ? s.minWidth / u.width : 0, s.minHeight ? s.minHeight / u.height : 0), maximum: Math.min(s.maxWidth ? s.maxWidth / u.width : 1 / 0, s.maxHeight ? s.maxHeight / u.height : 1 / 0, L(u, a)) }, area: { maximum: L(l, o({ visibleArea: l, type: "resize" })) } };
482
+ r.factor && g && (r.factor < 1 ? (m = Math.max(r.factor, f.stencil.minimum)) > 1 && (m = 1) : r.factor > 1 && (m = Math.min(r.factor, Math.min(f.area.maximum, f.stencil.maximum))) < 1 && (m = 1)), m && (l = E(l, m, r.center));
483
+ var S = i.left - n.left, $ = n.width + n.left - (i.width + i.left), B = i.top - n.top, N = n.height + n.top - (i.height + i.top);
484
+ return l = z(l = x(l, F(l, { left: a.left !== void 0 ? a.left - S * m : void 0, top: a.top !== void 0 ? a.top - B * m : void 0, bottom: a.bottom !== void 0 ? a.bottom + N * m : void 0, right: a.right !== void 0 ? a.right + $ * m : void 0 })), o({ visibleArea: l, type: "move" })), u.width = u.width * m, u.height = u.height * m, u.left = l.left + S * m, u.top = l.top + B * m, u = z(u, it(T(l), a)), r.factor && g && h && (r.factor > 1 ? d = Math.min(f.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 = z(l = E(l, d, r.factor > 1 ? r.center : R(u)), o({ visibleArea: l, type: "move" })), tt(F(u, T(l)))))), { coordinates: u, visibleArea: l };
506
485
  }
507
486
  function ue(t) {
508
- var e = t.flip, i = t.previousFlip, n = t.rotate;
509
- t.aspectRatio;
510
- var o = t.getAreaRestrictions, s = t.coordinates, a = t.visibleArea, h = t.imageSize, r = p({}, s), c = p({}, a), l = i.horizontal !== e.horizontal, d = i.vertical !== e.vertical;
511
- if (l || d) {
512
- var u = I({ left: h.width / 2, top: h.height / 2 }, -n), m = I(R(r), -n), f = I({ left: l ? u.left - (m.left - u.left) : m.left, top: d ? u.top - (m.top - u.top) : m.top }, n);
513
- r = x(r, P(f, R(r))), m = I(R(c), -n), c = z(c = x(c, P(f = I({ left: l ? u.left - (m.left - u.left) : m.left, top: d ? u.top - (m.top - u.top) : m.top }, n), R(c))), o({ visibleArea: c, type: "move" }));
487
+ var e = t.aspectRatio, i = t.getAreaRestrictions, n = t.coordinates, s = t.visibleArea, o = t.sizeRestrictions, a = t.positionRestrictions, h = t.imageSize, r = t.previousImageSize, c = t.angle, l = p({}, n), u = p({}, s), d = H(R(p({ left: 0, top: 0 }, r)), c);
488
+ return (l = p(p({}, I({ sizeRestrictions: o, aspectRatio: e, width: l.width, height: l.height })), H(R(l), c))).left -= d.left - h.width / 2 + l.width / 2, l.top -= d.top - h.height / 2 + l.height / 2, u = E(u, et(u, i({ visibleArea: u, type: "resize" }))), { coordinates: l = z(l, a), visibleArea: u = z(u = x(u, P(R(l), R(n))), i({ visibleArea: u, type: "move" })) };
489
+ }
490
+ function de(t) {
491
+ var e = t.flip, i = t.previousFlip, n = t.rotate, s = t.getAreaRestrictions, o = t.coordinates, a = t.visibleArea, h = t.imageSize, r = p({}, o), c = p({}, a), l = i.horizontal !== e.horizontal, u = i.vertical !== e.vertical;
492
+ if (l || u) {
493
+ var d = H({ left: h.width / 2, top: h.height / 2 }, -n), m = H(R(r), -n), g = H({ left: l ? d.left - (m.left - d.left) : m.left, top: u ? d.top - (m.top - d.top) : m.top }, n);
494
+ r = x(r, P(g, R(r))), m = H(R(c), -n), c = z(c = x(c, P(g = H({ left: l ? d.left - (m.left - d.left) : m.left, top: u ? d.top - (m.top - d.top) : m.top }, n), R(c))), s({ visibleArea: c, type: "move" }));
514
495
  }
515
496
  return { coordinates: r, visibleArea: c };
516
497
  }
517
498
  function Ot(t) {
518
- var e = t.directions, i = t.coordinates, n = t.positionRestrictions, o = n === void 0 ? {} : n, s = t.sizeRestrictions, a = t.preserveRatio, h = t.compensate, r = p({}, e), c = O(i, r).width, l = O(i, r).height;
519
- c < 0 && (r.left < 0 && r.right < 0 ? (r.left = -(i.width - s.minWidth) / (r.left / r.right), r.right = -(i.width - s.minWidth) / (r.right / r.left)) : r.left < 0 ? r.left = -(i.width - s.minWidth) : r.right < 0 && (r.right = -(i.width - s.minWidth))), l < 0 && (r.top < 0 && r.bottom < 0 ? (r.top = -(i.height - s.minHeight) / (r.top / r.bottom), r.bottom = -(i.height - s.minHeight) / (r.bottom / r.top)) : r.top < 0 ? r.top = -(i.height - s.minHeight) : r.bottom < 0 && (r.bottom = -(i.height - s.minHeight)));
520
- var d = Y(O(i, r), o);
521
- h && (d.left && d.left > 0 && d.right === 0 ? (r.right += d.left, r.left -= d.left) : d.right && d.right > 0 && d.left === 0 && (r.left += d.right, r.right -= d.right), d.top && d.top > 0 && d.bottom === 0 ? (r.bottom += d.top, r.top -= d.top) : d.bottom && d.bottom > 0 && d.top === 0 && (r.top += d.bottom, r.bottom -= d.bottom), d = Y(O(i, r), o));
522
- var u = { width: 1 / 0, height: 1 / 0, left: 1 / 0, right: 1 / 0, top: 1 / 0, bottom: 1 / 0 };
523
- if (W.forEach(function(g) {
524
- var S = d[g];
525
- S && r[g] && (u[g] = Math.max(0, 1 - S / r[g]));
499
+ var e = t.directions, i = t.coordinates, n = t.positionRestrictions, s = n === void 0 ? {} : n, o = t.sizeRestrictions, a = t.preserveRatio, h = t.compensate, r = p({}, e), c = O(i, r).width, l = O(i, r).height;
500
+ c < 0 && (r.left < 0 && r.right < 0 ? (r.left = -(i.width - o.minWidth) / (r.left / r.right), r.right = -(i.width - o.minWidth) / (r.right / r.left)) : r.left < 0 ? r.left = -(i.width - o.minWidth) : r.right < 0 && (r.right = -(i.width - o.minWidth))), l < 0 && (r.top < 0 && r.bottom < 0 ? (r.top = -(i.height - o.minHeight) / (r.top / r.bottom), r.bottom = -(i.height - o.minHeight) / (r.bottom / r.top)) : r.top < 0 ? r.top = -(i.height - o.minHeight) : r.bottom < 0 && (r.bottom = -(i.height - o.minHeight)));
501
+ var u = Y(O(i, r), s);
502
+ 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 = Y(O(i, r), s));
503
+ var d = { width: 1 / 0, height: 1 / 0, left: 1 / 0, right: 1 / 0, top: 1 / 0, bottom: 1 / 0 };
504
+ if (W.forEach(function(f) {
505
+ var S = u[f];
506
+ S && r[f] && (d[f] = Math.max(0, 1 - S / r[f]));
526
507
  }), a) {
527
- var m = Math.min.apply(null, W.map(function(g) {
528
- return u[g];
508
+ var m = Math.min.apply(null, W.map(function(f) {
509
+ return d[f];
529
510
  }));
530
- m !== 1 / 0 && W.forEach(function(g) {
531
- r[g] *= m;
511
+ m !== 1 / 0 && W.forEach(function(f) {
512
+ r[f] *= m;
532
513
  });
533
514
  } else
534
- W.forEach(function(g) {
535
- u[g] !== 1 / 0 && (r[g] *= u[g]);
515
+ W.forEach(function(f) {
516
+ d[f] !== 1 / 0 && (r[f] *= d[f]);
536
517
  });
537
- if (c = O(i, r).width, l = O(i, r).height, r.right + r.left && (c > s.maxWidth ? u.width = (s.maxWidth - i.width) / (r.right + r.left) : c < s.minWidth && (u.width = (s.minWidth - i.width) / (r.right + r.left))), r.bottom + r.top && (l > s.maxHeight ? u.height = (s.maxHeight - i.height) / (r.bottom + r.top) : l < s.minHeight && (u.height = (s.minHeight - i.height) / (r.bottom + r.top))), a) {
538
- var f = Math.min(u.width, u.height);
539
- f !== 1 / 0 && W.forEach(function(g) {
540
- r[g] *= f;
518
+ if (c = O(i, r).width, l = O(i, r).height, r.right + r.left && (c > o.maxWidth ? d.width = (o.maxWidth - i.width) / (r.right + r.left) : c < o.minWidth && (d.width = (o.minWidth - i.width) / (r.right + r.left))), r.bottom + r.top && (l > o.maxHeight ? d.height = (o.maxHeight - i.height) / (r.bottom + r.top) : l < o.minHeight && (d.height = (o.minHeight - i.height) / (r.bottom + r.top))), a) {
519
+ var g = Math.min(d.width, d.height);
520
+ g !== 1 / 0 && W.forEach(function(f) {
521
+ r[f] *= g;
541
522
  });
542
523
  } else
543
- u.width !== 1 / 0 && Jt.forEach(function(g) {
544
- r[g] *= u.width;
545
- }), u.height !== 1 / 0 && te.forEach(function(g) {
546
- r[g] *= u.height;
524
+ d.width !== 1 / 0 && Jt.forEach(function(f) {
525
+ r[f] *= d.width;
526
+ }), d.height !== 1 / 0 && te.forEach(function(f) {
527
+ r[f] *= d.height;
547
528
  });
548
529
  return r;
549
530
  }
@@ -566,13 +547,13 @@ var me = M("vue-simple-handler"), pe = M("vue-simple-handler-wrapper"), nt = A({
566
547
  this.hover = !1;
567
548
  }, onDragEnd: function() {
568
549
  this.$emit("drag-end");
569
- } } }, void 0, !1, void 0, !1, void 0, void 0, void 0), fe = M("vue-simple-line"), ge = M("vue-simple-line-wrapper"), st = A({ render: function() {
550
+ } } }, void 0, !1), ge = M("vue-simple-line"), fe = M("vue-simple-line-wrapper"), st = A({ render: function() {
570
551
  var t = this, e = t.$createElement, i = t._self._c || e;
571
552
  return i("LineWrapper", { class: t.classes.wrapper, attrs: { position: t.position, disabled: t.disabled }, on: { drag: t.onDrag, "drag-end": t.onDragEnd, enter: t.onEnter, leave: t.onLeave } }, [i("div", { class: t.classes.root })]);
572
553
  }, staticRenderFns: [] }, void 0, { name: "SimpleLine", components: { LineWrapper: Kt }, props: { defaultClass: { type: String }, hoverClass: { type: String }, wrapperClass: { type: String }, position: { type: String }, disabled: { type: Boolean, default: !1 } }, data: function() {
573
554
  return { hover: !1 };
574
555
  }, computed: { classes: function() {
575
- return { root: w(fe(C({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass), wrapper: w(ge(C({}, this.position, !0)), this.wrapperClass) };
556
+ return { root: w(ge(C({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass), wrapper: w(fe(C({}, this.position, !0)), this.wrapperClass) };
576
557
  } }, methods: { onDrag: function(t) {
577
558
  this.$emit("drag", t);
578
559
  }, onEnter: function() {
@@ -581,18 +562,18 @@ var me = M("vue-simple-handler"), pe = M("vue-simple-handler-wrapper"), nt = A({
581
562
  this.hover = !1;
582
563
  }, onDragEnd: function() {
583
564
  this.$emit("drag-end");
584
- } } }, void 0, !1, void 0, !1, void 0, void 0, void 0), ct = M("vue-bounding-box"), ve = ["east", "west", null], be = ["south", "north", null], Lt = A({ render: function() {
565
+ } } }, void 0, !1), ct = M("vue-bounding-box"), ve = ["east", "west", null], be = ["south", "north", null], Lt = A({ render: function() {
585
566
  var t = this, e = t.$createElement, i = t._self._c || e;
586
567
  return i("div", { ref: "box", class: t.classes.root, style: t.style }, [t._t("default"), t._v(" "), i("div", t._l(t.lineNodes, function(n) {
587
- return i(n.component, { key: n.name, tag: "component", attrs: { "default-class": n.class, "hover-class": n.hoverClass, "wrapper-class": n.wrapperClass, position: n.name, disabled: n.disabled }, on: { drag: function(o) {
588
- return t.onHandlerDrag(o, n.horizontalDirection, n.verticalDirection);
589
- }, "drag-end": function(o) {
568
+ return i(n.component, { key: n.name, tag: "component", attrs: { "default-class": n.class, "hover-class": n.hoverClass, "wrapper-class": n.wrapperClass, position: n.name, disabled: n.disabled }, on: { drag: function(s) {
569
+ return t.onHandlerDrag(s, n.horizontalDirection, n.verticalDirection);
570
+ }, "drag-end": function(s) {
590
571
  return t.onEnd();
591
572
  } } });
592
573
  }), 1), t._v(" "), t._l(t.handlerNodes, function(n) {
593
- return i("div", { key: n.name, class: n.wrapperClass, style: n.wrapperStyle }, [i(n.component, { tag: "component", attrs: { "default-class": n.class, "hover-class": n.hoverClass, "wrapper-class": n.wrapperClass, "horizontal-position": n.horizontalDirection, "vertical-position": n.verticalDirection, disabled: n.disabled }, on: { drag: function(o) {
594
- return t.onHandlerDrag(o, n.horizontalDirection, n.verticalDirection);
595
- }, "drag-end": function(o) {
574
+ return i("div", { key: n.name, class: n.wrapperClass, style: n.wrapperStyle }, [i(n.component, { tag: "component", attrs: { "default-class": n.class, "hover-class": n.hoverClass, "wrapper-class": n.wrapperClass, "horizontal-position": n.horizontalDirection, "vertical-position": n.verticalDirection, disabled: n.disabled }, on: { drag: function(s) {
575
+ return t.onHandlerDrag(s, n.horizontalDirection, n.verticalDirection);
576
+ }, "drag-end": function(s) {
596
577
  return t.onEnd();
597
578
  } } })], 1);
598
579
  })], 2);
@@ -617,8 +598,8 @@ var me = M("vue-simple-handler"), pe = M("vue-simple-handler-wrapper"), nt = A({
617
598
  return ve.forEach(function(e) {
618
599
  be.forEach(function(i) {
619
600
  if (e !== i) {
620
- var n = $t(e, i), o = n.name, s = n.classname;
621
- t.push({ name: o, classname: s, verticalDirection: i, horizontalDirection: e });
601
+ var n = jt(e, i), s = n.name, o = n.classname;
602
+ t.push({ name: s, classname: o, verticalDirection: i, horizontalDirection: e });
622
603
  }
623
604
  });
624
605
  }), { points: t };
@@ -635,15 +616,15 @@ var me = M("vue-simple-handler"), pe = M("vue-simple-handler-wrapper"), nt = A({
635
616
  }), e;
636
617
  }, handlerNodes: function() {
637
618
  var t = this, e = [], i = this.width, n = this.height;
638
- return this.points.forEach(function(o) {
639
- if (t.handlers[o.name]) {
640
- var s = { name: o.name, component: t.handlersComponent, class: w(t.classes.handlers.default, t.classes.handlers[o.name]), wrapperClass: w(t.classes.handlersWrappers.default, t.classes.handlersWrappers[o.name]), hoverClass: t.classes.handlers.hover, verticalDirection: o.verticalDirection, horizontalDirection: o.horizontalDirection, disabled: !t.resizable };
619
+ return this.points.forEach(function(s) {
620
+ if (t.handlers[s.name]) {
621
+ var o = { name: s.name, component: t.handlersComponent, class: w(t.classes.handlers.default, t.classes.handlers[s.name]), wrapperClass: w(t.classes.handlersWrappers.default, t.classes.handlersWrappers[s.name]), hoverClass: t.classes.handlers.hover, verticalDirection: s.verticalDirection, horizontalDirection: s.horizontalDirection, disabled: !t.resizable };
641
622
  if (i && n) {
642
- var a = o.horizontalDirection, h = o.verticalDirection, r = a === "east" ? i : a === "west" ? 0 : i / 2, c = h === "south" ? n : h === "north" ? 0 : n / 2;
643
- s.wrapperClass = ct("handler"), s.wrapperStyle = { transform: "translate(".concat(r, "px, ").concat(c, "px)") }, t.transitions && t.transitions.enabled && (s.wrapperStyle.transition = "".concat(t.transitions.time, "ms ").concat(t.transitions.timingFunction));
623
+ var a = s.horizontalDirection, h = s.verticalDirection, r = a === "east" ? i : a === "west" ? 0 : i / 2, c = h === "south" ? n : h === "north" ? 0 : n / 2;
624
+ o.wrapperClass = ct("handler"), o.wrapperStyle = { transform: "translate(".concat(r, "px, ").concat(c, "px)") }, t.transitions && t.transitions.enabled && (o.wrapperStyle.transition = "".concat(t.transitions.time, "ms ").concat(t.transitions.timingFunction));
644
625
  } else
645
- s.wrapperClass = ct("handler", C({}, o.classname, !0));
646
- e.push(s);
626
+ o.wrapperClass = ct("handler", C({}, s.classname, !0));
627
+ e.push(o);
647
628
  }
648
629
  }), e;
649
630
  } }, beforeMount: function() {
@@ -655,9 +636,9 @@ var me = M("vue-simple-handler"), pe = M("vue-simple-handler-wrapper"), nt = A({
655
636
  }, methods: { onEnd: function() {
656
637
  this.$emit("resize-end");
657
638
  }, onHandlerDrag: function(t, e, i) {
658
- var n, o = t.shift(), s = o.left, a = o.top, h = { left: 0, right: 0, top: 0, bottom: 0 };
659
- e === "west" ? h.left -= s : e === "east" && (h.right += s), i === "north" ? h.top -= a : i === "south" && (h.bottom += a), !i && e ? n = "width" : i && !e && (n = "height"), this.resizable && this.$emit("resize", new qt(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: n }));
660
- } } }, void 0, !1, void 0, !1, void 0, void 0, void 0), we = M("vue-draggable-area"), Ft = A({ render: function() {
639
+ var n, s = t.shift(), o = s.left, a = s.top, h = { left: 0, right: 0, top: 0, bottom: 0 };
640
+ e === "west" ? h.left -= o : e === "east" && (h.right += o), i === "north" ? h.top -= a : i === "south" && (h.bottom += a), !i && e ? n = "width" : i && !e && (n = "height"), this.resizable && this.$emit("resize", new qt(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: n }));
641
+ } } }, void 0, !1), we = M("vue-draggable-area"), Ft = A({ render: function() {
661
642
  var t = this, e = t.$createElement;
662
643
  return (t._self._c || e)("div", { ref: "container", on: { touchstart: t.onTouchStart, mousedown: t.onMouseDown } }, [t._t("default")], 2);
663
644
  }, staticRenderFns: [] }, void 0, { name: "DraggableArea", props: { movable: { type: Boolean, default: !0 }, activationDistance: { type: Number, default: 20 } }, computed: { classnames: function() {
@@ -671,12 +652,12 @@ var me = M("vue-simple-handler"), pe = M("vue-simple-handler-wrapper"), nt = A({
671
652
  }, methods: { onTouchStart: function(t) {
672
653
  if (t.cancelable) {
673
654
  var e = this.movable && t.touches.length === 1;
674
- e && (this.touches = H(t.touches)), (this.touchStarted || e) && (t.preventDefault(), t.stopPropagation());
655
+ e && (this.touches = _(t.touches)), (this.touchStarted || e) && (t.preventDefault(), t.stopPropagation());
675
656
  }
676
657
  }, onTouchEnd: function() {
677
658
  this.touchStarted = !1, this.processEnd();
678
659
  }, onTouchMove: function(t) {
679
- this.touches.length >= 1 && (this.touchStarted ? (this.processMove(t, t.touches), t.preventDefault(), t.stopPropagation()) : Ht({ x: this.touches[0].clientX, y: this.touches[0].clientY }, { x: t.touches[0].clientX, y: t.touches[0].clientY }) > this.activationDistance && (this.initAnchor({ clientX: t.touches[0].clientX, clientY: t.touches[0].clientY }), this.touchStarted = !0));
660
+ this.touches.length >= 1 && (this.touchStarted ? (this.processMove(t, t.touches), t.preventDefault(), t.stopPropagation()) : _t({ x: this.touches[0].clientX, y: this.touches[0].clientY }, { x: t.touches[0].clientX, y: t.touches[0].clientY }) > this.activationDistance && (this.initAnchor({ clientX: t.touches[0].clientX, clientY: t.touches[0].clientY }), this.touchStarted = !0));
680
661
  }, onMouseDown: function(t) {
681
662
  if (this.movable && t.button === 0) {
682
663
  var e = { fake: !0, clientX: t.clientX, clientY: t.clientY };
@@ -690,14 +671,14 @@ var me = M("vue-simple-handler"), pe = M("vue-simple-handler-wrapper"), nt = A({
690
671
  var e = this.$refs.container.getBoundingClientRect(), i = e.left, n = e.top;
691
672
  this.anchor = { x: t.clientX - i, y: t.clientY - n };
692
673
  }, processMove: function(t, e) {
693
- var i = H(e);
674
+ var i = _(e);
694
675
  if (this.touches.length) {
695
- var n = this.$refs.container.getBoundingClientRect(), o = n.left, s = n.top;
696
- this.touches.length === 1 && i.length === 1 && this.$emit("move", new vt({ left: i[0].clientX - (o + this.anchor.x), top: i[0].clientY - (s + this.anchor.y) }));
676
+ var n = this.$refs.container.getBoundingClientRect(), s = n.left, o = n.top;
677
+ this.touches.length === 1 && i.length === 1 && this.$emit("move", new vt({ left: i[0].clientX - (s + this.anchor.x), top: i[0].clientY - (o + this.anchor.y) }));
697
678
  }
698
679
  }, processEnd: function() {
699
680
  this.touches.length && this.$emit("move-end"), this.touches = [];
700
- } } }, void 0, !1, void 0, !1, void 0, void 0, void 0);
681
+ } } }, void 0, !1);
701
682
  function lt(t) {
702
683
  var e, i;
703
684
  return { rotate: t.rotate || 0, flip: { horizontal: ((e = t == null ? void 0 : t.flip) === null || e === void 0 ? void 0 : e.horizontal) || !1, vertical: ((i = t == null ? void 0 : t.flip) === null || i === void 0 ? void 0 : i.vertical) || !1 } };
@@ -709,66 +690,66 @@ function ye(t) {
709
690
  if (/^data:/i.test(t))
710
691
  e(function(r) {
711
692
  r = r.replace(/^data:([^;]+);base64,/gim, "");
712
- for (var c = atob(r), l = c.length, d = new ArrayBuffer(l), u = new Uint8Array(d), m = 0; m < l; m++)
713
- u[m] = c.charCodeAt(m);
714
- return d;
693
+ for (var c = atob(r), l = c.length, u = new ArrayBuffer(l), d = new Uint8Array(u), m = 0; m < l; m++)
694
+ d[m] = c.charCodeAt(m);
695
+ return u;
715
696
  }(t));
716
697
  else if (/^blob:/i.test(t)) {
717
698
  var n = new FileReader();
718
699
  n.onload = function(r) {
719
700
  e(r.target.result);
720
- }, s = t, a = function(r) {
701
+ }, o = t, a = function(r) {
721
702
  n.readAsArrayBuffer(r);
722
- }, (h = new XMLHttpRequest()).open("GET", s, !0), h.responseType = "blob", h.onload = function() {
703
+ }, (h = new XMLHttpRequest()).open("GET", o, !0), h.responseType = "blob", h.onload = function() {
723
704
  this.status != 200 && this.status !== 0 || a(this.response);
724
705
  }, h.send();
725
706
  } else {
726
- var o = new XMLHttpRequest();
727
- o.onreadystatechange = function() {
728
- o.readyState === 4 && (o.status === 200 || o.status === 0 ? e(o.response) : i("Warning: could not load an image to parse its orientation"), o = null);
729
- }, o.onprogress = function() {
730
- o.getResponseHeader("content-type") !== "image/jpeg" && o.abort();
731
- }, o.withCredentials = !1, o.open("GET", t, !0), o.responseType = "arraybuffer", o.send(null);
707
+ var s = new XMLHttpRequest();
708
+ s.onreadystatechange = function() {
709
+ s.readyState === 4 && (s.status === 200 || s.status === 0 ? e(s.response) : i("Warning: could not load an image to parse its orientation"), s = null);
710
+ }, s.onprogress = function() {
711
+ s.getResponseHeader("content-type") !== "image/jpeg" && s.abort();
712
+ }, s.withCredentials = !1, s.open("GET", t, !0), s.responseType = "arraybuffer", s.send(null);
732
713
  }
733
714
  else
734
715
  i("Error: the image is empty");
735
716
  } catch (r) {
736
717
  i(r);
737
718
  }
738
- var s, a, h;
719
+ var o, a, h;
739
720
  });
740
721
  }
741
722
  function wt(t) {
742
- var e = t.rotate, i = t.flip, n = t.scaleX, o = t.scaleY, s = "";
743
- return s += " rotate(" + e + "deg) ", s += " scaleX(" + n * (i.horizontal ? -1 : 1) + ") ", s += " scaleY(" + o * (i.vertical ? -1 : 1) + ") ";
723
+ var e = t.rotate, i = t.flip, n = t.scaleX, s = t.scaleY, o = "";
724
+ return o += " rotate(" + e + "deg) ", o += " scaleX(" + n * (i.horizontal ? -1 : 1) + ") ", o += " scaleY(" + s * (i.vertical ? -1 : 1) + ") ";
744
725
  }
745
726
  function ze(t) {
746
727
  try {
747
- var e, i = new DataView(t), n = void 0, o = void 0, s = void 0, a = void 0;
728
+ var e, i = new DataView(t), n = void 0, s = void 0, o = void 0, a = void 0;
748
729
  if (i.getUint8(0) === 255 && i.getUint8(1) === 216)
749
730
  for (var h = i.byteLength, r = 2; r + 1 < h; ) {
750
731
  if (i.getUint8(r) === 255 && i.getUint8(r + 1) === 225) {
751
- s = r;
732
+ o = r;
752
733
  break;
753
734
  }
754
735
  r++;
755
736
  }
756
- if (s && (n = s + 10, function(m, f, g) {
757
- var S, _ = "";
758
- for (S = f, g += f; S < g; S++)
759
- _ += String.fromCharCode(m.getUint8(S));
760
- return _;
761
- }(i, s + 4, 4) === "Exif")) {
737
+ if (o && (n = o + 10, function(m, g, f) {
738
+ var S, $ = "";
739
+ for (S = g, f += g; S < f; S++)
740
+ $ += String.fromCharCode(m.getUint8(S));
741
+ return $;
742
+ }(i, o + 4, 4) === "Exif")) {
762
743
  var c = i.getUint16(n);
763
- if (((o = c === 18761) || c === 19789) && i.getUint16(n + 2, o) === 42) {
764
- var l = i.getUint32(n + 4, o);
744
+ if (((s = c === 18761) || c === 19789) && i.getUint16(n + 2, s) === 42) {
745
+ var l = i.getUint32(n + 4, s);
765
746
  l >= 8 && (a = n + l);
766
747
  }
767
748
  }
768
749
  if (a) {
769
- for (var d = i.getUint16(a, o), u = 0; u < d; u++)
770
- if (r = a + 12 * u + 2, i.getUint16(r, o) === 274) {
771
- r += 8, e = i.getUint16(r, o), i.setUint16(r, 1, o);
750
+ for (var u = i.getUint16(a, s), d = 0; d < u; d++)
751
+ if (r = a + 12 * d + 2, i.getUint16(r, s) === 274) {
752
+ r += 8, e = i.getUint16(r, s), i.setUint16(r, 1, s);
772
753
  break;
773
754
  }
774
755
  }
@@ -789,17 +770,17 @@ A({ render: function() {
789
770
  var t = { width: "".concat(this.stencilCoordinates.width, "px"), height: "".concat(this.stencilCoordinates.height, "px"), left: "calc(50% - ".concat(this.stencilCoordinates.width / 2, "px)"), top: "calc(50% - ".concat(this.stencilCoordinates.height / 2, "px)") };
790
771
  return this.transitions && this.transitions.enabled && (t.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), t;
791
772
  }, imageStyle: function() {
792
- var t = this.image.transforms, e = bt({ width: this.image.width, height: this.image.height }, t.rotate), i = { width: "".concat(this.image.width, "px"), height: "".concat(this.image.height, "px"), left: "0px", top: "0px" }, n = { left: (this.image.width - e.width) * t.scaleX / 2, top: (this.image.height - e.height) * t.scaleY / 2 }, o = { left: (1 - t.scaleX) * this.image.width / 2, top: (1 - t.scaleY) * this.image.height / 2 };
773
+ var t = this.image.transforms, e = bt({ width: this.image.width, height: this.image.height }, t.rotate), i = { width: "".concat(this.image.width, "px"), height: "".concat(this.image.height, "px"), left: "0px", top: "0px" }, n = { left: (this.image.width - e.width) * t.scaleX / 2, top: (this.image.height - e.height) * t.scaleY / 2 }, s = { left: (1 - t.scaleX) * this.image.width / 2, top: (1 - t.scaleY) * this.image.height / 2 };
793
774
  return i.transform = `translate(
794
- `.concat(-this.stencilCoordinates.left - t.translateX - n.left - o.left, "px,").concat(-this.stencilCoordinates.top - t.translateY - n.top - o.top, "px) ") + wt(t), this.transitions && this.transitions.enabled && (i.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), i;
795
- } } }, void 0, !1, void 0, !1, void 0, void 0, void 0);
775
+ `.concat(-this.stencilCoordinates.left - t.translateX - n.left - s.left, "px,").concat(-this.stencilCoordinates.top - t.translateY - n.top - s.top, "px) ") + wt(t), this.transitions && this.transitions.enabled && (i.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), i;
776
+ } } }, void 0, !1);
796
777
  function Wt(t, e) {
797
- var i = e.getBoundingClientRect(), n = i.left, o = i.top, s = { left: 0, top: 0 }, a = 0;
778
+ var i = e.getBoundingClientRect(), n = i.left, s = i.top, o = { left: 0, top: 0 }, a = 0;
798
779
  return t.forEach(function(h) {
799
- s.left += (h.clientX - n) / t.length, s.top += (h.clientY - o) / t.length;
780
+ o.left += (h.clientX - n) / t.length, o.top += (h.clientY - s) / t.length;
800
781
  }), t.forEach(function(h) {
801
- a += Ht({ x: s.left, y: s.top }, { x: h.clientX - n, y: h.clientY - o });
802
- }), { centerMass: s, spread: a, count: t.length };
782
+ a += _t({ x: o.left, y: o.top }, { x: h.clientX - n, y: h.clientY - s });
783
+ }), { centerMass: o, spread: a, count: t.length };
803
784
  }
804
785
  var Re = A({ render: function() {
805
786
  var t = this, e = t.$createElement;
@@ -828,9 +809,9 @@ var Re = A({ render: function() {
828
809
  return this.eventsFilter ? this.eventsFilter(t, this.transforming) !== !1 : (t.preventDefault(), t.stopPropagation(), !0);
829
810
  }, onTouchStart: function(t) {
830
811
  if (t.cancelable && (this.touchMove || this.touchResize && t.touches.length > 1) && this.processEvent(t)) {
831
- var e = this.$refs.container, i = e.getBoundingClientRect(), n = i.left, o = i.top, s = i.bottom, a = i.right;
832
- this.touches = H(t.touches).filter(function(h) {
833
- return h.clientX > n && h.clientX < a && h.clientY > o && h.clientY < s;
812
+ var e = this.$refs.container, i = e.getBoundingClientRect(), n = i.left, s = i.top, o = i.bottom, a = i.right;
813
+ this.touches = _(t.touches).filter(function(h) {
814
+ return h.clientX > n && h.clientX < a && h.clientY > s && h.clientY < o;
834
815
  }), this.oldGeometricProperties = Wt(this.touches, e);
835
816
  }
836
817
  }, onTouchEnd: function(t) {
@@ -838,9 +819,9 @@ var Re = A({ render: function() {
838
819
  }, onTouchMove: function(t) {
839
820
  var e = this;
840
821
  if (this.touches.length) {
841
- var i = H(t.touches).filter(function(n) {
842
- return !n.identifier || e.touches.find(function(o) {
843
- return o.identifier === n.identifier;
822
+ var i = _(t.touches).filter(function(n) {
823
+ return !n.identifier || e.touches.find(function(s) {
824
+ return s.identifier === n.identifier;
844
825
  });
845
826
  });
846
827
  this.processEvent(t) && (this.processMove(t, i), this.processStart());
@@ -856,18 +837,18 @@ var Re = A({ render: function() {
856
837
  this.touches = [], this.processEnd();
857
838
  }, onWheel: function(t) {
858
839
  if (this.wheelResize && this.processEvent(t)) {
859
- var e = this.$refs.container.getBoundingClientRect(), i = e.left, n = e.top, o = 1 + this.wheelResize.ratio * (a = t.deltaY || t.detail || t.wheelDelta, (h = +a) == 0 || It(h) ? h : h > 0 ? 1 : -1), s = { left: t.clientX - i, top: t.clientY - n };
860
- this.$emit("resize", new X({}, { factor: o, center: s })), this.touches.length || this.debouncedProcessEnd();
840
+ var e = this.$refs.container.getBoundingClientRect(), i = e.left, n = e.top, s = 1 + this.wheelResize.ratio * (a = t.deltaY || t.detail || t.wheelDelta, (h = +a) == 0 || Ht(h) ? h : h > 0 ? 1 : -1), o = { left: t.clientX - i, top: t.clientY - n };
841
+ this.$emit("resize", new X({}, { factor: s, center: o })), this.touches.length || this.debouncedProcessEnd();
861
842
  }
862
843
  var a, h;
863
- } } }, void 0, !1, void 0, !1, void 0, void 0, void 0), Tt = A({ render: function() {
844
+ } } }, void 0, !1), Tt = A({ render: function() {
864
845
  var t = this, e = t.$createElement;
865
846
  return (t._self._c || e)("transformable-image", { attrs: { "touch-move": t.touchMove, "touch-resize": t.touchResize, "mouse-move": t.mouseMove, "wheel-resize": t.wheelResize }, on: { move: function(i) {
866
847
  return t.$emit("move", i);
867
848
  }, resize: function(i) {
868
849
  return t.$emit("resize", i);
869
850
  } } }, [t._t("default")], 2);
870
- }, staticRenderFns: [] }, void 0, { components: { TransformableImage: Re }, props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 } } }, void 0, !1, void 0, !1, void 0, void 0, void 0), K = M("vue-preview"), Ae = A({ render: function() {
851
+ }, staticRenderFns: [] }, void 0, { components: { TransformableImage: Re }, props: { touchMove: { type: Boolean, required: !0 }, mouseMove: { type: Boolean, required: !0 }, touchResize: { type: Boolean, required: !0 }, wheelResize: { type: [Boolean, Object], required: !0 } } }, void 0, !1), K = M("vue-preview"), Ae = A({ render: function() {
871
852
  var t = this, e = t.$createElement, i = t._self._c || e;
872
853
  return i("div", { ref: "root", class: t.classes.root, style: t.style }, [i("div", { ref: "wrapper", class: t.classes.wrapper, style: t.wrapperStyle }, [i("img", { directives: [{ name: "show", rawName: "v-show", value: t.image && t.image.src, expression: "image && image.src" }], ref: "image", class: t.classes.image, style: t.imageStyle, attrs: { src: t.image && t.image.src } })])]);
873
854
  }, staticRenderFns: [] }, void 0, { props: { coordinates: { type: Object }, transitions: { type: Object }, image: { type: Object, default: function() {
@@ -886,9 +867,9 @@ var Re = A({ render: function() {
886
867
  return this.transitions && this.transitions.enabled && (t.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), t;
887
868
  }, imageStyle: function() {
888
869
  if (this.coordinates && this.image) {
889
- var t = this.coordinates.width / this.size.width, e = v(v({ rotate: 0, flip: { horizontal: !1, vertical: !1 } }, this.image.transforms), {}, { scaleX: 1 / t, scaleY: 1 / t }), i = this.imageSize.width, n = this.imageSize.height, o = bt({ width: i, height: n }, e.rotate), s = { width: "".concat(i, "px"), height: "".concat(n, "px"), left: "0px", top: "0px" }, a = { rotate: { left: (i - o.width) * e.scaleX / 2, top: (n - o.height) * e.scaleY / 2 }, scale: { left: (1 - e.scaleX) * i / 2, top: (1 - e.scaleY) * n / 2 } };
890
- return s.transform = `translate(
891
- `.concat(-this.coordinates.left / t - a.rotate.left - a.scale.left, "px,").concat(-this.coordinates.top / t - a.rotate.top - a.scale.top, "px) ") + wt(e), this.transitions && this.transitions.enabled && (s.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), s;
870
+ var t = this.coordinates.width / this.size.width, e = v(v({ rotate: 0, flip: { horizontal: !1, vertical: !1 } }, this.image.transforms), {}, { scaleX: 1 / t, scaleY: 1 / t }), i = this.imageSize.width, n = this.imageSize.height, s = bt({ width: i, height: n }, e.rotate), o = { width: "".concat(i, "px"), height: "".concat(n, "px"), left: "0px", top: "0px" }, a = { rotate: { left: (i - s.width) * e.scaleX / 2, top: (n - s.height) * e.scaleY / 2 }, scale: { left: (1 - e.scaleX) * i / 2, top: (1 - e.scaleY) * n / 2 } };
871
+ return o.transform = `translate(
872
+ `.concat(-this.coordinates.left / t - a.rotate.left - a.scale.left, "px,").concat(-this.coordinates.top / t - a.rotate.top - a.scale.top, "px) ") + wt(e), this.transitions && this.transitions.enabled && (o.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), o;
892
873
  }
893
874
  return {};
894
875
  }, size: function() {
@@ -913,10 +894,10 @@ var Re = A({ render: function() {
913
894
  }, onChangeImage: function() {
914
895
  var t = this.$refs.image;
915
896
  t && t.complete && this.refreshImage(), this.refresh();
916
- } } }, void 0, !1, void 0, !1, void 0, void 0, void 0), Bt = A({ render: function() {
897
+ } } }, void 0, !1), Bt = A({ render: function() {
917
898
  var t = this, e = t.$createElement;
918
899
  return (t._self._c || e)("preview", t._b({ attrs: { fill: !0 } }, "preview", t.$attrs, !1));
919
- }, staticRenderFns: [] }, void 0, { components: { Preview: Ae }, inheritAttrs: !1 }, void 0, !1, void 0, !1, void 0, void 0, void 0), dt = M("vue-rectangle-stencil"), Ut = A({ render: function() {
900
+ }, staticRenderFns: [] }, void 0, { components: { Preview: Ae }, inheritAttrs: !1 }, void 0, !1), ut = M("vue-rectangle-stencil"), Ut = A({ render: function() {
920
901
  var t = this, e = t.$createElement, i = t._self._c || e;
921
902
  return i("div", { class: t.classes.stencil, style: t.style }, [i("bounding-box", { class: t.classes.boundingBox, attrs: { width: t.stencilCoordinates.width, height: t.stencilCoordinates.height, transitions: t.transitions, handlers: t.handlers, "handlers-component": t.handlersComponent, "handlers-classes": t.handlersClasses, "handlers-wrappers-classes": t.handlersWrappersClasses, lines: t.lines, "lines-component": t.linesComponent, "lines-classes": t.linesClasses, "lines-wrappers-classes": t.linesWrappersClasses, resizable: t.resizable }, on: { resize: t.onResize, "resize-end": t.onResizeEnd } }, [i("draggable-area", { attrs: { movable: t.movable }, on: { move: t.onMove, "move-end": t.onMoveEnd } }, [i("stencil-preview", { class: t.classes.preview, attrs: { image: t.image, coordinates: t.coordinates, width: t.stencilCoordinates.width, height: t.stencilCoordinates.height, transitions: t.transitions } })], 1)], 1)], 1);
922
903
  }, staticRenderFns: [] }, void 0, { name: "RectangleStencil", components: { StencilPreview: Bt, BoundingBox: Lt, DraggableArea: Ft }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object }, handlersComponent: { type: [Object, String], default: function() {
@@ -934,10 +915,10 @@ var Re = A({ render: function() {
934
915
  } } }, data: function() {
935
916
  return { moving: !1, resizing: !1 };
936
917
  }, computed: { classes: function() {
937
- return { stencil: w(dt({ movable: this.movable, moving: this.moving, resizing: this.resizing }), this.moving && this.movingClass, this.resizing && this.resizingClass), preview: w(dt("preview"), this.previewClass), boundingBox: w(dt("bounding-box"), this.boundingBoxClass) };
918
+ return { stencil: w(ut({ movable: this.movable, moving: this.moving, resizing: this.resizing }), this.moving && this.movingClass, this.resizing && this.resizingClass), preview: w(ut("preview"), this.previewClass), boundingBox: w(ut("bounding-box"), this.boundingBoxClass) };
938
919
  }, style: function() {
939
- var t = this.stencilCoordinates, e = t.height, i = t.width, n = t.left, o = t.top, s = { width: "".concat(i, "px"), height: "".concat(e, "px"), transform: "translate(".concat(n, "px, ").concat(o, "px)") };
940
- return this.transitions && this.transitions.enabled && (s.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), s;
920
+ var t = this.stencilCoordinates, e = t.height, i = t.width, n = t.left, s = t.top, o = { width: "".concat(i, "px"), height: "".concat(e, "px"), transform: "translate(".concat(n, "px, ").concat(s, "px)") };
921
+ return this.transitions && this.transitions.enabled && (o.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), o;
941
922
  } }, methods: { onMove: function(t) {
942
923
  this.$emit("move", t), this.moving = !0;
943
924
  }, onMoveEnd: function() {
@@ -948,7 +929,7 @@ var Re = A({ render: function() {
948
929
  this.$emit("resize-end"), this.resizing = !1;
949
930
  }, aspectRatios: function() {
950
931
  return { minimum: this.aspectRatio || this.minAspectRatio, maximum: this.aspectRatio || this.maxAspectRatio };
951
- } } }, void 0, !1, void 0, !1, void 0, void 0, void 0), ut = M("vue-circle-stencil"), xe = A({ render: function() {
932
+ } } }, void 0, !1), dt = M("vue-circle-stencil"), xe = A({ render: function() {
952
933
  var t = this, e = t.$createElement, i = t._self._c || e;
953
934
  return i("div", { class: t.classes.stencil, style: t.style }, [i("bounding-box", { class: t.classes.boundingBox, attrs: { width: t.stencilCoordinates.width, height: t.stencilCoordinates.height, transitions: t.transitions, handlers: t.handlers, "handlers-component": t.handlersComponent, "handlers-classes": t.handlersClasses, "handlers-wrappers-classes": t.handlersWrappersClasses, lines: t.lines, "lines-component": t.linesComponent, "lines-classes": t.linesClasses, "lines-wrappers-classes": t.linesWrappersClasses, resizable: t.resizable }, on: { resize: t.onResize, "resize-end": t.onResizeEnd } }, [i("draggable-area", { attrs: { movable: t.movable }, on: { move: t.onMove, "move-end": t.onMoveEnd } }, [i("stencil-preview", { class: t.classes.preview, attrs: { image: t.image, coordinates: t.coordinates, width: t.stencilCoordinates.width, height: t.stencilCoordinates.height, transitions: t.transitions } })], 1)], 1)], 1);
954
935
  }, staticRenderFns: [] }, void 0, { components: { StencilPreview: Bt, BoundingBox: Lt, DraggableArea: Ft }, props: { image: { type: Object }, coordinates: { type: Object }, stencilCoordinates: { type: Object }, handlers: { type: Object, default: function() {
@@ -968,10 +949,10 @@ var Re = A({ render: function() {
968
949
  } }, movable: { type: Boolean, default: !0 }, resizable: { type: Boolean, default: !0 }, transitions: { type: Object }, movingClass: { type: String }, resizingClass: { type: String }, previewClass: { type: String }, boundingBoxClass: { type: String } }, data: function() {
969
950
  return { moving: !1, resizing: !1 };
970
951
  }, computed: { classes: function() {
971
- return { stencil: w(ut({ movable: this.movable, moving: this.moving, resizing: this.resizing }), this.moving && this.movingClass, this.resizing && this.resizingClass), preview: w(ut("preview"), this.previewClass), boundingBox: w(ut("bounding-box"), this.boundingBoxClass) };
952
+ return { stencil: w(dt({ movable: this.movable, moving: this.moving, resizing: this.resizing }), this.moving && this.movingClass, this.resizing && this.resizingClass), preview: w(dt("preview"), this.previewClass), boundingBox: w(dt("bounding-box"), this.boundingBoxClass) };
972
953
  }, style: function() {
973
- var t = this.stencilCoordinates, e = t.height, i = t.width, n = t.left, o = t.top, s = { width: "".concat(i, "px"), height: "".concat(e, "px"), transform: "translate(".concat(n, "px, ").concat(o, "px)") };
974
- return this.transitions && this.transitions.enabled && (s.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), s;
954
+ var t = this.stencilCoordinates, e = t.height, i = t.width, n = t.left, s = t.top, o = { width: "".concat(i, "px"), height: "".concat(e, "px"), transform: "translate(".concat(n, "px, ").concat(s, "px)") };
955
+ return this.transitions && this.transitions.enabled && (o.transition = "".concat(this.transitions.time, "ms ").concat(this.transitions.timingFunction)), o;
975
956
  } }, methods: { onMove: function(t) {
976
957
  this.$emit("move", t), this.moving = !0;
977
958
  }, onMoveEnd: function() {
@@ -982,7 +963,7 @@ var Re = A({ render: function() {
982
963
  this.$emit("resize-end"), this.resizing = !1;
983
964
  }, aspectRatios: function() {
984
965
  return { minimum: 1, maximum: 1 };
985
- } } }, void 0, !1, void 0, !1, void 0, void 0, void 0), Se = ["transitions"], $ = M("vue-advanced-cropper"), Me = { name: "Cropper", components: { BackgroundWrapper: Tt }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {
966
+ } } }, void 0, !1), Se = ["transitions"], j = M("vue-advanced-cropper"), Me = { name: "Cropper", components: { BackgroundWrapper: Tt }, props: { src: { type: String, default: null }, stencilComponent: { type: [Object, String], default: function() {
986
967
  return Ut;
987
968
  } }, backgroundWrapperComponent: { type: [Object, String], default: function() {
988
969
  return Tt;
@@ -991,60 +972,60 @@ var Re = A({ render: function() {
991
972
  } }, autoZoom: { type: Boolean, default: !1 }, imageClass: { type: String }, boundariesClass: { type: String }, backgroundClass: { type: String }, foregroundClass: { type: String }, minWidth: { type: [Number, String] }, minHeight: { type: [Number, String] }, maxWidth: { type: [Number, String] }, maxHeight: { type: [Number, String] }, debounce: { type: [Boolean, Number], default: 500 }, transitions: { type: Boolean, default: !0 }, checkOrientation: { type: Boolean, default: !0 }, canvas: { type: [Object, Boolean], default: !0 }, crossOrigin: { type: [Boolean, String], default: void 0 }, transitionTime: { type: Number, default: 300 }, imageRestriction: { type: String, default: "fit-area", validator: function(t) {
992
973
  return ie.indexOf(t) !== -1;
993
974
  } }, roundResult: { type: Boolean, default: !0 }, defaultSize: { type: [Function, Object] }, defaultPosition: { type: [Function, Object], default: function(t) {
994
- var e = t.imageSize, i = t.visibleArea, n = t.coordinates, o = i || e;
995
- return { left: (i ? i.left : 0) + o.width / 2 - n.width / 2, top: (i ? i.top : 0) + o.height / 2 - n.height / 2 };
975
+ var e = t.imageSize, i = t.visibleArea, n = t.coordinates, s = i || e;
976
+ return { left: (i ? i.left : 0) + s.width / 2 - n.width / 2, top: (i ? i.top : 0) + s.height / 2 - n.height / 2 };
996
977
  } }, defaultVisibleArea: { type: [Function, Object], default: function(t) {
997
- var e = t.getAreaRestrictions, i = t.coordinates, n = t.imageSize, o = b(t.boundaries);
978
+ var e = t.getAreaRestrictions, i = t.coordinates, n = t.imageSize, s = b(t.boundaries);
998
979
  if (i) {
999
- var s = { height: Math.max(i.height, n.height), width: Math.max(i.width, n.width) }, a = Mt({ width: b(s) > o ? s.width : s.height * o, height: b(s) > o ? s.width / o : s.height }, ht(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 = Y(i, T(p({ left: 0, top: 0 }, n))), c = {};
980
+ var o = { height: Math.max(i.height, n.height), width: Math.max(i.width, n.width) }, a = Mt({ width: b(o) > s ? o.width : o.height * s, height: b(o) > s ? o.width / s : o.height }, ht(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 = Y(i, T(p({ left: 0, top: 0 }, n))), c = {};
1000
981
  return !r.left && !r.right && h.width <= n.width && (c.left = 0, c.right = n.width), !r.top && !r.bottom && h.height <= n.height && (c.top = 0, c.bottom = n.height), z(h, c);
1001
982
  }
1002
983
  var l = b(n);
1003
- return a = { height: l > o ? n.height : n.width / o, width: l > o ? n.height * o : n.width }, { left: n.width / 2 - a.width / 2, top: n.height / 2 - a.height / 2, width: a.width, height: a.height };
984
+ return a = { height: l > s ? n.height : n.width / s, width: l > s ? n.height * s : n.width }, { left: n.width / 2 - a.width / 2, top: n.height / 2 - a.height / 2, width: a.width, height: a.height };
1004
985
  } }, defaultTransforms: { type: [Function, Object] }, defaultBoundaries: { type: [Function, String], validator: function(t) {
1005
986
  return !(typeof t == "string" && t !== "fill" && t !== "fit");
1006
987
  } }, 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) {
1007
- var e = t.event, i = t.coordinates, n = t.aspectRatio, o = t.positionRestrictions, s = t.sizeRestrictions, a = p(p({}, i), { right: i.left + i.width, bottom: i.top + i.height }), h = e.params || {}, r = p({}, e.directions), c = h.allowedDirections || { left: !0, right: !0, bottom: !0, top: !0 };
1008
- s.widthFrozen && (r.left = 0, r.right = 0), s.heightFrozen && (r.top = 0, r.bottom = 0), W.forEach(function(U) {
988
+ var e = t.event, i = t.coordinates, n = t.aspectRatio, s = t.positionRestrictions, o = t.sizeRestrictions, a = p(p({}, i), { right: i.left + i.width, bottom: i.top + i.height }), h = e.params || {}, r = p({}, e.directions), c = h.allowedDirections || { left: !0, right: !0, bottom: !0, top: !0 };
989
+ o.widthFrozen && (r.left = 0, r.right = 0), o.heightFrozen && (r.top = 0, r.bottom = 0), W.forEach(function(U) {
1009
990
  c[U] || (r[U] = 0);
1010
991
  });
1011
- var l = O(a, r = Ot({ coordinates: a, directions: r, sizeRestrictions: s, positionRestrictions: o })).width, d = O(a, r).height, u = h.preserveRatio ? b(a) : at(l / d, n);
1012
- if (u) {
992
+ var l = O(a, r = Ot({ coordinates: a, directions: r, sizeRestrictions: o, positionRestrictions: s })).width, u = O(a, r).height, d = h.preserveRatio ? b(a) : at(l / u, n);
993
+ if (d) {
1013
994
  var m = h.respectDirection;
1014
- if (m || (m = a.width >= a.height || u === 1 ? "width" : "height"), m === "width") {
1015
- var f = l / u - a.height;
995
+ if (m || (m = a.width >= a.height || d === 1 ? "width" : "height"), m === "width") {
996
+ var g = l / d - a.height;
1016
997
  if (c.top && c.bottom) {
1017
- var g = r.top, S = r.bottom;
1018
- r.bottom = G(f, S, g), r.top = G(f, g, S);
998
+ var f = r.top, S = r.bottom;
999
+ r.bottom = G(g, S, f), r.top = G(g, f, S);
1019
1000
  } else
1020
- c.bottom ? r.bottom = f : c.top ? r.top = f : c.right ? r.right = 0 : c.left && (r.left = 0);
1001
+ c.bottom ? r.bottom = g : c.top ? r.top = g : c.right ? r.right = 0 : c.left && (r.left = 0);
1021
1002
  } else if (m === "height") {
1022
- var _ = a.width - d * u;
1003
+ var $ = a.width - u * d;
1023
1004
  if (c.left && c.right) {
1024
1005
  var B = r.left, N = r.right;
1025
- r.left = -G(_, B, N), r.right = -G(_, N, B);
1006
+ r.left = -G($, B, N), r.right = -G($, N, B);
1026
1007
  } else
1027
- c.left ? r.left = -_ : c.right ? r.right = -_ : c.top ? r.top = 0 : c.bottom && (r.bottom = 0);
1008
+ c.left ? r.left = -$ : c.right ? r.right = -$ : c.top ? r.top = 0 : c.bottom && (r.bottom = 0);
1028
1009
  }
1029
- r = Ot({ directions: r, coordinates: a, sizeRestrictions: s, positionRestrictions: o, preserveRatio: !0, compensate: h.compensate });
1010
+ r = Ot({ directions: r, coordinates: a, sizeRestrictions: o, positionRestrictions: s, preserveRatio: !0, compensate: h.compensate });
1030
1011
  }
1031
- return l = O(a, r).width, d = O(a, r).height, (u = h.preserveRatio ? b(a) : at(l / d, n)) && Math.abs(u - l / d) > 1e-3 && W.forEach(function(U) {
1012
+ return l = O(a, r).width, u = O(a, r).height, (d = h.preserveRatio ? b(a) : at(l / u, n)) && Math.abs(d - l / u) > 1e-3 && W.forEach(function(U) {
1032
1013
  c[U] || (r[U] = 0);
1033
- }), gt({ event: new vt({ left: -r.left, top: -r.top }), coordinates: { width: i.width + r.right + r.left, height: i.height + r.top + r.bottom, left: i.left, top: i.top }, positionRestrictions: o });
1034
- } }, moveAlgorithm: { type: Function, default: gt }, initStretcher: { type: Function, default: function(t) {
1014
+ }), ft({ event: new vt({ left: -r.left, top: -r.top }), coordinates: { width: i.width + r.right + r.left, height: i.height + r.top + r.bottom, left: i.left, top: i.top }, positionRestrictions: s });
1015
+ } }, moveAlgorithm: { type: Function, default: ft }, initStretcher: { type: Function, default: function(t) {
1035
1016
  var e = t.stretcher, i = t.imageSize, n = b(i);
1036
1017
  e.style.width = i.width + "px", e.style.height = e.clientWidth / n + "px", e.style.width = e.clientWidth + "px";
1037
1018
  } }, fitCoordinates: { type: Function, default: function(t) {
1038
- var e = t.visibleArea, i = t.coordinates, n = t.aspectRatio, o = t.sizeRestrictions, s = t.positionRestrictions, a = p(p({}, i), j({ width: i.width, height: i.height, aspectRatio: n, sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minHeight: Math.min(e.height, o.minHeight), minWidth: Math.min(e.width, o.minWidth) } }));
1039
- return a = z(a = x(a, P(R(i), R(a))), it(T(e), s));
1019
+ var e = t.visibleArea, i = t.coordinates, n = t.aspectRatio, s = t.sizeRestrictions, o = t.positionRestrictions, a = p(p({}, i), I({ width: i.width, height: i.height, aspectRatio: n, sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minHeight: Math.min(e.height, s.minHeight), minWidth: Math.min(e.width, s.minWidth) } }));
1020
+ return a = z(a = x(a, P(R(i), R(a))), it(T(e), o));
1040
1021
  } }, fitVisibleArea: { type: Function, default: function(t) {
1041
- var e = t.visibleArea, i = t.boundaries, n = t.getAreaRestrictions, o = t.coordinates, s = p({}, e);
1042
- s.height = s.width / b(i), s.top += (e.height - s.height) / 2, (o.height - s.height > 0 || o.width - s.width > 0) && (s = E(s, Math.max(o.height / s.height, o.width / s.width)));
1043
- var a = tt(F(o, T(s = E(s, et(s, n({ visibleArea: s, type: "resize" }))))));
1044
- return s.width < o.width && (a.left = 0), s.height < o.height && (a.top = 0), s = z(s = x(s, a), n({ visibleArea: s, type: "move" }));
1022
+ var e = t.visibleArea, i = t.boundaries, n = t.getAreaRestrictions, s = t.coordinates, o = p({}, e);
1023
+ o.height = o.width / b(i), o.top += (e.height - o.height) / 2, (s.height - o.height > 0 || s.width - o.width > 0) && (o = E(o, Math.max(s.height / o.height, s.width / o.width)));
1024
+ var a = tt(F(s, T(o = E(o, et(o, n({ visibleArea: o, type: "resize" }))))));
1025
+ return o.width < s.width && (a.left = 0), o.height < s.height && (a.top = 0), o = z(o = x(o, a), n({ visibleArea: o, type: "move" }));
1045
1026
  } }, areaRestrictionsAlgorithm: { type: Function, default: function(t) {
1046
- var e = t.visibleArea, i = t.boundaries, n = t.imageSize, o = t.imageRestriction, s = t.type, a = {};
1047
- return o === "fill-area" ? a = { left: 0, top: 0, right: n.width, bottom: n.height } : o === "fit-area" && (b(i) > b(n) ? (a = { top: 0, bottom: n.height }, e && s === "move" && (e.width > n.width ? (a.left = -(e.width - n.width) / 2, a.right = n.width - a.left) : (a.left = 0, a.right = n.width))) : (a = { left: 0, right: n.width }, e && s === "move" && (e.height > n.height ? (a.top = -(e.height - n.height) / 2, a.bottom = n.height - a.top) : (a.top = 0, a.bottom = n.height)))), a;
1027
+ var e = t.visibleArea, i = t.boundaries, n = t.imageSize, s = t.imageRestriction, o = t.type, a = {};
1028
+ return s === "fill-area" ? a = { left: 0, top: 0, right: n.width, bottom: n.height } : s === "fit-area" && (b(i) > b(n) ? (a = { top: 0, bottom: n.height }, e && o === "move" && (e.width > n.width ? (a.left = -(e.width - n.width) / 2, a.right = n.width - a.left) : (a.left = 0, a.right = n.width))) : (a = { left: 0, right: n.width }, e && o === "move" && (e.height > n.height ? (a.top = -(e.height - n.height) / 2, a.bottom = n.height - a.top) : (a.top = 0, a.bottom = n.height)))), a;
1048
1029
  } }, sizeRestrictionsAlgorithm: { type: Function, default: function(t) {
1049
1030
  return { minWidth: t.minWidth, minHeight: t.minHeight, maxWidth: t.maxWidth, maxHeight: t.maxHeight };
1050
1031
  } }, positionRestrictionsAlgorithm: { type: Function, default: function(t) {
@@ -1064,8 +1045,8 @@ var Re = A({ render: function() {
1064
1045
  }, initialized: function() {
1065
1046
  return !!(this.visibleArea && this.imageLoaded);
1066
1047
  }, settings: function() {
1067
- var t = ft(this.resizeImage, { touch: !0, wheel: { ratio: 0.1 }, adjustStencil: !0 }, { touch: !1, wheel: !1, adjustStencil: !1 });
1068
- return { moveImage: ft(this.moveImage, { touch: !0, mouse: !0 }, { touch: !1, mouse: !1 }), resizeImage: t };
1048
+ var t = gt(this.resizeImage, { touch: !0, wheel: { ratio: 0.1 }, adjustStencil: !0 }, { touch: !1, wheel: !1, adjustStencil: !1 });
1049
+ return { moveImage: gt(this.moveImage, { touch: !0, mouse: !0 }, { touch: !1, mouse: !1 }), resizeImage: t };
1069
1050
  }, coefficient: function() {
1070
1051
  return this.visibleArea ? this.visibleArea.width / this.boundaries.width : 0;
1071
1052
  }, areaRestrictions: function() {
@@ -1076,13 +1057,9 @@ var Re = A({ render: function() {
1076
1057
  if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {
1077
1058
  var t = this.sizeRestrictionsAlgorithm({ imageSize: this.imageSize, minWidth: y(this.minWidth) ? 0 : q(this.minWidth), minHeight: y(this.minHeight) ? 0 : q(this.minHeight), maxWidth: y(this.maxWidth) ? 1 / 0 : q(this.maxWidth), maxHeight: y(this.maxHeight) ? 1 / 0 : q(this.maxHeight) });
1078
1059
  if (t = function(n) {
1079
- var o = n.areaRestrictions, s = n.sizeRestrictions;
1080
- n.imageSize;
1081
- var a = n.boundaries, h = n.positionRestrictions;
1082
- n.imageRestriction;
1083
- var r = p(p({}, s), { minWidth: s.minWidth !== void 0 ? s.minWidth : 0, minHeight: s.minHeight !== void 0 ? s.minHeight : 0, maxWidth: s.maxWidth !== void 0 ? s.maxWidth : 1 / 0, maxHeight: s.maxHeight !== void 0 ? s.maxHeight : 1 / 0 });
1060
+ var s = n.areaRestrictions, o = n.sizeRestrictions, a = n.boundaries, h = n.positionRestrictions, r = p(p({}, o), { minWidth: o.minWidth !== void 0 ? o.minWidth : 0, minHeight: o.minHeight !== void 0 ? o.minHeight : 0, maxWidth: o.maxWidth !== void 0 ? o.maxWidth : 1 / 0, maxHeight: o.maxHeight !== void 0 ? o.maxHeight : 1 / 0 });
1084
1061
  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));
1085
- var c = ht(o), l = Mt(a, c);
1062
+ var c = ht(s), l = Mt(a, c);
1086
1063
  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;
1087
1064
  }({ sizeRestrictions: t, areaRestrictions: this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }), imageSize: this.imageSize, boundaries: this.boundaries, positionRestrictions: this.positionRestrictions, imageRestriction: this.imageRestriction, visibleArea: this.visibleArea, stencilSize: this.getStencilSize() }), this.visibleArea && this.stencilSize) {
1088
1065
  var e = this.getStencilSize(), i = ht(this.getAreaRestrictions({ visibleArea: this.visibleArea, type: "resize" }));
@@ -1094,19 +1071,19 @@ var Re = A({ render: function() {
1094
1071
  }, positionRestrictions: function() {
1095
1072
  return this.positionRestrictionsAlgorithm({ imageSize: this.imageSize, imageRestriction: this.imageRestriction });
1096
1073
  }, classes: function() {
1097
- return { cropper: $(), image: w($("image"), this.imageClass), stencil: $("stencil"), boundaries: w($("boundaries"), this.boundariesClass), stretcher: w($("stretcher")), background: w($("background"), this.backgroundClass), foreground: w($("foreground"), this.foregroundClass), imageWrapper: w($("image-wrapper")), cropperWrapper: w($("cropper-wrapper")) };
1074
+ return { cropper: j(), image: w(j("image"), this.imageClass), stencil: j("stencil"), boundaries: w(j("boundaries"), this.boundariesClass), stretcher: w(j("stretcher")), background: w(j("background"), this.backgroundClass), foreground: w(j("foreground"), this.foregroundClass), imageWrapper: w(j("image-wrapper")), cropperWrapper: w(j("cropper-wrapper")) };
1098
1075
  }, stencilCoordinates: function() {
1099
1076
  if (this.initialized) {
1100
- var t = this.coordinates, e = t.width, i = t.height, n = t.left, o = t.top;
1101
- return { width: e / this.coefficient, height: i / this.coefficient, left: (n - this.visibleArea.left) / this.coefficient, top: (o - this.visibleArea.top) / this.coefficient };
1077
+ var t = this.coordinates, e = t.width, i = t.height, n = t.left, s = t.top;
1078
+ return { width: e / this.coefficient, height: i / this.coefficient, left: (n - this.visibleArea.left) / this.coefficient, top: (s - this.visibleArea.top) / this.coefficient };
1102
1079
  }
1103
1080
  return this.defaultCoordinates();
1104
1081
  }, boundariesStyle: function() {
1105
1082
  var t = { width: this.boundaries.width ? "".concat(Math.round(this.boundaries.width), "px") : "auto", height: this.boundaries.height ? "".concat(Math.round(this.boundaries.height), "px") : "auto", transition: "opacity ".concat(this.transitionTime, "ms"), pointerEvents: this.imageLoaded ? "all" : "none" };
1106
1083
  return this.imageLoaded || (t.opacity = "0"), t;
1107
1084
  }, imageStyle: function() {
1108
- var t = this.imageAttributes.width > this.imageAttributes.height ? { width: Math.min(1024, this.imageAttributes.width), height: Math.min(1024, this.imageAttributes.width) / (this.imageAttributes.width / this.imageAttributes.height) } : { height: Math.min(1024, this.imageAttributes.height), width: Math.min(1024, this.imageAttributes.height) * (this.imageAttributes.width / this.imageAttributes.height) }, e = { left: (t.width - this.imageSize.width) / (2 * this.coefficient), top: (t.height - this.imageSize.height) / (2 * this.coefficient) }, i = { left: (1 - 1 / this.coefficient) * t.width / 2, top: (1 - 1 / this.coefficient) * t.height / 2 }, n = v(v({}, this.imageTransforms), {}, { scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / t.width), scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / t.height) }), o = { width: "".concat(t.width, "px"), height: "".concat(t.height, "px"), left: "0px", top: "0px", transform: "translate(".concat(-e.left - i.left - this.imageTransforms.translateX, "px, ").concat(-e.top - i.top - this.imageTransforms.translateY, "px)") + wt(n) };
1109
- return this.transitionsOptions.enabled && (o.transition = "".concat(this.transitionsOptions.time, "ms ").concat(this.transitionsOptions.timingFunction)), o;
1085
+ var t = this.imageAttributes.width > this.imageAttributes.height ? { width: Math.min(1024, this.imageAttributes.width), height: Math.min(1024, this.imageAttributes.width) / (this.imageAttributes.width / this.imageAttributes.height) } : { height: Math.min(1024, this.imageAttributes.height), width: Math.min(1024, this.imageAttributes.height) * (this.imageAttributes.width / this.imageAttributes.height) }, e = { left: (t.width - this.imageSize.width) / (2 * this.coefficient), top: (t.height - this.imageSize.height) / (2 * this.coefficient) }, i = { left: (1 - 1 / this.coefficient) * t.width / 2, top: (1 - 1 / this.coefficient) * t.height / 2 }, n = v(v({}, this.imageTransforms), {}, { scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / t.width), scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / t.height) }), s = { width: "".concat(t.width, "px"), height: "".concat(t.height, "px"), left: "0px", top: "0px", transform: "translate(".concat(-e.left - i.left - this.imageTransforms.translateX, "px, ").concat(-e.top - i.top - this.imageTransforms.translateY, "px)") + wt(n) };
1086
+ return this.transitionsOptions.enabled && (s.transition = "".concat(this.transitionsOptions.time, "ms ").concat(this.transitionsOptions.timingFunction)), s;
1110
1087
  } }, watch: { src: function() {
1111
1088
  this.onChangeImage();
1112
1089
  }, stencilComponent: function() {
@@ -1144,15 +1121,15 @@ var Re = A({ render: function() {
1144
1121
  }
1145
1122
  return { image: this.image, coordinates: t, visibleArea: this.visibleArea ? v({}, this.visibleArea) : null, canvas: void 0, imageTransforms: e };
1146
1123
  }, zoom: function(t, e) {
1147
- var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = i.transitions, o = n === void 0 || n;
1148
- this.onManipulateImage(new X({}, { factor: 1 / t, center: e }), { normalize: !1, transitions: o });
1124
+ var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = i.transitions, s = n === void 0 || n;
1125
+ this.onManipulateImage(new X({}, { factor: 1 / t, center: e }), { normalize: !1, transitions: s });
1149
1126
  }, move: function(t, e) {
1150
- var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = i.transitions, o = n === void 0 || n;
1151
- this.onManipulateImage(new X({ left: t || 0, top: e || 0 }), { normalize: !1, transitions: o });
1127
+ var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = i.transitions, s = n === void 0 || n;
1128
+ this.onManipulateImage(new X({ left: t || 0, top: e || 0 }), { normalize: !1, transitions: s });
1152
1129
  }, setCoordinates: function(t) {
1153
- var e = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = i.autoZoom, o = n === void 0 || n, s = i.transitions, a = s === void 0 || s;
1130
+ var e = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = i.autoZoom, s = n === void 0 || n, o = i.transitions, a = o === void 0 || o;
1154
1131
  this.$nextTick(function() {
1155
- e.imageLoaded ? (e.transitionsActive || (a && e.enableTransitions(), e.coordinates = e.applyTransform(t), o && e.runAutoZoom("setCoordinates"), a && e.debouncedDisableTransitions()), e.onChange()) : e.delayedTransforms = t;
1132
+ e.imageLoaded ? (e.transitionsActive || (a && e.enableTransitions(), e.coordinates = e.applyTransform(t), s && e.runAutoZoom("setCoordinates"), a && e.debouncedDisableTransitions()), e.onChange()) : e.delayedTransforms = t;
1156
1133
  });
1157
1134
  }, refresh: function() {
1158
1135
  var t = this, e = this.$refs.image;
@@ -1174,32 +1151,32 @@ var Re = A({ render: function() {
1174
1151
  }));
1175
1152
  }, prepareResult: function(t) {
1176
1153
  return this.roundResult ? function(e) {
1177
- var i = e.coordinates, n = e.sizeRestrictions, o = e.positionRestrictions, s = { width: Math.round(i.width), height: Math.round(i.height), left: Math.round(i.left), top: Math.round(i.top) };
1178
- return s.width > n.maxWidth ? s.width = Math.floor(i.width) : s.width < n.minWidth && (s.width = Math.ceil(i.width)), s.height > n.maxHeight ? s.height = Math.floor(i.height) : s.height < n.minHeight && (s.height = Math.ceil(i.height)), z(s, o);
1154
+ var i = e.coordinates, n = e.sizeRestrictions, s = e.positionRestrictions, o = { width: Math.round(i.width), height: Math.round(i.height), left: Math.round(i.left), top: Math.round(i.top) };
1155
+ return o.width > n.maxWidth ? o.width = Math.floor(i.width) : o.width < n.minWidth && (o.width = Math.ceil(i.width)), o.height > n.maxHeight ? o.height = Math.floor(i.height) : o.height < n.minHeight && (o.height = Math.ceil(i.height)), z(o, s);
1179
1156
  }(v(v({}, this.getPublicProperties()), {}, { positionRestrictions: Z(this.positionRestrictions, this.visibleArea), coordinates: t })) : t;
1180
1157
  }, processAutoZoom: function(t, e, i, n) {
1181
- var o = this.autoZoomAlgorithm;
1182
- o || (o = this.stencilSize ? oe : this.autoZoom ? re : ae);
1183
- var s = o({ event: { type: t, params: n }, visibleArea: e, coordinates: i, boundaries: this.boundaries, aspectRatio: this.getAspectRatio(), positionRestrictions: this.positionRestrictions, getAreaRestrictions: this.getAreaRestrictions, sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize() });
1184
- return v(v({}, s), {}, { changed: !St(s.visibleArea, e) || !St(s.coordinates, i) });
1158
+ var s = this.autoZoomAlgorithm;
1159
+ s || (s = this.stencilSize ? oe : this.autoZoom ? re : ae);
1160
+ var o = s({ event: { type: t, params: n }, visibleArea: e, coordinates: i, boundaries: this.boundaries, aspectRatio: this.getAspectRatio(), positionRestrictions: this.positionRestrictions, getAreaRestrictions: this.getAreaRestrictions, sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize() });
1161
+ return v(v({}, o), {}, { changed: !St(o.visibleArea, e) || !St(o.coordinates, i) });
1185
1162
  }, runAutoZoom: function(t) {
1186
- var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = e.transitions, n = i !== void 0 && i, o = Nt(e, Se), s = this.processAutoZoom(t, this.visibleArea, this.coordinates, o), a = s.visibleArea, h = s.coordinates, r = s.changed;
1163
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = e.transitions, n = i !== void 0 && i, s = Nt(e, Se), o = this.processAutoZoom(t, this.visibleArea, this.coordinates, s), a = o.visibleArea, h = o.coordinates, r = o.changed;
1187
1164
  n && r && this.enableTransitions(), this.visibleArea = a, this.coordinates = h, n && r && this.debouncedDisableTransitions();
1188
1165
  }, normalizeEvent: function(t) {
1189
1166
  return function(e) {
1190
- var i = e.event, n = e.visibleArea, o = e.coefficient;
1167
+ var i = e.event, n = e.visibleArea, s = e.coefficient;
1191
1168
  if (i.type === "manipulateImage")
1192
- return p(p({}, 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 + n.left, top: i.scale.center.top * o + n.top } : null } });
1169
+ return p(p({}, i), { move: { left: i.move && i.move.left ? s * i.move.left : 0, top: i.move && i.move.top ? s * 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 * s + n.left, top: i.scale.center.top * s + n.top } : null } });
1193
1170
  if (i.type === "resize") {
1194
- var s = p(p({}, i), { directions: p({}, i.directions) });
1171
+ var o = p(p({}, i), { directions: p({}, i.directions) });
1195
1172
  return W.forEach(function(h) {
1196
- s.directions[h] *= o;
1197
- }), s;
1173
+ o.directions[h] *= s;
1174
+ }), o;
1198
1175
  }
1199
1176
  if (i.type === "move") {
1200
1177
  var a = p(p({}, i), { directions: p({}, i.directions) });
1201
1178
  return ee.forEach(function(h) {
1202
- a.directions[h] *= o;
1179
+ a.directions[h] *= s;
1203
1180
  }), a;
1204
1181
  }
1205
1182
  return i;
@@ -1207,27 +1184,27 @@ var Re = A({ render: function() {
1207
1184
  }, getCanvas: function() {
1208
1185
  if (this.$refs.canvas) {
1209
1186
  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) {
1210
- var l = c.rotate, d = c.flip, u = { width: r.naturalWidth, height: r.naturalHeight }, m = bt(u, l), f = h.getContext("2d");
1211
- h.height = m.height, h.width = m.width, f.save();
1212
- var g = I(R(p({ left: 0, top: 0 }, u)), l);
1213
- return f.translate(-(g.left - m.width / 2), -(g.top - m.height / 2)), f.rotate(l * Math.PI / 180), f.translate(d.horizontal ? u.width : 0, d.vertical ? u.height : 0), f.scale(d.horizontal ? -1 : 1, d.vertical ? -1 : 1), f.drawImage(r, 0, 0, u.width, u.height), f.restore(), h;
1214
- }(this.$refs.sourceCanvas, e, this.imageTransforms) : e, n = 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) {
1187
+ var l = c.rotate, u = c.flip, d = { width: r.naturalWidth, height: r.naturalHeight }, m = bt(d, l), g = h.getContext("2d");
1188
+ h.height = m.height, h.width = m.width, g.save();
1189
+ var f = H(R(p({ left: 0, top: 0 }, d)), l);
1190
+ return g.translate(-(f.left - m.width / 2), -(f.top - m.height / 2)), g.rotate(l * Math.PI / 180), g.translate(u.horizontal ? d.width : 0, u.vertical ? d.height : 0), g.scale(u.horizontal ? -1 : 1, u.vertical ? -1 : 1), g.drawImage(r, 0, 0, d.width, d.height), g.restore(), h;
1191
+ }(this.$refs.sourceCanvas, e, this.imageTransforms) : e, n = v({ minWidth: 0, minHeight: 0, maxWidth: 1 / 0, maxHeight: 1 / 0, maxArea: this.maxCanvasSize, imageSmoothingEnabled: !0, imageSmoothingQuality: "high", fillColor: "transparent" }, this.canvas), s = function(h) {
1215
1192
  return h.find(function(r) {
1216
1193
  return c = r, !Number.isNaN(parseFloat(c)) && isFinite(c);
1217
1194
  var c;
1218
1195
  });
1219
- }, s = j({ sizeRestrictions: { minWidth: o([n.width, n.minWidth]) || 0, minHeight: o([n.height, n.minHeight]) || 0, maxWidth: o([n.width, n.maxWidth]) || 1 / 0, maxHeight: o([n.height, n.maxHeight]) || 1 / 0 }, width: this.coordinates.width, height: this.coordinates.height, aspectRatio: { minimum: this.coordinates.width / this.coordinates.height, maximum: this.coordinates.width / this.coordinates.height } });
1220
- if (n.maxArea && s.width * s.height > n.maxArea) {
1221
- var a = Math.sqrt(n.maxArea / (s.width * s.height));
1222
- s = { width: Math.round(a * s.width), height: Math.round(a * s.height) };
1196
+ }, o = I({ sizeRestrictions: { minWidth: s([n.width, n.minWidth]) || 0, minHeight: s([n.height, n.minHeight]) || 0, maxWidth: s([n.width, n.maxWidth]) || 1 / 0, maxHeight: s([n.height, n.maxHeight]) || 1 / 0 }, width: this.coordinates.width, height: this.coordinates.height, aspectRatio: { minimum: this.coordinates.width / this.coordinates.height, maximum: this.coordinates.width / this.coordinates.height } });
1197
+ if (n.maxArea && o.width * o.height > n.maxArea) {
1198
+ var a = Math.sqrt(n.maxArea / (o.width * o.height));
1199
+ o = { width: Math.round(a * o.width), height: Math.round(a * o.height) };
1223
1200
  }
1224
- return function(h, r, c, l, d) {
1201
+ return function(h, r, c, l, u) {
1225
1202
  h.width = l ? l.width : c.width, h.height = l ? l.height : c.height;
1226
- var u = h.getContext("2d");
1227
- u.clearRect(0, 0, h.width, h.height), d && (d.imageSmoothingEnabled && (u.imageSmoothingEnabled = d.imageSmoothingEnabled), d.imageSmoothingQuality && (u.imageSmoothingQuality = d.imageSmoothingQuality), d.fillColor && (u.fillStyle = d.fillColor, u.fillRect(0, 0, h.width, h.height), u.save()));
1228
- var m = c.left < 0 ? -c.left : 0, f = c.top < 0 ? -c.top : 0;
1229
- u.drawImage(r, c.left + m, c.top + f, c.width, c.height, m, f, h.width, h.height);
1230
- }(t, i, this.coordinates, s, n), t;
1203
+ var d = h.getContext("2d");
1204
+ 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()));
1205
+ var m = c.left < 0 ? -c.left : 0, g = c.top < 0 ? -c.top : 0;
1206
+ d.drawImage(r, c.left + m, c.top + g, c.width, c.height, m, g, h.width, h.height);
1207
+ }(t, i, this.coordinates, o, n), t;
1231
1208
  }
1232
1209
  }, update: function() {
1233
1210
  this.$emit("change", this.getResult());
@@ -1242,11 +1219,11 @@ var Re = A({ render: function() {
1242
1219
  e || (e = this.stencilSize ? ce : he);
1243
1220
  var i = this.sizeRestrictions;
1244
1221
  i.minWidth, i.minHeight, i.maxWidth, i.maxHeight;
1245
- var n = [D(e) ? e({ boundaries: this.boundaries, imageSize: this.imageSize, aspectRatio: this.getAspectRatio(), sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize(), visibleArea: this.visibleArea }) : e, function(o) {
1246
- var s = o.coordinates;
1247
- return v({}, D(t.defaultPosition) ? t.defaultPosition({ coordinates: s, imageSize: t.imageSize, visibleArea: t.visibleArea }) : t.defaultPosition);
1222
+ var n = [D(e) ? e({ boundaries: this.boundaries, imageSize: this.imageSize, aspectRatio: this.getAspectRatio(), sizeRestrictions: this.sizeRestrictions, stencilSize: this.getStencilSize(), visibleArea: this.visibleArea }) : e, function(s) {
1223
+ var o = s.coordinates;
1224
+ return v({}, D(t.defaultPosition) ? t.defaultPosition({ coordinates: o, imageSize: t.imageSize, visibleArea: t.visibleArea }) : t.defaultPosition);
1248
1225
  }];
1249
- this.delayedTransforms && n.push.apply(n, H(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(n, !0), this.delayedTransforms = null;
1226
+ this.delayedTransforms && n.push.apply(n, _(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(n, !0), this.delayedTransforms = null;
1250
1227
  }
1251
1228
  }, clearImage: function() {
1252
1229
  var t = this;
@@ -1262,20 +1239,20 @@ var Re = A({ render: function() {
1262
1239
  var t = this, e = this.$refs.stretcher, i = this.$refs.cropper;
1263
1240
  return this.initStretcher({ cropper: i, stretcher: e, imageSize: this.imageSize }), this.$nextTick().then(function() {
1264
1241
  var n = { cropper: i, imageSize: t.imageSize };
1265
- if (D(t.defaultBoundaries) ? t.boundaries = t.defaultBoundaries(n) : t.defaultBoundaries === "fit" ? t.boundaries = function(o) {
1266
- var s = o.cropper, a = o.imageSize, h = s.clientHeight, r = s.clientWidth, c = h, l = a.width * h / a.height;
1242
+ if (D(t.defaultBoundaries) ? t.boundaries = t.defaultBoundaries(n) : t.defaultBoundaries === "fit" ? t.boundaries = function(s) {
1243
+ var o = s.cropper, a = s.imageSize, h = o.clientHeight, r = o.clientWidth, c = h, l = a.width * h / a.height;
1267
1244
  return l > r && (l = r, c = a.height * r / a.width), { width: l, height: c };
1268
- }(n) : t.boundaries = function(o) {
1269
- var s = o.cropper;
1270
- return { width: s.clientWidth, height: s.clientHeight };
1245
+ }(n) : t.boundaries = function(s) {
1246
+ var o = s.cropper;
1247
+ return { width: o.clientWidth, height: o.clientHeight };
1271
1248
  }(n), !t.boundaries.width || !t.boundaries.height)
1272
1249
  throw new Error("It's impossible to fit the cropper in the current container");
1273
1250
  });
1274
1251
  }, resetVisibleArea: function() {
1275
1252
  var t = this;
1276
1253
  return this.appliedImageTransforms = v(v({}, this.defaultImageTransforms), {}, { flip: v({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then(function() {
1277
- var e, i, n, o, s, a;
1278
- t.priority !== "visible-area" && (t.visibleArea = null, t.resetCoordinates()), t.visibleArea = D(t.defaultVisibleArea) ? t.defaultVisibleArea({ 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, n = e.boundaries, o = e.getAreaRestrictions, s = p({}, i), a = b(n), s.width / s.height !== a && (s.height = s.width / a), z(s, o({ visibleArea: s, 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");
1254
+ var e, i, n, s, o, a;
1255
+ t.priority !== "visible-area" && (t.visibleArea = null, t.resetCoordinates()), t.visibleArea = D(t.defaultVisibleArea) ? t.defaultVisibleArea({ 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, n = e.boundaries, s = e.getAreaRestrictions, o = p({}, i), a = b(n), o.width / o.height !== a && (o.height = o.width / a), z(o, s({ visibleArea: o, 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");
1279
1256
  }).catch(function() {
1280
1257
  t.visibleArea = null;
1281
1258
  });
@@ -1292,24 +1269,24 @@ var Re = A({ render: function() {
1292
1269
  }, onChangeImage: function() {
1293
1270
  var t, e = this;
1294
1271
  if (this.imageLoaded = !1, this.delayedTransforms = null, this.src) {
1295
- if (function(o) {
1296
- if (Rt(o))
1272
+ if (function(s) {
1273
+ if (Rt(s))
1297
1274
  return !1;
1298
- var s = window.location, a = /(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(o) || [], h = { protocol: a[1] || "", host: a[2] || "", port: a[3] || "" }, r = function(c) {
1299
- return c.port || ((c.protocol || s.protocol) === "http" ? 80 : 433);
1275
+ var o = window.location, a = /(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(s) || [], h = { protocol: a[1] || "", host: a[2] || "", port: a[3] || "" }, r = function(c) {
1276
+ return c.port || ((c.protocol || o.protocol) === "http" ? 80 : 433);
1300
1277
  };
1301
- return !(!h.protocol && !h.host && !h.port || h.protocol && h.protocol == s.protocol && h.host && h.host == s.host && h.host && r(h) == r(s));
1278
+ return !(!h.protocol && !h.host && !h.port || h.protocol && h.protocol == o.protocol && h.host && h.host == o.host && h.host && r(h) == r(o));
1302
1279
  }(this.src)) {
1303
1280
  var i = y(this.crossOrigin) ? this.canvas : this.crossOrigin;
1304
1281
  i === !0 && (i = "anonymous"), this.imageAttributes.crossOrigin = i;
1305
1282
  }
1306
1283
  if (this.checkOrientation) {
1307
- var n = (t = this.src, new Promise(function(o) {
1308
- ye(t).then(function(s) {
1309
- var a = ze(s);
1310
- o(s ? { source: t, arrayBuffer: s, orientation: a } : { source: t, arrayBuffer: null, orientation: null });
1311
- }).catch(function(s) {
1312
- console.warn(s), o({ source: t, arrayBuffer: null, orientation: null });
1284
+ var n = (t = this.src, new Promise(function(s) {
1285
+ ye(t).then(function(o) {
1286
+ var a = ze(o);
1287
+ s(o ? { source: t, arrayBuffer: o, orientation: a } : { source: t, arrayBuffer: null, orientation: null });
1288
+ }).catch(function(o) {
1289
+ console.warn(o), s({ source: t, arrayBuffer: null, orientation: null });
1313
1290
  });
1314
1291
  }));
1315
1292
  setTimeout(function() {
@@ -1329,17 +1306,17 @@ var Re = A({ render: function() {
1329
1306
  t.$emit("ready"), t.onChange(!1);
1330
1307
  }));
1331
1308
  }, onParseImage: function(t) {
1332
- var e = this, i = t.source, n = t.arrayBuffer, o = t.orientation;
1333
- this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, n && o && o > 1 ? jt(i) || !Rt(i) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([n])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(s) {
1334
- for (var a = [], h = new Uint8Array(s); h.length > 0; ) {
1309
+ var e = this, i = t.source, n = t.arrayBuffer, s = t.orientation;
1310
+ this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, n && s && s > 1 ? It(i) || !Rt(i) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([n])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(o) {
1311
+ for (var a = [], h = new Uint8Array(o); h.length > 0; ) {
1335
1312
  var r = h.subarray(0, 8192);
1336
1313
  a.push(String.fromCharCode.apply(null, Array.from ? Array.from(r) : r.slice())), h = h.subarray(8192);
1337
1314
  }
1338
1315
  return "data:image/jpeg;base64," + btoa(a.join(""));
1339
- }(n) : this.imageAttributes.src = i, D(this.defaultTransforms) ? this.appliedImageTransforms = lt(this.defaultTransforms()) : J(this.defaultTransforms) ? this.appliedImageTransforms = lt(this.defaultTransforms) : this.appliedImageTransforms = function(s) {
1316
+ }(n) : this.imageAttributes.src = i, D(this.defaultTransforms) ? this.appliedImageTransforms = lt(this.defaultTransforms()) : J(this.defaultTransforms) ? this.appliedImageTransforms = lt(this.defaultTransforms) : this.appliedImageTransforms = function(o) {
1340
1317
  var a = lt({});
1341
- if (s)
1342
- switch (s) {
1318
+ if (o)
1319
+ switch (o) {
1343
1320
  case 2:
1344
1321
  a.flip.horizontal = !0;
1345
1322
  break;
@@ -1362,11 +1339,11 @@ var Re = A({ render: function() {
1362
1339
  a.rotate = -90;
1363
1340
  }
1364
1341
  return a;
1365
- }(o), this.defaultImageTransforms = v(v({}, this.appliedImageTransforms), {}, { flip: v({}, this.appliedImageTransforms.flip) }), this.$nextTick(function() {
1366
- var s = e.$refs.image;
1367
- s && s.complete && (function(a) {
1342
+ }(s), this.defaultImageTransforms = v(v({}, this.appliedImageTransforms), {}, { flip: v({}, this.appliedImageTransforms.flip) }), this.$nextTick(function() {
1343
+ var o = e.$refs.image;
1344
+ o && o.complete && (function(a) {
1368
1345
  return !!a.naturalWidth;
1369
- }(s) ? e.onSuccessLoadImage() : e.onFailLoadImage());
1346
+ }(o) ? e.onSuccessLoadImage() : e.onFailLoadImage());
1370
1347
  });
1371
1348
  }, onResizeEnd: function() {
1372
1349
  this.runAutoZoom("resize", { transitions: !0 });
@@ -1386,9 +1363,9 @@ var Re = A({ render: function() {
1386
1363
  }, onManipulateImage: function(t) {
1387
1364
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1388
1365
  if (!this.transitionsOptions.enabled) {
1389
- var i = e.transitions, n = i !== void 0 && i, o = e.normalize, s = o === void 0 || o;
1366
+ var i = e.transitions, n = i !== void 0 && i, s = e.normalize, o = s === void 0 || s;
1390
1367
  n && this.enableTransitions();
1391
- var a = le(v(v({}, this.getPublicProperties()), {}, { event: s ? this.normalizeEvent(t) : t, getAreaRestrictions: this.getAreaRestrictions, imageRestriction: this.imageRestriction, adjustStencil: !this.stencilSize && this.settings.resizeImage.adjustStencil })), h = a.visibleArea, r = a.coordinates;
1368
+ var a = le(v(v({}, this.getPublicProperties()), {}, { event: o ? this.normalizeEvent(t) : t, getAreaRestrictions: this.getAreaRestrictions, imageRestriction: this.imageRestriction, adjustStencil: !this.stencilSize && this.settings.resizeImage.adjustStencil })), h = a.visibleArea, r = a.coordinates;
1392
1369
  this.visibleArea = h, this.coordinates = r, this.runAutoZoom("manipulateImage"), this.onChange(), n && this.debouncedDisableTransitions();
1393
1370
  }
1394
1371
  }, onPropsChange: function() {
@@ -1397,38 +1374,38 @@ var Re = A({ render: function() {
1397
1374
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = t.visibleArea, i = t.type, n = i === void 0 ? "move" : i;
1398
1375
  return this.areaRestrictionsAlgorithm({ boundaries: this.boundaries, imageSize: this.imageSize, imageRestriction: this.imageRestriction, visibleArea: e, type: n });
1399
1376
  }, getAspectRatio: function(t) {
1400
- var e, i, n = this.stencilProps, o = n.aspectRatio, s = n.minAspectRatio, a = n.maxAspectRatio;
1377
+ var e, i, n = this.stencilProps, s = n.aspectRatio, o = n.minAspectRatio, a = n.maxAspectRatio;
1401
1378
  if (this.$refs.stencil && this.$refs.stencil.aspectRatios) {
1402
1379
  var h = this.$refs.stencil.aspectRatios();
1403
1380
  e = h.minimum, i = h.maximum;
1404
1381
  }
1405
- if (y(e) && (e = y(o) ? s : o), y(i) && (i = y(o) ? a : o), !t && (y(e) || y(i))) {
1382
+ if (y(e) && (e = y(s) ? o : s), y(i) && (i = y(s) ? a : s), !t && (y(e) || y(i))) {
1406
1383
  var r = this.getStencilSize(), c = r ? b(r) : null;
1407
1384
  y(e) && (e = At(c) ? c : void 0), y(i) && (i = At(c) ? c : void 0);
1408
1385
  }
1409
1386
  return { minimum: e, maximum: i };
1410
1387
  }, getStencilSize: function() {
1411
1388
  if (this.stencilSize)
1412
- return t = { currentStencilSize: { width: this.stencilCoordinates.width, height: this.stencilCoordinates.height }, stencilSize: this.stencilSize, boundaries: this.boundaries, coefficient: this.coefficient, coordinates: this.coordinates, aspectRatio: this.getAspectRatio(!0) }, e = t.boundaries, i = t.stencilSize, n = t.aspectRatio, at(b(o = D(i) ? i({ boundaries: e, aspectRatio: n }) : i), n) && (o = j({ sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minWidth: 0, minHeight: 0 }, width: o.width, height: o.height, aspectRatio: { minimum: n.minimum, maximum: n.maximum } })), (o.width > e.width || o.height > e.height) && (o = j({ sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minWidth: 0, minHeight: 0 }, width: o.width, height: o.height, aspectRatio: { minimum: b(o), maximum: b(o) } })), o;
1413
- var t, e, i, n, o;
1389
+ return t = { currentStencilSize: { width: this.stencilCoordinates.width, height: this.stencilCoordinates.height }, stencilSize: this.stencilSize, boundaries: this.boundaries, coefficient: this.coefficient, coordinates: this.coordinates, aspectRatio: this.getAspectRatio(!0) }, e = t.boundaries, i = t.stencilSize, n = t.aspectRatio, at(b(s = D(i) ? i({ boundaries: e, aspectRatio: n }) : i), n) && (s = I({ sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minWidth: 0, minHeight: 0 }, width: s.width, height: s.height, aspectRatio: { minimum: n.minimum, maximum: n.maximum } })), (s.width > e.width || s.height > e.height) && (s = I({ sizeRestrictions: { maxWidth: e.width, maxHeight: e.height, minWidth: 0, minHeight: 0 }, width: s.width, height: s.height, aspectRatio: { minimum: b(s), maximum: b(s) } })), s;
1390
+ var t, e, i, n, s;
1414
1391
  }, getPublicProperties: function() {
1415
1392
  return { coefficient: this.coefficient, visibleArea: this.visibleArea, coordinates: this.coordinates, boundaries: this.boundaries, sizeRestrictions: this.sizeRestrictions, positionRestrictions: this.positionRestrictions, aspectRatio: this.getAspectRatio(), imageRestriction: this.imageRestriction };
1416
1393
  }, defaultCoordinates: function() {
1417
1394
  return v({}, xt);
1418
1395
  }, flip: function(t, e) {
1419
- var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = i.transitions, o = n === void 0 || n;
1396
+ var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = i.transitions, s = n === void 0 || n;
1420
1397
  if (!this.transitionsActive) {
1421
- o && this.enableTransitions();
1422
- var s = v({}, this.imageTransforms.flip), a = ue({ flip: { horizontal: t ? !s.horizontal : s.horizontal, vertical: e ? !s.vertical : s.vertical }, previousFlip: s, rotate: this.imageTransforms.rotate, visibleArea: this.visibleArea, coordinates: this.coordinates, imageSize: this.imageSize, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), h = a.visibleArea, r = a.coordinates;
1423
- t && (this.appliedImageTransforms.flip.horizontal = !this.appliedImageTransforms.flip.horizontal), e && (this.appliedImageTransforms.flip.vertical = !this.appliedImageTransforms.flip.vertical), this.visibleArea = h, this.coordinates = r, this.onChange(), o && this.debouncedDisableTransitions();
1398
+ s && this.enableTransitions();
1399
+ var o = v({}, this.imageTransforms.flip), a = de({ flip: { horizontal: t ? !o.horizontal : o.horizontal, vertical: e ? !o.vertical : o.vertical }, previousFlip: o, rotate: this.imageTransforms.rotate, visibleArea: this.visibleArea, coordinates: this.coordinates, imageSize: this.imageSize, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), h = a.visibleArea, r = a.coordinates;
1400
+ t && (this.appliedImageTransforms.flip.horizontal = !this.appliedImageTransforms.flip.horizontal), e && (this.appliedImageTransforms.flip.vertical = !this.appliedImageTransforms.flip.vertical), this.visibleArea = h, this.coordinates = r, this.onChange(), s && this.debouncedDisableTransitions();
1424
1401
  }
1425
1402
  }, rotate: function(t) {
1426
1403
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = e.transitions, n = i === void 0 || i;
1427
1404
  if (!this.transitionsActive) {
1428
1405
  n && this.enableTransitions();
1429
- var o = v({}, this.imageSize);
1406
+ var s = v({}, this.imageSize);
1430
1407
  this.appliedImageTransforms.rotate += t;
1431
- var s = de({ visibleArea: this.visibleArea, coordinates: this.coordinates, previousImageSize: o, imageSize: this.imageSize, angle: t, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), a = s.visibleArea, h = s.coordinates, r = this.processAutoZoom("rotateImage", a, h);
1408
+ var o = ue({ visibleArea: this.visibleArea, coordinates: this.coordinates, previousImageSize: s, imageSize: this.imageSize, angle: t, positionRestrictions: this.positionRestrictions, sizeRestrictions: this.sizeRestrictions, getAreaRestrictions: this.getAreaRestrictions, aspectRatio: this.getAspectRatio() }), a = o.visibleArea, h = o.coordinates, r = this.processAutoZoom("rotateImage", a, h);
1432
1409
  a = r.visibleArea, h = r.coordinates, this.visibleArea = a, this.coordinates = h, this.onChange(), n && this.debouncedDisableTransitions();
1433
1410
  }
1434
1411
  } } }, kt = A({ render: function() {
@@ -1436,15 +1413,10 @@ var Re = A({ render: function() {
1436
1413
  return i("div", { ref: "cropper", class: t.classes.cropper }, [i("div", { ref: "stretcher", class: t.classes.stretcher }), t._v(" "), i("div", { class: t.classes.boundaries, style: t.boundariesStyle }, [i(t.backgroundWrapperComponent, { tag: "component", class: t.classes.cropperWrapper, attrs: { "wheel-resize": t.settings.resizeImage.wheel, "touch-resize": t.settings.resizeImage.touch, "touch-move": t.settings.moveImage.touch, "mouse-move": t.settings.moveImage.mouse }, on: { move: t.onManipulateImage, resize: t.onManipulateImage } }, [i("div", { class: t.classes.background, style: t.boundariesStyle }), t._v(" "), i("div", { class: t.classes.imageWrapper }, [i("img", { ref: "image", class: t.classes.image, style: t.imageStyle, attrs: { crossorigin: t.imageAttributes.crossOrigin, src: t.imageAttributes.src }, on: { mousedown: function(n) {
1437
1414
  n.preventDefault();
1438
1415
  } } })]), t._v(" "), i("div", { class: t.classes.foreground, style: t.boundariesStyle }), t._v(" "), i(t.stencilComponent, t._b({ directives: [{ name: "show", rawName: "v-show", value: t.imageLoaded, expression: "imageLoaded" }], ref: "stencil", tag: "component", attrs: { image: t.image, coordinates: t.coordinates, "stencil-coordinates": t.stencilCoordinates, transitions: t.transitionsOptions }, on: { resize: t.onResize, "resize-end": t.onResizeEnd, move: t.onMove, "move-end": t.onMoveEnd } }, "component", t.stencilProps, !1)), t._v(" "), t.canvas ? i("canvas", { ref: "canvas", style: { display: "none" } }) : t._e(), t._v(" "), t.canvas ? i("canvas", { ref: "sourceCanvas", style: { display: "none" } }) : t._e()], 1)], 1)]);
1439
- }, staticRenderFns: [] }, void 0, Me, void 0, !1, void 0, !1, void 0, void 0, void 0);
1416
+ }, staticRenderFns: [] }, void 0, Me, void 0, !1);
1440
1417
  k.component("cropper", kt), k.component("rectangle-stencil", Ut), k.component("circle-stencil", xe), k.component("simple-handler", nt), k.component("simple-line", st);
1441
1418
  const Ce = {
1442
1419
  name: "ImageUploadModal",
1443
- data() {
1444
- return {
1445
- currentTarget: null
1446
- };
1447
- },
1448
1420
  components: {
1449
1421
  Cropper: kt
1450
1422
  },
@@ -1466,6 +1438,11 @@ const Ce = {
1466
1438
  default: () => ({})
1467
1439
  }
1468
1440
  },
1441
+ data() {
1442
+ return {
1443
+ currentTarget: null
1444
+ };
1445
+ },
1469
1446
  methods: {
1470
1447
  onSave() {
1471
1448
  const { canvas: t } = this.$refs.cropper.getResult();
@@ -1489,18 +1466,15 @@ var Ee = function() {
1489
1466
  } } }, [i("CButton", { staticClass: "absolute right-2 top-2 z-50 border-transparent bg-black/50 text-white/90", attrs: { circle: "", icon: "x", type: "text" }, on: { click: function(n) {
1490
1467
  return e.$emit("close");
1491
1468
  } } }), i("div", { staticClass: "flex min-h-0 max-w-[calc(100%_-_4_*_var(--rem))] flex-auto items-center justify-center pt-8" }, [i("Cropper", e._b({ ref: "cropper", staticClass: "h-full w-full", attrs: { src: e.imageData } }, "Cropper", e.cropperOptions, !1))], 1), i("div", { staticClass: "shrink-0 flex-grow py-8" }, [i("CButton", { staticClass: "w-36", attrs: { type: "secondary" }, on: { click: e.onSave } }, [e._v(" " + e._s(e.$t("_common:save")) + " ")])], 1)], 1);
1492
- }, Oe = [], We = /* @__PURE__ */ _t(
1469
+ }, Oe = [], We = /* @__PURE__ */ $t(
1493
1470
  Ce,
1494
1471
  Ee,
1495
1472
  Oe,
1496
1473
  !1,
1497
1474
  null,
1498
- null,
1499
- null,
1500
1475
  null
1501
1476
  );
1502
- const Te = We.exports;
1503
- const _e = {
1477
+ const Te = We.exports, $e = {
1504
1478
  i18nOptions: {
1505
1479
  namespaces: "imageUploadWrapper",
1506
1480
  messages: {
@@ -1568,8 +1542,8 @@ const _e = {
1568
1542
  }
1569
1543
  const i = new FileReader();
1570
1544
  i.onload = (n) => {
1571
- let o;
1572
- typeof n.target.result == "object" ? o = window.URL.createObjectURL(new Blob([n.target.result])) : o = n.target.result, this.show(o, e.name);
1545
+ let s;
1546
+ typeof n.target.result == "object" ? s = window.URL.createObjectURL(new Blob([n.target.result])) : s = n.target.result, this.show(s, e.name);
1573
1547
  }, i.readAsArrayBuffer(e);
1574
1548
  },
1575
1549
  show(t, e) {
@@ -1597,15 +1571,15 @@ const _e = {
1597
1571
  this.$emit("upload"), this.isUpdatingImage = !0;
1598
1572
  const e = this.$refs.upload.$refs.upload.files, i = e[e.length - 1], n = i;
1599
1573
  n.file = t;
1600
- const o = await this.$refs.upload.compressFile(n.file);
1574
+ const s = await this.$refs.upload.compressFile(n.file);
1601
1575
  await this.$refs.upload.$refs.upload.update(i, {
1602
- ...o,
1576
+ ...s,
1603
1577
  active: !0
1604
1578
  });
1605
1579
  }
1606
1580
  }
1607
1581
  };
1608
- var $e = function() {
1582
+ var je = function() {
1609
1583
  var e = this, i = e._self._c;
1610
1584
  return i("div", [i("BaseUpload", e._b({ ref: "upload", on: { input: function(n) {
1611
1585
  e.isUpdatingImage || e.uploadImg(n);
@@ -1616,17 +1590,15 @@ var $e = function() {
1616
1590
  }, expression: "newFiles" } }, "BaseUpload", e.mergedUploadOptions, !1), [e.$slots.image ? e._t("image") : e._e()], 2), i("div", { staticStyle: { cursor: "pointer" }, on: { click: function(n) {
1617
1591
  return n.stopPropagation(), n.preventDefault(), e.onClick.apply(null, arguments);
1618
1592
  } } }, [e._t("default", null, { progress: e.progress })], 2)], 1);
1619
- }, je = [], Ie = /* @__PURE__ */ _t(
1620
- _e,
1593
+ }, Ie = [], He = /* @__PURE__ */ $t(
1621
1594
  $e,
1622
1595
  je,
1596
+ Ie,
1623
1597
  !1,
1624
1598
  null,
1625
- "c25ea148",
1626
- null,
1627
- null
1599
+ "66b0d147"
1628
1600
  );
1629
- const Pe = Ie.exports;
1601
+ const Pe = He.exports;
1630
1602
  export {
1631
1603
  Pe as default
1632
1604
  };