uploadcare-rails 0.4.2 → 0.5

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.
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  [![Build Status](https://secure.travis-ci.org/uploadcare/uploadcare-rails.png?branch=master)](http://travis-ci.org/uploadcare/uploadcare-rails)
2
2
 
3
+ **Warning!** This plugin is of alpha quality. Some things may not work or be unexpectedly slow.
4
+ You are welcome to try it with your projects and report any issues with the latest release.
5
+
3
6
  # Installation
4
7
 
5
8
  This is a Rails gem for using the [Uploadcare.com](https://uploadcare.com) service. To install it, add it in your Gemfile: `gem 'uploadcare-rails'`, then run:
@@ -16,7 +19,7 @@ The first thing is to configure stuff for Uploadcare. Create a file `config/init
16
19
  Uploadcare::Rails::Engine.configure do
17
20
  config.uploadcare.public_key = 'demopublickey'
18
21
  config.uploadcare.private_key = 'demoprivatekey'
19
- config.uploadcare.widget_version = '0.6.4.2'
22
+ config.uploadcare.widget_version = '0.8'
20
23
  end
21
24
  ```
22
25
 
@@ -36,10 +39,10 @@ class Post < ActiveRecord::Base
36
39
  end
37
40
  ```
38
41
 
39
- To display nice widgets for file upload, include the script for desired widget version (here we use 0.6.4.2) in your layout.
42
+ To display nice widgets for file upload, include the script for desired widget version (here we use 0.8) in your layout.
40
43
 
41
44
  ```erb
42
- <%= uploadcare_include_tag version: '0.6.4.2' %>
45
+ <%= uploadcare_include_tag version: '0.8' %>
43
46
  ```
44
47
 
45
48
  This will include the widget script from Uploadcare CDN via a tag, which is the preferred way to do it. If you omit the version argument (which is fine), the value from `config/initializers/uploadcare.rb` will be used.
@@ -66,3 +69,9 @@ Uploadcare-rails gem takes care of storing files when saving a model, so as soon
66
69
  ```erb
67
70
  <%= image_tag @post.file.public_url("scale_crop/500x200", "effect/grayscale/") %>
68
71
  ```
72
+
73
+ [Other information](https://uploadcare.com/documentation/rest/#file) about the file is accessed through the `api` method that makes a single HTTP request to Uploadcare servers **for each file**. Use cautiously or cache the returned information somewhere.
74
+
75
+ ```erb
76
+ File size: <%= @post.file.api.size %> byte(s)
77
+ ```
@@ -1,7 +1,7 @@
1
1
  /*
2
- * Uploadcare (0.6.9.2)
3
- * Date: 2013-04-08 15:46:19 +0300
4
- * Rev: 5b86155f5a
2
+ * Uploadcare (0.8)
3
+ * Date: 2013-04-19 13:52:01 +0300
4
+ * Rev: 99aa9e7346
5
5
  */
6
6
  ;(function(uploadcare){(function() {
7
7
 
@@ -16698,16 +16698,6 @@ var _require = (function() {
16698
16698
 
16699
16699
 
16700
16700
 
16701
- }).call(this);
16702
- (function() {
16703
- var __slice = [].slice;
16704
-
16705
- uploadcare.debug = function() {
16706
- var args;
16707
- args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
16708
- return uploadcare.jQuery(uploadcare).trigger('log.uploadcare', [args]);
16709
- };
16710
-
16711
16701
  }).call(this);
16712
16702
  (function() {
16713
16703
 
@@ -16723,9 +16713,6 @@ var _require = (function() {
16723
16713
 
16724
16714
  }).call(this);
16725
16715
  (function() {
16726
- var debug;
16727
-
16728
- debug = uploadcare.debug;
16729
16716
 
16730
16717
  uploadcare.namespace('uploadcare.utils.pusher', function(ns) {
16731
16718
  var hasOwners, pusherInstance, pusherWrapped, pushers, releasePusher, updateConnection;
@@ -16744,9 +16731,7 @@ var _require = (function() {
16744
16731
  return pusherWrapped(key, owner);
16745
16732
  };
16746
16733
  releasePusher = function(key, owner) {
16747
- debug('releasing', owner);
16748
16734
  if (!pushers[key].owners[owner]) {
16749
- debug('this pusher has already been released');
16750
16735
  return;
16751
16736
  }
16752
16737
  pushers[key].owners[owner] = false;
@@ -16771,12 +16756,8 @@ var _require = (function() {
16771
16756
  if (hasOwners(key)) {
16772
16757
  return instance.connect();
16773
16758
  } else {
16774
- debug('disconnect timeout started', key);
16775
16759
  return setTimeout((function() {
16776
- if (hasOwners(key)) {
16777
- return debug('not disconnecting in the end');
16778
- } else {
16779
- debug('actual disconnect', key);
16760
+ if (!hasOwners(key)) {
16780
16761
  return instance.disconnect();
16781
16762
  }
16782
16763
  }), 5000);
@@ -16787,7 +16768,6 @@ var _require = (function() {
16787
16768
  if (((_ref = pushers[key]) != null ? _ref.instance : void 0) != null) {
16788
16769
  return pushers[key].instance;
16789
16770
  }
16790
- debug('new actual Pusher');
16791
16771
  return pushers[key].instance = new Pusher(key);
16792
16772
  };
16793
16773
  return pusherWrapped = function(key, owner) {
@@ -16806,135 +16786,142 @@ var _require = (function() {
16806
16786
 
16807
16787
  }).call(this);
16808
16788
  (function() {
16809
- var $, debug, pusher;
16810
-
16811
- $ = uploadcare.jQuery, debug = uploadcare.debug;
16789
+ var $, namespace,
16790
+ __hasProp = {}.hasOwnProperty,
16791
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
16792
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
16793
+ __slice = [].slice;
16812
16794
 
16813
- pusher = uploadcare.utils.pusher;
16795
+ namespace = uploadcare.namespace, $ = uploadcare.jQuery;
16814
16796
 
16815
- uploadcare.namespace('uploadcare.utils.pubsub', function(ns) {
16816
- var PollWatcher, PusherWatcher;
16817
- ns.PubSub = (function() {
16797
+ namespace('uploadcare.utils', function(utils) {
16798
+ utils.Collection = (function() {
16818
16799
 
16819
- function PubSub(settings, channel, topic) {
16820
- this.settings = settings;
16821
- this.channel = channel;
16822
- this.topic = topic;
16823
- this.pollUrlConstructor = function(channel, topic) {
16824
- return "" + this.settings.socialBase + "/pubsub/status/" + this.channel + "/" + this.topic;
16825
- };
16826
- this.pusherw = new PusherWatcher(this, this.settings.pusherKey);
16827
- this.pollw = new PollWatcher(this);
16800
+ function Collection(items) {
16801
+ var item, _i, _len;
16802
+ if (items == null) {
16803
+ items = [];
16804
+ }
16805
+ this.onAdd = $.Callbacks();
16806
+ this.onRemove = $.Callbacks();
16807
+ this.__items = [];
16808
+ for (_i = 0, _len = items.length; _i < _len; _i++) {
16809
+ item = items[_i];
16810
+ this.add(item);
16811
+ }
16828
16812
  }
16829
16813
 
16830
- PubSub.prototype.watch = function() {
16831
- var _this = this;
16832
- this.pusherw.watch();
16833
- this.pollw.watch();
16834
- return $(this.pusherw).on('started', function() {
16835
- return _this.pollw.stop();
16836
- });
16814
+ Collection.prototype.add = function(item) {
16815
+ this.__items.push(item);
16816
+ return this.onAdd.fire(item);
16837
16817
  };
16838
16818
 
16839
- PubSub.prototype.stop = function() {
16840
- this.pusherw.stop();
16841
- return this.pollw.stop();
16819
+ Collection.prototype.remove = function(item) {
16820
+ if (utils.remove(this.__items, item)) {
16821
+ return this.onRemove.fire(item);
16822
+ }
16842
16823
  };
16843
16824
 
16844
- PubSub.prototype.__update = function(status) {
16845
- if (!this.status || this.status.score < status.score) {
16846
- this.status = status;
16847
- return this.__notify();
16825
+ Collection.prototype.clear = function() {
16826
+ var item, _i, _len, _ref, _results;
16827
+ _ref = this.get();
16828
+ _results = [];
16829
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
16830
+ item = _ref[_i];
16831
+ _results.push(this.remove(item));
16848
16832
  }
16833
+ return _results;
16849
16834
  };
16850
16835
 
16851
- PubSub.prototype.__notify = function() {
16852
- debug('status', this.status.score, this.status.state, this.status);
16853
- return $(this).trigger(this.status.state, [this.status]);
16836
+ Collection.prototype.get = function(index) {
16837
+ if (index != null) {
16838
+ return this.__items[index];
16839
+ } else {
16840
+ return this.__items.slice(0);
16841
+ }
16854
16842
  };
16855
16843
 
16856
- return PubSub;
16844
+ Collection.prototype.length = function() {
16845
+ return this.__items.length;
16846
+ };
16857
16847
 
16858
- })();
16859
- PusherWatcher = (function() {
16848
+ Collection.prototype.readOnly = function() {
16849
+ return utils.bindAll(this, ['get', 'length', 'onAdd', 'onRemove']);
16850
+ };
16860
16851
 
16861
- function PusherWatcher(ps, pusherKey) {
16862
- this.ps = ps;
16863
- this.pusher = pusher.getPusher(pusherKey, this.__channelName());
16864
- }
16852
+ return Collection;
16865
16853
 
16866
- PusherWatcher.prototype.__channelName = function() {
16867
- return "pubsub.channel." + this.ps.channel + "." + this.ps.topic;
16868
- };
16854
+ })();
16855
+ utils.UniqCollection = (function(_super) {
16869
16856
 
16870
- PusherWatcher.prototype.watch = function() {
16871
- var onStarted,
16872
- _this = this;
16873
- this.channel = this.pusher.subscribe(this.__channelName());
16874
- this.channel.bind('event', function(data) {
16875
- return _this.ps.__update($.parseJSON(data));
16876
- });
16877
- onStarted = function() {
16878
- debug('wow, listening with pusher');
16879
- $(_this).trigger('started');
16880
- return _this.channel.unbind('event', onStarted);
16881
- };
16882
- return this.channel.bind('event', onStarted);
16883
- };
16857
+ __extends(UniqCollection, _super);
16884
16858
 
16885
- PusherWatcher.prototype.stop = function() {
16886
- if (this.pusher) {
16887
- this.pusher.release();
16859
+ function UniqCollection() {
16860
+ return UniqCollection.__super__.constructor.apply(this, arguments);
16861
+ }
16862
+
16863
+ UniqCollection.prototype.add = function(item) {
16864
+ if (__indexOf.call(this.__items, item) >= 0) {
16865
+ return;
16888
16866
  }
16889
- return this.pusher = null;
16867
+ return UniqCollection.__super__.add.apply(this, arguments);
16890
16868
  };
16891
16869
 
16892
- return PusherWatcher;
16870
+ return UniqCollection;
16893
16871
 
16894
- })();
16895
- return PollWatcher = (function() {
16872
+ })(utils.Collection);
16873
+ return utils.CollectionOfPromises = (function(_super) {
16896
16874
 
16897
- function PollWatcher(ps) {
16898
- this.ps = ps;
16899
- }
16875
+ __extends(CollectionOfPromises, _super);
16900
16876
 
16901
- PollWatcher.prototype.watch = function() {
16902
- var _this = this;
16903
- return this.interval = setInterval((function() {
16904
- return _this.__checkStatus();
16905
- }), 2000);
16906
- };
16877
+ function CollectionOfPromises() {
16878
+ this.onAnyDone = $.Callbacks();
16879
+ this.onAnyFail = $.Callbacks();
16880
+ this.onAnyProgress = $.Callbacks();
16881
+ this.onAnyProgress.add(function(item, firstArgument) {
16882
+ return $(item).data('lastProgress', firstArgument);
16883
+ });
16884
+ CollectionOfPromises.__super__.constructor.apply(this, arguments);
16885
+ }
16907
16886
 
16908
- PollWatcher.prototype.stop = function() {
16909
- if (this.interval) {
16910
- clearInterval(this.interval);
16887
+ CollectionOfPromises.prototype.lastProgresses = function() {
16888
+ var item, _i, _len, _ref, _results;
16889
+ _ref = this.__items;
16890
+ _results = [];
16891
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
16892
+ item = _ref[_i];
16893
+ _results.push($(item).data('lastProgress'));
16911
16894
  }
16912
- return this.interval = null;
16895
+ return _results;
16913
16896
  };
16914
16897
 
16915
- PollWatcher.prototype.__checkStatus = function() {
16916
- var fail,
16898
+ CollectionOfPromises.prototype.add = function(item) {
16899
+ var handler,
16917
16900
  _this = this;
16918
- debug('polling status...');
16919
- fail = function() {
16920
- return _this.ps.__update({
16921
- score: -1,
16922
- state: 'error'
16923
- });
16901
+ if (!(item && item.done && item.fail && item.then)) {
16902
+ return;
16903
+ }
16904
+ CollectionOfPromises.__super__.add.apply(this, arguments);
16905
+ handler = function(callbacks) {
16906
+ return function() {
16907
+ var args;
16908
+ args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
16909
+ if (__indexOf.call(_this.__items, item) >= 0) {
16910
+ args.unshift(item);
16911
+ return callbacks.fire.apply(callbacks, args);
16912
+ }
16913
+ };
16924
16914
  };
16925
- return $.ajax(this.ps.pollUrlConstructor(this.ps.channel, this.ps.topic), {
16926
- dataType: 'jsonp'
16927
- }).fail(fail).done(function(data) {
16928
- if (data.error) {
16929
- return fail();
16930
- }
16931
- return _this.ps.__update(data);
16932
- });
16915
+ return item.then(handler(this.onAnyDone), handler(this.onAnyFail), handler(this.onAnyProgress));
16933
16916
  };
16934
16917
 
16935
- return PollWatcher;
16918
+ CollectionOfPromises.prototype.readOnly = function() {
16919
+ return $.extend(CollectionOfPromises.__super__.readOnly.call(this), utils.bindAll(this, ['onAnyDone', 'onAnyFail', 'onAnyProgress', 'lastProgresses']));
16920
+ };
16936
16921
 
16937
- })();
16922
+ return CollectionOfPromises;
16923
+
16924
+ })(utils.UniqCollection);
16938
16925
  });
16939
16926
 
16940
16927
  }).call(this);
@@ -16943,7 +16930,115 @@ var _require = (function() {
16943
16930
 
16944
16931
  namespace = uploadcare.namespace, $ = uploadcare.jQuery;
16945
16932
 
16933
+ namespace('uploadcare.utils', function(utils) {
16934
+ return utils.squareImage = function(container, src, size, attempts) {
16935
+ var img;
16936
+ if (attempts == null) {
16937
+ attempts = 5;
16938
+ }
16939
+ container = $(container);
16940
+ if (size == null) {
16941
+ size = container.width();
16942
+ }
16943
+ container.css({
16944
+ position: 'relative',
16945
+ overflow: 'hidden'
16946
+ });
16947
+ img = new Image();
16948
+ img.src = src;
16949
+ $(img).hide().appendTo(container);
16950
+ return $(img).on({
16951
+ load: function() {
16952
+ if (this.width > this.height) {
16953
+ this.width = this.width * size / this.height;
16954
+ this.height = size;
16955
+ } else {
16956
+ this.height = this.height * size / this.width;
16957
+ this.width = size;
16958
+ }
16959
+ return $(this).css({
16960
+ top: Math.round((this.height - size) / -2),
16961
+ left: Math.round((this.width - size) / -2)
16962
+ }).fadeIn();
16963
+ },
16964
+ error: function() {
16965
+ var d;
16966
+ if (attempts-- > 0) {
16967
+ d = src.split('?')[1] ? '&' : '?';
16968
+ return this.src = "" + src + d + (new Date().getTime());
16969
+ }
16970
+ }
16971
+ });
16972
+ };
16973
+ });
16974
+
16975
+ }).call(this);
16976
+ (function() {
16977
+ var namespace;
16978
+
16979
+ namespace = uploadcare.namespace;
16980
+
16981
+ namespace('uploadcare.utils', function(ns) {
16982
+ var common, messages;
16983
+ ns.log = function(msg) {
16984
+ if (console && console.log) {
16985
+ return console.log(msg);
16986
+ }
16987
+ };
16988
+ ns.warn = function(msg) {
16989
+ if (console && console.warn) {
16990
+ return console.warn(msg);
16991
+ } else {
16992
+ return ns.log(msg);
16993
+ }
16994
+ };
16995
+ messages = {};
16996
+ ns.warnOnce = function(msg) {
16997
+ if (messages[msg] == null) {
16998
+ messages[msg] = true;
16999
+ return ns.warn(msg);
17000
+ }
17001
+ };
17002
+ common = {
17003
+ autostore: "You have enabled autostore in the widget, but not on the server.\nTo use autostore, make sure it's enabled in project settings.\n\nhttps://uploadcare.com/accounts/settings/",
17004
+ publicKey: "Global public key not set. Uploads may not work!\nAdd this to the <head> tag to set your key:\n\n<script>\nUPLOADCARE_PUBLIC_KEY = 'your_public_key';\n</script>"
17005
+ };
17006
+ return ns.commonWarning = function(name) {
17007
+ if (common[name] != null) {
17008
+ return ns.warnOnce(common[name]);
17009
+ }
17010
+ };
17011
+ });
17012
+
17013
+ }).call(this);
17014
+ (function() {
17015
+ var $, namespace,
17016
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
17017
+
17018
+ namespace = uploadcare.namespace, $ = uploadcare.jQuery;
17019
+
16946
17020
  namespace('uploadcare.utils', function(ns) {
17021
+ var own;
17022
+ own = Object.prototype.hasOwnProperty;
17023
+ ns.own = function(o, prop) {
17024
+ return own.call(o, prop);
17025
+ };
17026
+ ns.uniq = function(arr, cond) {
17027
+ var item, result, _i, _len;
17028
+ if (cond == null) {
17029
+ cond = function() {
17030
+ return true;
17031
+ };
17032
+ }
17033
+ result = [];
17034
+ for (_i = 0, _len = arr.length; _i < _len; _i++) {
17035
+ item = arr[_i];
17036
+ if (cond(item) && __indexOf.call(result, item) < 0) {
17037
+ result.push(item);
17038
+ }
17039
+ }
17040
+ return result;
17041
+ };
16947
17042
  ns.defer = function(fn) {
16948
17043
  return setTimeout(fn, 0);
16949
17044
  };
@@ -16959,6 +17054,33 @@ var _require = (function() {
16959
17054
  return result;
16960
17055
  };
16961
17056
  };
17057
+ ns.wrapToPromise = function(value) {
17058
+ return $.Deferred().resolve(value).promise();
17059
+ };
17060
+ ns.remove = function(array, item) {
17061
+ var index;
17062
+ if ((index = array.indexOf(item)) !== -1) {
17063
+ array.splice(index, 1);
17064
+ return true;
17065
+ } else {
17066
+ return false;
17067
+ }
17068
+ };
17069
+ ns.then = function(pr, doneFilter, failFilter, progressFilter) {
17070
+ var compose, df;
17071
+ df = $.Deferred();
17072
+ compose = function(fn1, fn2) {
17073
+ if (fn1 && fn2) {
17074
+ return function() {
17075
+ return fn2.call(this, fn1.apply(this, arguments));
17076
+ };
17077
+ } else {
17078
+ return fn1 || fn2;
17079
+ }
17080
+ };
17081
+ pr.then(compose(doneFilter, df.resolve), compose(failFilter, df.reject), compose(progressFilter, df.notify));
17082
+ return df.promise();
17083
+ };
16962
17084
  ns.bindAll = function(source, methods) {
16963
17085
  var method, target, _fn, _i, _len;
16964
17086
  target = {};
@@ -16981,6 +17103,9 @@ var _require = (function() {
16981
17103
  }
16982
17104
  return target;
16983
17105
  };
17106
+ ns.upperCase = function(s) {
17107
+ return s.replace(/-/g, '_').toUpperCase();
17108
+ };
16984
17109
  ns.publicCallbacks = function(callbacks) {
16985
17110
  var result;
16986
17111
  result = callbacks.add;
@@ -16997,6 +17122,7 @@ var _require = (function() {
16997
17122
  });
16998
17123
  };
16999
17124
  ns.uuidRegex = /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/i;
17125
+ ns.groupIdRegex = new RegExp("" + ns.uuidRegex.source + "~[0-9]+", 'i');
17000
17126
  ns.fullUuidRegex = new RegExp("^" + ns.uuidRegex.source + "$", 'i');
17001
17127
  ns.cdnUrlModifiersRegex = /(?:-\/(?:[a-z0-9_,]+\/)+)+/i;
17002
17128
  ns.normalizeUrl = function(url) {
@@ -17005,66 +17131,6 @@ var _require = (function() {
17005
17131
  }
17006
17132
  return url.replace(/\/+$/, '');
17007
17133
  };
17008
- ns.buildSettings = function(settings) {
17009
- var crop, key, ratio, size, value, _i, _j, _len, _len1, _ref, _ref1;
17010
- settings = $.extend({}, uploadcare.defaults, settings || {});
17011
- if ($.type(settings.tabs) === "string") {
17012
- settings.tabs = settings.tabs.split(' ');
17013
- }
17014
- settings.tabs = settings.tabs || [];
17015
- _ref = ['urlBase', 'socialBase', 'cdnBase'];
17016
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
17017
- key = _ref[_i];
17018
- settings[key] = ns.normalizeUrl(settings[key]);
17019
- }
17020
- _ref1 = ['previewStep', 'multiple', 'imagesOnly', 'pathValue'];
17021
- for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
17022
- key = _ref1[_j];
17023
- if (typeof settings[key] === 'string') {
17024
- value = $.trim(settings[key]).toLowerCase();
17025
- settings[key] = !(value === 'false' || value === 'disabled');
17026
- } else {
17027
- settings[key] = !!settings[key];
17028
- }
17029
- }
17030
- if (settings.multiple) {
17031
- console.log('Sorry, the multiupload is not working now');
17032
- settings.multiple = false;
17033
- }
17034
- if (settings.multiple) {
17035
- settings.crop = 'disabled';
17036
- }
17037
- settings.__cropParsed = {
17038
- enabled: true,
17039
- scale: false,
17040
- upscale: false,
17041
- preferedSize: null
17042
- };
17043
- crop = '' + settings.crop;
17044
- if (crop.match(/(disabled|false)/i)) {
17045
- crop = 'disabled';
17046
- settings.__cropParsed.enabled = false;
17047
- } else if (ratio = crop.match(/[0-9]+\:[0-9]+/)) {
17048
- crop = ratio[0];
17049
- settings.__cropParsed.preferedSize = ratio[0].replace(':', 'x');
17050
- } else if (size = crop.match(/[0-9]+x[0-9]+/i)) {
17051
- settings.__cropParsed.preferedSize = size[0];
17052
- settings.__cropParsed.scale = true;
17053
- if (crop.match(/upscale/i)) {
17054
- crop = size[0] + ' upscale';
17055
- settings.__cropParsed.upscale = true;
17056
- } else {
17057
- crop = size[0];
17058
- }
17059
- } else {
17060
- crop = '';
17061
- }
17062
- settings.crop = crop;
17063
- if (settings.__cropParsed.enabled || settings.multiple) {
17064
- settings.previewStep = true;
17065
- }
17066
- return settings;
17067
- };
17068
17134
  ns.fitText = function(text, max) {
17069
17135
  var head, tail;
17070
17136
  if (text.length > max) {
@@ -17079,7 +17145,7 @@ var _require = (function() {
17079
17145
  var input;
17080
17146
  container.find('input:file').remove();
17081
17147
  input = multiple ? $('<input type="file" multiple>') : $('<input type="file">');
17082
- input.on('change', fn).css({
17148
+ input.css({
17083
17149
  position: 'absolute',
17084
17150
  top: 0,
17085
17151
  opacity: 0,
@@ -17093,6 +17159,11 @@ var _require = (function() {
17093
17159
  position: 'relative',
17094
17160
  overflow: 'hidden'
17095
17161
  }).append(input);
17162
+ input.on('change', function(e) {
17163
+ fn(e);
17164
+ input.remove();
17165
+ return ns.fileInput(container, multiple, fn);
17166
+ });
17096
17167
  return container.mousemove(function(e) {
17097
17168
  var left, top, width, _ref;
17098
17169
  _ref = $(this).offset(), left = _ref.left, top = _ref.top;
@@ -17109,7 +17180,7 @@ var _require = (function() {
17109
17180
  a.href = url;
17110
17181
  return a;
17111
17182
  };
17112
- return ns.createObjectUrl = function(object) {
17183
+ ns.createObjectUrl = function(object) {
17113
17184
  var URL;
17114
17185
  URL = window.URL || window.webkitURL;
17115
17186
  if (URL) {
@@ -17117,28 +17188,210 @@ var _require = (function() {
17117
17188
  }
17118
17189
  return null;
17119
17190
  };
17191
+ ns.inDom = function(el) {
17192
+ if (el.jquery) {
17193
+ el = el.get(0);
17194
+ }
17195
+ return $.contains(document.documentElement, el);
17196
+ };
17197
+ ns.readableFileSize = function(value, onNaN, prefix, postfix) {
17198
+ var i, label, labels, _i, _len;
17199
+ if (onNaN == null) {
17200
+ onNaN = '';
17201
+ }
17202
+ if (prefix == null) {
17203
+ prefix = '';
17204
+ }
17205
+ if (postfix == null) {
17206
+ postfix = '';
17207
+ }
17208
+ value = parseInt(value, 10);
17209
+ if (isNaN(value)) {
17210
+ return onNaN;
17211
+ }
17212
+ labels = 'B KB MB GB TB PB EB ZB YB'.split(' ');
17213
+ for (i = _i = 0, _len = labels.length; _i < _len; i = ++_i) {
17214
+ label = labels[i];
17215
+ if (value < 512 || i === labels.length - 1) {
17216
+ return "" + prefix + value + " " + label + postfix;
17217
+ }
17218
+ value = Math.round(value / 1024);
17219
+ }
17220
+ };
17221
+ return ns.jsonp = function(url, data) {
17222
+ return $.ajax(url, {
17223
+ data: data,
17224
+ dataType: 'jsonp'
17225
+ }).then(function(data) {
17226
+ var text;
17227
+ if (data.error) {
17228
+ text = data.error.content || data.error;
17229
+ ns.warn("JSONP error: " + text);
17230
+ return $.Deferred().reject(text);
17231
+ } else {
17232
+ return data;
17233
+ }
17234
+ }, function(_, textStatus, errorThrown) {
17235
+ return "JSONP unexpected error: " + textStatus + " (" + errorThrown + ")";
17236
+ });
17237
+ };
17120
17238
  });
17121
17239
 
17122
17240
  }).call(this);
17123
17241
  (function() {
17242
+ var $, expose, namespace, utils,
17243
+ __hasProp = {}.hasOwnProperty,
17244
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
17124
17245
 
17125
- uploadcare.defaults = {
17126
- locale: window.UPLOADCARE_LOCALE,
17127
- translations: window.UPLOADCARE_LOCALE_TRANSLATIONS,
17128
- pluralize: window.UPLOADCARE_LOCALE_PLURALIZE,
17129
- publicKey: window.UPLOADCARE_PUBLIC_KEY || void 0,
17130
- pusherKey: window.UPLOADCARE_PUSHER_KEY || '79ae88bd931ea68464d9',
17131
- urlBase: window.UPLOADCARE_URL_BASE || 'https://upload.uploadcare.com',
17132
- socialBase: window.UPLOADCARE_SOCIAL_BASE || 'https://social.uploadcare.com',
17133
- cdnBase: window.UPLOADCARE_CDN_BASE || 'https://ucarecdn.com',
17134
- live: window.UPLOADCARE_LIVE != null ? window.UPLOADCARE_LIVE : true,
17135
- tabs: window.UPLOADCARE_TABS || 'file url facebook dropbox gdrive instagram',
17136
- crop: window.UPLOADCARE_CROP != null ? window.UPLOADCARE_CROP : 'disabled',
17137
- multiple: !!window.UPLOADCARE_MULTIPLE,
17138
- previewStep: !!window.UPLOADCARE_PREVIEW_STEP,
17139
- imagesOnly: !!window.UPLOADCARE_IMAGES_ONLY,
17140
- pathValue: !!window.UPLOADCARE_PATH_VALUE
17141
- };
17246
+ expose = uploadcare.expose, namespace = uploadcare.namespace, utils = uploadcare.utils, $ = uploadcare.jQuery;
17247
+
17248
+ namespace('uploadcare.settings', function(ns) {
17249
+ var arrayOptions, defaults, flagOptions, key, normalize, presets, publicDefaults, str2arr, urlOptions, value;
17250
+ defaults = {
17251
+ 'autostore': false,
17252
+ 'cdn-base': 'https://ucarecdn.com',
17253
+ 'crop': 'disabled',
17254
+ 'images-only': false,
17255
+ 'live': true,
17256
+ 'locale': null,
17257
+ 'locale-pluralize': null,
17258
+ 'locale-translations': null,
17259
+ 'manual-start': false,
17260
+ 'multiple': false,
17261
+ 'path-value': false,
17262
+ 'preview-step': false,
17263
+ 'public-key': null,
17264
+ 'pusher-key': '79ae88bd931ea68464d9',
17265
+ 'social-base': 'https://social.uploadcare.com',
17266
+ 'tabs': 'file url facebook gdrive instagram',
17267
+ 'url-base': 'https://upload.uploadcare.com'
17268
+ };
17269
+ presets = {
17270
+ 'tabs': {
17271
+ all: 'file url facebook dropbox gdrive instagram',
17272
+ "default": defaults.tabs
17273
+ }
17274
+ };
17275
+ str2arr = function(value) {
17276
+ if (!$.isArray(value)) {
17277
+ value = $.trim(value);
17278
+ value = value ? value.split(' ') : [];
17279
+ }
17280
+ return value;
17281
+ };
17282
+ arrayOptions = function(settings, keys) {
17283
+ var key, name, preset, presetList, value, _i, _len;
17284
+ for (_i = 0, _len = keys.length; _i < _len; _i++) {
17285
+ key = keys[_i];
17286
+ value = str2arr(settings[key]);
17287
+ presetList = presets[key];
17288
+ for (name in presetList) {
17289
+ if (!__hasProp.call(presetList, name)) continue;
17290
+ preset = presetList[name];
17291
+ if (__indexOf.call(value, name) >= 0) {
17292
+ value = value.concat(str2arr(preset));
17293
+ }
17294
+ }
17295
+ settings[key] = utils.uniq(value, function(x) {
17296
+ return !utils.own(presetList, x);
17297
+ });
17298
+ }
17299
+ return settings;
17300
+ };
17301
+ urlOptions = function(settings, keys) {
17302
+ var key, _i, _len;
17303
+ for (_i = 0, _len = keys.length; _i < _len; _i++) {
17304
+ key = keys[_i];
17305
+ if (settings[key] != null) {
17306
+ settings[key] = utils.normalizeUrl(settings[key]);
17307
+ }
17308
+ }
17309
+ return settings;
17310
+ };
17311
+ flagOptions = function(settings, keys) {
17312
+ var key, value, _i, _len;
17313
+ for (_i = 0, _len = keys.length; _i < _len; _i++) {
17314
+ key = keys[_i];
17315
+ if (!(settings[key] != null)) {
17316
+ continue;
17317
+ }
17318
+ value = settings[key];
17319
+ if ($.type(value) === 'string') {
17320
+ value = $.trim(value).toLowerCase();
17321
+ settings[key] = !(value === 'false' || value === 'disabled');
17322
+ } else {
17323
+ settings[key] = !!value;
17324
+ }
17325
+ }
17326
+ return settings;
17327
+ };
17328
+ normalize = function(settings) {
17329
+ var crop, ratio, size;
17330
+ arrayOptions(settings, ['tabs']);
17331
+ urlOptions(settings, ['cdnBase', 'socialBase', 'urlBase']);
17332
+ flagOptions(settings, ['autostore', 'imagesOnly', 'multiple', 'pathValue', 'previewStep']);
17333
+ if (settings.multiple) {
17334
+ settings.crop = 'disabled';
17335
+ }
17336
+ settings.__cropParsed = {
17337
+ enabled: true,
17338
+ scale: false,
17339
+ upscale: false,
17340
+ preferedSize: null
17341
+ };
17342
+ crop = '' + settings.crop;
17343
+ if (crop.match(/(disabled|false)/i)) {
17344
+ crop = 'disabled';
17345
+ settings.__cropParsed.enabled = false;
17346
+ } else if (ratio = crop.match(/[0-9]+\:[0-9]+/)) {
17347
+ crop = ratio[0];
17348
+ settings.__cropParsed.preferedSize = ratio[0].replace(':', 'x');
17349
+ } else if (size = crop.match(/[0-9]+x[0-9]+/i)) {
17350
+ settings.__cropParsed.preferedSize = size[0];
17351
+ settings.__cropParsed.scale = true;
17352
+ if (crop.match(/upscale/i)) {
17353
+ crop = size[0] + ' upscale';
17354
+ settings.__cropParsed.upscale = true;
17355
+ } else {
17356
+ crop = size[0];
17357
+ }
17358
+ } else {
17359
+ crop = '';
17360
+ }
17361
+ settings.crop = crop;
17362
+ if (settings.__cropParsed.enabled || settings.multiple) {
17363
+ settings.previewStep = true;
17364
+ }
17365
+ return settings;
17366
+ };
17367
+ publicDefaults = {};
17368
+ for (key in defaults) {
17369
+ if (!__hasProp.call(defaults, key)) continue;
17370
+ value = defaults[key];
17371
+ publicDefaults[$.camelCase(key)] = value;
17372
+ }
17373
+ expose('defaults', publicDefaults);
17374
+ ns.globals = utils.once(function() {
17375
+ var fallback, values;
17376
+ values = {};
17377
+ for (key in defaults) {
17378
+ if (!__hasProp.call(defaults, key)) continue;
17379
+ fallback = defaults[key];
17380
+ value = window["UPLOADCARE_" + (utils.upperCase(key))];
17381
+ values[$.camelCase(key)] = value != null ? value : fallback;
17382
+ }
17383
+ if (!values.publicKey) {
17384
+ utils.commonWarning('publicKey');
17385
+ }
17386
+ return normalize(values);
17387
+ });
17388
+ ns.common = utils.once(function(settings) {
17389
+ return normalize($.extend({}, ns.globals(), settings || {}));
17390
+ });
17391
+ return ns.build = function(settings) {
17392
+ return normalize($.extend({}, ns.common(), settings || {}));
17393
+ };
17394
+ });
17142
17395
 
17143
17396
  }).call(this);
17144
17397
  (function() {
@@ -17152,12 +17405,14 @@ var _require = (function() {
17152
17405
  "default": 'Error',
17153
17406
  baddata: 'Incorrect value',
17154
17407
  size: 'Too big',
17155
- upload: 'Can\'t upload',
17408
+ upload: 'Cant upload',
17156
17409
  user: 'Upload canceled',
17157
- info: 'Can\'t load info',
17158
- image: 'Only images allowed'
17410
+ info: 'Cant load info',
17411
+ image: 'Only images allowed',
17412
+ createGroup: 'Can’t create file group',
17413
+ deleted: 'File was deleted'
17159
17414
  },
17160
- draghere: 'Drop the file here',
17415
+ draghere: 'Drop a file here',
17161
17416
  file: {
17162
17417
  one: '1 file',
17163
17418
  other: '%1 files'
@@ -17168,6 +17423,8 @@ var _require = (function() {
17168
17423
  file: 'Computer'
17169
17424
  },
17170
17425
  dialog: {
17426
+ done: 'Done',
17427
+ showFiles: 'Show files',
17171
17428
  tabs: {
17172
17429
  file: {
17173
17430
  drag: 'Drop a file here',
@@ -17227,6 +17484,13 @@ var _require = (function() {
17227
17484
  line1: 'The file you selected exceeds the 100 MB limit.',
17228
17485
  line2: 'Please try again with another file.'
17229
17486
  }
17487
+ },
17488
+ multiple: {
17489
+ title: 'You’ve chosen',
17490
+ question: 'Do you want to add all of these files?',
17491
+ toManyFiles: 'You’ve chosen to many files. %max% is maximum. Please remove some of them.',
17492
+ clear: 'Remove all',
17493
+ done: 'Done'
17230
17494
  }
17231
17495
  }
17232
17496
  },
@@ -17238,7 +17502,7 @@ var _require = (function() {
17238
17502
  crop: {
17239
17503
  error: {
17240
17504
  title: 'Error',
17241
- text: 'Can\'t load image'
17505
+ text: 'Cant load image'
17242
17506
  },
17243
17507
  done: 'Done'
17244
17508
  }
@@ -17492,7 +17756,9 @@ var _require = (function() {
17492
17756
  upload: 'Ошибка при загрузке',
17493
17757
  user: 'Загрузка прервана',
17494
17758
  info: 'Ошибка при загрузке информации',
17495
- image: 'Разрешены только изображения'
17759
+ image: 'Разрешены только изображения',
17760
+ createGroup: 'Не удалось создать группу файлов',
17761
+ deleted: 'Файл удалён'
17496
17762
  },
17497
17763
  draghere: 'Перетащите файл сюда',
17498
17764
  file: {
@@ -17507,19 +17773,21 @@ var _require = (function() {
17507
17773
  file: 'Компьютер'
17508
17774
  },
17509
17775
  dialog: {
17776
+ done: 'Готово',
17777
+ showFiles: 'Показать файлы',
17510
17778
  tabs: {
17511
17779
  file: {
17512
17780
  drag: 'Перетащите файл сюда',
17513
17781
  nodrop: 'Загрузка файлов с вашего компьютера',
17514
17782
  or: 'или',
17515
- button: 'Выбрать файлы',
17516
- also: 'Вы также можете загрузить файлы используя',
17783
+ button: 'Выберите файл с компьютера',
17784
+ also: 'Вы также можете загрузить файлы, используя:',
17517
17785
  tabNames: {
17518
17786
  facebook: 'Facebook',
17519
17787
  dropbox: 'Dropbox',
17520
17788
  gdrive: 'Google Drive',
17521
17789
  instagram: 'Instagram',
17522
- url: 'Внешнюю ссылку'
17790
+ url: 'Произвольную ссылку'
17523
17791
  }
17524
17792
  },
17525
17793
  url: {
@@ -17540,7 +17808,7 @@ var _require = (function() {
17540
17808
  },
17541
17809
  regular: {
17542
17810
  title: 'Загрузить этот файл?',
17543
- line1: 'Вы собираетесь загрузить представленный файл.',
17811
+ line1: 'Вы собираетесь загрузить этот файл:',
17544
17812
  line2: 'Пожалуйста, подтвердите.'
17545
17813
  },
17546
17814
  image: {
@@ -17557,7 +17825,7 @@ var _require = (function() {
17557
17825
  line2: 'Пожалуйста, попробуйте ещё раз.'
17558
17826
  },
17559
17827
  image: {
17560
- title: 'Только изображения',
17828
+ title: 'Только изображения!',
17561
17829
  line1: 'Можно загружать только изображения.',
17562
17830
  line2: 'Попробуйте загрузить другой файл.'
17563
17831
  },
@@ -17566,6 +17834,13 @@ var _require = (function() {
17566
17834
  line1: 'Размер выбранного файла превышает 100 Мб.',
17567
17835
  line2: 'Попробуйте загрузить другой файл.'
17568
17836
  }
17837
+ },
17838
+ multiple: {
17839
+ title: 'Вы выбрали',
17840
+ question: 'Вы хотите добавить все эти файлы?',
17841
+ toManyFiles: 'Вы выбрали слишком много файлов. %max% максимум. Удалите что-нибудь.',
17842
+ clear: 'Удалить все',
17843
+ done: 'Готово'
17569
17844
  }
17570
17845
  }
17571
17846
  },
@@ -17602,23 +17877,33 @@ var _require = (function() {
17602
17877
 
17603
17878
  }).call(this);
17604
17879
  (function() {
17605
- var $, namespace;
17880
+ var $, namespace, s, utils;
17606
17881
 
17607
- namespace = uploadcare.namespace, $ = uploadcare.jQuery;
17882
+ namespace = uploadcare.namespace, utils = uploadcare.utils, s = uploadcare.settings, $ = uploadcare.jQuery;
17608
17883
 
17609
17884
  namespace('uploadcare.locale', function(ns) {
17610
- var defaultLocale, translate, _base, _name;
17611
- defaultLocale = 'en';
17612
- ns.lang = uploadcare.defaults.locale || defaultLocale;
17613
- (_base = ns.translations)[_name = ns.lang] || (_base[_name] = {});
17614
- $.extend(ns.translations[ns.lang], uploadcare.defaults.translations);
17615
- translate = function(key, locale) {
17616
- var node, path, subkey, _i, _len;
17617
- if (locale == null) {
17618
- locale = defaultLocale;
17619
- }
17885
+ var build, defaultLang, defaults, translate;
17886
+ defaultLang = 'en';
17887
+ defaults = {
17888
+ lang: defaultLang,
17889
+ translations: ns.translations[defaultLang],
17890
+ pluralize: ns.pluralize[defaultLang]
17891
+ };
17892
+ build = utils.once(function() {
17893
+ var lang, pluralize, settings, translations;
17894
+ settings = s.build();
17895
+ lang = settings.locale || defaults.lang;
17896
+ translations = $.extend(true, {}, ns.translations[lang], settings.localeTranslations);
17897
+ pluralize = $.isFunction(settings.localePluralize) ? settings.localePluralize : ns.pluralize[lang];
17898
+ return {
17899
+ lang: lang,
17900
+ translations: translations,
17901
+ pluralize: pluralize
17902
+ };
17903
+ });
17904
+ translate = function(key, node) {
17905
+ var path, subkey, _i, _len;
17620
17906
  path = key.split('.');
17621
- node = ns.translations[locale];
17622
17907
  for (_i = 0, _len = path.length; _i < _len; _i++) {
17623
17908
  subkey = path[_i];
17624
17909
  if (node == null) {
@@ -17629,17 +17914,16 @@ var _require = (function() {
17629
17914
  return node;
17630
17915
  };
17631
17916
  return ns.t = function(key, n) {
17632
- var lang, pluralize, value, _ref;
17633
- lang = ns.lang;
17634
- value = translate(key, lang);
17635
- if (!(value != null) && lang !== defaultLocale) {
17636
- lang = defaultLocale;
17637
- value = translate(key, lang);
17917
+ var locale, value, _ref;
17918
+ locale = build();
17919
+ value = translate(key, locale.translations);
17920
+ if (!(value != null) && locale.lang !== defaults.lang) {
17921
+ locale = defaults;
17922
+ value = translate(key, locale.translations);
17638
17923
  }
17639
17924
  if (n != null) {
17640
- pluralize = ns.pluralize[lang];
17641
- if (pluralize != null) {
17642
- value = ((_ref = value[pluralize(n)]) != null ? _ref.replace('%1', n) : void 0) || n;
17925
+ if (locale.pluralize != null) {
17926
+ value = ((_ref = value[locale.pluralize(n)]) != null ? _ref.replace('%1', n) : void 0) || n;
17643
17927
  } else {
17644
17928
  value = '';
17645
17929
  }
@@ -17651,7 +17935,7 @@ var _require = (function() {
17651
17935
  }).call(this);
17652
17936
  (function() {
17653
17937
  this.JST || (this.JST = {});
17654
- this.JST["uploadcare/templates/circle"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('<div class="uploadcare-widget-circle-back" role="uploadcare-widget-status">\n <div class="uploadcare-widget-circle-center"></div>\n</div>\n');}return __p.join('');};
17938
+ this.JST["uploadcare/templates/circle"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('<div class="uploadcare-widget-circle-back" role="uploadcare-widget-status">\n <div class="uploadcare-widget-circle-center" role="uploadcare-circle-center"></div>\n</div>\n');}return __p.join('');};
17655
17939
  }).call(this);
17656
17940
  (function() {
17657
17941
  this.JST || (this.JST = {});
@@ -17663,7 +17947,11 @@ var _require = (function() {
17663
17947
  }).call(this);
17664
17948
  (function() {
17665
17949
  this.JST || (this.JST = {});
17666
- this.JST["uploadcare/templates/styles"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('\n\n\n\n\n\n.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab:after{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAFeCAYAAADHfkwkAAAQGUlEQVR42uydbYxVRxnHuxdaa6q8pLwEQSi1CpLWT1qML9A2gDRVbKQNDfWDoU1s0bQ1RqOJrUqNDRQwvhCtxp6%2BKJMQarTQLmAbKtg2QutriESK1KTCCrvlZWnLsmzxP%2BzD3f%2FOM3P39sOZc8Xnwz8zZ87ce%2BZ3nnlm5p4zd%2Ba806dPnxMyEAMxEAMxEAMxkP9bkIceXUty5xWPDD6G2hCfhfTliP8e8Q6oB3EvH0eaWwHNQryt%2FjmEBRR8fyYQiApSg5agMHsQngbIaYSQo1DiIsm7BHlrHgJhHUqU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2BTNry7%2Bz9sPB5dWjxCVXO4S1I1g7bS1xbpMHXpcK%2FC%2BYVy9URwoLw8xVapOHaIhE6l9qQP3sqq10gqqpaTqEdH%2F8IE6GDTXTCfB0kkaTSYVvHchfPNzOI8AVdAAkgASSABJAAEkACSAAZq%2F4A0EvZstJINZUAAAAASUVORK5CYII%3D)}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab:hover:after{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAFeCAYAAADHfkwkAAAJFUlEQVR42uzdfWxVdx3H8dvbDkemsGYFgp0w5rSMbP6lY9EJ28IQMkUiWyDgH4YtcZuGzRjNTNxUZraUJ%2BMD8SmSkMx%2FDCMKbAVkAZnOWJiPIZIVLCZaKm3HgA1bSv36%2FuO75Jeb23NuH845v8Lnj1faXs5t%2Bs55%2BP3Or%2FfSkpldERSiEIUoRCEKUYhCAuufbQ3VYQFa8Vt0Y8B1%2B2MbfJs6RBdSxlp0wGrU4c8pxxIyB%2B2wUWrHnMJCPOJu9MDGqAcLcg%2FxiMUYgI2TAXwitxCPaMF52Di7gJbMQzyiPjgnstCO%2BjxC1sIy9lCmIX7t78ghpAN1WYYshOVkYZYhrTmGtGYZ8kqOIYezDOmGjdBBZyPUnVnIKAbAAyi5AyMdIBUS26Glk72GkA15Xn41IEY2RSlnPWl8KI9JY17T%2BCMZRhzNZRrvMXNxIaMbq7l53%2BouzeBWd2lRiw9Lx2nPXAgicg8JD7OjYzwn5sa2QHdiBAEnYlugC5WxABvxu8olU39so29Tjm3JdNQUohCFKEQhClGIQhSiEIUoRCEKUYhCFKIQl%2FVrUebjBCxjJzA%2Fy5CTMHThVEZOw3AyyxBDN%2BqyOrT813u9sKxDTmV9jvD4KYUoRCEKUYhCFKKQkYX05xDyVuYheVHI1RbyVo4h57IMeSLHkHUxLD50wobxz4m0inIpIWRwooQ8DUvx1EQIeaaGkG9qgU4hClGIQhSiEIUoRCEKUYhCFKIQhShEIQpRi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zyB%2B94ybwBPFqaYdECUJKcIERXEMQpR0iCRS%2FX%2FbwyyELsZB4HzjBEVroQrAJF8jjUWvIPnJwgXlcQnpQF3II10MWV%2BpCghGlAEGEKbgfbEC88eBMFSFrEFThYozhE4KitpAtCI7hfuEVgry2kBUIzuFiZINh0WkLmUCELmZjQnYgqKoL8Q4gOEWmR8QMniHY1hpSCCbZJhbgvGGs4x6CGoZUhnhLeIB4t7jAC8RrYRJObYg3jT28QQJ32EUGTntIaBSLWMUchuAAPSERBDm4JPx5uUE9rOoQVJBNGJNFBYJ62iHlf1o%2BLA9qHdTs0zqoGUQkCFHCQizEQizEQizEQizEQnT6AqfQwgd5BnPGAAAAAElFTkSuQmCC)}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-selected-tab:after{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAFeCAYAAADHfkwkAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADDJJREFUeNrtW21wVUcZJgnQYiuBCQUjISQtGmBK%2FKGWgJWPDqEwCEUpA94kMxrr2CLQatWpM7R%2B1LEFCp1anXJJRBmrP0roaEv5DISPto5A1XovIxIgqC2kBAoEKgkErs%2Feuyd3z549Hzfp2XNueZ%2BZZ%2FZk7%2B4573Ped9999wz06UMgEAgEAoHw0UZ8x7gccFJsx7jl4Ou4bkXbGU%2BxNZ7qW8HGsLFhFJALg2vBZlwnGGNCa1zHzddsbC2bGwoRMKwU3C8aG1cbbuoTBLK5pUF7YgrYpjLaTphKJNo2cFJQIqbz2E8b11hua7DkBUvo8bV0r%2B5wKoPR7U5Gu%2FXZeO4iu7cuT%2BSxuLYJkW7PZBha4nh27zwd3qiNuRtjEeVFmBGaGPsNHftEs0tatayJmEtIKdZOc8zPfQYPmGzzYEcBMacwtM9yk%2F0Ustz04HQoJNxScMwlMSja5X6uj3126VRe4DGX9OuU4Xi7108hrZns4Ly%2FCW1TzC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dXW%2FbdEjSZpFVIoeSf8WQ5unW0gBRJxD%2B0LSG4sbNivCxCxA9o51%2FIxgFn5dzdfGPP1YAd7utPTbFjwgi5H7zUK2BprFKpdsyIURbyvjvju8zCIrrQngGjiOvkERCAQCgUAgEAgEAoFAIBAIhCzFlO%2FWTwB3gx1gohfs4PeZEISICrCzlwJkdmoXgwfu7IXBF8FjAk8Jv%2B3SLeRyL4RUSPfKA4%2Fw3y7rFtKbECpW3G%2Bf8TsJISHuvARuAn%2FLDe3i%2FfOlexWAJ8MqZC04SJozFjzoNjdMQn7jMC8f%2FFfohAh%2FFxrpExziMvd%2BwfCP2d0zKCGVvK%2FRw9wB4DV54YdFyALe9weP8y%2Fw8QVhEzKF973uYW6%2BUSw63TMoIbfy9cFSbInL3G%2BqwjAUQnhfHe%2FfAfazmTcCfI%2BPqw6rkEKhkt0Dlgu%2F5YKzwf8aVS6YE0ohvP%2Bz4LtCej0OHgDbhD62yw%2F2es9AhPDfPgGuAdulze4%2F4KMOYRcuIcKYm8DPgFPBMjmUwiLEOFgN%2BpDuNyiog1UTf%2FBqti%2F08l75%2FD7sfk26hUzw6ePDxKA%2BB%2B35kD4H7QlEBIFAIBAIBALhxsL%2FAWFBQYLmSYGkAAAAAElFTkSuQmCC)}.uploadcare-widget-buttons>li.uploadcare-widget-buttons-dialog,.uploadcare-widget-buttons>li.uploadcare-widget-buttons-file,.uploadcare-widget-buttons>li.uploadcare-widget-buttons-url{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAB4CAYAAACaTFAUAAADn0lEQVR42u3bS2wNURjA8aLaEBp0IV5NPGJBkJBSEl1UtB5hQW0JXSIsxGMjFsRjQ9AHQtJiwUpUaVJExELi3US5JZ7FlajiJlQfPv%2FcfKQ5uVNuO2em9Cx%2BSe%2FMSe8%2FM3PnnGluU0SkR3FBLsgF7T9YXAn5S5VBBEkyY12QC3JB%2F0VQEiwFaUh3BBb0p3HJnjpbU4ap0s32LsgFuSAXpGzOZ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qi4BnOyDfAAAAAElFTkSuQmCC)}.uploadcare-crop-widget .jcrop-vline,.uploadcare-crop-widget .jcrop-hline{background-image:url(data:image/gif;base64,R0lGODlhCAAIAJEAAKqqqv%2F%2F%2FwAAAAAAACH%2FC05FVFNDQVBFMi4wAwEAAAAh%2BQQJCgAAACwAAAAACAAIAAACDZQFCadrzVRMB9FZ5SwAIfkECQoAAAAsAAAAAAgACAAAAg%2BELqCYaudeW9ChyOyltQAAIfkECQoAAAAsAAAAAAgACAAAAg8EhGKXm%2BrQYtC0WGl9oAAAIfkECQoAAAAsAAAAAAgACAAAAg%2BEhWKQernaYmjCWLF7qAAAIfkECQoAAAAsAAAAAAgACAAAAg2EISmna81UTAfRWeUsACH5BAkKAAAALAAAAAAIAAgAAAIPFA6imGrnXlvQocjspbUAACH5BAkKAAAALAAAAAAIAAgAAAIPlIBgl5vq0GLQtFhpfaIAACH5BAUKAAAALAAAAAAIAAgAAAIPlIFgknq52mJowlixe6gAADs%3D)}.uploadcare-dialog-file-sources:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEMAAAAsCAYAAAA%2BaAX8AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAArdJREFUeNrsml1ozWEcx387lolkMSNJLKNIIhQ3btwouXBDlJer09rF3LFdyZWLCbHMy4W3lPfXQl5rGyk1WkqE8hLJxbCZjW0%2Bj%2Bd32tNxzhnLyv%2F%2FO9%2F69JzzdLY63%2FN9nuf3PM%2B%2FYOee%2BjIReQcdkkVVlUmxoASshiewQozLmTEaJsEZuA0zrJvRA%2BvgPuyFWii2ZkYhjIFLcCToL4Ip8Al6LSWjBOrS%2Bjt1Hum1Nkzeww3J69cwOREkYCQ8hDnwOdcf7qrbF%2BkvnqlccMm4ELz%2FArdgq9XVJL3YqoZV4RIb9RT88TDJEJePfPn1utz%2BNiziXI0msvRf1dUkdnPFX5sR%2FPqNMN2KIYl%2BZttjcByGWplAcy0%2F9TSvYIuVOqM%2FbYD55pOh6Wilua77lRLTZgTzx0K4B2NNm6GG3KE5rTvc4abNUNXAU6gwbwbpcBu6tbAjn4y%2B%2BcOV6otg%2B0D%2BR2zMCAx5pFv9QzDErBmqdlimq0utlaIrl77CcphoPRkpfYeX%2BtrtZcotmxHK1SINsDRvhshB8TdzB2C2tTkjk%2B7CVPHXDQVarbZbTEZK38SfuLtz1OewxrIZKT3W%2BWMTnIVhls1waoZ5cHOQhmWkzHDqEn%2BF2QazoAmWWDUjVItWrO62%2FwqUWjbD6RzMhIviT9CcRlg1IzV0XDpeB4k5r7thc2akyyXlGhyGbXEpugaqDk3Kfuk7VlwJc3XP02IpGSl1i38awKlRi7fL8GCwd8f%2F%2BynVW9gs%2FpGqjfBB%2B116qv%2F1%2FicqR3Y9mpIufe%2FmlXHiT%2Bsbgs%2BVWjAjXU2alPLguGC8%2BKeO3sBJ8adwWZXp8rxQoq82bd2zaROgTJfnbu13r0%2BJv%2BJ4Bkc1TUUYMpnW3Ri2VlUmO%2BNgRrpeKOGRwgLxj1ZMgx%2Favxh2wygoxpjkTwEGAPykmqa52kHJAAAAAElFTkSuQmCC)}.uploadcare-crop-widget--loading .uploadcare-crop-widget__image-wrap{background-image:url(data:image/gif;base64,R0lGODlhGQAZAPQAAOzq7Ozu7OTm5Ly6vKSmpLS2tNTS1MzKzKyqrOTi5MTCxLSytNTW1Nze3PT29Ly%2BvKyurPz%2B%2FPz6%2FMzOzMTGxNza3PTy9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH%2FC05FVFNDQVBFMi4wAwEAAAAh%2BQQFCQAAACwAAAAAGQAZAEAFhCAgjqIkRRKgFEfjkOMZwXQNRKhs7yKe1ibULcdzpEw8QKIBkLySUBjSmKQ6aQ6c9powPAjgQUDqi5bKZTNJllafZ7JfNCsk0bcvE7tu26cGYAgIFU9AWjYBBwgETDBtUHQjj1E6Om5nJ0iXAHQnhW56lpc6k1CipTuiMahvnzR%2BQ1s0IQAh%2B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hACH5BAUJAAAALAAAAAAZABkAAAV2ICCOoiRFEhChKemS54qq8vyOTo06gKnzt1jk1ou1SI6UiThaJkmrIxO3akanrpztinXFetXuK%2FoVe1Fcs5WsRobbwQgQbjLCS9F326hXX9NmZXZmWkeAWGUlKU9TTxJza1JnckRaMo9FQjZEmik6kkw%2BnixEIQA7)}.uploadcare-dialog{font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(49,49,49,0.95);z-index:10000;overflow:auto}.uploadcare-dialog *{margin:0;padding:0}.uploadcare-dialog-inner-wrap1{display:table;width:100%;height:100%}.uploadcare-dialog-inner-wrap2{display:table-cell;vertical-align:middle}.uploadcare-dialog-close{position:absolute;top:4px;left:0;width:100%;min-width:988px}.uploadcare-dialog-close>div{margin:0;padding:0;border:none;background:none;width:33px;height:33px;line-height:33px;font-size:29.7px;font-weight:bold;color:#1d1d1d;cursor:pointer;position:absolute;right:0;top:0}.uploadcare-dialog-panel-wrap{margin:0 auto;width:900px;padding:0 44px}.uploadcare-dialog-panel{width:900px;height:616px;overflow:hidden;border-radius:8px;background:#fff;-ms-box-shadow:0 1px 2px rgba(0,0,0,0.35);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.35);-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.35);-o-box-shadow:0 1px 2px rgba(0,0,0,0.35);box-shadow:0 1px 2px rgba(0,0,0,0.35);font-weight:normal}.uploadcare-dialog-panel a{text-decoration:none;border-bottom:1px dotted}.uploadcare-dialog-panel a:link,.uploadcare-dialog-panel a:visited{color:#1a85ad;border-bottom-color:#1a85ad}.uploadcare-dialog-panel a:hover,.uploadcare-dialog-panel a:active{color:#252525;border-bottom-color:#252525}.uploadcare-dialog-body .uploadcare-dialog-tabs{-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;width:75px;height:616px;float:left;list-style:none;list-style-type:none;margin:0;padding:0;background:#dee0e1;border-bottom-left-radius:8px;border-top-left-radius:8px;overflow:hidden;position:relative}.uploadcare-dialog-body .uploadcare-dialog-tabs:before{content:\'\';display:block;position:absolute;top:0;right:0;bottom:0;width:0;border-left:1px solid #c5cace}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab{-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;width:75px;height:66px;border-bottom:1px solid #c5cace;border-right:1px solid #c5cace;cursor:pointer;position:relative}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab:after{content:\'\';display:block;position:absolute;width:50px;height:50px;top:50%;left:50%;margin-top:-25px;margin-left:-25px}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab:hover{background-color:#ebeced}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-selected-tab{margin-right:-1px;border-right:1px solid #efefef}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-selected-tab,.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-selected-tab:hover{background-color:#efefef}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-tab-file:after{background-position:0 -50px}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-tab-url:after{background-position:0 -100px}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-tab-facebook:after{background-position:0 -150px}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-tab-dropbox:after{background-position:0 -200px}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-tab-gdrive:after{background-position:0 -250px}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-tab-instagram:after{background-position:0 -300px}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-first-tab{border-top-left-radius:8px}.uploadcare-dialog-body .uploadcare-dialog-tabs-panel{position:relative;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;margin-left:75px;padding:22px 25px;width:825px;height:616px;line-height:22px;background:#efefef;border-bottom-right-radius:8px;border-top-right-radius:8px;font-size:16px;color:black}.uploadcare-dialog-body .uploadcare-dialog-tabs-panel input{-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;width:100%;height:44px;margin-bottom:22px;padding:11px 12.5px;font-family:inherit;font-size:16px;border:1px solid #c5cace;background:white;color:black}.uploadcare-dialog-body .uploadcare-dialog-tabs-panel .uploadcare-dialog-drop-file{background:white;border:1px dashed #c5cace;border-radius:3px;height:99px;padding-top:77px;text-align:center;color:#545454}.uploadcare-dialog-body .uploadcare-dialog-tabs-panel-facebook,.uploadcare-dialog-body .uploadcare-dialog-tabs-panel-dropbox,.uploadcare-dialog-body .uploadcare-dialog-tabs-panel-gdrive,.uploadcare-dialog-body .uploadcare-dialog-tabs-panel-instagram{padding:0}.uploadcare-dialog-body .uploadcare-dialog-tabs-panel-facebook iframe,.uploadcare-dialog-body .uploadcare-dialog-tabs-panel-dropbox iframe,.uploadcare-dialog-body .uploadcare-dialog-tabs-panel-gdrive iframe,.uploadcare-dialog-body .uploadcare-dialog-tabs-panel-instagram iframe{border-bottom-right-radius:8px;border-top-right-radius:8px}.uploadcare-dialog-footer{font-size:13px;text-align:center;color:#888;margin-top:15px}.uploadcare-dialog-footer a{color:#c2c2c2;text-decoration:none}.uploadcare-dialog-footer a:hover{text-decoration:underline}.uploadcare-dialog-title{font-size:25px;line-height:1;font-weight:bolder;margin-bottom:25px}.uploadcare-dialog-title2{font-size:20px;line-height:1;padding-bottom:11px}.uploadcare-dialog-label{font-size:15px;line-height:25px;margin-bottom:12.5px}.uploadcare-dialog-section{margin-bottom:22px}.uploadcare-dialog-normal-text{font-size:13px;color:#545454}.uploadcare-dialog-button{display:inline-block;font-size:13px;line-height:31px;padding:0 22px;margin-right:.5em;border:solid 1px;border-radius:3px;cursor:pointer;color:#444}.uploadcare-dialog-button,.uploadcare-dialog-button[disabled]:active,.uploadcare-dialog-button.uploadcare-disabled-el:active,.uploadcare-dialog-button[disabled]:hover,.uploadcare-dialog-button.uploadcare-disabled-el:hover{background:#f3f3f3;background:-webkit-linear-gradient(whitesmoke,#f1f1f1);background:-moz-linear-gradient(whitesmoke,#f1f1f1);background:-o-linear-gradient(whitesmoke,#f1f1f1);background:linear-gradient(whitesmoke,#f1f1f1);-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;-o-box-shadow:none;box-shadow:none;border-color:gainsboro}.uploadcare-dialog-button:hover{background:#f8f8f8;background:-webkit-linear-gradient(#fbfbfb,#f6f6f6);background:-moz-linear-gradient(#fbfbfb,#f6f6f6);background:-o-linear-gradient(#fbfbfb,#f6f6f6);background:linear-gradient(#fbfbfb,#f6f6f6);-ms-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);-webkit-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);-o-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05)}.uploadcare-dialog-button:active{background:#f3f3f3;background:-webkit-linear-gradient(whitesmoke,#f1f1f1);background:-moz-linear-gradient(whitesmoke,#f1f1f1);background:-o-linear-gradient(whitesmoke,#f1f1f1);background:linear-gradient(whitesmoke,#f1f1f1);-ms-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);-webkit-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);-o-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 2px rgba(0,0,0,0.05)}.uploadcare-dialog-button[disabled],.uploadcare-dialog-button.uploadcare-disabled-el{cursor:default;opacity:.6}.uploadcare-dialog-button:active,.uploadcare-dialog-button:hover{border-color:#cbcbcb}.uploadcare-dialog-button-success{display:inline-block;font-size:13px;line-height:31px;padding:0 22px;margin-right:.5em;border:solid 1px;border-radius:3px;cursor:pointer;color:white}.uploadcare-dialog-button-success,.uploadcare-dialog-button-success[disabled]:active,.uploadcare-dialog-button-success.uploadcare-disabled-el:active,.uploadcare-dialog-button-success[disabled]:hover,.uploadcare-dialog-button-success.uploadcare-disabled-el:hover{background:#3786eb;background:-webkit-linear-gradient(#3b8df7,#347fdf);background:-moz-linear-gradient(#3b8df7,#347fdf);background:-o-linear-gradient(#3b8df7,#347fdf);background:linear-gradient(#3b8df7,#347fdf);-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;-o-box-shadow:none;box-shadow:none;border-color:#266fcb}.uploadcare-dialog-button-success:hover{background:#3279d6;background:-webkit-linear-gradient(#3986ea,#2c6dc2);background:-moz-linear-gradient(#3986ea,#2c6dc2);background:-o-linear-gradient(#3986ea,#2c6dc2);background:linear-gradient(#3986ea,#2c6dc2);-ms-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);-webkit-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);-o-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05)}.uploadcare-dialog-button-success:active{background:#3177d3;background:-webkit-linear-gradient(#3680e1,#2c6fc5);background:-moz-linear-gradient(#3680e1,#2c6fc5);background:-o-linear-gradient(#3680e1,#2c6fc5);background:linear-gradient(#3680e1,#2c6fc5);-ms-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);-webkit-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);-o-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 2px rgba(0,0,0,0.05)}.uploadcare-dialog-button-success[disabled],.uploadcare-dialog-button-success.uploadcare-disabled-el{cursor:default;opacity:.6}.uploadcare-dialog-button-success:active,.uploadcare-dialog-button-success:hover{border-color:#266eca #1f62b7 #1753a1}.uploadcare-dialog-button-success:hover{-ms-box-shadow:inset 0 -1px 3px rgba(22,82,160,0.5);-moz-box-shadow:inset 0 -1px 3px rgba(22,82,160,0.5);-webkit-box-shadow:inset 0 -1px 3px rgba(22,82,160,0.5);-o-box-shadow:inset 0 -1px 3px rgba(22,82,160,0.5);box-shadow:inset 0 -1px 3px rgba(22,82,160,0.5)}.uploadcare-dialog-button-success:active{-ms-box-shadow:inset 0 1px 3px rgba(22,82,160,0.4);-moz-box-shadow:inset 0 1px 3px rgba(22,82,160,0.4);-webkit-box-shadow:inset 0 1px 3px rgba(22,82,160,0.4);-o-box-shadow:inset 0 1px 3px rgba(22,82,160,0.4);box-shadow:inset 0 1px 3px rgba(22,82,160,0.4)}.uploadcare-dialog-big-button{border-radius:100px;font-size:20px;font-weight:normal;letter-spacing:1px;color:white;line-height:64px;border:solid 1px #276fcb;text-shadow:0 -1px #2a7ce5;display:inline-block;padding:0 2em;cursor:pointer;-ms-box-shadow:inset 0 -2px #1f66c1;-moz-box-shadow:inset 0 -2px #1f66c1;-webkit-box-shadow:inset 0 -2px #1f66c1;-o-box-shadow:inset 0 -2px #1f66c1;box-shadow:inset 0 -2px #1f66c1;background:#458dee;background:-webkit-linear-gradient(#4892f6,#4289e6);background:-moz-linear-gradient(#4892f6,#4289e6);background:-o-linear-gradient(#4892f6,#4289e6);background:linear-gradient(#4892f6,#4289e6)}.uploadcare-dialog-big-button:hover{-ms-box-shadow:inset 0 -2px #1652a0;-moz-box-shadow:inset 0 -2px #1652a0;-webkit-box-shadow:inset 0 -2px #1652a0;-o-box-shadow:inset 0 -2px #1652a0;box-shadow:inset 0 -2px #1652a0;background:#3279d6;background:-webkit-linear-gradient(#3986eb,#2c6dc2);background:-moz-linear-gradient(#3986eb,#2c6dc2);background:-o-linear-gradient(#3986eb,#2c6dc2);background:linear-gradient(#3986eb,#2c6dc2)}.uploadcare-dialog-big-button:active{border:none;line-height:66px;-ms-box-shadow:inset 0 2px #2561b9;-moz-box-shadow:inset 0 2px #2561b9;-webkit-box-shadow:inset 0 2px #2561b9;-o-box-shadow:inset 0 2px #2561b9;box-shadow:inset 0 2px #2561b9;background:#2c6ec3;background:-webkit-linear-gradient(#2c6ec3,#2c6ec3);background:-moz-linear-gradient(#2c6ec3,#2c6ec3);background:-o-linear-gradient(#2c6ec3,#2c6ec3);background:linear-gradient(#2c6ec3,#2c6ec3)}.uploadcare-dialog-preview-image-wrap1{width:100%;height:452px;margin-bottom:25px;display:table}.uploadcare-dialog-preview-image-wrap2{display:table-cell;vertical-align:middle;text-align:center}.uploadcare-dialog-preview-image-wrap2 img{max-width:775px;max-height:452px;display:block;margin:0 auto}.uploadcare-dialog-preview-footer{background:#fff3be;border-top:1px solid #efe2a9;height:33px;padding:16px 30px;margin:0 -25px -22px;border-bottom-right-radius:8px}.uploadcare-dialog-preview-footer .uploadcare-dialog-button-success{float:right;margin-right:0}.uploadcare-dialog-preview-footer .uploadcare-dialog-button{float:left}.uploadcare-dialog-preview-center{text-align:center;padding-top:176px}.uploadcare-dialog-preview-circle{width:66px;height:66px;display:inline-block;margin-bottom:22px}.uploadcare-no-draganddrop .uploadcare-if-draganddrop{display:none}.uploadcare-draganddrop .uploadcare-if-no-draganddrop{display:none}.uploadcare-dialog-file-drop-area{width:100%;height:100%;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;background:#f8f8f8;border:dashed 3px #c5cacd;text-align:center;border-radius:3px;padding-top:70px}.uploadcare-dialog-file-drop-area .uploadcare-dialog-big-button{margin-top:11px;margin-bottom:55px}.uploadcare-no-draganddrop .uploadcare-dialog-file-drop-area{border:none;padding-top:73px;background:transparent}.uploadcare-dialog-file-title{font-size:40px;line-height:1;color:#dee0e1;font-weight:bold;margin-bottom:66px;text-shadow:0 1px white}.uploadcare-no-draganddrop .uploadcare-dialog-file-title{text-shadow:none;color:black;margin-top:66px}.uploadcare-dialog-file-or{font-size:13px;color:#8f9498;margin-bottom:44px}.uploadcare-dialog-file-sources{position:relative;display:inline-block}.uploadcare-dialog-file-sources:before{content:\'\';display:block;position:absolute;width:67px;height:44px;top:-32px;left:-90px}.uploadcare-dialog-file-source{display:inline;font-size:15px;margin-right:.2em;cursor:pointer;font-weight:300}.uploadcare-dialog-file-source:after{content:\'\\00B7\';color:#b7babc;margin-left:.5em}.uploadcare-dialog-file-source:last-child:after{display:none}.uploadcare-draging .uploadcare-dialog-file-or,.uploadcare-draging .uploadcare-dialog-file-sources,.uploadcare-draging .uploadcare-dialog-file-drop-area .uploadcare-dialog-big-button{display:none}.uploadcare-draging .uploadcare-dialog-file-drop-area{background:#f2f7fe;border-color:#438ae7;padding-top:264px}.uploadcare-draging .uploadcare-dialog-file-title{color:#438ae7}.uploadcare-crop-widget .jcrop-holder{direction:ltr;text-align:left}.uploadcare-crop-widget .jcrop-vline,.uploadcare-crop-widget .jcrop-hline{background-color:white;background-position:top left;background-repeat:repeat;font-size:0;position:absolute}.uploadcare-crop-widget .jcrop-vline{height:100%;width:1px!important}.uploadcare-crop-widget .jcrop-hline{height:1px!important;width:100%}.uploadcare-crop-widget .jcrop-vline.right{right:0}.uploadcare-crop-widget .jcrop-hline.bottom{bottom:0}.uploadcare-crop-widget .jcrop-handle{background-color:#333;border:1px #eee solid;font-size:1px}.uploadcare-crop-widget .jcrop-tracker{height:100%;width:100%;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none}.uploadcare-crop-widget .jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0}.uploadcare-crop-widget .jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px}.uploadcare-crop-widget .jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%}.uploadcare-crop-widget .jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%}.uploadcare-crop-widget .jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0}.uploadcare-crop-widget .jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0}.uploadcare-crop-widget .jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0}.uploadcare-crop-widget .jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px}.uploadcare-crop-widget .jcrop-dragbar.ord-n,.uploadcare-crop-widget .jcrop-dragbar.ord-s{height:7px;width:100%}.uploadcare-crop-widget .jcrop-dragbar.ord-e,.uploadcare-crop-widget .jcrop-dragbar.ord-w{height:100%;width:7px}.uploadcare-crop-widget .jcrop-dragbar.ord-n{margin-top:-4px}.uploadcare-crop-widget .jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px}.uploadcare-crop-widget .jcrop-dragbar.ord-e{margin-right:-4px;right:0}.uploadcare-crop-widget .jcrop-dragbar.ord-w{margin-left:-4px}.uploadcare-crop-widget .jcrop-light .jcrop-vline,.uploadcare-crop-widget .jcrop-light .jcrop-hline{background:#FFF;filter:Alpha(opacity=70)!important;opacity:.70!important}.uploadcare-crop-widget .jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#FFF;border-radius:3px}.uploadcare-crop-widget .jcrop-dark .jcrop-vline,.uploadcare-crop-widget .jcrop-dark .jcrop-hline{background:#000;filter:Alpha(opacity=70)!important;opacity:.7!important}.uploadcare-crop-widget .jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#FFF;border-color:#000;border-radius:3px}.uploadcare-crop-widget .jcrop-holder img,.uploadcare-crop-widget img.jcrop-preview{max-width:none}.uploadcare-crop-widget{font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif}.uploadcare-crop-widget__image-wrap{position:relative}.uploadcare-crop-widget--loading .uploadcare-crop-widget__image-wrap{background-repeat:no-repeat;background-position:center}.uploadcare-crop-widget__image-wrap img{display:block}.uploadcare-crop-widget__error{-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;text-align:center;position:absolute;top:50%;left:0;right:0;margin-top:-1em;display:none}.uploadcare-crop-widget--error .uploadcare-crop-widget__error{display:block}.uploadcare-crop-widget__error__title{font-size:20px}.uploadcare-crop-widget__error__text{font-size:15px}.uploadcare-crop-widget__controls{height:30px;padding-top:5px;text-align:center}.uploadcare-crop-widget--no-controls .uploadcare-crop-widget__controls{display:none}.uploadcare-widget{display:inline-block!important;position:relative;vertical-align:middle;padding:0 5px}.uploadcare-widget[data-status=loaded] .uploadcare-widget-buttons>li,.uploadcare-widget[data-status=started] .uploadcare-widget-buttons>li{display:none}.uploadcare-widget[data-status=started] .uploadcare-widget-buttons .uploadcare-widget-buttons-cancel,.uploadcare-widget[data-status=loaded] .uploadcare-widget-buttons .uploadcare-widget-buttons-remove{display:inline-block}.uploadcare-widget .uploadcare-widget-circle{width:25px;height:25px;top:-1px;float:left;margin-right:1ex}.uploadcare-widget-circle{position:relative;font-size:0}.uploadcare-widget-circle .uploadcare-widget-circle-back{position:relative;width:100%;height:100%;border-radius:50%;background:#e1e5e7}.uploadcare-widget-circle .uploadcare-widget-circle-back.uploadcare-widget-circle-active{background:#d0bf26}.uploadcare-widget-circle .uploadcare-widget-circle-center{position:absolute;background:white;width:10%;height:10%;top:50%;left:50%;border-radius:50%;margin-top:-5%;margin-left:-5%}.uploadcare-widget-buttons{position:relative;top:-1px;float:left;overflow:hidden;margin:0;padding:0;list-style:none}.uploadcare-widget-buttons>li{height:24px;float:left;font-size:11px;color:#8f9295;line-height:25px;min-width:36px;padding:0 6px;margin:0 3px 1px 0;list-style:none;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;border-radius:2px;background:#e1e5e7;cursor:default}.uploadcare-widget-buttons>li.uploadcare-widget-buttons-dialog,.uploadcare-widget-buttons>li.uploadcare-widget-buttons-file,.uploadcare-widget-buttons>li.uploadcare-widget-buttons-url{background-position:0 0;background-repeat:no-repeat;padding-left:30px}.uploadcare-widget-buttons>li.uploadcare-widget-buttons-dialog,.uploadcare-widget-buttons>li.uploadcare-widget-buttons-url{background-position:0 -24px}.uploadcare-widget-buttons>li.uploadcare-widget-buttons-cancel,.uploadcare-widget-buttons>li.uploadcare-widget-buttons-remove{font-size:.9em;display:none}.uploadcare-widget-status-text{float:left;overflow:hidden;line-height:25px;height:25px;margin-right:1ex;white-space:nowrap;padding:0 5px}.uploadcare-widget-file-name{cursor:pointer;color:#1a85ad;border-bottom-color:#1a85ad;text-decoration:none;border-bottom:1px dotted}.uploadcare-widget .uploadcare-widget-dragndrop-area{display:none;position:absolute;top:-8px;left:0;width:100%;height:41px;line-height:41px;text-align:center;background-color:#f0f0f0;color:#707478;border:1px dashed #b3b5b6;border-radius:20.5px}.uploadcare-widget .uploadcare-widget-dragndrop-area.uploadcare-dragging{display:block}\n');}return __p.join('');};
17950
+ this.JST["uploadcare/templates/source-tab-base"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('<div \n class="uploadcare-dialog-source-base-wrap" \n role="uploadcare-dialog-source-base-wrap"\n></div>\n\n<div class="uploadcare-dialog-inner-footer uploadcare-dialog-source-base-footer">\n <div \n class="uploadcare-dialog-button" \n role="uploadcare-dialog-source-base-show-files">',(''+ t('dialog.showFiles') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n <div\n class="uploadcare-dialog-button-success" \n role="uploadcare-dialog-source-base-done">',(''+ t('dialog.done') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n <div \n class="uploadcare-dialog-inner-footer-text"\n role="uploadcare-dialog-source-base-footer-text"\n ></div>\n</div>\n');}return __p.join('');};
17951
+ }).call(this);
17952
+ (function() {
17953
+ this.JST || (this.JST = {});
17954
+ this.JST["uploadcare/templates/styles"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('\n\n\n\n\n\n.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab:after{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAFeCAYAAADHfkwkAAAQGUlEQVR42uydbYxVRxnHuxdaa6q8pLwEQSi1CpLWT1qML9A2gDRVbKQNDfWDoU1s0bQ1RqOJrUqNDRQwvhCtxp6%2BKJMQarTQLmAbKtg2QutriESK1KTCCrvlZWnLsmzxP%2BzD3f%2FOM3P39sOZc8Xnwz8zZ87ce%2BZ3nnlm5p4zd%2Ba806dPnxMyEAMxEAMxEAMxkP9bkIceXUty5xWPDD6G2hCfhfTliP8e8Q6oB3EvH0eaWwHNQryt%2FjmEBRR8fyYQiApSg5agMHsQngbIaYSQo1DiIsm7BHlrHgJhHUqUD6ToB5kK7eBC4phhfKFDCE7fId9BNyYDSDG4OlyF8BAVkEINAThoIE55D%2BF4lnxnDhDHd2weLtojBVJVqCAgZY14tevBuU%2Bwz%2BSoWtNwoWO4qIJgmDiQS8JB3dA0aUhKBxkmPsFVRwFIWiMAnXfAZ4ZlsIhbIs5cd1o5VoVtHtCFlrml1OYXF2pDgfcQQOyu66qV9iMOWXt8n1SmRWZLYbiQEsabWk5Lg0A6%2F%2BwyLbJcmk4uRMLJNUi88BLqPMvLtMh27hN0vU%2F1EyJdzShd3ZBtZYJ00MVU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gVjLefDzyH0QHOia2JzmEgrBrSp0h9WAKhBfwkKpyzA1ik0YB%2FSrrDnWgZiIAZiIAZiIAZiIAZiIAZiIAby3%2FbOWKWBIIqiqARRhChaaKH4BVrYuHYWlnaKja1f4H%2BkFi3WyvyAnTExxNIfUIiFokGsRGGzEMG7cgM3%2BzbpMtNMcdnZcTPOmbdvHDLPNwEkgASQABJAAsgY5ChgIILuoKEnudrsHIVHbHa52RM5B2FKkbRo%2B01lAG2siu5FpoRxapFbk3pt9A6V6hv1bUC0Uc7UkYGouwZJrCWqIo52sQW2c21Noe6JzyeuQbTTFsgmR9KdqbWCbYpWvz3nICNyyRnIWIR6A8IQKD8gotEpDq31DAgGpUVruQZRB7di%2FQ%2Beucb1kiPeo1UOtS1u3b0T1AOI9Q%2B9nsdMqqcJwqAHDoCZ7fyAjD4IO87FaImqZVwfzesnQF58RJKtrtAPEtwvDcQDS5k6kGNqZ7XN2CcIYfbYkZpJpsd7gZuBfmUG8w8iUUBHvL9iHSVQFMtffH7RK0j%2F1dC8QbTQvYnVErGuTIiuGRznIPylkodxDkqgHrQO6WyVDzA44SDUfIPoEkU7e8HO3EAlsYyGy66i%2FMHPHudmQu8%2BQv3PXB0uXZoob0jqz0mU93F95SDUGQ%2Fv1yKyws37whb0JrPaM0NnP2V91oIWhljZvbNnEgidqZahs%2F%2FA%2F8G11wvKp1BJ2%2FI8%2FdozcmObYn0adZsA3mV6qgn%2BTNry7%2Bz9sPB5dWjxCVXO4S1I1g7bS1xbpMHXpcK%2FC%2BYVy9URwoLw8xVapOHaIhE6l9qQP3sqq10gqqpaTqEdH%2F8IE6GDTXTCfB0kkaTSYVvHchfPNzOI8AVdAAkgASSABJAAEkACSAAZq%2F4A0EvZstJINZUAAAAASUVORK5CYII%3D)}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab:hover:after{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAFeCAYAAADHfkwkAAAJFUlEQVR42uz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iHlf1o%2BLA9qHdTs0zqoGUQkCFHCQizEQizEQizEQizEQnT6AqfQwgd5BnPGAAAAAElFTkSuQmCC)}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-selected-tab:after{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAFeCAYAAADHfkwkAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADDJJREFUeNrtW21wVUcZJgnQYiuBCQUjISQtGmBK%2FKGWgJWPDqEwCEUpA94kMxrr2CLQatWpM7R%2B1LEFCp1anXJJRBmrP0roaEv5DISPto5A1XovIxIgqC2kBAoEKgkErs%2Feuyd3z549Hzfp2XNueZ%2BZZ%2FZk7%2B4573Ped9999wz06UMgEAgEAoHw0UZ8x7gccFJsx7jl4Ou4bkXbGU%2BxNZ7qW8HGsLFhFJALg2vBZlwnGGNCa1zHzddsbC2bGwoRMKwU3C8aG1cbbuoTBLK5pUF7YgrYpjLaTphKJNo2cFJQIqbz2E8b11hua7DkBUvo8bV0r%2B5wKoPR7U5Gu%2FXZeO4iu7cuT%2BSxuLYJkW7PZBha4nh27zwd3qiNuRtjEeVFmBGaGPsNHftEs0tatayJmEtIKdZOc8zPfQYPmGzzYEcBMacwtM9yk%2F0Ustz04HQoJNxScMwlMSja5X6uj3126VRe4DGX9OuU4Xi7108hrZns4Ly%2FCW1TzCn8mGeFF8HbVj%2BFdMYdUq3CI43C3Ma4e%2F0l9nX6uUY64x42N6E1C5F2fpeU7KuQ1rjHhS38rQytuFsmayxv9VPIvpjLZua00DPc6ff6KWSFU2zHHPYJL7WX1Lfc1w0x5lJi9NRjit993BAby3N4%2BeAlY3nZve3mNvt%2BcmQFXTwD41VnlJhDwRnTUTQaZTwedCDmJsCahezXiLlCPqiljOdeGc0OQfEMRcRcFn8sdbAarfuoO5NtWm7VrtdShm%2B2M4M6t88UPeN1n1Ds8MwTwYgQwyyWiuuefD0x1sToPmEADM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n7jMC8f%2FFfohAh%2FFxrpExziMvd%2BwfCP2d0zKCGVvK%2FRw9wB4DV54YdFyALe9weP8y%2Fw8QVhEzKF973uYW6%2BUSw63TMoIbfy9cFSbInL3G%2BqwjAUQnhfHe%2FfAfazmTcCfI%2BPqw6rkEKhkt0Dlgu%2F5YKzwf8aVS6YE0ohvP%2Bz4LtCej0OHgDbhD62yw%2F2es9AhPDfPgGuAdulze4%2F4KMOYRcuIcKYm8DPgFPBMjmUwiLEOFgN%2BpDuNyiog1UTf%2FBqti%2F08l75%2FD7sfk26hUzw6ePDxKA%2BB%2B35kD4H7QlEBIFAIBAIBALhxsL%2FAWFBQYLmSYGkAAAAAElFTkSuQmCC)}.uploadcare-widget-buttons>li.uploadcare-widget-buttons-dialog,.uploadcare-widget-buttons>li.uploadcare-widget-buttons-file,.uploadcare-widget-buttons>li.uploadcare-widget-buttons-url{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAB4CAYAAACaTFAUAAADn0lEQVR42u3bS2wNURjA8aLaEBp0IV5NPGJBkJBSEl1UtB5hQW0JXSIsxGMjFsRjQ9AHQtJiwUpUaVJExELi3US5JZ7FlajiJlQfPv%2FcfKQ5uVNuO2em9Cx%2BSe%2FMSe8%2FM3PnnGluU0SkR3FBLsgF7T9YXAn5S5VBBEkyY12QC3JB%2F0VQEiwFaUh3BBb0p3HJnjpbU4ap0s32LsgFuSAXpGzOZR0lNVb5GOT9RoOwGgdQih1Yin5BB6XjKFo0ZB4mYhrq0IhNQQVlIYKtxhumYYz%2BnAnBBfSxGZSOJ5AObxRFGcTDGZtBR7AX54yjUwnBZ4%2Bo%2Bb4H6QXcgiVGzEYIvkJwS8d9h6gHNoJWQ7DNCPqAcszFJFyDIAbpYKjfQbtRaMRkQTqI4DEELca%2BqX4HlWCCEVQD6URfiMq3cYSyjaAjEA95OmYsBDP8DloMQaYRFX9txLw1xrRjgN9BqfgIQUoCZyCqAinqOKps3Yc2QzyiaiGoR7VxdEbanDou41mCoHREjG2C7bbnsn44C8EIM0xtQzu2BLn8KMRdiGqGoBVVGBX4ekhlIhcLMB0DPMa5NbULckEuqLuT6xp8gSQphiILQRrTNZ9675%2BFTdU1V6XhXVTeRN8Lwg968bpBY3pGkBnigswQkwty15AL%2BqeDvnQjKGYjqAhNkCQ1ocitGF2QC3JB7rnMPZclqXcGmevnp89fyPmqS%2BEG1T6skyvXrsvNW7flZcMbYVu4QcT8fv2o%2Fkl8W3HZsZCC9DRpSBxHSveHGMRpi%2BN1%2FLQdO1HeM04ZP8e3VddcCf%2BiRvxosU0%2FaSEFmbiG3I2xS8KeXN1zmVsxuiAX1LuCuK9kIKeT%2FbOQEdR%2FTy3Ca7RibYL969GGV1ho80ExEychhhKkoj9KIYYKDPMtSGNWIArxcAqnIR6iKPQlSL%2BvuAVtEEM7ijFEleg2MbRhM%2Fr4ecoK0AhRd5CdYNxM3IOoRuRbuaj5xeNxAxuQ2um3sRijY8fpditBk1GL7UjrZFyajnmASbY%2BZcsRg6jHyEswbh4iEBXDMr8%2FZbvwA2L4gQoMVychHuN2%2BhlUgJcQD%2BUaJh6eo8DvUzYYxQmO1B7dl4F9CW4LhzHY5tSRi3o0YyVG4y7uIwurdF8Ec4OYywowEFOQg3cQ9R5zMEXH5AcRVIJqrMU3iKEZ63ARpUEtP5ajAeLhLVYEukDTi%2FgQ2hPNbaGtGHUxdh%2B1mN0jlrC%2F1kNuTR2En2aqi4BnOyDfAAAAAElFTkSuQmCC)}.uploadcare-crop-widget .jcrop-vline,.uploadcare-crop-widget .jcrop-hline{background-image:url(data:image/gif;base64,R0lGODlhCAAIAJEAAKqqqv%2F%2F%2FwAAAAAAACH%2FC05FVFNDQVBFMi4wAwEAAAAh%2BQQJCgAAACwAAAAACAAIAAACDZQFCadrzVRMB9FZ5SwAIfkECQoAAAAsAAAAAAgACAAAAg%2BELqCYaudeW9ChyOyltQAAIfkECQoAAAAsAAAAAAgACAAAAg8EhGKXm%2BrQYtC0WGl9oAAAIfkECQoAAAAsAAAAAAgACAAAAg%2BEhWKQernaYmjCWLF7qAAAIfkECQoAAAAsAAAAAAgACAAAAg2EISmna81UTAfRWeUsACH5BAkKAAAALAAAAAAIAAgAAAIPFA6imGrnXlvQocjspbUAACH5BAkKAAAALAAAAAAIAAgAAAIPlIBgl5vq0GLQtFhpfaIAACH5BAUKAAAALAAAAAAIAAgAAAIPlIFgknq52mJowlixe6gAADs%3D)}.uploadcare-dialog-file-sources:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEMAAAAsCAYAAAA%2BaAX8AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAArdJREFUeNrsml1ozWEcx387lolkMSNJLKNIIhQ3btwouXBDlJer09rF3LFdyZWLCbHMy4W3lPfXQl5rGyk1WkqE8hLJxbCZjW0%2Bj%2Bd32tNxzhnLyv%2F%2FO9%2F69JzzdLY63%2FN9nuf3PM%2B%2FYOee%2BjIReQcdkkVVlUmxoASshiewQozLmTEaJsEZuA0zrJvRA%2BvgPuyFWii2ZkYhjIFLcCToL4Ip8Al6LSWjBOrS%2Bjt1Hum1Nkzeww3J69cwOREkYCQ8hDnwOdcf7qrbF%2BkvnqlccMm4ELz%2FArdgq9XVJL3YqoZV4RIb9RT88TDJEJePfPn1utz%2BNiziXI0msvRf1dUkdnPFX5sR%2FPqNMN2KIYl%2BZttjcByGWplAcy0%2F9TSvYIuVOqM%2FbYD55pOh6Wilua77lRLTZgTzx0K4B2NNm6GG3KE5rTvc4abNUNXAU6gwbwbpcBu6tbAjn4y%2B%2BcOV6otg%2B0D%2BR2zMCAx5pFv9QzDErBmqdlimq0utlaIrl77CcphoPRkpfYeX%2BtrtZcotmxHK1SINsDRvhshB8TdzB2C2tTkjk%2B7CVPHXDQVarbZbTEZK38SfuLtz1OewxrIZKT3W%2BWMTnIVhls1waoZ5cHOQhmWkzHDqEn%2BF2QazoAmWWDUjVItWrO62%2FwqUWjbD6RzMhIviT9CcRlg1IzV0XDpeB4k5r7thc2akyyXlGhyGbXEpugaqDk3Kfuk7VlwJc3XP02IpGSl1i38awKlRi7fL8GCwd8f%2F%2BynVW9gs%2FpGqjfBB%2B116qv%2F1%2FicqR3Y9mpIufe%2FmlXHiT%2Bsbgs%2BVWjAjXU2alPLguGC8%2BKeO3sBJ8adwWZXp8rxQoq82bd2zaROgTJfnbu13r0%2BJv%2BJ4Bkc1TUUYMpnW3Ri2VlUmO%2BNgRrpeKOGRwgLxj1ZMgx%2Favxh2wygoxpjkTwEGAPykmqa52kHJAAAAAElFTkSuQmCC)}.uploadcare-crop-widget--loading .uploadcare-crop-widget__image-wrap{background-image:url(data:image/gif;base64,R0lGODlhGQAZAPQAAOzq7Ozu7OTm5Ly6vKSmpLS2tNTS1MzKzKyqrOTi5MTCxLSytNTW1Nze3PT29Ly%2BvKyurPz%2B%2FPz6%2FMzOzMTGxNza3PTy9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH%2FC05FVFNDQVBFMi4wAwEAAAAh%2BQQFCQAAACwAAAAAGQAZAEAFhCAgjqIkRRKgFEfjkOMZwXQNRKhs7yKe1ibULcdzpEw8QKIBkLySUBjSmKQ6aQ6c9powPAjgQUDqi5bKZTNJllafZ7JfNCsk0bcvE7tu26cGYAgIFU9AWjYBBwgETDBtUHQjj1E6Om5nJ0iXAHQnhW56lpc6k1CipTuiMahvnzR%2BQ1s0IQAh%2BQQFCQAAACwUAAQABQAIAAAFHaBTBQDAEIMDJARRlQexqAFCNOVDHKVBFKXEQBECACH5BAUJAAAALBQADQAFAAgAAAUcIAAIyiEaRCE%2BhBkgRAIcxOIIsAGggwM4hoAoBAAh%2BQQFCQAAACwNAAEACAAYAAAFJyAgAtBonmiqrmzrvnAsz6KQmMFBEIlgKDtEITAIQhgOwKNwaCRFIQAh%2BQQFCQABACwEAAEAFQAYAAAFTWAgjmRplWiqruNJIGwsr8Zs3y2u73zv25Te4Ic7BRo9oy1BCDCIDMGOgSBMlChYCVC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oEUYVnLBcWBQgNikgjALAVkVJLEksvDDYTn4KrPgBiNgpFR0nCZgZyNTjKjWUWJgV0PNIvIQAh%2BQQJCQAVACwAAAAAGQAZAAAFpGAljpXTHMVURZEkkTDpMAtBIFQlsewbj4GBDfEwCHQ7XsTxqxhuB8DP1YsBEg5DojlylXylAmHLhTlYIwaCcCyTkj4I4eCO8UQIRKBub1UID3wxOy8EBoIwSRUDbYgihI5lCo2OLoUMkY9oRJkrfjcWmVVyKpVoFWoEUoJnfhUWBQgNiIojALMSTGW5OrpvVU1wTa08vJZKYFPInsWCVC89ySQhACH5BAkJABUALAAAAAAZABkAAAWeYCWOldMcxVRFkSSRMOkwC0EgVCWx7BuPgYEN8TAIdDtexPGrGG4HwM%2FViwESDkOiOXKVfKUCYcuFOVgjBoJwLJOSLweEcHDHeJUGAhGw31sHBA9%2BMTsSYgaEMEkKA22KIoaQXDtMk0hwlzo9aJdwnZNVVZBJkaN%2BZy0jp3alXXFgTQ4vEpZvrIsstmZKLUwuSbi5PC%2B9sWVUxS3HIyEAIfkECQkAAAAsAAAAABkAGQAABYggII6A0xzFBESRJJEw6TALQSAUILHsG4%2BBgQ3xMAh0O17E8QMYbofAz9WLOSQOY3PkKvlE1S3MweKGxSNyC7xGw5K6sjvWg8%2FfrfNdlGx99yVygFNLg3xUbYNJdoo9goBVenN2i3tqX5JijEheaFc6THiJMUmhVkotTC59o6RKL6h%2Fmjuwfk0hACH5BAUJAAAALAAAAAAZABkAAAV2ICCOoiRFEhChKemS54qq8vyOTo06gKnzt1jk1ou1SI6UiThaJkmrIxO3akanrpztinXFetXuK%2FoVe1Fcs5WsRobbwQgQbjLCS9F326hXX9NmZXZmWkeAWGUlKU9TTxJza1JnckRaMo9FQjZEmik6kkw%2BnixEIQA7)}.uploadcare-dpm-file-remove{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABh0lEQVR42q2Vz26CQBDGSZO%2BV%2F33Oh699dA%2BSntpLxSMwqHoA5C96QGuQJREX4CD0P2ZrgF2IdFg8oV15ptvZ4Zh16qqSkNRFM9JkozCMHzdbDZfq9XqV8KX6w9s0vcCxxSrGdI0HW232x%2F5E7ZtC9d1xXK5BKyvNnxwJHfcKXi5XJ52u93ccRwCEOgFHLjEENsQLMvS2u%2F381pGfdAyJhYNtFSZE5xA7Q5M4tiUX%2F0HaFwFaa7sh6cIlBFFEQTheV6jfNa%2B74ssy%2BDAvdnRQMuSb2zWDsrzXMjdxOl0uokC1ufzGR8cbTO0LDkGb%2FShXhJZEKhE1%2Bs1UDaecBotQUNqvVtBEHy3etXOBlGgxFTWWm%2FRshjajrEgKyVUz7ZzrNBC0DM4aTgETRAbvi5BSv4csmTTS6mL8bzrpWhjQznH41EF9o0NXG1sjIMdx7E4HA5kYRpsfHCMg60%2BvekAn9506MPBeHwtHji%2BFsT2HbDjOw7YSTu%2B7wqYMQb%2FV0AAWGPD13UF%2FAEl4axZtqCy7wAAAABJRU5ErkJggg%3D%3D)}.uploadcare-dpm-file-error:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABIklEQVR42q3Vv2rCUBTHcaEQH825TdLl9hl0FsFdV7s5uXSpb%2BDoEziV6JCgATdR02D9E09%2FR64KF3NPbQx84BJOvgRyuSktK5VbHHiFDwhhCwl86Xu%2BnimZbsWeYQIkmMCLLfgELaA7tfSzRlCISVEz6AEV5J2DDszyBtNGg7L5%2FCSt123BGBwOKqA8WRzT%2BcqmU%2Bkt3zj4aQ0myTW4WEjBPgcj29B%2BNLoE98OhFIw4%2BGMb2vR6l%2BCm25WCWw6ubUPftRrR8XiSVKt%2FCgZADxKJH2XlurQbDBivxY8ibpu02SR98VrcNuLGXitFh%2FGYDkHAa2ljlznIfKCCfPNwaBeItfOOr84%2FYu%2Fm8WVy7zhgPfHE1hxQ0IcQdlqo76m8X8Avwkyxg4iIuCEAAAAASUVORK5CYII%3D)}.uploadcare-dpm-file-name:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAUCAMAAACzvE1FAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHhQTFRFAAAAnZ2dqKiooaGho6Ojq6uroaGhpqamsrKyzc3N0NDQ0dHRyMjIycnJysrKy8vLzMzMyMjIpaWlpqamr6%2BvsLCwsrKytra2vLy8wMDAwsLCw8PDxcXFyMjIycnJysrKy8vLzMzMzc3Nzs7Oz8%2FP0NDQ0dHR0tLSdHkMAgAAABJ0Uk5TAAFjbHaCi5ea6Ojo6%2Bvr6%2BzuM18ehwAAAJxJREFUGBkFwUFSAzEQBMGqltbLZQkI%2F%2F%2BXHK1pMgXAOwUFNgCv99dnKTYb4PXcBCpzNnA9a8EIhg374SrGtiGs73VdB6n%2BHXfe%2B86MkcyL%2BvsjLUFBujukgAzW7KFFrUrtBkssJ6BEA3NoQJlAdaDozDRMcYkUTldYKVLbskI6zRSJ4JC2itiiNrVH5FSYTmJnKMG2TlqQoSlt1z9lQV37unfRSAAAAABJRU5ErkJggg%3D%3D)}.uploadcare-dialog{font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(49,49,49,0.95);z-index:10000;overflow:auto}.uploadcare-dialog *{margin:0;padding:0}.uploadcare-dialog-inner-wrap1{display:table;width:100%;height:100%}.uploadcare-dialog-inner-wrap2{display:table-cell;vertical-align:middle}.uploadcare-dialog-close{position:absolute;top:4px;left:0;width:100%;min-width:988px}.uploadcare-dialog-close>div{margin:0;padding:0;border:none;background:none;width:33px;height:33px;line-height:33px;font-size:29.7px;font-weight:bold;color:#1d1d1d;cursor:pointer;position:absolute;right:0;top:0}.uploadcare-dialog-panel-wrap{margin:0 auto;width:900px;padding:0 44px}.uploadcare-dialog-panel{width:900px;height:616px;overflow:hidden;border-radius:8px;background:#fff;-ms-box-shadow:0 1px 2px rgba(0,0,0,0.35);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.35);-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.35);-o-box-shadow:0 1px 2px rgba(0,0,0,0.35);box-shadow:0 1px 2px rgba(0,0,0,0.35);font-weight:normal}.uploadcare-dialog-panel a{text-decoration:none;border-bottom:1px dotted}.uploadcare-dialog-panel a:link,.uploadcare-dialog-panel a:visited{color:#1a85ad;border-bottom-color:#1a85ad}.uploadcare-dialog-panel a:hover,.uploadcare-dialog-panel a:active{color:#252525;border-bottom-color:#252525}.uploadcare-dialog-body .uploadcare-dialog-tabs{-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;width:75px;height:616px;float:left;list-style:none;list-style-type:none;margin:0;padding:0;background:#dee0e1;border-bottom-left-radius:8px;border-top-left-radius:8px;overflow:hidden;position:relative}.uploadcare-dialog-body .uploadcare-dialog-tabs:before{content:\'\';display:block;position:absolute;top:0;right:0;bottom:0;width:0;border-left:1px solid #c5cace}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab{-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;width:75px;height:66px;border-bottom:1px solid #c5cace;border-right:1px solid #c5cace;cursor:pointer;position:relative}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab:after{content:\'\';display:block;position:absolute;width:50px;height:50px;top:50%;left:50%;margin-top:-25px;margin-left:-25px}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab:hover{background-color:#e5e7e8}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-selected-tab{margin-right:-1px;border-right:1px solid #efefef}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-selected-tab,.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-selected-tab:hover{background-color:#efefef}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-tab-preview:after{display:none}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-tab-file:after{background-position:0 -50px}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-tab-url:after{background-position:0 -100px}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-tab-facebook:after{background-position:0 -150px}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-tab-dropbox:after{background-position:0 -200px}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-tab-gdrive:after{background-position:0 -250px}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-tab-instagram:after{background-position:0 -300px}.uploadcare-dialog-body .uploadcare-dialog-tabs .uploadcare-dialog-tab.uploadcare-dialog-first-tab{border-top-left-radius:8px}.uploadcare-dialog-body .uploadcare-dialog-tabs-panel{position:relative;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;margin-left:75px;padding:22px 25px;width:825px;height:616px;line-height:22px;background:#efefef;border-bottom-right-radius:8px;border-top-right-radius:8px;font-size:16px;color:black}.uploadcare-dialog-body .uploadcare-dialog-tabs-panel input{-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;width:100%;height:44px;margin-bottom:22px;padding:11px 12.5px;font-family:inherit;font-size:16px;border:1px solid #c5cace;background:white;color:black}.uploadcare-dialog-body .uploadcare-dialog-tabs-panel .uploadcare-dialog-drop-file{background:white;border:1px dashed #c5cace;border-radius:3px;height:99px;padding-top:77px;text-align:center;color:#545454}.uploadcare-dialog-body .uploadcare-pre{white-space:pre;font-family:monospace;margin:22px auto;padding:22px 25px;background-color:white;border:1px solid #c5cace;border-radius:3px;text-align:left;font-size:15px;line-height:22px}.uploadcare-dialog-footer{font-size:13px;text-align:center;color:#888;margin-top:15px}.uploadcare-dialog-footer a{color:#c2c2c2;text-decoration:none}.uploadcare-dialog-footer a:hover{text-decoration:underline}.uploadcare-dialog-title{font-size:25px;line-height:1;font-weight:bolder;margin-bottom:25px}.uploadcare-dialog-title2{font-size:20px;line-height:1;padding-bottom:11px}.uploadcare-dialog-label{font-size:15px;line-height:25px;margin-bottom:12.5px}.uploadcare-dialog-large-text{font-size:18px;line-height:25px}.uploadcare-dialog-section{margin-bottom:22px}.uploadcare-dialog-normal-text{font-size:13px;color:#545454}.uploadcare-dialog-button{display:inline-block;font-size:13px;line-height:31px;padding:0 22px;margin-right:.5em;border:solid 1px;border-radius:3px;cursor:pointer;color:#444}.uploadcare-dialog-button,.uploadcare-dialog-button[disabled]:active,.uploadcare-dialog-button.uploadcare-disabled-el:active,.uploadcare-dialog-button[disabled]:hover,.uploadcare-dialog-button.uploadcare-disabled-el:hover{background:#f3f3f3;background:-webkit-linear-gradient(whitesmoke,#f1f1f1);background:-moz-linear-gradient(whitesmoke,#f1f1f1);background:-o-linear-gradient(whitesmoke,#f1f1f1);background:linear-gradient(whitesmoke,#f1f1f1);-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;-o-box-shadow:none;box-shadow:none;border-color:gainsboro}.uploadcare-dialog-button:hover{background:#f8f8f8;background:-webkit-linear-gradient(#fbfbfb,#f6f6f6);background:-moz-linear-gradient(#fbfbfb,#f6f6f6);background:-o-linear-gradient(#fbfbfb,#f6f6f6);background:linear-gradient(#fbfbfb,#f6f6f6);-ms-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);-webkit-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);-o-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05)}.uploadcare-dialog-button:active{background:#f3f3f3;background:-webkit-linear-gradient(whitesmoke,#f1f1f1);background:-moz-linear-gradient(whitesmoke,#f1f1f1);background:-o-linear-gradient(whitesmoke,#f1f1f1);background:linear-gradient(whitesmoke,#f1f1f1);-ms-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);-webkit-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);-o-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 2px rgba(0,0,0,0.05)}.uploadcare-dialog-button[disabled],.uploadcare-dialog-button.uploadcare-disabled-el{cursor:default;opacity:.6}.uploadcare-dialog-button:active,.uploadcare-dialog-button:hover{border-color:#cbcbcb}.uploadcare-dialog-button-success{display:inline-block;font-size:13px;line-height:31px;padding:0 22px;margin-right:.5em;border:solid 1px;border-radius:3px;cursor:pointer;color:white}.uploadcare-dialog-button-success,.uploadcare-dialog-button-success[disabled]:active,.uploadcare-dialog-button-success.uploadcare-disabled-el:active,.uploadcare-dialog-button-success[disabled]:hover,.uploadcare-dialog-button-success.uploadcare-disabled-el:hover{background:#3786eb;background:-webkit-linear-gradient(#3b8df7,#347fdf);background:-moz-linear-gradient(#3b8df7,#347fdf);background:-o-linear-gradient(#3b8df7,#347fdf);background:linear-gradient(#3b8df7,#347fdf);-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;-o-box-shadow:none;box-shadow:none;border-color:#266fcb}.uploadcare-dialog-button-success:hover{background:#3279d6;background:-webkit-linear-gradient(#3986ea,#2c6dc2);background:-moz-linear-gradient(#3986ea,#2c6dc2);background:-o-linear-gradient(#3986ea,#2c6dc2);background:linear-gradient(#3986ea,#2c6dc2);-ms-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);-webkit-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);-o-box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05);box-shadow:inset 0 -1px 3px rgba(0,0,0,0.05)}.uploadcare-dialog-button-success:active{background:#3177d3;background:-webkit-linear-gradient(#3680e1,#2c6fc5);background:-moz-linear-gradient(#3680e1,#2c6fc5);background:-o-linear-gradient(#3680e1,#2c6fc5);background:linear-gradient(#3680e1,#2c6fc5);-ms-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);-webkit-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);-o-box-shadow:inset 0 2px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 2px rgba(0,0,0,0.05)}.uploadcare-dialog-button-success[disabled],.uploadcare-dialog-button-success.uploadcare-disabled-el{cursor:default;opacity:.6}.uploadcare-dialog-button-success:active,.uploadcare-dialog-button-success:hover{border-color:#266eca #1f62b7 #1753a1}.uploadcare-dialog-button-success:hover{-ms-box-shadow:inset 0 -1px 3px rgba(22,82,160,0.5);-moz-box-shadow:inset 0 -1px 3px rgba(22,82,160,0.5);-webkit-box-shadow:inset 0 -1px 3px rgba(22,82,160,0.5);-o-box-shadow:inset 0 -1px 3px rgba(22,82,160,0.5);box-shadow:inset 0 -1px 3px rgba(22,82,160,0.5)}.uploadcare-dialog-button-success:active{-ms-box-shadow:inset 0 1px 3px rgba(22,82,160,0.4);-moz-box-shadow:inset 0 1px 3px rgba(22,82,160,0.4);-webkit-box-shadow:inset 0 1px 3px rgba(22,82,160,0.4);-o-box-shadow:inset 0 1px 3px rgba(22,82,160,0.4);box-shadow:inset 0 1px 3px rgba(22,82,160,0.4)}.uploadcare-dialog-big-button{border-radius:100px;font-size:20px;font-weight:normal;letter-spacing:1px;color:white;line-height:64px;border:solid 1px #276fcb;text-shadow:0 -1px #2a7ce5;display:inline-block;padding:0 2em;cursor:pointer;-ms-box-shadow:inset 0 -2px #1f66c1;-moz-box-shadow:inset 0 -2px #1f66c1;-webkit-box-shadow:inset 0 -2px #1f66c1;-o-box-shadow:inset 0 -2px #1f66c1;box-shadow:inset 0 -2px #1f66c1;background:#458dee;background:-webkit-linear-gradient(#4892f6,#4289e6);background:-moz-linear-gradient(#4892f6,#4289e6);background:-o-linear-gradient(#4892f6,#4289e6);background:linear-gradient(#4892f6,#4289e6)}.uploadcare-dialog-big-button:hover{-ms-box-shadow:inset 0 -2px #1652a0;-moz-box-shadow:inset 0 -2px #1652a0;-webkit-box-shadow:inset 0 -2px #1652a0;-o-box-shadow:inset 0 -2px #1652a0;box-shadow:inset 0 -2px #1652a0;background:#3279d6;background:-webkit-linear-gradient(#3986eb,#2c6dc2);background:-moz-linear-gradient(#3986eb,#2c6dc2);background:-o-linear-gradient(#3986eb,#2c6dc2);background:linear-gradient(#3986eb,#2c6dc2)}.uploadcare-dialog-big-button:active{border:none;line-height:66px;-ms-box-shadow:inset 0 2px #2561b9;-moz-box-shadow:inset 0 2px #2561b9;-webkit-box-shadow:inset 0 2px #2561b9;-o-box-shadow:inset 0 2px #2561b9;box-shadow:inset 0 2px #2561b9;background:#2c6ec3;background:-webkit-linear-gradient(#2c6ec3,#2c6ec3);background:-moz-linear-gradient(#2c6ec3,#2c6ec3);background:-o-linear-gradient(#2c6ec3,#2c6ec3);background:linear-gradient(#2c6ec3,#2c6ec3)}.uploadcare-dialog-preview-image-wrap1{width:100%;height:456px;margin-bottom:22px;display:table}.uploadcare-dialog-preview-image-wrap2{display:table-cell;vertical-align:middle;text-align:center}.uploadcare-dialog-preview-image-wrap2 img{max-width:775px;max-height:456px;display:block;margin:0 auto}.uploadcare-dialog-inner-footer{background:#fff3be;border-top:1px solid #efe2a9;height:33px;padding:16px 30px;margin:0 -25px -22px;border-bottom-right-radius:8px}.uploadcare-dialog-inner-footer .uploadcare-dialog-button-success{float:right}.uploadcare-dialog-inner-footer .uploadcare-dialog-button{float:left}.uploadcare-dialog-inner-footer .uploadcare-dialog-button-success,.uploadcare-dialog-inner-footer .uploadcare-dialog-button{width:112.5px;padding:0;text-align:center;margin-right:0}.uploadcare-dialog-inner-footer-text{text-align:center;color:#85732c;font-size:15px;line-height:33px}.uploadcare-dialog-inner-footer-text.uploadcare-error{color:red}.uploadcare-dialog-message-center,.uploadcare-dialog-preview-center{text-align:center;padding-top:176px}.uploadcare-dialog-message-center .uploadcare-pre,.uploadcare-dialog-preview-center .uploadcare-pre{width:400px}.uploadcare-dialog-preview-circle{width:66px;height:66px;display:inline-block;margin-bottom:22px}.uploadcare-no-draganddrop .uploadcare-if-draganddrop{display:none}.uploadcare-draganddrop .uploadcare-if-no-draganddrop{display:none}.uploadcare-dialog-file-drop-area{width:100%;height:100%;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;background:#f8f8f8;border:dashed 3px #c5cacd;text-align:center;border-radius:3px;padding-top:70px}.uploadcare-dialog-file-drop-area .uploadcare-dialog-big-button{margin-top:11px;margin-bottom:55px}.uploadcare-no-draganddrop .uploadcare-dialog-file-drop-area{border:none;padding-top:73px;background:transparent}.uploadcare-dialog-file-title{font-size:40px;line-height:1;color:#dee0e1;font-weight:bold;margin-bottom:66px;text-shadow:0 1px white}.uploadcare-no-draganddrop .uploadcare-dialog-file-title{text-shadow:none;color:black;margin-top:66px}.uploadcare-dialog-file-or{font-size:13px;color:#8f9498;margin-bottom:44px}.uploadcare-dialog-file-sources{position:relative;display:inline-block}.uploadcare-dialog-file-sources:before{content:\'\';display:block;position:absolute;width:67px;height:44px;top:-32px;left:-90px}.uploadcare-dialog-file-source{display:inline;font-size:15px;margin-right:.2em;cursor:pointer;font-weight:300}.uploadcare-dialog-file-source:after{content:\'\\00B7\';color:#b7babc;margin-left:.5em}.uploadcare-dialog-file-source:last-child:after{display:none}.uploadcare-draging .uploadcare-dialog-file-or,.uploadcare-draging .uploadcare-dialog-file-sources,.uploadcare-draging .uploadcare-dialog-file-drop-area .uploadcare-dialog-big-button{display:none}.uploadcare-draging .uploadcare-dialog-file-drop-area{background:#f2f7fe;border-color:#438ae7;padding-top:264px}.uploadcare-draging .uploadcare-dialog-file-title{color:#438ae7}.uploadcare-dpm-file-list{height:478px;overflow:auto;margin:0 -25px;padding:0 25px}.uploadcare-dpm-file-item{border-top:1px solid #e3e3e3;padding:10px 0;font-size:13px;line-height:1;word-wrap:break-word}.uploadcare-dpm-file-item:last-child{border-bottom:1px solid #e3e3e3}.uploadcare-dpm-file-item:hover{background:#ececec}.uploadcare-dpm-file-item:hover .uploadcare-dpm-file-remove{display:inline-block}.uploadcare-dpm-file-item.uploadcare-dpm-image .uploadcare-dpm-file-preview-wrap{display:inline-block}.uploadcare-dpm-file-item.uploadcare-dpm-image .uploadcare-dpm-file-name{width:60%}.uploadcare-dpm-file-item.uploadcare-dpm-image .uploadcare-dpm-file-name:before{display:none}.uploadcare-dpm-file-item.uploadcare-dpm-uploaded .uploadcare-dpm-file-progressbar-value{background:#8ac54c}.uploadcare-dpm-file-item.uploadcare-dpm-error .uploadcare-dpm-file-error{display:inline-block}.uploadcare-dpm-file-item.uploadcare-dpm-error .uploadcare-dpm-file-size,.uploadcare-dpm-file-item.uploadcare-dpm-error .uploadcare-dpm-file-progressbar-wrap{display:none}.uploadcare-dpm-file-preview-wrap,.uploadcare-dpm-file-name,.uploadcare-dpm-file-size,.uploadcare-dpm-file-progressbar-wrap,.uploadcare-dpm-file-error,.uploadcare-dpm-file-remove-wrap{vertical-align:middle;display:inline-block;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;padding:0 10px}.uploadcare-dpm-file-preview-wrap{text-align:center;width:8%;display:none;padding:0;line-height:0}.uploadcare-dpm-file-preview-wrap2{display:inline-block;width:45px;height:45px}.uploadcare-dpm-file-name,.uploadcare-dpm-file-size,.uploadcare-dpm-file-error{padding-top:4px;padding-bottom:4px}.uploadcare-dpm-file-name:before,.uploadcare-dpm-file-error:before{content:\'\';display:inline-block;width:20px;height:20px;margin:-3.5px .7em -3.5px 0}.uploadcare-dpm-file-name{width:68%}.uploadcare-dpm-file-name:before{width:16px}.uploadcare-dpm-file-size{width:10%;padding-right:0;text-align:left}.uploadcare-dpm-file-progressbar-wrap{width:14%}.uploadcare-dpm-file-progressbar{width:80px;height:8px;background:#e0e0e0;border-radius:100px}.uploadcare-dpm-file-progressbar-value{height:100%;background:#d6b849;border-radius:100px}.uploadcare-dpm-file-error{width:24%;display:none;color:#f5444b}.uploadcare-dpm-file-remove-wrap{padding:0;padding-right:10px;width:8%;text-align:right;line-height:0}.uploadcare-dpm-file-remove{display:none;width:20px;height:20px;cursor:pointer}.uploadcare-dialog-source-base-wrap{height:616px;margin:-22px -25px;padding:22px 25px;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box}.uploadcare-dialog-source-base-wrap.uploadcare-dialog-remote-iframe-wrap{padding:0}.uploadcare-dialog-source-base-wrap.uploadcare-dialog-remote-iframe-wrap iframe{border-top-right-radius:8px;border-bottom-right-radius:8px}.uploadcare-dialog-multiple .uploadcare-dialog-source-base-wrap.uploadcare-dialog-remote-iframe-wrap iframe{border-bottom-right-radius:0}.uploadcare-dialog-multiple .uploadcare-dialog-source-base-wrap{height:550px;margin:-22px -25px 0}.uploadcare-dialog-source-base-footer{display:none}.uploadcare-dialog-multiple .uploadcare-dialog-source-base-footer{display:block}.uploadcare-crop-widget .jcrop-holder{direction:ltr;text-align:left}.uploadcare-crop-widget .jcrop-vline,.uploadcare-crop-widget .jcrop-hline{background-color:white;background-position:top left;background-repeat:repeat;font-size:0;position:absolute}.uploadcare-crop-widget .jcrop-vline{height:100%;width:1px!important}.uploadcare-crop-widget .jcrop-hline{height:1px!important;width:100%}.uploadcare-crop-widget .jcrop-vline.right{right:0}.uploadcare-crop-widget .jcrop-hline.bottom{bottom:0}.uploadcare-crop-widget .jcrop-handle{background-color:#333;border:1px #eee solid;font-size:1px}.uploadcare-crop-widget .jcrop-tracker{height:100%;width:100%;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none}.uploadcare-crop-widget .jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0}.uploadcare-crop-widget .jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px}.uploadcare-crop-widget .jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%}.uploadcare-crop-widget .jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%}.uploadcare-crop-widget .jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0}.uploadcare-crop-widget .jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0}.uploadcare-crop-widget .jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0}.uploadcare-crop-widget .jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px}.uploadcare-crop-widget .jcrop-dragbar.ord-n,.uploadcare-crop-widget .jcrop-dragbar.ord-s{height:7px;width:100%}.uploadcare-crop-widget .jcrop-dragbar.ord-e,.uploadcare-crop-widget .jcrop-dragbar.ord-w{height:100%;width:7px}.uploadcare-crop-widget .jcrop-dragbar.ord-n{margin-top:-4px}.uploadcare-crop-widget .jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px}.uploadcare-crop-widget .jcrop-dragbar.ord-e{margin-right:-4px;right:0}.uploadcare-crop-widget .jcrop-dragbar.ord-w{margin-left:-4px}.uploadcare-crop-widget .jcrop-light .jcrop-vline,.uploadcare-crop-widget .jcrop-light .jcrop-hline{background:#FFF;filter:Alpha(opacity=70)!important;opacity:.70!important}.uploadcare-crop-widget .jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#FFF;border-radius:3px}.uploadcare-crop-widget .jcrop-dark .jcrop-vline,.uploadcare-crop-widget .jcrop-dark .jcrop-hline{background:#000;filter:Alpha(opacity=70)!important;opacity:.7!important}.uploadcare-crop-widget .jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#FFF;border-color:#000;border-radius:3px}.uploadcare-crop-widget .jcrop-holder img,.uploadcare-crop-widget img.jcrop-preview{max-width:none}.uploadcare-crop-widget{font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif}.uploadcare-crop-widget__image-wrap{position:relative}.uploadcare-crop-widget--loading .uploadcare-crop-widget__image-wrap{background-repeat:no-repeat;background-position:center}.uploadcare-crop-widget__image-wrap img{display:block}.uploadcare-crop-widget__error{-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;text-align:center;position:absolute;top:50%;left:0;right:0;margin-top:-1em;display:none}.uploadcare-crop-widget--error .uploadcare-crop-widget__error{display:block}.uploadcare-crop-widget__error__title{font-size:20px}.uploadcare-crop-widget__error__text{font-size:15px}.uploadcare-crop-widget__controls{height:30px;padding-top:5px;text-align:center}.uploadcare-crop-widget--no-controls .uploadcare-crop-widget__controls{display:none}.uploadcare-widget{display:inline-block!important;position:relative;vertical-align:middle;padding:0 5px}.uploadcare-widget[data-status=loaded] .uploadcare-widget-buttons>li,.uploadcare-widget[data-status=started] .uploadcare-widget-buttons>li{display:none}.uploadcare-widget[data-status=started] .uploadcare-widget-buttons .uploadcare-widget-buttons-cancel,.uploadcare-widget[data-status=loaded] .uploadcare-widget-buttons .uploadcare-widget-buttons-remove{display:inline-block}.uploadcare-widget .uploadcare-widget-circle{width:25px;height:25px;top:-1px;float:left;margin-right:1ex}.uploadcare-widget-circle{position:relative;font-size:0}.uploadcare-widget-circle .uploadcare-widget-circle-back{position:relative;width:100%;height:100%;border-radius:50%}.uploadcare-widget-circle .uploadcare-widget-circle-center{position:absolute;width:10%;height:10%;top:50%;left:50%;border-radius:50%;margin-top:-5%;margin-left:-5%}.uploadcare-widget-buttons{position:relative;top:-1px;float:left;overflow:hidden;margin:0;padding:0;list-style:none}.uploadcare-widget-buttons>li{height:24px;float:left;font-size:11px;color:#8f9295;line-height:25px;min-width:36px;padding:0 6px;margin:0 3px 1px 0;list-style:none;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;border-radius:2px;background:#e1e5e7;cursor:default}.uploadcare-widget-buttons>li.uploadcare-widget-buttons-dialog,.uploadcare-widget-buttons>li.uploadcare-widget-buttons-file,.uploadcare-widget-buttons>li.uploadcare-widget-buttons-url{background-position:0 0;background-repeat:no-repeat;padding-left:30px}.uploadcare-widget-buttons>li.uploadcare-widget-buttons-dialog,.uploadcare-widget-buttons>li.uploadcare-widget-buttons-url{background-position:0 -24px}.uploadcare-widget-buttons>li.uploadcare-widget-buttons-cancel,.uploadcare-widget-buttons>li.uploadcare-widget-buttons-remove{font-size:.9em;display:none}.uploadcare-widget-status-text{float:left;overflow:hidden;line-height:25px;height:25px;margin-right:1ex;white-space:nowrap;padding:0 5px}.uploadcare-widget-file-name{cursor:pointer;color:#1a85ad;border-bottom-color:#1a85ad;text-decoration:none;border-bottom:1px dotted}.uploadcare-widget .uploadcare-widget-dragndrop-area{display:none;position:absolute;top:-8px;left:0;width:100%;height:41px;line-height:41px;text-align:center;background-color:#f0f0f0;color:#707478;border:1px dashed #b3b5b6;border-radius:20.5px}.uploadcare-widget .uploadcare-widget-dragndrop-area.uploadcare-dragging{display:block}\n');}return __p.join('');};
17667
17955
  }).call(this);
17668
17956
  (function() {
17669
17957
  this.JST || (this.JST = {});
@@ -17675,7 +17963,8 @@ var _require = (function() {
17675
17963
  this.JST || (this.JST = {});
17676
17964
  this.JST["uploadcare/templates/tab-preview-error"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('<div class="uploadcare-dialog-title">',(''+
17677
17965
  t('dialog.tabs.preview.error.'+error+'.title') || t('dialog.tabs.preview.error.default.title')
17678
- ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n\n<div class="uploadcare-dialog-label">\n ',(''+ (file.name || t('dialog.tabs.preview.unknownName')) ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),''); if (file.size != null) { ; __p.push(',\n ',(''+ Math.round(file.size/1000) ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),' KB'); } ; __p.push('\n</div>\n\n<div class="uploadcare-dialog-section uploadcare-dialog-normal-text">\n ',(''+
17966
+ ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n\n<div class="uploadcare-dialog-label">\n ',(''+ (file.name || t('dialog.tabs.preview.unknownName')) ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'',(''+
17967
+ utils.readableFileSize(file.size, '', ', ') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'\n</div>\n\n<div class="uploadcare-dialog-section uploadcare-dialog-normal-text">\n ',(''+
17679
17968
  t('dialog.tabs.preview.error.'+error+'.line1') || t('dialog.tabs.preview.error.default.line1')
17680
17969
  ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'<br/>\n ',(''+
17681
17970
  t('dialog.tabs.preview.error.'+error+'.line2') || t('dialog.tabs.preview.error.default.line2')
@@ -17683,24 +17972,34 @@ var _require = (function() {
17683
17972
  }).call(this);
17684
17973
  (function() {
17685
17974
  this.JST || (this.JST = {});
17686
- this.JST["uploadcare/templates/tab-preview-image"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('<div class="uploadcare-dialog-title">',(''+ t('dialog.tabs.preview.image.title') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n\n<div class="uploadcare-dialog-preview-image-wrap1">\n<div class="uploadcare-dialog-preview-image-wrap2">\n <img \n src="',(''+ file.previewUrl ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'" \n title="',(''+ (file.name || t('dialog.tabs.preview.unknownName')) ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'" \n alt="',(''+ (file.name || t('dialog.tabs.preview.unknownName')) ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'"\n role="uploadcare-dialog-preview-image"\n />\n</div>\n</div>\n\n<div class="uploadcare-dialog-preview-footer">\n <div \n class="uploadcare-dialog-button" \n role="uploadcare-dialog-preview-back">',(''+ t('dialog.tabs.preview.image.change') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n <div \n class="uploadcare-dialog-button-success" \n role="uploadcare-dialog-preview-done">',(''+ t('dialog.tabs.preview.done') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n</div>\n');}return __p.join('');};
17975
+ this.JST["uploadcare/templates/tab-preview-image"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('<div class="uploadcare-dialog-title">',(''+ t('dialog.tabs.preview.image.title') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n\n<div class="uploadcare-dialog-preview-image-wrap1">\n<div class="uploadcare-dialog-preview-image-wrap2">\n <img \n src="',(''+ file.previewUrl ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'" \n title="',(''+ (file.name || t('dialog.tabs.preview.unknownName')) ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'" \n alt="',(''+ (file.name || t('dialog.tabs.preview.unknownName')) ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'"\n role="uploadcare-dialog-preview-image"\n />\n</div>\n</div>\n\n<div class="uploadcare-dialog-inner-footer">\n <div \n class="uploadcare-dialog-button" \n role="uploadcare-dialog-preview-back">',(''+ t('dialog.tabs.preview.image.change') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n <div \n class="uploadcare-dialog-button-success" \n role="uploadcare-dialog-preview-done">',(''+ t('dialog.tabs.preview.done') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n</div>\n');}return __p.join('');};
17976
+ }).call(this);
17977
+ (function() {
17978
+ this.JST || (this.JST = {});
17979
+ this.JST["uploadcare/templates/tab-preview-multiple-file"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('<div role="uploadcare-dpm-file-item" class="uploadcare-dpm-file-item">\n <div class="uploadcare-dpm-file-preview-wrap">\n <div class="uploadcare-dpm-file-preview-wrap2" role="uploadcare-dpm-file-preview-wrap"></div>\n </div><!--\n --><div role="uploadcare-dpm-file-name" class="uploadcare-dpm-file-name">\n ',(''+ t('dialog.tabs.preview.unknownName') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'\n </div><!--\n --><div role="uploadcare-dpm-file-size" class="uploadcare-dpm-file-size"></div><!--\n --><div class="uploadcare-dpm-file-progressbar-wrap">\n <div class="uploadcare-dpm-file-progressbar">\n <div \n role="uploadcare-dpm-file-progressbar-value"\n class="uploadcare-dpm-file-progressbar-value"\n ></div>\n </div>\n </div><!--\n --><div role="uploadcare-dpm-file-error" class="uploadcare-dpm-file-error"></div><!--\n --><div class="uploadcare-dpm-file-remove-wrap">\n <div role="uploadcare-dpm-file-remove" class="uploadcare-dpm-file-remove"></div>\n </div>\n</div>\n');}return __p.join('');};
17687
17980
  }).call(this);
17688
17981
  (function() {
17689
17982
  this.JST || (this.JST = {});
17690
- this.JST["uploadcare/templates/tab-preview-regular"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('<div class="uploadcare-dialog-title">',(''+ t('dialog.tabs.preview.regular.title') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n\n<div class="uploadcare-dialog-label">\n ',(''+ (file.name || t('dialog.tabs.preview.unknownName')) ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),''); if (file.size != null) { ; __p.push(',\n ',(''+ Math.round(file.size/1000) ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),' KB'); } ; __p.push('\n</div>\n\n<div class="uploadcare-dialog-section uploadcare-dialog-normal-text">\n ',(''+ t('dialog.tabs.preview.regular.line1') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'<br/>\n ',(''+ t('dialog.tabs.preview.regular.line2') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'\n</div>\n\n<div \n class="uploadcare-dialog-button-success" \n role="uploadcare-dialog-preview-done">',(''+ t('dialog.tabs.preview.done') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n<div \n class="uploadcare-dialog-button" \n role="uploadcare-dialog-preview-back">',(''+ t('dialog.tabs.preview.change') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n');}return __p.join('');};
17983
+ this.JST["uploadcare/templates/tab-preview-multiple"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('<div class="uploadcare-dialog-title">\n ',(''+ t('dialog.tabs.preview.multiple.title') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'\n <span role="uploadcare-dpm-files-count"></span>\n</div>\n\n<div role="uploadcare-dpm-file-list" class="uploadcare-dpm-file-list"></div>\n\n<div class="uploadcare-dialog-inner-footer">\n <div \n class="uploadcare-dialog-button" \n role="uploadcare-dialog-preview-back">',(''+ t('dialog.tabs.preview.multiple.clear') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n <div \n class="uploadcare-dialog-button-success" \n role="uploadcare-dialog-preview-done">',(''+ t('dialog.tabs.preview.multiple.done') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n <div class="uploadcare-dialog-inner-footer-text" role="uploadcare-dpm-footer-text"></div>\n</div>\n');}return __p.join('');};
17691
17984
  }).call(this);
17692
17985
  (function() {
17693
17986
  this.JST || (this.JST = {});
17694
- this.JST["uploadcare/templates/tab-preview-unknown"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('<div class="uploadcare-dialog-preview-center">\n \n <div \n class="uploadcare-dialog-preview-circle"\n role="uploadcare-dialog-preview-circle"></div>\n <div class="uploadcare-dialog-title2">',(''+ t('dialog.tabs.preview.unknown.title') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n <div class="uploadcare-dialog-label">\n ',(''+ (file.name || t('dialog.tabs.preview.unknownName')) ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),''); if (file.size != null) { ; __p.push(',\n ',(''+ Math.round(file.size/1000) ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),' KB'); } ; __p.push('\n </div>\n <div \n class="uploadcare-dialog-button-success" \n role="uploadcare-dialog-preview-done">',(''+ t('dialog.tabs.preview.unknown.done') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n</div>\n');}return __p.join('');};
17987
+ this.JST["uploadcare/templates/tab-preview-regular"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('<div class="uploadcare-dialog-title">',(''+ t('dialog.tabs.preview.regular.title') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n\n<div class="uploadcare-dialog-label">\n ',(''+ (file.name || t('dialog.tabs.preview.unknownName')) ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'',(''+
17988
+ utils.readableFileSize(file.size, '', ', ') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'\n</div>\n\n<div class="uploadcare-dialog-section uploadcare-dialog-normal-text">\n ',(''+ t('dialog.tabs.preview.regular.line1') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'<br/>\n ',(''+ t('dialog.tabs.preview.regular.line2') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'\n</div>\n\n<div \n class="uploadcare-dialog-button-success" \n role="uploadcare-dialog-preview-done">',(''+ t('dialog.tabs.preview.done') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n<div \n class="uploadcare-dialog-button" \n role="uploadcare-dialog-preview-back">',(''+ t('dialog.tabs.preview.change') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n');}return __p.join('');};
17695
17989
  }).call(this);
17696
17990
  (function() {
17697
17991
  this.JST || (this.JST = {});
17698
- this.JST["uploadcare/templates/tab-preview"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('');}return __p.join('');};
17992
+ this.JST["uploadcare/templates/tab-preview-unknown"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('<div class="uploadcare-dialog-preview-center">\n \n <div \n class="uploadcare-dialog-preview-circle"\n role="uploadcare-dialog-preview-circle"></div>\n <div class="uploadcare-dialog-title2">',(''+ t('dialog.tabs.preview.unknown.title') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n <div class="uploadcare-dialog-label">\n ',(''+ (file.name || t('dialog.tabs.preview.unknownName')) ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'',(''+
17993
+ utils.readableFileSize(file.size, '', ', ') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'\n </div>\n <div \n class="uploadcare-dialog-button-success" \n role="uploadcare-dialog-preview-done">',(''+ t('dialog.tabs.preview.unknown.done') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n</div>\n');}return __p.join('');};
17699
17994
  }).call(this);
17700
17995
  (function() {
17701
17996
  this.JST || (this.JST = {});
17702
17997
  this.JST["uploadcare/templates/tab-url"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('<div class="uploadcare-dialog-title">',(''+ t('dialog.tabs.url.title') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n<div class="uploadcare-dialog-section uploadcare-dialog-normal-text">\n <div>',(''+ t('dialog.tabs.url.line1') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n <div>',(''+ t('dialog.tabs.url.line2') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n</div>\n<form role="uploadcare-dialog-url-form">\n <input type="text" role="uploadcare-dialog-url-input" placeholder="',(''+ t('dialog.tabs.url.input') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'">\n <button class="uploadcare-dialog-button" type="submit" role="uploadcare-dialog-url-submit">',(''+ t('dialog.tabs.url.button') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</button>\n</form>\n');}return __p.join('');};
17703
17998
  }).call(this);
17999
+ (function() {
18000
+ this.JST || (this.JST = {});
18001
+ this.JST["uploadcare/templates/tab-welcome"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('<div class="uploadcare-dialog-message-center">\n <div class="uploadcare-dialog-title">Welcome to Uploadcare</div>\n <div class="uploadcare-dialog-large-text">\n <div>Your <a href="https://uploadcare.com/accounts/settings/">public key</a> is not set.</div>\n <div>Add this to the &lt;head&gt; tag to start uploading files:</div>\n <div class="uploadcare-pre">&lt;script&gt;\nUPLOADCARE_PUBLIC_KEY = \'your_public_key\';\n&lt;/script&gt;</div>\n </div>\n</div>\n');}return __p.join('');};
18002
+ }).call(this);
17704
18003
  (function() {
17705
18004
  this.JST || (this.JST = {});
17706
18005
  this.JST["uploadcare/templates/widget-button"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('<li \n role="uploadcare-widget-buttons-', name ,'" \n class="uploadcare-widget-buttons-', name ,'"\n>',(''+ caption ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</li>\n');}return __p.join('');};
@@ -17714,9 +18013,9 @@ var _require = (function() {
17714
18013
  this.JST["uploadcare/templates/widget"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('<div class="uploadcare-widget">\n <div role="uploadcare-widget-status"></div>\n <div role="uploadcare-widget-status-text" class="uploadcare-widget-status-text"></div>\n <ul role="uploadcare-widget-buttons" class="uploadcare-widget-buttons"></ul>\n <div class="uploadcare-widget-dragndrop-area" role="uploadcare-drop-area">',(''+ t('draghere') ).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;'),'</div>\n</div>\n');}return __p.join('');};
17715
18014
  }).call(this);
17716
18015
  (function() {
17717
- var locale, namespace;
18016
+ var locale, namespace, utils;
17718
18017
 
17719
- namespace = uploadcare.namespace, locale = uploadcare.locale;
18018
+ namespace = uploadcare.namespace, locale = uploadcare.locale, utils = uploadcare.utils;
17720
18019
 
17721
18020
  namespace('uploadcare.templates', function(ns) {
17722
18021
  return ns.tpl = function(key, ctx) {
@@ -17727,6 +18026,7 @@ var _require = (function() {
17727
18026
  fn = JST["uploadcare/templates/" + key];
17728
18027
  if (fn != null) {
17729
18028
  ctx.t = locale.t;
18029
+ ctx.utils = utils;
17730
18030
  return fn(ctx);
17731
18031
  } else {
17732
18032
  return '';
@@ -19780,10 +20080,10 @@ var _require = (function() {
19780
20080
 
19781
20081
  }).call(this);
19782
20082
  (function() {
19783
- var $, namespace, utils,
20083
+ var $, namespace, s, utils,
19784
20084
  __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
19785
20085
 
19786
- namespace = uploadcare.namespace, $ = uploadcare.jQuery, utils = uploadcare.utils;
20086
+ namespace = uploadcare.namespace, s = uploadcare.settings, $ = uploadcare.jQuery, utils = uploadcare.utils;
19787
20087
 
19788
20088
  namespace('uploadcare.files', function(ns) {
19789
20089
  return ns.BaseFile = (function() {
@@ -19806,7 +20106,7 @@ var _require = (function() {
19806
20106
  this.__requestInfo = __bind(this.__requestInfo, this);
19807
20107
 
19808
20108
  var _this = this;
19809
- this.settings = utils.buildSettings(settings);
20109
+ this.settings = s.build(settings);
19810
20110
  this.fileId = null;
19811
20111
  this.fileName = null;
19812
20112
  this.fileSize = null;
@@ -19832,32 +20132,28 @@ var _require = (function() {
19832
20132
  throw new Error('not implemented');
19833
20133
  };
19834
20134
 
20135
+ BaseFile.prototype.__handleFileData = function(data) {
20136
+ this.fileName = data.original_filename;
20137
+ this.fileSize = data.size;
20138
+ this.isImage = data.is_image;
20139
+ this.isStored = data.is_stored || data.is_public;
20140
+ this.__buildPreviewUrl();
20141
+ if (this.settings.imagesOnly && !this.isImage) {
20142
+ this.__infoDf.reject('image', this);
20143
+ return;
20144
+ }
20145
+ return this.__infoDf.resolve(this);
20146
+ };
20147
+
19835
20148
  BaseFile.prototype.__requestInfo = function() {
19836
- var fail,
19837
- _this = this;
19838
- fail = function() {
20149
+ var _this = this;
20150
+ return utils.jsonp("" + this.settings.urlBase + "/info/", {
20151
+ file_id: this.fileId,
20152
+ pub_key: this.settings.publicKey
20153
+ }).fail(function() {
19839
20154
  return _this.__infoDf.reject('info', _this);
19840
- };
19841
- return $.ajax("" + this.settings.urlBase + "/info/", {
19842
- data: {
19843
- file_id: this.fileId,
19844
- pub_key: this.settings.publicKey
19845
- },
19846
- dataType: 'jsonp'
19847
- }).fail(fail).done(function(data) {
19848
- if (data.error) {
19849
- return fail();
19850
- }
19851
- _this.fileName = data.original_filename;
19852
- _this.fileSize = data.size;
19853
- _this.isImage = data.is_image;
19854
- _this.isStored = data.is_stored;
19855
- _this.__buildPreviewUrl();
19856
- if (_this.settings.imagesOnly && !_this.isImage) {
19857
- _this.__infoDf.reject('image', _this);
19858
- return;
19859
- }
19860
- return _this.__infoDf.resolve(_this);
20155
+ }).done(function(data) {
20156
+ return _this.__handleFileData(data);
19861
20157
  });
19862
20158
  };
19863
20159
 
@@ -19998,13 +20294,30 @@ var _require = (function() {
19998
20294
  })();
19999
20295
  });
20000
20296
 
20297
+ namespace('uploadcare.utils', function(utils) {
20298
+ utils.isFile = function(obj) {
20299
+ return obj && obj.done && obj.fail && obj.cancel;
20300
+ };
20301
+ return utils.anyToFile = function(value, settings) {
20302
+ if (value) {
20303
+ if (utils.isFile(value)) {
20304
+ return value;
20305
+ } else {
20306
+ return uploadcare.fileFrom('url', value, settings);
20307
+ }
20308
+ } else {
20309
+ return null;
20310
+ }
20311
+ };
20312
+ });
20313
+
20001
20314
  }).call(this);
20002
20315
  (function() {
20003
- var $, debug, namespace, utils,
20316
+ var $, namespace, utils,
20004
20317
  __hasProp = {}.hasOwnProperty,
20005
20318
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
20006
20319
 
20007
- namespace = uploadcare.namespace, $ = uploadcare.jQuery, utils = uploadcare.utils, debug = uploadcare.debug;
20320
+ namespace = uploadcare.namespace, $ = uploadcare.jQuery, utils = uploadcare.utils;
20008
20321
 
20009
20322
  namespace('uploadcare.files', function(ns) {
20010
20323
  return ns.EventFile = (function(_super) {
@@ -20032,6 +20345,9 @@ var _require = (function() {
20032
20345
  formData = new FormData();
20033
20346
  formData.append('UPLOADCARE_PUB_KEY', this.settings.publicKey);
20034
20347
  formData.append('UPLOADCARE_FILE_ID', this.fileId);
20348
+ if (this.settings.autostore) {
20349
+ formData.append('UPLOADCARE_STORE', 1);
20350
+ }
20035
20351
  formData.append('file', this.__file);
20036
20352
  fail = function() {
20037
20353
  return _this.__uploadDf.reject('upload', _this);
@@ -20067,7 +20383,9 @@ var _require = (function() {
20067
20383
  error: fail,
20068
20384
  success: function(data) {
20069
20385
  if (data != null ? data.error : void 0) {
20070
- debug(data.error.content);
20386
+ if (_this.settings.autostore && /autostore/i.test(data.error.content)) {
20387
+ utils.commonWarning('autostore');
20388
+ }
20071
20389
  return fail();
20072
20390
  }
20073
20391
  return _this.__uploadDf.resolve(_this);
@@ -20136,7 +20454,7 @@ var _require = (function() {
20136
20454
  action: targetUrl,
20137
20455
  enctype: 'multipart/form-data',
20138
20456
  target: iframeId
20139
- }).append(formParam('UPLOADCARE_PUB_KEY', this.settings.publicKey)).append(formParam('UPLOADCARE_FILE_ID', this.fileId)).append(this.__input).css('display', 'none').appendTo('body').submit();
20457
+ }).append(formParam('UPLOADCARE_PUB_KEY', this.settings.publicKey)).append(formParam('UPLOADCARE_FILE_ID', this.fileId)).append(this.settings.autostore ? formParam('UPLOADCARE_STORE', 1) : void 0).append(this.__input).css('display', 'none').appendTo('body').submit();
20140
20458
  };
20141
20459
 
20142
20460
  InputFile.prototype.__cleanUp = function() {
@@ -20158,11 +20476,11 @@ var _require = (function() {
20158
20476
 
20159
20477
  }).call(this);
20160
20478
  (function() {
20161
- var $, debug, namespace, pusher, utils,
20479
+ var $, namespace, pusher, utils,
20162
20480
  __hasProp = {}.hasOwnProperty,
20163
20481
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
20164
20482
 
20165
- namespace = uploadcare.namespace, $ = uploadcare.jQuery, utils = uploadcare.utils, debug = uploadcare.debug;
20483
+ namespace = uploadcare.namespace, $ = uploadcare.jQuery, utils = uploadcare.utils;
20166
20484
 
20167
20485
  pusher = uploadcare.utils.pusher;
20168
20486
 
@@ -20183,24 +20501,24 @@ var _require = (function() {
20183
20501
  }
20184
20502
 
20185
20503
  UrlFile.prototype.__startUpload = function() {
20186
- var fail,
20504
+ var data,
20187
20505
  _this = this;
20188
20506
  this.__pollWatcher = new PollWatcher(this, this.settings);
20189
20507
  this.__pusherWatcher = new PusherWatcher(this, this.settings);
20190
20508
  this.__state('start');
20191
- fail = function() {
20192
- return _this.__state('error');
20509
+ data = {
20510
+ pub_key: this.settings.publicKey,
20511
+ source_url: this.__url
20193
20512
  };
20194
- $.ajax("" + this.settings.urlBase + "/from_url/", {
20195
- data: {
20196
- pub_key: this.settings.publicKey,
20197
- source_url: this.__url
20198
- },
20199
- dataType: 'jsonp'
20200
- }).fail(fail).done(function(data) {
20201
- if (data.error) {
20202
- return fail();
20513
+ if (this.settings.autostore) {
20514
+ data.store = 1;
20515
+ }
20516
+ utils.jsonp("" + this.settings.urlBase + "/from_url/", data).fail(function(error) {
20517
+ if (_this.settings.autostore && /autostore/i.test(error)) {
20518
+ utils.commonWarning('autostore');
20203
20519
  }
20520
+ return _this.__state('error');
20521
+ }).done(function(data) {
20204
20522
  _this.__token = data.token;
20205
20523
  _this.__pollWatcher.watch(_this.__token);
20206
20524
  _this.__pusherWatcher.watch(_this.__token);
@@ -20259,7 +20577,6 @@ var _require = (function() {
20259
20577
  var ev, onStarted, _fn, _i, _len, _ref,
20260
20578
  _this = this;
20261
20579
  this.token = token;
20262
- debug('started url watching with pusher');
20263
20580
  this.channel = this.pusher.subscribe("task-status-" + this.token);
20264
20581
  onStarted = function() {
20265
20582
  var ev, _i, _len, _ref, _results;
@@ -20274,10 +20591,10 @@ var _require = (function() {
20274
20591
  };
20275
20592
  _ref = ['progress', 'success'];
20276
20593
  _fn = function(ev) {
20277
- _this.channel.bind(ev, onStarted);
20278
- return _this.channel.bind(ev, function(data) {
20594
+ _this.channel.bind(ev, function(data) {
20279
20595
  return _this.uploader.__state(ev, data);
20280
20596
  });
20597
+ return _this.channel.bind(ev, onStarted);
20281
20598
  };
20282
20599
  for (_i = 0, _len = _ref.length; _i < _len; _i++) {
20283
20600
  ev = _ref[_i];
@@ -20331,20 +20648,12 @@ var _require = (function() {
20331
20648
  };
20332
20649
 
20333
20650
  PollWatcher.prototype.__checkStatus = function(callback) {
20334
- var fail,
20335
- _this = this;
20336
- fail = function() {
20651
+ var _this = this;
20652
+ return utils.jsonp("" + this.settings.urlBase + "/status/", {
20653
+ token: this.token
20654
+ }).fail(function(error) {
20337
20655
  return _this.__error();
20338
- };
20339
- return $.ajax("" + this.settings.urlBase + "/status/", {
20340
- data: {
20341
- 'token': this.token
20342
- },
20343
- dataType: 'jsonp'
20344
- }).fail(fail).done(function(data) {
20345
- if (data.error) {
20346
- return fail();
20347
- }
20656
+ }).done(function(data) {
20348
20657
  return callback(data);
20349
20658
  });
20350
20659
  };
@@ -20363,7 +20672,7 @@ var _require = (function() {
20363
20672
  namespace = uploadcare.namespace, $ = uploadcare.jQuery, utils = uploadcare.utils;
20364
20673
 
20365
20674
  namespace('uploadcare.files', function(ns) {
20366
- return ns.UploadedFile = (function(_super) {
20675
+ ns.UploadedFile = (function(_super) {
20367
20676
 
20368
20677
  __extends(UploadedFile, _super);
20369
20678
 
@@ -20390,6 +20699,337 @@ var _require = (function() {
20390
20699
  return UploadedFile;
20391
20700
 
20392
20701
  })(ns.BaseFile);
20702
+ ns.ReadyFile = (function(_super) {
20703
+
20704
+ __extends(ReadyFile, _super);
20705
+
20706
+ function ReadyFile(settings, __fileData) {
20707
+ this.__fileData = __fileData;
20708
+ ReadyFile.__super__.constructor.apply(this, arguments);
20709
+ this.fileId = this.__fileData.file_id;
20710
+ this.__uploadDf.resolve();
20711
+ }
20712
+
20713
+ ReadyFile.prototype.__startUpload = function() {};
20714
+
20715
+ ReadyFile.prototype.__requestInfo = function() {
20716
+ return this.__handleFileData(this.__fileData);
20717
+ };
20718
+
20719
+ return ReadyFile;
20720
+
20721
+ })(ns.BaseFile);
20722
+ return ns.DeletedFile = (function(_super) {
20723
+
20724
+ __extends(DeletedFile, _super);
20725
+
20726
+ function DeletedFile() {
20727
+ DeletedFile.__super__.constructor.apply(this, arguments);
20728
+ this.__uploadDf.reject('deleted');
20729
+ }
20730
+
20731
+ DeletedFile.prototype.__startUpload = function() {};
20732
+
20733
+ return DeletedFile;
20734
+
20735
+ })(ns.BaseFile);
20736
+ });
20737
+
20738
+ }).call(this);
20739
+ (function() {
20740
+ var $, namespace, s, t, utils, _ref,
20741
+ __slice = [].slice,
20742
+ __hasProp = {}.hasOwnProperty,
20743
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
20744
+
20745
+ namespace = uploadcare.namespace, $ = uploadcare.jQuery, utils = uploadcare.utils, (_ref = uploadcare.locale, t = _ref.t), s = uploadcare.settings;
20746
+
20747
+ namespace('uploadcare.files', function(ns) {
20748
+ ns.FileGroup = (function() {
20749
+
20750
+ function FileGroup(files, settings) {
20751
+ var _this = this;
20752
+ this.settings = s.build(settings);
20753
+ this.__fileColl = new utils.CollectionOfPromises(files);
20754
+ this.__allFilesDf = $.when.apply($, this.__fileColl.get());
20755
+ this.__fileInfosDf = (function() {
20756
+ var file;
20757
+ files = (function() {
20758
+ var _i, _len, _ref1, _results;
20759
+ _ref1 = this.__fileColl.get();
20760
+ _results = [];
20761
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
20762
+ file = _ref1[_i];
20763
+ _results.push(file.then(null, function(err, info) {
20764
+ return $.when(info);
20765
+ }));
20766
+ }
20767
+ return _results;
20768
+ }).call(_this);
20769
+ return $.when.apply($, files);
20770
+ })();
20771
+ this.__createGroupDf = $.Deferred();
20772
+ this.__initApiDeferred();
20773
+ }
20774
+
20775
+ FileGroup.prototype.files = function() {
20776
+ return this.__fileColl.get();
20777
+ };
20778
+
20779
+ FileGroup.prototype.__save = function() {
20780
+ var _this = this;
20781
+ if (!this.__saved) {
20782
+ this.__saved = true;
20783
+ return this.__allFilesDf.done(function() {
20784
+ return _this.__createGroup().done(function(groupInfo) {
20785
+ _this.__uuid = groupInfo.id;
20786
+ return _this.__buildInfo(function(info) {
20787
+ if (_this.settings.imagesOnly && !info.isImage) {
20788
+ return _this.__createGroupDf.reject('image', info);
20789
+ } else {
20790
+ return _this.__createGroupDf.resolve(info);
20791
+ }
20792
+ });
20793
+ }).fail(function() {
20794
+ return _this.__createGroupDf.reject('createGroup');
20795
+ });
20796
+ });
20797
+ }
20798
+ };
20799
+
20800
+ FileGroup.prototype.promise = function() {
20801
+ this.__save();
20802
+ return this.__apiDf.promise();
20803
+ };
20804
+
20805
+ FileGroup.prototype.__initApiDeferred = function() {
20806
+ var notify, reject, resolve,
20807
+ _this = this;
20808
+ this.__apiDf = $.Deferred();
20809
+ this.__progressState = 'uploading';
20810
+ reject = function(err) {
20811
+ return _this.__buildInfo(function(info) {
20812
+ return _this.__apiDf.reject(err, info);
20813
+ });
20814
+ };
20815
+ resolve = function(info) {
20816
+ return _this.__apiDf.resolve(info);
20817
+ };
20818
+ notify = function() {
20819
+ return _this.__apiDf.notify(_this.__progressInfo());
20820
+ };
20821
+ notify();
20822
+ this.__fileColl.onAnyProgress.add(notify);
20823
+ this.__allFilesDf.done(function() {
20824
+ _this.__progressState = 'uploaded';
20825
+ return notify();
20826
+ }).fail(reject);
20827
+ return this.__createGroupDf.done(function(info) {
20828
+ _this.__progressState = 'ready';
20829
+ notify();
20830
+ return resolve(info);
20831
+ }).fail(reject);
20832
+ };
20833
+
20834
+ FileGroup.prototype.__progressInfo = function() {
20835
+ var progress, progressInfo, progressInfos, _i, _len;
20836
+ progress = 0;
20837
+ progressInfos = this.__fileColl.lastProgresses();
20838
+ for (_i = 0, _len = progressInfos.length; _i < _len; _i++) {
20839
+ progressInfo = progressInfos[_i];
20840
+ progress += ((progressInfo != null ? progressInfo.progress : void 0) || 0) / progressInfos.length;
20841
+ }
20842
+ return {
20843
+ state: this.__progressState,
20844
+ uploadProgress: progress,
20845
+ progress: this.__progressState === 'ready' ? 1 : progress * 0.9,
20846
+ incompleteFileInfo: {}
20847
+ };
20848
+ };
20849
+
20850
+ FileGroup.prototype.__buildInfo = function(cb) {
20851
+ var info;
20852
+ info = {
20853
+ uuid: this.__uuid,
20854
+ cdnUrl: "" + this.settings.cdnBase + "/" + this.__uuid + "/",
20855
+ name: t('file', this.__fileColl.length()),
20856
+ size: 0,
20857
+ isImage: true,
20858
+ isStored: true
20859
+ };
20860
+ return this.__fileInfosDf.done(function() {
20861
+ var infos, _i, _info, _len;
20862
+ infos = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
20863
+ for (_i = 0, _len = infos.length; _i < _len; _i++) {
20864
+ _info = infos[_i];
20865
+ info.size += _info.size;
20866
+ if (!_info.isImage) {
20867
+ info.isImage = false;
20868
+ }
20869
+ if (!_info.isStored) {
20870
+ info.isStored = false;
20871
+ }
20872
+ }
20873
+ return cb(info);
20874
+ });
20875
+ };
20876
+
20877
+ FileGroup.prototype.__createGroup = function() {
20878
+ var df,
20879
+ _this = this;
20880
+ df = $.Deferred();
20881
+ if (this.__fileColl.length()) {
20882
+ this.__fileInfosDf.done(function() {
20883
+ var data, info, infos;
20884
+ infos = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
20885
+ data = {
20886
+ pub_key: _this.settings.publicKey,
20887
+ files: (function() {
20888
+ var _i, _len, _results;
20889
+ _results = [];
20890
+ for (_i = 0, _len = infos.length; _i < _len; _i++) {
20891
+ info = infos[_i];
20892
+ _results.push(info.uuid);
20893
+ }
20894
+ return _results;
20895
+ })()
20896
+ };
20897
+ return utils.jsonp("" + _this.settings.urlBase + "/group/", data).fail(df.reject).done(df.resolve);
20898
+ });
20899
+ } else {
20900
+ df.reject();
20901
+ }
20902
+ return df.promise();
20903
+ };
20904
+
20905
+ FileGroup.prototype.api = function() {
20906
+ if (!this.__api) {
20907
+ this.__api = utils.bindAll(this, ['promise', 'files']);
20908
+ }
20909
+ return this.__api;
20910
+ };
20911
+
20912
+ return FileGroup;
20913
+
20914
+ })();
20915
+ return ns.SavedFileGroup = (function(_super) {
20916
+
20917
+ __extends(SavedFileGroup, _super);
20918
+
20919
+ function SavedFileGroup(__data, settings) {
20920
+ var files;
20921
+ this.__data = __data;
20922
+ files = uploadcare.filesFrom('ready', this.__data.files, settings);
20923
+ SavedFileGroup.__super__.constructor.call(this, files, settings);
20924
+ }
20925
+
20926
+ SavedFileGroup.prototype.__createGroup = function() {
20927
+ return utils.wrapToPromise(this.__data);
20928
+ };
20929
+
20930
+ return SavedFileGroup;
20931
+
20932
+ })(ns.FileGroup);
20933
+ });
20934
+
20935
+ namespace('uploadcare', function(ns) {
20936
+ ns.FileGroup = function(filesAndGroups, settings) {
20937
+ var file, files, item, _i, _j, _len, _len1, _ref1;
20938
+ if (filesAndGroups == null) {
20939
+ filesAndGroups = [];
20940
+ }
20941
+ files = [];
20942
+ for (_i = 0, _len = filesAndGroups.length; _i < _len; _i++) {
20943
+ item = filesAndGroups[_i];
20944
+ if (utils.isFile(item)) {
20945
+ files.push(item);
20946
+ } else if (utils.isFileGroup(item)) {
20947
+ _ref1 = item.files();
20948
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
20949
+ file = _ref1[_j];
20950
+ files.push(file);
20951
+ }
20952
+ }
20953
+ }
20954
+ return new uploadcare.files.FileGroup(files, settings).api();
20955
+ };
20956
+ return ns.loadFileGroup = function(groupIdOrUrl, settings) {
20957
+ var data, df, id;
20958
+ settings = s.build(settings);
20959
+ df = $.Deferred();
20960
+ id = utils.groupIdRegex.exec(groupIdOrUrl);
20961
+ if (id) {
20962
+ data = {
20963
+ pub_key: settings.publicKey,
20964
+ group_id: id[0]
20965
+ };
20966
+ utils.jsonp("" + settings.urlBase + "/group/info/", data).fail(df.reject).done(function(data) {
20967
+ return df.resolve(new uploadcare.files.SavedFileGroup(data, settings).api());
20968
+ });
20969
+ } else {
20970
+ df.reject();
20971
+ }
20972
+ return df.promise();
20973
+ };
20974
+ });
20975
+
20976
+ namespace('uploadcare.utils', function(utils) {
20977
+ utils.isFileGroup = function(obj) {
20978
+ return obj && obj.files && obj.promise;
20979
+ };
20980
+ utils.anyToFileGroup = function(value, settings) {
20981
+ var files, item, _i, _len;
20982
+ if (value) {
20983
+ if ($.isArray(value)) {
20984
+ for (_i = 0, _len = value.length; _i < _len; _i++) {
20985
+ item = value[_i];
20986
+ files = utils.anyToFile(item, settings);
20987
+ }
20988
+ return utils.wrapToPromise(uploadcare.FileGroup(files, settings));
20989
+ } else {
20990
+ if (utils.isFileGroup(value)) {
20991
+ return utils.wrapToPromise(value);
20992
+ } else {
20993
+ return uploadcare.loadFileGroup(value, settings);
20994
+ }
20995
+ }
20996
+ } else {
20997
+ return utils.wrapToPromise(null);
20998
+ }
20999
+ };
21000
+ return utils.isFileGroupsEqual = function(group1, group2) {
21001
+ var file, files1, files2, i, mismatches;
21002
+ if (group1 === group2) {
21003
+ return true;
21004
+ } else {
21005
+ if (utils.isFileGroup(group1) && utils.isFileGroup(group2)) {
21006
+ files1 = group1.files();
21007
+ files2 = group2.files();
21008
+ if (files1.length !== files2.length) {
21009
+ return false;
21010
+ } else {
21011
+ mismatches = (function() {
21012
+ var _i, _len, _results;
21013
+ _results = [];
21014
+ for (i = _i = 0, _len = files1.length; _i < _len; i = ++_i) {
21015
+ file = files1[i];
21016
+ if (file !== files2[i]) {
21017
+ _results.push(1);
21018
+ }
21019
+ }
21020
+ return _results;
21021
+ })();
21022
+ if (mismatches.length) {
21023
+ return false;
21024
+ } else {
21025
+ return true;
21026
+ }
21027
+ }
21028
+ } else {
21029
+ return false;
21030
+ }
21031
+ }
21032
+ };
20393
21033
  });
20394
21034
 
20395
21035
  }).call(this);
@@ -20401,35 +21041,83 @@ var _require = (function() {
20401
21041
  namespace('uploadcare', function(ns) {
20402
21042
  var converters;
20403
21043
  ns.fileFrom = function(type, data, settings) {
21044
+ return converters[type](settings, data)[0].promise();
21045
+ };
21046
+ ns.filesFrom = function(type, data, settings) {
21047
+ var file, _i, _len, _ref, _results;
20404
21048
  if (settings == null) {
20405
21049
  settings = {};
20406
21050
  }
20407
- return converters[type](settings, data).promise();
21051
+ _ref = converters[type](settings, data);
21052
+ _results = [];
21053
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
21054
+ file = _ref[_i];
21055
+ _results.push(file.promise());
21056
+ }
21057
+ return _results;
20408
21058
  };
20409
21059
  return converters = {
20410
21060
  event: function(settings, e) {
20411
- var files;
21061
+ var file, files, _i, _len, _results;
20412
21062
  if (utils.abilities.canFileAPI) {
20413
21063
  files = e.type === 'drop' ? e.originalEvent.dataTransfer.files : e.target.files;
20414
- return new f.EventFile(settings, files[0]);
21064
+ _results = [];
21065
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
21066
+ file = files[_i];
21067
+ _results.push(new f.EventFile(settings, file));
21068
+ }
21069
+ return _results;
20415
21070
  } else {
20416
21071
  return this.input(settings, e.target);
20417
21072
  }
20418
21073
  },
20419
21074
  input: function(settings, input) {
20420
- return new f.InputFile(settings, input);
21075
+ return [new f.InputFile(settings, input)];
20421
21076
  },
20422
- url: function(settings, url) {
20423
- var cdn;
20424
- cdn = new RegExp("^" + settings.cdnBase + "/" + utils.uuidRegex.source, 'i');
20425
- if (utils.fullUuidRegex.test(url) || cdn.test(url)) {
20426
- return new f.UploadedFile(settings, url);
20427
- } else {
20428
- return new f.UrlFile(settings, url);
21077
+ url: function(settings, urls) {
21078
+ var cdn, url, _i, _len, _results;
21079
+ if (!$.isArray(urls)) {
21080
+ urls = [urls];
21081
+ }
21082
+ _results = [];
21083
+ for (_i = 0, _len = urls.length; _i < _len; _i++) {
21084
+ url = urls[_i];
21085
+ cdn = new RegExp("^" + settings.cdnBase + "/" + utils.uuidRegex.source, 'i');
21086
+ if (utils.fullUuidRegex.test(url) || cdn.test(url)) {
21087
+ _results.push(new f.UploadedFile(settings, url));
21088
+ } else {
21089
+ _results.push(new f.UrlFile(settings, url));
21090
+ }
21091
+ }
21092
+ return _results;
21093
+ },
21094
+ uploaded: function(settings, uuids) {
21095
+ var uuid, _i, _len, _results;
21096
+ if (!$.isArray(uuids)) {
21097
+ uuids = [uuids];
21098
+ }
21099
+ _results = [];
21100
+ for (_i = 0, _len = uuids.length; _i < _len; _i++) {
21101
+ uuid = uuids[_i];
21102
+ _results.push(new f.UploadedFile(settings, uuid));
20429
21103
  }
21104
+ return _results;
20430
21105
  },
20431
- uploaded: function(settings, uuid) {
20432
- return new f.UploadedFile(settings, uuid);
21106
+ ready: function(settings, arrayOfFileData) {
21107
+ var fileData, _i, _len, _results;
21108
+ if (!$.isArray(arrayOfFileData)) {
21109
+ arrayOfFileData = [arrayOfFileData];
21110
+ }
21111
+ _results = [];
21112
+ for (_i = 0, _len = arrayOfFileData.length; _i < _len; _i++) {
21113
+ fileData = arrayOfFileData[_i];
21114
+ if (fileData) {
21115
+ _results.push(new f.ReadyFile(settings, fileData));
21116
+ } else {
21117
+ _results.push(new f.DeletedFile());
21118
+ }
21119
+ }
21120
+ return _results;
20433
21121
  }
20434
21122
  };
20435
21123
  });
@@ -20526,10 +21214,11 @@ var _require = (function() {
20526
21214
  this.element = $(this.element);
20527
21215
  this.element.html(tpl('circle'));
20528
21216
  this.pie = this.element.find('@uploadcare-widget-status');
21217
+ this.center = this.element.find('@uploadcare-circle-center');
20529
21218
  this.element.addClass('uploadcare-widget-circle');
21219
+ this.setColorTheme('default');
20530
21220
  this.size = Math.min(this.element.width(), this.element.height());
20531
21221
  this.pie.width(this.size).height(this.size);
20532
- this.color = this.__getSegmentColor();
20533
21222
  this.angleOffset = -90;
20534
21223
  this.raphael = this.__initRaphael();
20535
21224
  this.path = this.raphael.path();
@@ -20556,9 +21245,9 @@ var _require = (function() {
20556
21245
  };
20557
21246
  this.observed = file;
20558
21247
  if (this.observed.state() === "resolved") {
20559
- return this.__update(1, true);
21248
+ this.__update(1, true);
20560
21249
  } else {
20561
- return this.observed.progress(function(progress) {
21250
+ this.observed.progress(function(progress) {
20562
21251
  if (file === _this.observed) {
20563
21252
  return _this.__update(selectorFn(progress));
20564
21253
  }
@@ -20568,6 +21257,7 @@ var _require = (function() {
20568
21257
  }
20569
21258
  });
20570
21259
  }
21260
+ return this;
20571
21261
  };
20572
21262
 
20573
21263
  Circle.prototype.reset = function(filled) {
@@ -20578,15 +21268,47 @@ var _require = (function() {
20578
21268
  return this.__update((filled ? 100 : 0), true);
20579
21269
  };
20580
21270
 
21271
+ Circle.prototype.colorThemes = {
21272
+ "default": {
21273
+ back: '#e1e5e7',
21274
+ front: '#d0bf26',
21275
+ center: '#ffffff'
21276
+ },
21277
+ grey: {
21278
+ back: '#c5cacd',
21279
+ front: '#a0a3a5'
21280
+ },
21281
+ darkGrey: {
21282
+ back: '#bfbfbf',
21283
+ front: '#8c8c8c'
21284
+ }
21285
+ };
21286
+
21287
+ Circle.prototype.setColorTheme = function(theme) {
21288
+ if ($.type(theme) === 'string') {
21289
+ theme = this.colorThemes[theme];
21290
+ }
21291
+ this.colorTheme = $.extend({}, this.colorThemes["default"], theme);
21292
+ this.pie.css('background', this.colorTheme.back);
21293
+ this.center.css('background', this.colorTheme.center);
21294
+ if (this.raphael) {
21295
+ return this.__update();
21296
+ }
21297
+ };
21298
+
20581
21299
  Circle.prototype.__update = function(val, instant) {
20582
21300
  var delay,
20583
21301
  _this = this;
21302
+ if (val == null) {
21303
+ val = this.currentVal;
21304
+ }
20584
21305
  if (instant == null) {
20585
21306
  instant = false;
20586
21307
  }
20587
21308
  if (val > 1) {
20588
21309
  val = 1;
20589
21310
  }
21311
+ this.currentVal = val;
20590
21312
  delay = this.fullDelay * Math.abs(val - this.value);
20591
21313
  this.value = val;
20592
21314
  if (instant) {
@@ -20610,20 +21332,15 @@ var _require = (function() {
20610
21332
  return 360 * (value < 1 ? value : 0.99999999);
20611
21333
  };
20612
21334
 
20613
- Circle.prototype.__getSegmentColor = function() {
20614
- var color;
20615
- this.pie.addClass('uploadcare-widget-circle-active');
20616
- color = this.pie.css('background-color');
20617
- this.pie.removeClass('uploadcare-widget-circle-active');
20618
- return color;
20619
- };
20620
-
20621
21335
  Circle.prototype.__initRaphael = function() {
20622
- var angleOffset, color, raphael, size;
21336
+ var angleOffset, getColor, raphael, size,
21337
+ _this = this;
20623
21338
  raphael = uploadcare.Raphael(this.pie.get(0), this.size, this.size);
20624
- color = this.color;
20625
21339
  size = this.size;
20626
21340
  angleOffset = this.angleOffset;
21341
+ getColor = function() {
21342
+ return _this.colorTheme.front;
21343
+ };
20627
21344
  raphael.customAttributes.segment = function(angle) {
20628
21345
  var a1, a2, flag, r, x, y;
20629
21346
  x = size / 2;
@@ -20639,7 +21356,7 @@ var _require = (function() {
20639
21356
  a2 = (a2 % 360) * Math.PI / 180;
20640
21357
  return {
20641
21358
  path: [["M", x, y], ["l", r * Math.cos(a1), r * Math.sin(a1)], ["A", r, r, 0, +flag, 1, x + r * Math.cos(a2), y + r * Math.sin(a2)], ["z"]],
20642
- fill: color
21359
+ fill: getColor()
20643
21360
  };
20644
21361
  };
20645
21362
  return raphael;
@@ -20652,13 +21369,9 @@ var _require = (function() {
20652
21369
 
20653
21370
  }).call(this);
20654
21371
  (function() {
20655
- var $, namespace, progress, t, tpl, utils, _ref;
20656
-
20657
- namespace = uploadcare.namespace, $ = uploadcare.jQuery, utils = uploadcare.utils, (_ref = uploadcare.ui, progress = _ref.progress);
20658
-
20659
- t = uploadcare.locale.t;
21372
+ var $, namespace, progress, t, tpl, utils, _ref, _ref1, _ref2;
20660
21373
 
20661
- tpl = uploadcare.templates.tpl;
21374
+ namespace = uploadcare.namespace, $ = uploadcare.jQuery, utils = uploadcare.utils, (_ref = uploadcare.ui, progress = _ref.progress), (_ref1 = uploadcare.locale, t = _ref1.t), (_ref2 = uploadcare.templates, tpl = _ref2.tpl);
20662
21375
 
20663
21376
  namespace('uploadcare.widget', function(ns) {
20664
21377
  return ns.Template = (function() {
@@ -20743,7 +21456,6 @@ var _require = (function() {
20743
21456
 
20744
21457
  Template.prototype.error = function(type) {
20745
21458
  this.statusText.text(t("errors." + (type || 'default')));
20746
- this.circle.reset();
20747
21459
  return this.setStatus('error');
20748
21460
  };
20749
21461
 
@@ -20764,16 +21476,14 @@ var _require = (function() {
20764
21476
 
20765
21477
  }).call(this);
20766
21478
  (function() {
20767
- var $, files, namespace, t, tpl, utils;
20768
-
20769
- namespace = uploadcare.namespace, utils = uploadcare.utils, files = uploadcare.files, $ = uploadcare.jQuery;
20770
-
20771
- t = uploadcare.locale.t;
21479
+ var $, Circle, files, namespace, s, t, tpl, utils, _ref, _ref1, _ref2, _ref3,
21480
+ __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
20772
21481
 
20773
- tpl = uploadcare.templates.tpl;
21482
+ namespace = uploadcare.namespace, utils = uploadcare.utils, (_ref = uploadcare.locale, t = _ref.t), (_ref1 = uploadcare.templates, tpl = _ref1.tpl), (_ref2 = uploadcare.ui, (_ref3 = _ref2.progress, Circle = _ref3.Circle)), files = uploadcare.files, s = uploadcare.settings, $ = uploadcare.jQuery;
20774
21483
 
20775
21484
  namespace('uploadcare', function(ns) {
20776
21485
  var Dialog, currentDialogPr;
21486
+ ns.MULTIPLE_UPLOAD_FILES_LIMIT = 30;
20777
21487
  currentDialogPr = null;
20778
21488
  ns.isDialogOpened = function() {
20779
21489
  return currentDialogPr !== null;
@@ -20781,38 +21491,62 @@ var _require = (function() {
20781
21491
  ns.closeDialog = function() {
20782
21492
  return currentDialogPr != null ? currentDialogPr.reject() : void 0;
20783
21493
  };
20784
- ns.openDialog = function(currentFile, tab, settings) {
20785
- var dialog;
21494
+ ns.openDialog = function(files, tab, settings) {
21495
+ var dialog, filter, promise;
20786
21496
  if ($.isPlainObject(tab)) {
20787
21497
  settings = tab;
20788
21498
  tab = null;
20789
21499
  }
20790
21500
  ns.closeDialog();
20791
- settings = utils.buildSettings(settings);
20792
- dialog = new Dialog(settings, currentFile, tab);
20793
- return currentDialogPr = dialog.publicPromise().always(function() {
21501
+ if (utils.isFileGroup(files)) {
21502
+ files = files.files();
21503
+ }
21504
+ settings = s.build(settings);
21505
+ dialog = new Dialog(settings, files, tab);
21506
+ currentDialogPr = dialog.publicPromise().always(function() {
20794
21507
  return currentDialogPr = null;
20795
21508
  });
21509
+ filter = settings.multiple ? function(files) {
21510
+ return uploadcare.FileGroup(files, settings);
21511
+ } : function(files) {
21512
+ return files[0];
21513
+ };
21514
+ promise = utils.then(currentDialogPr, filter, filter);
21515
+ promise.reject = currentDialogPr.reject;
21516
+ return promise;
20796
21517
  };
20797
21518
  return Dialog = (function() {
20798
21519
 
20799
- function Dialog(settings, currentFile, tab) {
21520
+ function Dialog(settings, files, tab) {
20800
21521
  var _this = this;
20801
21522
  this.settings = settings;
20802
- if (currentFile) {
20803
- this.settings = $.extend({}, this.settings, {
20804
- previewStep: true
20805
- });
21523
+ this.switchTab = __bind(this.switchTab, this);
21524
+
21525
+ this.__reject = __bind(this.__reject, this);
21526
+
21527
+ this.__resolve = __bind(this.__resolve, this);
21528
+
21529
+ if (files) {
21530
+ if (!$.isArray(files)) {
21531
+ files = [files];
21532
+ }
21533
+ } else {
21534
+ files = [];
20806
21535
  }
20807
21536
  this.dfd = $.Deferred();
20808
21537
  this.dfd.always(function() {
20809
21538
  return _this.__closeDialog();
20810
21539
  });
20811
- this.content = $(tpl('dialog')).hide().appendTo('body');
21540
+ this.content = $(tpl('dialog')).hide().appendTo('body').addClass(this.settings.multiple ? 'uploadcare-dialog-multiple' : void 0);
21541
+ this.files = new utils.CollectionOfPromises();
20812
21542
  this["__bind"]();
20813
- this.__prepareTabs();
20814
- this.switchTab(tab || this.settings.tabs[0]);
20815
- this.__setFile(currentFile);
21543
+ this.tabs = {};
21544
+ if (this.settings.publicKey) {
21545
+ this.__prepareTabs(tab);
21546
+ this.__prepareFiles(files);
21547
+ } else {
21548
+ this.__welcome();
21549
+ }
20816
21550
  this.__updateFirstTab();
20817
21551
  this.content.fadeIn('fast');
20818
21552
  }
@@ -20824,59 +21558,115 @@ var _require = (function() {
20824
21558
  return promise;
20825
21559
  };
20826
21560
 
20827
- Dialog.prototype["__bind"] = function() {
20828
- var isPartOfWindow, reject,
21561
+ Dialog.prototype.apiForTab = function(tabName) {
21562
+ var api,
20829
21563
  _this = this;
20830
- reject = function() {
20831
- return _this.dfd.reject(_this.currentFile);
20832
- };
20833
- isPartOfWindow = function(el) {
20834
- return $(el).is('.uploadcare-dialog-panel') || $(el).parents('.uploadcare-dialog-panel').size();
21564
+ api = {
21565
+ avalibleTabs: this.settings.tabs,
21566
+ fileColl: this.files.readOnly(),
21567
+ onSwitched: $.Callbacks(),
21568
+ onSwitchedToMe: $.Callbacks(),
21569
+ addFiles: function(fileType, data) {
21570
+ var file, _i, _len, _ref4, _results;
21571
+ if (_this.settings.multiple) {
21572
+ _ref4 = ns.filesFrom(fileType, data, _this.settings);
21573
+ _results = [];
21574
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
21575
+ file = _ref4[_i];
21576
+ _results.push(_this.files.add(file));
21577
+ }
21578
+ return _results;
21579
+ } else {
21580
+ _this.files.clear();
21581
+ return _this.files.add(ns.fileFrom(fileType, data, _this.settings));
21582
+ }
21583
+ },
21584
+ removeFile: function(file) {
21585
+ return _this.files.remove(file);
21586
+ },
21587
+ clearFiles: function() {
21588
+ return _this.files.clear();
21589
+ },
21590
+ switchToPreview: function() {
21591
+ return _this.switchTab('preview');
21592
+ },
21593
+ done: this.__resolve,
21594
+ switchTab: this.switchTab
20835
21595
  };
20836
- this.content.on('click', function(e) {
20837
- if (!(isPartOfWindow(e.target) || $(e.target).is('a'))) {
20838
- return reject();
21596
+ this.dfd.progress(function(name) {
21597
+ api.onSwitched.fire(name, name === tabName);
21598
+ if (name === tabName) {
21599
+ return api.onSwitchedToMe.fire(name);
20839
21600
  }
20840
21601
  });
20841
- $(window).on('keydown', function(e) {
20842
- if (e.which === 27) {
20843
- return reject();
20844
- }
20845
- });
20846
- return this.content.on('click', '@uploadcare-dialog-switch-tab', function(e) {
20847
- return _this.switchTab($(e.target).data('tab'));
20848
- });
21602
+ return api;
21603
+ };
21604
+
21605
+ Dialog.prototype.__resolve = function() {
21606
+ return this.dfd.resolve(this.files.get());
21607
+ };
21608
+
21609
+ Dialog.prototype.__reject = function() {
21610
+ return this.dfd.reject(this.files.get());
20849
21611
  };
20850
21612
 
20851
- Dialog.prototype.__prepareTabs = function() {
20852
- var tabName, _i, _len, _ref, _results,
21613
+ Dialog.prototype["__bind"] = function() {
21614
+ var isPartOfWindow, panel,
20853
21615
  _this = this;
20854
- this.tabs = {};
20855
- this.tabs.preview = this.addTab('preview');
20856
- this.tabs.preview.onDone.add(function() {
20857
- return _this.dfd.resolve(_this.currentFile);
21616
+ panel = this.content.find('.uploadcare-dialog-panel');
21617
+ isPartOfWindow = function(el) {
21618
+ return $(el).is(panel) || $.contains(panel.get(0), el);
21619
+ };
21620
+ this.content.on('click', function(e) {
21621
+ if (!(!utils.inDom(e.target) || isPartOfWindow(e.target) || $(e.target).is('a'))) {
21622
+ return _this.__reject();
21623
+ }
20858
21624
  });
20859
- this.tabs.preview.onBack.add(function() {
20860
- return _this.__setFile(null);
21625
+ return $(window).on('keydown', function(e) {
21626
+ if (e.which === 27) {
21627
+ return _this.__reject();
21628
+ }
20861
21629
  });
21630
+ };
21631
+
21632
+ Dialog.prototype.__prepareTabs = function(tab) {
21633
+ var tabName, _i, _len, _ref4;
21634
+ this.addTab('preview');
20862
21635
  this.__hideTab('preview');
20863
- _ref = this.settings.tabs;
20864
- _results = [];
20865
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
20866
- tabName = _ref[_i];
20867
- if (!(!(tabName in this.tabs))) {
20868
- continue;
20869
- }
20870
- this.tabs[tabName] = this.addTab(tabName);
20871
- if (this.tabs[tabName]) {
20872
- _results.push(this.tabs[tabName].onSelected.add(function(fileType, data) {
20873
- return _this.__setFile(ns.fileFrom(fileType, data, _this.settings));
20874
- }));
21636
+ _ref4 = this.settings.tabs;
21637
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
21638
+ tabName = _ref4[_i];
21639
+ this.addTab(tabName);
21640
+ }
21641
+ return this.switchTab(tab || this.settings.tabs[0]);
21642
+ };
21643
+
21644
+ Dialog.prototype.__prepareFiles = function(files) {
21645
+ var file, _i, _len,
21646
+ _this = this;
21647
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
21648
+ file = files[_i];
21649
+ this.files.add(file);
21650
+ }
21651
+ if (files.length) {
21652
+ this.__showTab('preview');
21653
+ this.switchTab('preview');
21654
+ }
21655
+ this.files.onAdd.add(function() {
21656
+ if (_this.settings.previewStep) {
21657
+ _this.__showTab('preview');
21658
+ if (!_this.settings.multiple) {
21659
+ return _this.switchTab('preview');
21660
+ }
20875
21661
  } else {
20876
- throw new Error("No such tab: " + tabName);
21662
+ return _this.__resolve();
20877
21663
  }
20878
- }
20879
- return _results;
21664
+ });
21665
+ return this.files.onRemove.add(function() {
21666
+ if (_this.files.length() === 0) {
21667
+ return _this.__hideTab('preview');
21668
+ }
21669
+ });
20880
21670
  };
20881
21671
 
20882
21672
  Dialog.prototype.__closeDialog = function() {
@@ -20886,28 +21676,14 @@ var _require = (function() {
20886
21676
  });
20887
21677
  };
20888
21678
 
20889
- Dialog.prototype.__setFile = function(currentFile) {
20890
- this.currentFile = currentFile;
20891
- if (this.settings.previewStep) {
20892
- if (this.currentFile) {
20893
- this.tabs.preview.setFile(this.currentFile);
20894
- this.__showTab('preview');
20895
- return this.switchTab('preview');
20896
- } else {
20897
- return this.__hideTab('preview');
20898
- }
20899
- } else {
20900
- if (this.currentFile) {
20901
- return this.dfd.resolve(this.currentFile);
20902
- }
20903
- }
20904
- };
20905
-
20906
21679
  Dialog.prototype.addTab = function(name) {
20907
- var tab, tabCls, tabs,
21680
+ var TabCls, tabButton, tabPanel, tabs,
20908
21681
  _this = this;
20909
21682
  tabs = uploadcare.widget.tabs;
20910
- tabCls = (function() {
21683
+ if (name in this.tabs) {
21684
+ return;
21685
+ }
21686
+ TabCls = (function() {
20911
21687
  switch (name) {
20912
21688
  case 'file':
20913
21689
  return tabs.FileTab;
@@ -20922,20 +21698,23 @@ var _require = (function() {
20922
21698
  case 'instagram':
20923
21699
  return tabs.RemoteTabFor('instagram');
20924
21700
  case 'preview':
20925
- return tabs.PreviewTab;
21701
+ if (this.settings.multiple) {
21702
+ return tabs.PreviewTabMultiple;
21703
+ } else {
21704
+ return tabs.PreviewTab;
21705
+ }
21706
+ case 'welcome':
21707
+ return tabs.StaticTabWith('welcome');
20926
21708
  }
20927
- })();
20928
- if (!tabCls) {
20929
- return false;
21709
+ }).call(this);
21710
+ if (!TabCls) {
21711
+ throw new Error("No such tab: " + name);
20930
21712
  }
20931
- tab = new tabCls(this.dfd.promise(), this.settings);
20932
- $('<div>').addClass("uploadcare-dialog-tab uploadcare-dialog-tab-" + name).attr('title', t("tabs." + name + ".title")).on('click', function() {
21713
+ tabPanel = $('<div>').hide().addClass('uploadcare-dialog-tabs-panel').addClass("uploadcare-dialog-tabs-panel-" + name).appendTo(this.content.find('.uploadcare-dialog-body'));
21714
+ tabButton = $('<div>').addClass("uploadcare-dialog-tab uploadcare-dialog-tab-" + name).attr('title', t("tabs." + name + ".title")).on('click', function() {
20933
21715
  return _this.switchTab(name);
20934
21716
  }).appendTo(this.content.find('.uploadcare-dialog-tabs'));
20935
- tab.setContent($('<div>').hide().addClass('uploadcare-dialog-tabs-panel').addClass("uploadcare-dialog-tabs-panel-" + name).append(tpl("tab-" + name, {
20936
- avalibleTabs: this.settings.tabs
20937
- })).appendTo(this.content.find('.uploadcare-dialog-body')));
20938
- return tab;
21717
+ return this.tabs[name] = new TabCls(tabPanel, tabButton, this.apiForTab(name), this.settings);
20939
21718
  };
20940
21719
 
20941
21720
  Dialog.prototype.switchTab = function(currentTab) {
@@ -20966,6 +21745,11 @@ var _require = (function() {
20966
21745
  return this.__updateFirstTab();
20967
21746
  };
20968
21747
 
21748
+ Dialog.prototype.__welcome = function() {
21749
+ this.addTab('welcome');
21750
+ return this.switchTab('welcome');
21751
+ };
21752
+
20969
21753
  return Dialog;
20970
21754
 
20971
21755
  })();
@@ -20973,35 +21757,55 @@ var _require = (function() {
20973
21757
 
20974
21758
  }).call(this);
20975
21759
  (function() {
20976
- var $, namespace;
21760
+ var $, MULTIPLE_UPLOAD_FILES_LIMIT, namespace, t, tpl, _ref, _ref1;
20977
21761
 
20978
- namespace = uploadcare.namespace, $ = uploadcare.jQuery;
21762
+ namespace = uploadcare.namespace, $ = uploadcare.jQuery, (_ref = uploadcare.templates, tpl = _ref.tpl), (_ref1 = uploadcare.locale, t = _ref1.t), MULTIPLE_UPLOAD_FILES_LIMIT = uploadcare.MULTIPLE_UPLOAD_FILES_LIMIT;
20979
21763
 
20980
21764
  namespace('uploadcare.widget.tabs', function(ns) {
20981
- return ns.BaseFileTab = (function() {
21765
+ return ns.BaseSourceTab = (function() {
21766
+ var CLASS_PREFIX, ROLE_PREFIX;
20982
21767
 
20983
- function BaseFileTab(dialog, settings) {
20984
- this.dialog = dialog;
21768
+ CLASS_PREFIX = 'uploadcare-dialog-source-base-';
21769
+
21770
+ ROLE_PREFIX = '@' + CLASS_PREFIX;
21771
+
21772
+ function BaseSourceTab(container, tabButton, dialogApi, settings) {
21773
+ var notDisabled, updateFooter,
21774
+ _this = this;
21775
+ this.container = container;
21776
+ this.tabButton = tabButton;
21777
+ this.dialogApi = dialogApi;
20985
21778
  this.settings = settings;
20986
- this.onSelected = $.Callbacks();
21779
+ this.container.append(tpl('source-tab-base'));
21780
+ this.wrap = this.container.find(ROLE_PREFIX + 'wrap');
21781
+ notDisabled = ':not(.uploadcare-disabled-el)';
21782
+ this.container.on('click', ROLE_PREFIX + 'show-files' + notDisabled, this.dialogApi.switchToPreview);
21783
+ this.container.on('click', ROLE_PREFIX + 'done' + notDisabled, this.dialogApi.done);
21784
+ updateFooter = function() {
21785
+ var toLessFiles, toManyFiles;
21786
+ toManyFiles = _this.dialogApi.fileColl.length() > MULTIPLE_UPLOAD_FILES_LIMIT;
21787
+ toLessFiles = _this.dialogApi.fileColl.length() === 0;
21788
+ _this.container.find(ROLE_PREFIX + 'done').toggleClass('uploadcare-disabled-el', toManyFiles || toLessFiles);
21789
+ _this.container.find(ROLE_PREFIX + 'show-files').toggleClass('uploadcare-disabled-el', toLessFiles);
21790
+ return _this.container.find(ROLE_PREFIX + 'footer-text').toggleClass('uploadcare-error', toManyFiles).text(toManyFiles ? t('dialog.tabs.preview.multiple.toManyFiles').replace('%max%', MULTIPLE_UPLOAD_FILES_LIMIT) : t('dialog.tabs.preview.multiple.title') + ' ' + t('file', _this.dialogApi.fileColl.length()));
21791
+ };
21792
+ updateFooter();
21793
+ this.dialogApi.fileColl.onAdd.add(updateFooter);
21794
+ this.dialogApi.fileColl.onRemove.add(updateFooter);
20987
21795
  }
20988
21796
 
20989
- BaseFileTab.prototype.setContent = function(content) {
20990
- throw new Error('not implemented');
20991
- };
20992
-
20993
- return BaseFileTab;
21797
+ return BaseSourceTab;
20994
21798
 
20995
21799
  })();
20996
21800
  });
20997
21801
 
20998
21802
  }).call(this);
20999
21803
  (function() {
21000
- var $, dragdrop, namespace, utils,
21804
+ var $, dragdrop, namespace, tpl, utils, _ref,
21001
21805
  __hasProp = {}.hasOwnProperty,
21002
21806
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
21003
21807
 
21004
- namespace = uploadcare.namespace, utils = uploadcare.utils, $ = uploadcare.jQuery;
21808
+ namespace = uploadcare.namespace, utils = uploadcare.utils, $ = uploadcare.jQuery, (_ref = uploadcare.templates, tpl = _ref.tpl);
21005
21809
 
21006
21810
  dragdrop = uploadcare.widget.dragdrop;
21007
21811
 
@@ -21011,48 +21815,54 @@ var _require = (function() {
21011
21815
  __extends(FileTab, _super);
21012
21816
 
21013
21817
  function FileTab() {
21014
- return FileTab.__super__.constructor.apply(this, arguments);
21015
- }
21016
-
21017
- FileTab.prototype.setContent = function(content) {
21018
- this.content = content;
21818
+ var _this = this;
21819
+ FileTab.__super__.constructor.apply(this, arguments);
21820
+ this.wrap.append(tpl('tab-file', {
21821
+ avalibleTabs: this.dialogApi.avalibleTabs
21822
+ }));
21823
+ this.wrap.on('click', '@uploadcare-dialog-switch-tab', function(e) {
21824
+ return _this.dialogApi.switchTab($(e.target).data('tab'));
21825
+ });
21019
21826
  this.__setupFileButton();
21020
- return this.__initDragNDrop();
21021
- };
21827
+ this.__initDragNDrop();
21828
+ }
21022
21829
 
21023
21830
  FileTab.prototype.__initDragNDrop = function() {
21024
- var className, dropArea;
21025
- dropArea = this.content.find('@uploadcare-drop-area');
21831
+ var className, dropArea,
21832
+ _this = this;
21833
+ dropArea = this.wrap.find('@uploadcare-drop-area');
21026
21834
  if (utils.abilities.fileDragAndDrop) {
21027
- dragdrop.receiveDrop(this.onSelected.fire, dropArea);
21835
+ dragdrop.receiveDrop(function(type, data) {
21836
+ return _this.dialogApi.addFiles(type, data);
21837
+ }, dropArea);
21028
21838
  className = 'draganddrop';
21029
21839
  } else {
21030
21840
  className = 'no-draganddrop';
21031
21841
  }
21032
- return this.content.addClass("uploadcare-" + className);
21842
+ return this.wrap.addClass("uploadcare-" + className);
21033
21843
  };
21034
21844
 
21035
21845
  FileTab.prototype.__setupFileButton = function() {
21036
21846
  var fileButton,
21037
21847
  _this = this;
21038
- fileButton = this.content.find('@uploadcare-dialog-browse-file');
21848
+ fileButton = this.wrap.find('@uploadcare-dialog-browse-file');
21039
21849
  return utils.fileInput(fileButton, this.settings.multiple, function(e) {
21040
- return _this.onSelected.fire('event', e);
21850
+ return _this.dialogApi.addFiles('event', e);
21041
21851
  });
21042
21852
  };
21043
21853
 
21044
21854
  return FileTab;
21045
21855
 
21046
- })(ns.BaseFileTab);
21856
+ })(ns.BaseSourceTab);
21047
21857
  });
21048
21858
 
21049
21859
  }).call(this);
21050
21860
  (function() {
21051
- var $, namespace, t,
21861
+ var $, namespace, t, tpl, _ref,
21052
21862
  __hasProp = {}.hasOwnProperty,
21053
21863
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
21054
21864
 
21055
- namespace = uploadcare.namespace, $ = uploadcare.jQuery;
21865
+ namespace = uploadcare.namespace, $ = uploadcare.jQuery, (_ref = uploadcare.templates, tpl = _ref.tpl);
21056
21866
 
21057
21867
  t = uploadcare.locale.t;
21058
21868
 
@@ -21062,10 +21872,6 @@ var _require = (function() {
21062
21872
 
21063
21873
  __extends(UrlTab, _super);
21064
21874
 
21065
- function UrlTab() {
21066
- return UrlTab.__super__.constructor.apply(this, arguments);
21067
- }
21068
-
21069
21875
  urlRegexp = /^(http|https):\/\/.+\..+$/i;
21070
21876
 
21071
21877
  fixUrl = function(url) {
@@ -21079,36 +21885,39 @@ var _require = (function() {
21079
21885
  }
21080
21886
  };
21081
21887
 
21082
- UrlTab.prototype.setContent = function(content) {
21888
+ function UrlTab() {
21083
21889
  var button, input,
21084
21890
  _this = this;
21085
- this.content = content;
21086
- input = this.content.find('@uploadcare-dialog-url-input');
21891
+ UrlTab.__super__.constructor.apply(this, arguments);
21892
+ this.wrap.append(tpl('tab-url'));
21893
+ input = this.wrap.find('@uploadcare-dialog-url-input');
21087
21894
  input.on('change keyup input', function() {
21088
21895
  return button.attr('disabled', !fixUrl($(this).val()));
21089
21896
  });
21090
- button = this.content.find('@uploadcare-dialog-url-submit').attr('disabled', true);
21091
- return this.content.find('@uploadcare-dialog-url-form').on('submit', function() {
21897
+ button = this.wrap.find('@uploadcare-dialog-url-submit').attr('disabled', true);
21898
+ this.wrap.find('@uploadcare-dialog-url-form').on('submit', function() {
21092
21899
  var url;
21093
21900
  if (url = fixUrl(input.val())) {
21094
- _this.onSelected.fire('url', url);
21901
+ _this.dialogApi.addFiles('url', url);
21902
+ input.val('');
21095
21903
  }
21096
21904
  return false;
21097
21905
  });
21098
- };
21906
+ }
21099
21907
 
21100
21908
  return UrlTab;
21101
21909
 
21102
- })(ns.BaseFileTab);
21910
+ })(ns.BaseSourceTab);
21103
21911
  });
21104
21912
 
21105
21913
  }).call(this);
21106
21914
  (function() {
21107
- var $, locale, namespace, utils,
21915
+ var $, locale, namespace, t, utils, _ref,
21916
+ __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
21108
21917
  __hasProp = {}.hasOwnProperty,
21109
21918
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
21110
21919
 
21111
- namespace = uploadcare.namespace, locale = uploadcare.locale, utils = uploadcare.utils, $ = uploadcare.jQuery;
21920
+ namespace = uploadcare.namespace, locale = uploadcare.locale, utils = uploadcare.utils, $ = uploadcare.jQuery, (_ref = uploadcare.locale, t = _ref.t);
21112
21921
 
21113
21922
  namespace('uploadcare.widget.tabs', function(ns) {
21114
21923
  return ns.RemoteTabFor = function(service) {
@@ -21118,98 +21927,174 @@ var _require = (function() {
21118
21927
  __extends(RemoteTab, _super);
21119
21928
 
21120
21929
  function RemoteTab() {
21121
- return RemoteTab.__super__.constructor.apply(this, arguments);
21122
- }
21930
+ this.__createIframe = __bind(this.__createIframe, this);
21123
21931
 
21124
- RemoteTab.prototype.setContent = function(content) {
21125
21932
  var _this = this;
21126
- this.content = content;
21127
- this.dialog.progress(function(tab) {
21128
- if (tab === service) {
21129
- return _this.createIframe();
21130
- }
21131
- });
21132
- return this.dialog.fail(function() {
21133
- return _this.cleanup();
21933
+ RemoteTab.__super__.constructor.apply(this, arguments);
21934
+ this.wrap.addClass('uploadcare-dialog-remote-iframe-wrap');
21935
+ this.dialogApi.onSwitchedToMe.add(this.__createIframe);
21936
+ this.dialogApi.onSwitched.add(function(_, switchedToMe) {
21937
+ return _this.__sendMessage({
21938
+ type: 'visibility-changed',
21939
+ visible: switchedToMe
21940
+ });
21134
21941
  });
21942
+ }
21943
+
21944
+ RemoteTab.prototype.__sendMessage = function(messageObj) {
21945
+ var _ref1, _ref2, _ref3;
21946
+ return (_ref1 = this.iframe) != null ? (_ref2 = _ref1[0]) != null ? (_ref3 = _ref2.contentWindow) != null ? _ref3.postMessage(JSON.stringify(messageObj), '*') : void 0 : void 0 : void 0;
21135
21947
  };
21136
21948
 
21137
- RemoteTab.prototype.createIframe = function() {
21138
- var src;
21949
+ RemoteTab.prototype.__createIframe = function() {
21950
+ var nos, src,
21951
+ _this = this;
21139
21952
  if (!this.iframe) {
21140
- this.windowId = utils.uuid();
21141
- this.createWatcher();
21142
- src = ("" + this.settings.socialBase + "/window/" + this.windowId + "/") + ("" + service + "?lang=" + locale.lang + "&public_key=" + this.settings.publicKey) + ("&widget_version=" + (encodeURIComponent(uploadcare.version)));
21143
- return this.iframe = $('<iframe>').attr('src', src).css({
21953
+ src = ("" + this.settings.socialBase + "/window/" + service + "?") + $.param({
21954
+ lang: this.settings.locale,
21955
+ public_key: this.settings.publicKey,
21956
+ widget_version: uploadcare.version
21957
+ });
21958
+ this.iframe = $('<iframe>').attr('src', src).css({
21144
21959
  width: '100%',
21145
21960
  height: '100%',
21146
21961
  border: 0,
21147
21962
  visibility: 'hidden'
21148
- }).appendTo(this.content).on('load', function() {
21963
+ }).appendTo(this.wrap).on('load', function() {
21149
21964
  return $(this).css('visibility', 'visible');
21150
21965
  });
21151
- }
21152
- };
21153
-
21154
- RemoteTab.prototype.createWatcher = function() {
21155
- var _this = this;
21156
- if (!this.watcher) {
21157
- this.watcher = new utils.pubsub.PubSub(this.settings, 'window', this.windowId);
21158
- $(this.watcher).on('done', function(e, state) {
21159
- _this.cleanup();
21160
- return _this.onSelected.fire('url', state.url);
21966
+ nos = function(str) {
21967
+ return str.toLowerCase().replace(/^https/, 'http');
21968
+ };
21969
+ return $(window).on("message", function(_arg) {
21970
+ var e, goodOrigin, goodSource, message, _ref1, _ref2;
21971
+ e = _arg.originalEvent;
21972
+ goodOrigin = nos(e.origin) === nos(_this.settings.socialBase);
21973
+ goodSource = e.source === ((_ref1 = _this.iframe) != null ? (_ref2 = _ref1[0]) != null ? _ref2.contentWindow : void 0 : void 0);
21974
+ if (goodOrigin && goodSource) {
21975
+ try {
21976
+ message = JSON.parse(e.data);
21977
+ } catch (_error) {}
21978
+ if ((message != null ? message.type : void 0) === 'file-selected') {
21979
+ _this.dialogApi.addFiles('url', message.url);
21980
+ return _this.__sendMessage({
21981
+ type: 'file-selected-received',
21982
+ url: message.url
21983
+ });
21984
+ }
21985
+ }
21161
21986
  });
21162
- return this.watcher.watch();
21163
- }
21164
- };
21165
-
21166
- RemoteTab.prototype.cleanup = function() {
21167
- var _ref, _ref1;
21168
- if ((_ref = this.watcher) != null) {
21169
- _ref.stop();
21170
21987
  }
21171
- this.watcher = null;
21172
- if ((_ref1 = this.iframe) != null) {
21173
- _ref1.remove();
21174
- }
21175
- return this.iframe = null;
21176
21988
  };
21177
21989
 
21178
21990
  return RemoteTab;
21179
21991
 
21180
- })(ns.BaseFileTab);
21992
+ })(ns.BaseSourceTab);
21181
21993
  };
21182
21994
  });
21183
21995
 
21184
21996
  }).call(this);
21185
21997
  (function() {
21186
- var $, CropWidget, namespace, progress, t, tpl, utils, _ref, _ref1, _ref2, _ref3;
21998
+ var $, Circle, namespace, _ref, _ref1;
21187
21999
 
21188
- namespace = uploadcare.namespace, utils = uploadcare.utils, (_ref = uploadcare.ui, progress = _ref.progress), (_ref1 = uploadcare.templates, tpl = _ref1.tpl), $ = uploadcare.jQuery, (_ref2 = uploadcare.crop, CropWidget = _ref2.CropWidget), (_ref3 = uploadcare.locale, t = _ref3.t);
22000
+ namespace = uploadcare.namespace, (_ref = uploadcare.ui, (_ref1 = _ref.progress, Circle = _ref1.Circle)), $ = uploadcare.jQuery;
21189
22001
 
21190
22002
  namespace('uploadcare.widget.tabs', function(ns) {
21191
- return ns.PreviewTab = (function() {
22003
+ return ns.BasePreviewTab = (function() {
21192
22004
  var PREFIX;
21193
22005
 
21194
22006
  PREFIX = '@uploadcare-dialog-preview-';
21195
22007
 
21196
- function PreviewTab(dialog, settings) {
21197
- this.dialog = dialog;
22008
+ function BasePreviewTab(container, tabButton, dialogApi, settings) {
22009
+ var notDisabled;
22010
+ this.container = container;
22011
+ this.tabButton = tabButton;
22012
+ this.dialogApi = dialogApi;
21198
22013
  this.settings = settings;
21199
- this.onDone = $.Callbacks();
21200
- this.onBack = $.Callbacks();
21201
- this.__doCrop = this.settings.__cropParsed.enabled;
22014
+ this.__initTabButtonCircle();
22015
+ notDisabled = ':not(.uploadcare-disabled-el)';
22016
+ this.container.on('click', PREFIX + 'back' + notDisabled, this.dialogApi.clearFiles);
22017
+ this.container.on('click', PREFIX + 'done' + notDisabled, this.dialogApi.done);
21202
22018
  }
21203
22019
 
21204
- PreviewTab.prototype.setContent = function(content) {
21205
- var notDisabled;
21206
- this.content = content;
21207
- notDisabled = ':not(.uploadcare-disabled-el)';
21208
- this.content.on('click', PREFIX + 'back' + notDisabled, this.onBack.fire);
21209
- return this.content.on('click', PREFIX + 'done' + notDisabled, this.onDone.fire);
22020
+ BasePreviewTab.prototype.__initTabButtonCircle = function() {
22021
+ var buttonHovered, circle, circleDf, circleEl, size, tabActive, update, updateTheme,
22022
+ _this = this;
22023
+ size = 28;
22024
+ circleEl = $('<div>').appendTo(this.tabButton).css({
22025
+ position: 'absolute',
22026
+ top: '50%',
22027
+ left: '50%',
22028
+ marginTop: size / -2,
22029
+ marginLeft: size / -2,
22030
+ width: size,
22031
+ height: size
22032
+ });
22033
+ circleDf = $.Deferred();
22034
+ update = function() {
22035
+ var infos, progress, progressInfo, _i, _len;
22036
+ infos = _this.dialogApi.fileColl.lastProgresses();
22037
+ progress = 0;
22038
+ for (_i = 0, _len = infos.length; _i < _len; _i++) {
22039
+ progressInfo = infos[_i];
22040
+ progress += ((progressInfo != null ? progressInfo.progress : void 0) || 0) / infos.length;
22041
+ }
22042
+ return circleDf.notify({
22043
+ progress: progress
22044
+ });
22045
+ };
22046
+ this.dialogApi.fileColl.onAnyProgress.add(update);
22047
+ this.dialogApi.fileColl.onAdd.add(update);
22048
+ this.dialogApi.fileColl.onRemove.add(update);
22049
+ circle = new Circle(circleEl).listen(circleDf.promise(), 'progress');
22050
+ updateTheme = function() {
22051
+ return circle.setColorTheme(tabActive ? 'default' : buttonHovered ? 'darkGrey' : 'grey');
22052
+ };
22053
+ tabActive = false;
22054
+ this.dialogApi.onSwitched.add(function(_, switchedToMe) {
22055
+ tabActive = switchedToMe;
22056
+ return updateTheme();
22057
+ });
22058
+ buttonHovered = false;
22059
+ return this.tabButton.hover(function() {
22060
+ buttonHovered = true;
22061
+ return updateTheme();
22062
+ }, function() {
22063
+ buttonHovered = false;
22064
+ return updateTheme();
22065
+ });
21210
22066
  };
21211
22067
 
21212
- PreviewTab.prototype.setFile = function(file) {
22068
+ return BasePreviewTab;
22069
+
22070
+ })();
22071
+ });
22072
+
22073
+ }).call(this);
22074
+ (function() {
22075
+ var $, CropWidget, namespace, progress, t, tpl, utils, _ref, _ref1, _ref2, _ref3,
22076
+ __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
22077
+ __hasProp = {}.hasOwnProperty,
22078
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
22079
+
22080
+ namespace = uploadcare.namespace, utils = uploadcare.utils, (_ref = uploadcare.ui, progress = _ref.progress), (_ref1 = uploadcare.templates, tpl = _ref1.tpl), $ = uploadcare.jQuery, (_ref2 = uploadcare.crop, CropWidget = _ref2.CropWidget), (_ref3 = uploadcare.locale, t = _ref3.t);
22081
+
22082
+ namespace('uploadcare.widget.tabs', function(ns) {
22083
+ return ns.PreviewTab = (function(_super) {
22084
+ var PREFIX;
22085
+
22086
+ __extends(PreviewTab, _super);
22087
+
22088
+ PREFIX = '@uploadcare-dialog-preview-';
22089
+
22090
+ function PreviewTab() {
22091
+ this.__setFile = __bind(this.__setFile, this);
22092
+ PreviewTab.__super__.constructor.apply(this, arguments);
22093
+ this.__doCrop = this.settings.__cropParsed.enabled;
22094
+ this.dialogApi.fileColl.onAdd.add(this.__setFile);
22095
+ }
22096
+
22097
+ PreviewTab.prototype.__setFile = function(file) {
21213
22098
  var _this = this;
21214
22099
  this.file = file;
21215
22100
  this.__setState('unknown');
@@ -21237,7 +22122,7 @@ var _require = (function() {
21237
22122
  data = $.extend({
21238
22123
  file: progressInfo.incompleteFileInfo
21239
22124
  }, data);
21240
- _this.content.empty().append(tpl("tab-preview-" + state, data));
22125
+ _this.container.empty().append(tpl("tab-preview-" + state, data));
21241
22126
  return _this.__afterRender(state);
21242
22127
  }));
21243
22128
  };
@@ -21255,16 +22140,16 @@ var _require = (function() {
21255
22140
  };
21256
22141
 
21257
22142
  PreviewTab.prototype.__hideDoneButton = function() {
21258
- return this.content.find(PREFIX + 'done').hide();
22143
+ return this.container.find(PREFIX + 'done').hide();
21259
22144
  };
21260
22145
 
21261
22146
  PreviewTab.prototype.__initCrop = function() {
21262
22147
  var _this = this;
21263
22148
  return setTimeout((function() {
21264
22149
  var container, doneButton, img, widget;
21265
- img = _this.content.find(PREFIX + 'image');
22150
+ img = _this.container.find(PREFIX + 'image');
21266
22151
  container = img.parent();
21267
- doneButton = _this.content.find(PREFIX + 'done');
22152
+ doneButton = _this.container.find(PREFIX + 'done');
21268
22153
  widget = new CropWidget($.extend({}, _this.settings.__cropParsed, {
21269
22154
  container: container,
21270
22155
  controls: false
@@ -21290,13 +22175,13 @@ var _require = (function() {
21290
22175
  }
21291
22176
  });
21292
22177
  img.remove();
21293
- return _this.content.find('.uploadcare-dialog-title').text(t('dialog.tabs.preview.crop.title'));
22178
+ return _this.container.find('.uploadcare-dialog-title').text(t('dialog.tabs.preview.crop.title'));
21294
22179
  }), 100);
21295
22180
  };
21296
22181
 
21297
22182
  PreviewTab.prototype.__initCircle = function() {
21298
22183
  var circle, circleEl;
21299
- circleEl = this.content.find('@uploadcare-dialog-preview-circle');
22184
+ circleEl = this.container.find('@uploadcare-dialog-preview-circle');
21300
22185
  if (circleEl.length) {
21301
22186
  circle = new progress.Circle(circleEl);
21302
22187
  return circle.listen(this.file);
@@ -21305,48 +22190,176 @@ var _require = (function() {
21305
22190
 
21306
22191
  return PreviewTab;
21307
22192
 
21308
- })();
22193
+ })(ns.BasePreviewTab);
21309
22194
  });
21310
22195
 
21311
22196
  }).call(this);
21312
22197
  (function() {
21313
- var $, namespace, t, uploads, utils,
22198
+ var $, CropWidget, MULTIPLE_UPLOAD_FILES_LIMIT, namespace, progress, t, tpl, utils, _ref, _ref1, _ref2, _ref3,
21314
22199
  __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
21315
- __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
22200
+ __hasProp = {}.hasOwnProperty,
22201
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
21316
22202
 
21317
- namespace = uploadcare.namespace, utils = uploadcare.utils, uploads = uploadcare.uploads, $ = uploadcare.jQuery;
22203
+ namespace = uploadcare.namespace, utils = uploadcare.utils, (_ref = uploadcare.ui, progress = _ref.progress), (_ref1 = uploadcare.templates, tpl = _ref1.tpl), $ = uploadcare.jQuery, (_ref2 = uploadcare.crop, CropWidget = _ref2.CropWidget), (_ref3 = uploadcare.locale, t = _ref3.t), MULTIPLE_UPLOAD_FILES_LIMIT = uploadcare.MULTIPLE_UPLOAD_FILES_LIMIT;
21318
22204
 
21319
- t = uploadcare.locale.t;
22205
+ namespace('uploadcare.widget.tabs', function(ns) {
22206
+ return ns.PreviewTabMultiple = (function(_super) {
22207
+ var CLASS_PREFIX, ROLE_PREFIX;
21320
22208
 
21321
- namespace('uploadcare.widget', function(ns) {
21322
- return ns.Widget = (function() {
22209
+ __extends(PreviewTabMultiple, _super);
21323
22210
 
21324
- function Widget(element) {
21325
- this.__openDialogWithFile = __bind(this.__openDialogWithFile, this);
22211
+ CLASS_PREFIX = 'uploadcare-dpm-';
21326
22212
 
21327
- this.__fail = __bind(this.__fail, this);
22213
+ ROLE_PREFIX = '@' + CLASS_PREFIX;
21328
22214
 
21329
- this.reloadInfo = __bind(this.reloadInfo, this);
22215
+ function PreviewTabMultiple() {
22216
+ this.__removeFile = __bind(this.__removeFile, this);
21330
22217
 
21331
- this.__setFile = __bind(this.__setFile, this);
22218
+ this.__addFile = __bind(this.__addFile, this);
22219
+
22220
+ this.__updateFileInfo = __bind(this.__updateFileInfo, this);
22221
+
22222
+ this.__fileFailed = __bind(this.__fileFailed, this);
22223
+
22224
+ this.__fileDone = __bind(this.__fileDone, this);
22225
+
22226
+ this.__fileProgress = __bind(this.__fileProgress, this);
22227
+
22228
+ this.__updateContainerView = __bind(this.__updateContainerView, this);
21332
22229
 
22230
+ var file, _i, _len, _ref4;
22231
+ PreviewTabMultiple.__super__.constructor.apply(this, arguments);
22232
+ this.container.append(tpl('tab-preview-multiple'));
22233
+ this.fileListEl = this.__find('file-list');
22234
+ this.filesCountEl = this.__find('files-count');
22235
+ this.footerText = this.__find('footer-text');
22236
+ this.doneBtnEl = this.container.find('@uploadcare-dialog-preview-done');
22237
+ _ref4 = this.dialogApi.fileColl.get();
22238
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
22239
+ file = _ref4[_i];
22240
+ this.__addFile(file);
22241
+ }
22242
+ this.dialogApi.fileColl.onAdd.add([this.__addFile, this.__updateContainerView]);
22243
+ this.dialogApi.fileColl.onRemove.add([this.__removeFile, this.__updateContainerView]);
22244
+ this.dialogApi.fileColl.onAnyProgress.add(this.__fileProgress);
22245
+ this.dialogApi.fileColl.onAnyDone.add(this.__fileDone);
22246
+ this.dialogApi.fileColl.onAnyFail.add(this.__fileFailed);
22247
+ }
22248
+
22249
+ PreviewTabMultiple.prototype.__find = function(s, context) {
22250
+ if (context == null) {
22251
+ context = this.container;
22252
+ }
22253
+ return $(ROLE_PREFIX + s, context);
22254
+ };
22255
+
22256
+ PreviewTabMultiple.prototype.__updateContainerView = function() {
22257
+ var toManyFiles;
22258
+ this.filesCountEl.text(t('file', this.dialogApi.fileColl.length()));
22259
+ toManyFiles = this.dialogApi.fileColl.length() > MULTIPLE_UPLOAD_FILES_LIMIT;
22260
+ this.doneBtnEl.toggleClass('uploadcare-disabled-el', toManyFiles);
22261
+ return this.footerText.toggleClass('uploadcare-error', toManyFiles).text(toManyFiles ? t('dialog.tabs.preview.multiple.toManyFiles').replace('%max%', MULTIPLE_UPLOAD_FILES_LIMIT) : t('dialog.tabs.preview.multiple.question'));
22262
+ };
22263
+
22264
+ PreviewTabMultiple.prototype.__fileProgress = function(file, progressInfo) {
22265
+ var fileEl;
22266
+ fileEl = this.__fileToEl(file);
22267
+ this.__find('file-progressbar-value', fileEl).css('width', Math.round(progressInfo.progress * 100) + '%');
22268
+ return this.__updateFileInfo(file, progressInfo.incompleteFileInfo);
22269
+ };
22270
+
22271
+ PreviewTabMultiple.prototype.__fileDone = function(file, info) {
22272
+ this.__fileToEl(file).addClass(CLASS_PREFIX + 'uploaded');
22273
+ return this.__updateFileInfo(file, info);
22274
+ };
22275
+
22276
+ PreviewTabMultiple.prototype.__fileFailed = function(file, error, info) {
22277
+ var fileEl;
22278
+ fileEl = this.__fileToEl(file);
22279
+ fileEl.addClass(CLASS_PREFIX + 'error');
22280
+ this.__find('file-error', fileEl).text(t("errors." + error));
22281
+ return this.__updateFileInfo(file, info);
22282
+ };
22283
+
22284
+ PreviewTabMultiple.prototype.__updateFileInfo = function(file, info) {
22285
+ var fileEl, pWrapEl;
22286
+ fileEl = this.__fileToEl(file);
22287
+ fileEl.toggleClass(CLASS_PREFIX + 'image', !!info.isImage);
22288
+ if (info.isImage) {
22289
+ pWrapEl = this.__find('file-preview-wrap', fileEl);
22290
+ utils.squareImage(pWrapEl, info.previewUrl);
22291
+ }
22292
+ this.__find('file-name', fileEl).text(info.name || t('dialog.tabs.preview.unknownName'));
22293
+ return this.__find('file-size', fileEl).text(utils.readableFileSize(info.size, '–'));
22294
+ };
22295
+
22296
+ PreviewTabMultiple.prototype.__addFile = function(file) {
22297
+ return $(file).data('dmp-el', this.__createFileEl(file));
22298
+ };
22299
+
22300
+ PreviewTabMultiple.prototype.__removeFile = function(file) {
22301
+ return this.__fileToEl(file).remove();
22302
+ };
22303
+
22304
+ PreviewTabMultiple.prototype.__fileToEl = function(file) {
22305
+ return $(file).data('dmp-el');
22306
+ };
22307
+
22308
+ PreviewTabMultiple.prototype.__createFileEl = function(file) {
22309
+ var _this = this;
22310
+ return $(tpl('tab-preview-multiple-file')).appendTo(this.fileListEl).on('click', ROLE_PREFIX + 'file-remove', (function() {
22311
+ return _this.dialogApi.removeFile(file);
22312
+ }));
22313
+ };
22314
+
22315
+ return PreviewTabMultiple;
22316
+
22317
+ })(ns.BasePreviewTab);
22318
+ });
22319
+
22320
+ }).call(this);
22321
+ (function() {
22322
+ var namespace, tpl, _ref;
22323
+
22324
+ namespace = uploadcare.namespace, (_ref = uploadcare.templates, tpl = _ref.tpl);
22325
+
22326
+ namespace('uploadcare.widget.tabs', function(ns) {
22327
+ return ns.StaticTabWith = function(tplName) {
22328
+ var StaticTab;
22329
+ return StaticTab = (function() {
22330
+
22331
+ function StaticTab(container) {
22332
+ this.container = container;
22333
+ this.container.append(tpl("tab-" + tplName));
22334
+ }
22335
+
22336
+ return StaticTab;
22337
+
22338
+ })();
22339
+ };
22340
+ });
22341
+
22342
+ }).call(this);
22343
+ (function() {
22344
+ var $, namespace, s, t, utils, _ref,
22345
+ __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
22346
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
22347
+
22348
+ namespace = uploadcare.namespace, utils = uploadcare.utils, s = uploadcare.settings, $ = uploadcare.jQuery, (_ref = uploadcare.locale, t = _ref.t);
22349
+
22350
+ namespace('uploadcare.widget', function(ns) {
22351
+ return ns.BaseWidget = (function() {
22352
+
22353
+ function BaseWidget(element) {
21333
22354
  this.__reset = __bind(this.__reset, this);
21334
22355
 
21335
- var __onUploadComplete,
21336
- _this = this;
22356
+ var _this = this;
21337
22357
  this.element = $(element);
21338
- this.settings = utils.buildSettings(this.element.data());
22358
+ this.settings = s.build(this.element.data());
21339
22359
  this.__onChange = $.Callbacks();
21340
22360
  this.onChange = utils.publicCallbacks(this.__onChange);
21341
- __onUploadComplete = $.Callbacks();
21342
- this.onUploadComplete = utils.publicCallbacks(__onUploadComplete);
21343
- this.__onChange.add(function(file) {
21344
- return file != null ? file.done(function(info) {
21345
- return __onUploadComplete.fire(info);
21346
- }) : void 0;
21347
- });
22361
+ this.__initOnUploadComplete();
21348
22362
  this.__setupWidget();
21349
- this.currentFile = null;
21350
22363
  this.template.reset();
21351
22364
  this.element.on('change.uploadcare', function() {
21352
22365
  return _this.reloadInfo();
@@ -21354,76 +22367,169 @@ var _require = (function() {
21354
22367
  this.reloadInfo();
21355
22368
  }
21356
22369
 
21357
- Widget.prototype.__reset = function(keepValue) {
21358
- var _ref;
21359
- if (keepValue == null) {
21360
- keepValue = false;
21361
- }
21362
- if ((_ref = this.currentFile) != null) {
21363
- _ref.cancel();
21364
- }
21365
- this.currentFile = null;
21366
- this.template.reset();
21367
- if (!keepValue) {
21368
- return this.__setValue('');
22370
+ BaseWidget.prototype.__setupWidget = function() {
22371
+ var dialogButton, fileButton,
22372
+ _this = this;
22373
+ this.template = new ns.Template(this.settings, this.element);
22374
+ this.template.addButton('cancel', t('buttons.cancel')).on('click', this.__reset);
22375
+ this.template.addButton('remove', t('buttons.remove')).on('click', this.__reset);
22376
+ if (this.settings.tabs.length > 0) {
22377
+ if (__indexOf.call(this.settings.tabs, 'file') >= 0) {
22378
+ fileButton = this.template.addButton('file');
22379
+ fileButton.on('click', function() {
22380
+ return _this.openDialog('file');
22381
+ });
22382
+ }
22383
+ dialogButton = this.template.addButton('dialog');
22384
+ dialogButton.on('click', function() {
22385
+ return _this.openDialog();
22386
+ });
21369
22387
  }
22388
+ ns.dragdrop.receiveDrop(this.__handleDirectSelection, this.template.dropArea);
22389
+ this.template.dropArea.on('dragstatechange.uploadcare', function(e, active) {
22390
+ if (!(active && uploadcare.isDialogOpened())) {
22391
+ return _this.template.dropArea.toggleClass('uploadcare-dragging', active);
22392
+ }
22393
+ });
22394
+ return this.template.content.on('click', '@uploadcare-widget-file-name', function() {
22395
+ return _this.openDialog();
22396
+ });
21370
22397
  };
21371
22398
 
21372
- Widget.prototype.__setFile = function(newFile, keepValue) {
21373
- var _this = this;
21374
- if (keepValue == null) {
21375
- keepValue = false;
22399
+ BaseWidget.prototype.__infoToValue = function(info) {
22400
+ if (info.cdnUrlModifiers || this.settings.pathValue) {
22401
+ return info.cdnUrl;
22402
+ } else {
22403
+ return info.uuid;
21376
22404
  }
21377
- if (newFile === this.currentFile) {
21378
- if (newFile) {
21379
- if (!keepValue) {
21380
- this.__updateValue();
21381
- }
21382
- }
21383
- return;
22405
+ };
22406
+
22407
+ BaseWidget.prototype.__setValue = function(value) {
22408
+ if (this.element.val() !== value) {
22409
+ this.element.val(value);
22410
+ return this.__onChange.fire(this.__currentObject());
21384
22411
  }
21385
- this.__reset(keepValue);
21386
- if (newFile) {
21387
- this.currentFile = newFile;
21388
- this.template.listen(this.currentFile);
21389
- this.currentFile.fail(function(error) {
21390
- if (newFile === _this.currentFile) {
21391
- return _this.__fail(error);
22412
+ };
22413
+
22414
+ BaseWidget.prototype.__reset = function() {
22415
+ this.__clearCurrentObj();
22416
+ this.template.reset();
22417
+ return this.__setValue('');
22418
+ };
22419
+
22420
+ BaseWidget.prototype.__watchCurrentObject = function() {
22421
+ var object,
22422
+ _this = this;
22423
+ object = this.__currentFile();
22424
+ if (object) {
22425
+ this.template.listen(object);
22426
+ return object.fail(function(error) {
22427
+ if (object === _this.__currentFile()) {
22428
+ return _this.__onUploadingFailed(error);
21392
22429
  }
21393
22430
  }).done(function(info) {
21394
- if (newFile === _this.currentFile) {
21395
- _this.template.setFileInfo(info);
21396
- return _this.template.loaded();
22431
+ if (object === _this.__currentFile()) {
22432
+ return _this.__onUploadingDone(info);
21397
22433
  }
21398
22434
  });
21399
- if (!keepValue) {
21400
- return this.__updateValue();
21401
- }
21402
22435
  }
21403
22436
  };
21404
22437
 
21405
- Widget.prototype.__updateValue = function() {
21406
- var file,
22438
+ BaseWidget.prototype.__onUploadingDone = function(info) {
22439
+ this.__setValue(this.__infoToValue(info));
22440
+ this.template.setFileInfo(info);
22441
+ return this.template.loaded();
22442
+ };
22443
+
22444
+ BaseWidget.prototype.__onUploadingFailed = function(error) {
22445
+ return this.template.error(error);
22446
+ };
22447
+
22448
+ BaseWidget.prototype.api = function() {
22449
+ if (!this.__api) {
22450
+ this.__api = utils.bindAll(this, ['openDialog', 'reloadInfo', 'value']);
22451
+ this.__api.onChange = this.onChange;
22452
+ this.__api.onUploadComplete = this.onUploadComplete;
22453
+ }
22454
+ return this.__api;
22455
+ };
22456
+
22457
+ return BaseWidget;
22458
+
22459
+ })();
22460
+ });
22461
+
22462
+ }).call(this);
22463
+ (function() {
22464
+ var $, namespace, s, utils,
22465
+ __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
22466
+ __hasProp = {}.hasOwnProperty,
22467
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
22468
+
22469
+ namespace = uploadcare.namespace, utils = uploadcare.utils, s = uploadcare.settings, $ = uploadcare.jQuery;
22470
+
22471
+ namespace('uploadcare.widget', function(ns) {
22472
+ return ns.Widget = (function(_super) {
22473
+
22474
+ __extends(Widget, _super);
22475
+
22476
+ function Widget(element) {
22477
+ this.__handleDirectSelection = __bind(this.__handleDirectSelection, this);
22478
+
22479
+ this.reloadInfo = __bind(this.reloadInfo, this);
22480
+
22481
+ this.__setFile = __bind(this.__setFile, this);
22482
+ this.currentFile = null;
22483
+ Widget.__super__.constructor.apply(this, arguments);
22484
+ }
22485
+
22486
+ Widget.prototype.__initOnUploadComplete = function() {
22487
+ var __onUploadComplete,
21407
22488
  _this = this;
21408
- file = this.currentFile;
21409
- return this.currentFile.done(function(info) {
21410
- if (file === _this.currentFile) {
21411
- return _this.__setValue(info.cdnUrlModifiers || _this.settings.pathValue ? info.cdnUrl : info.uuid);
21412
- }
22489
+ __onUploadComplete = $.Callbacks();
22490
+ this.onUploadComplete = utils.publicCallbacks(__onUploadComplete);
22491
+ return this.__onChange.add(function(file) {
22492
+ return file != null ? file.done(function(info) {
22493
+ return __onUploadComplete.fire(info);
22494
+ }) : void 0;
21413
22495
  });
21414
22496
  };
21415
22497
 
21416
- Widget.prototype.__setValue = function(value) {
21417
- if (this.element.val() !== value) {
21418
- this.element.val(value);
21419
- return this.__onChange.fire(this.currentFile);
22498
+ Widget.prototype.__currentObject = function() {
22499
+ return this.currentFile;
22500
+ };
22501
+
22502
+ Widget.prototype.__currentFile = function() {
22503
+ return this.currentFile;
22504
+ };
22505
+
22506
+ Widget.prototype.__clearCurrentObj = function() {
22507
+ var _ref;
22508
+ if ((_ref = this.currentFile) != null) {
22509
+ _ref.cancel();
21420
22510
  }
22511
+ return this.currentFile = null;
22512
+ };
22513
+
22514
+ Widget.prototype.__setFile = function(newFile) {
22515
+ if (newFile !== this.currentFile) {
22516
+ this.__reset();
22517
+ if (newFile) {
22518
+ this.currentFile = newFile;
22519
+ return this.__watchCurrentObject();
22520
+ }
22521
+ }
22522
+ };
22523
+
22524
+ Widget.prototype.__onUploadingFailed = function() {
22525
+ this.__reset();
22526
+ return Widget.__super__.__onUploadingFailed.apply(this, arguments);
21421
22527
  };
21422
22528
 
21423
22529
  Widget.prototype.value = function(value) {
21424
22530
  if (value != null) {
21425
22531
  if (this.element.val() !== value) {
21426
- this.__setFile(value.done && value.fail ? value : uploadcare.fileFrom('url', value, this.settings));
22532
+ this.__setFile(utils.anyToFile(value, this.settings));
21427
22533
  }
21428
22534
  return this;
21429
22535
  } else {
@@ -21432,55 +22538,11 @@ var _require = (function() {
21432
22538
  };
21433
22539
 
21434
22540
  Widget.prototype.reloadInfo = function() {
21435
- var file;
21436
- if (this.element.val()) {
21437
- file = uploadcare.fileFrom('url', this.element.val(), this.settings);
21438
- this.__setFile(file, true);
21439
- } else {
21440
- this.__reset();
21441
- }
22541
+ this.__setFile(utils.anyToFile(this.element.val(), this.settings));
21442
22542
  return this;
21443
22543
  };
21444
22544
 
21445
- Widget.prototype.__fail = function(error) {
21446
- this.__reset();
21447
- return this.template.error(error);
21448
- };
21449
-
21450
- Widget.prototype.__setupWidget = function() {
21451
- var dialogButton, fileButton,
21452
- _this = this;
21453
- this.template = new ns.Template(this.settings, this.element);
21454
- this.template.addButton('cancel', t('buttons.cancel')).on('click', function() {
21455
- return _this.__reset();
21456
- });
21457
- this.template.addButton('remove', t('buttons.remove')).on('click', function() {
21458
- return _this.__reset();
21459
- });
21460
- if (this.settings.tabs.length > 0) {
21461
- if (__indexOf.call(this.settings.tabs, 'file') >= 0) {
21462
- fileButton = this.template.addButton('file');
21463
- fileButton.on('click', function() {
21464
- return _this.openDialog('file');
21465
- });
21466
- }
21467
- dialogButton = this.template.addButton('dialog');
21468
- dialogButton.on('click', function() {
21469
- return _this.openDialog();
21470
- });
21471
- }
21472
- ns.dragdrop.receiveDrop(this.__openDialogWithFile, this.template.dropArea);
21473
- this.template.dropArea.on('dragstatechange.uploadcare', function(e, active) {
21474
- if (!(active && uploadcare.isDialogOpened())) {
21475
- return _this.template.dropArea.toggleClass('uploadcare-dragging', active);
21476
- }
21477
- });
21478
- return this.template.content.on('click', '@uploadcare-widget-file-name', function() {
21479
- return _this.openDialog();
21480
- });
21481
- };
21482
-
21483
- Widget.prototype.__openDialogWithFile = function(type, data) {
22545
+ Widget.prototype.__handleDirectSelection = function(type, data) {
21484
22546
  var file;
21485
22547
  file = uploadcare.fileFrom(type, data, this.settings);
21486
22548
  if (this.settings.previewStep) {
@@ -21499,84 +22561,219 @@ var _require = (function() {
21499
22561
  });
21500
22562
  };
21501
22563
 
21502
- Widget.prototype.api = function() {
21503
- if (!this.__api) {
21504
- this.__api = utils.bindAll(this, ['openDialog', 'reloadInfo', 'value']);
21505
- this.__api.onChange = this.onChange;
21506
- this.__api.onUploadComplete = this.onUploadComplete;
21507
- }
21508
- return this.__api;
21509
- };
21510
-
21511
22564
  return Widget;
21512
22565
 
21513
- })();
22566
+ })(ns.BaseWidget);
21514
22567
  });
21515
22568
 
21516
22569
  }).call(this);
21517
22570
  (function() {
21518
- var $, cleanup, dataAttr, initialize, initializeWidget, live;
22571
+ var $, namespace, t, utils, _ref,
22572
+ __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
22573
+ __hasProp = {}.hasOwnProperty,
22574
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
21519
22575
 
21520
- $ = uploadcare.jQuery;
22576
+ namespace = uploadcare.namespace, utils = uploadcare.utils, $ = uploadcare.jQuery, (_ref = uploadcare.locale, t = _ref.t);
21521
22577
 
21522
- dataAttr = 'uploadcareWidget';
22578
+ namespace('uploadcare.widget', function(ns) {
22579
+ return ns.MultipleWidget = (function(_super) {
21523
22580
 
21524
- uploadcare.initialize = function(container) {
21525
- if (container == null) {
21526
- container = 'body';
21527
- }
21528
- return initialize($(container).find('@uploadcare-uploader'));
21529
- };
22581
+ __extends(MultipleWidget, _super);
21530
22582
 
21531
- initialize = function(targets) {
21532
- var target, _i, _len, _results;
21533
- _results = [];
21534
- for (_i = 0, _len = targets.length; _i < _len; _i++) {
21535
- target = targets[_i];
21536
- _results.push(uploadcare.Widget(target));
21537
- }
21538
- return _results;
21539
- };
22583
+ function MultipleWidget(element) {
22584
+ this.__handleDirectSelection = __bind(this.__handleDirectSelection, this);
21540
22585
 
21541
- uploadcare.Widget = function(target) {
21542
- var el;
21543
- el = $(target).eq(0);
21544
- return initializeWidget(el);
21545
- };
22586
+ this.reloadInfo = __bind(this.reloadInfo, this);
21546
22587
 
21547
- initializeWidget = function(el) {
21548
- var widget;
21549
- widget = el.data(dataAttr);
21550
- if (!widget || el[0] !== widget.element[0]) {
21551
- cleanup(el);
21552
- widget = new uploadcare.widget.Widget(el);
21553
- el.data(dataAttr, widget);
21554
- widget.template.content.data(dataAttr, widget.template);
21555
- }
21556
- return widget.api();
21557
- };
22588
+ this.__setGroup = __bind(this.__setGroup, this);
22589
+ this.currentGroup = null;
22590
+ MultipleWidget.__super__.constructor.apply(this, arguments);
22591
+ }
21558
22592
 
21559
- cleanup = function(el) {
21560
- var template;
21561
- el.off('.uploadcare');
21562
- el = el.next('.uploadcare-widget');
21563
- template = el.data(dataAttr);
21564
- if (el.length && (!template || el[0] !== template.content[0])) {
21565
- return el.remove();
21566
- }
21567
- };
22593
+ MultipleWidget.prototype.__initOnUploadComplete = function() {
22594
+ var __onUploadComplete,
22595
+ _this = this;
22596
+ __onUploadComplete = $.Callbacks();
22597
+ this.onUploadComplete = utils.publicCallbacks(__onUploadComplete);
22598
+ return this.__onChange.add(function(group) {
22599
+ return group != null ? group.promise().done(function(info) {
22600
+ return __onUploadComplete.fire(info);
22601
+ }) : void 0;
22602
+ });
22603
+ };
21568
22604
 
21569
- live = function() {
21570
- return initialize($('@uploadcare-uploader'));
21571
- };
22605
+ MultipleWidget.prototype.__currentObject = function() {
22606
+ return this.currentGroup;
22607
+ };
22608
+
22609
+ MultipleWidget.prototype.__currentFile = function() {
22610
+ var _ref1;
22611
+ return (_ref1 = this.currentGroup) != null ? _ref1.promise() : void 0;
22612
+ };
22613
+
22614
+ MultipleWidget.prototype.__setGroup = function(group) {
22615
+ if (!utils.isFileGroupsEqual(this.currentGroup, group)) {
22616
+ this.__reset();
22617
+ if (group && group.files().length) {
22618
+ this.currentGroup = group;
22619
+ return this.__watchCurrentObject();
22620
+ }
22621
+ }
22622
+ };
21572
22623
 
21573
- if (uploadcare.defaults.live) {
21574
- $(function() {
21575
- return setInterval(live, 100);
22624
+ MultipleWidget.prototype.__setGroupByPromise = function(groupPr) {
22625
+ var _this = this;
22626
+ this.__lastGroupPr = groupPr;
22627
+ this.__reset();
22628
+ this.template.setStatus('started');
22629
+ this.template.statusText.text(t('loadingInfo'));
22630
+ return groupPr.done(function(group) {
22631
+ if (_this.__lastGroupPr === groupPr) {
22632
+ _this.__reset();
22633
+ return _this.__setGroup(group);
22634
+ }
22635
+ }).fail(function() {
22636
+ if (_this.__lastGroupPr === groupPr) {
22637
+ return _this.template.error('createGroup');
22638
+ }
22639
+ });
22640
+ };
22641
+
22642
+ MultipleWidget.prototype.__clearCurrentObj = function() {
22643
+ return this.currentGroup = null;
22644
+ };
22645
+
22646
+ MultipleWidget.prototype.__onUploadingFailed = function(error) {
22647
+ if (error === 'createGroup') {
22648
+ this.__reset();
22649
+ }
22650
+ return MultipleWidget.__super__.__onUploadingFailed.apply(this, arguments);
22651
+ };
22652
+
22653
+ MultipleWidget.prototype.value = function(value) {
22654
+ if (value != null) {
22655
+ if (this.element.val() !== value) {
22656
+ this.__setGroupByPromise(utils.anyToFileGroup(value, this.settings));
22657
+ }
22658
+ return this;
22659
+ } else {
22660
+ return this.currentGroup;
22661
+ }
22662
+ };
22663
+
22664
+ MultipleWidget.prototype.reloadInfo = function() {
22665
+ this.__setGroupByPromise(utils.anyToFileGroup(this.element.val(), this.settings));
22666
+ return this;
22667
+ };
22668
+
22669
+ MultipleWidget.prototype.__handleDirectSelection = function(type, data) {
22670
+ var files;
22671
+ files = uploadcare.filesFrom(type, data, this.settings);
22672
+ if (this.settings.previewStep) {
22673
+ return uploadcare.openDialog(files, this.settings).done(this.__setGroup);
22674
+ } else {
22675
+ return this.__setGroup(uploadcare.FileGroup(files, this.settings));
22676
+ }
22677
+ };
22678
+
22679
+ MultipleWidget.prototype.openDialog = function(tab) {
22680
+ var _this = this;
22681
+ return uploadcare.openDialog(this.currentGroup, tab, this.settings).done(this.__setGroup).fail(function(group) {
22682
+ if (!utils.isFileGroupsEqual(group, _this.currentGroup)) {
22683
+ return _this.__setGroup(null);
22684
+ }
22685
+ });
22686
+ };
22687
+
22688
+ return MultipleWidget;
22689
+
22690
+ })(ns.BaseWidget);
22691
+ });
22692
+
22693
+ }).call(this);
22694
+ (function() {
22695
+ var $, namespace, s, utils;
22696
+
22697
+ utils = uploadcare.utils, namespace = uploadcare.namespace, s = uploadcare.settings, $ = uploadcare.jQuery;
22698
+
22699
+ namespace('uploadcare', function(ns) {
22700
+ var cleanup, dataAttr, getSettings, initialize, initializeWidget;
22701
+ dataAttr = 'uploadcareWidget';
22702
+ ns.initialize = function(container) {
22703
+ if (container == null) {
22704
+ container = 'body';
22705
+ }
22706
+ return initialize($(container).find('@uploadcare-uploader'));
22707
+ };
22708
+ getSettings = function(el) {
22709
+ return s.build($(el).data());
22710
+ };
22711
+ initialize = function(targets) {
22712
+ var method, target, _i, _len, _results;
22713
+ _results = [];
22714
+ for (_i = 0, _len = targets.length; _i < _len; _i++) {
22715
+ target = targets[_i];
22716
+ method = getSettings(target).multiple ? 'MultipleWidget' : 'Widget';
22717
+ _results.push(uploadcare[method](target));
22718
+ }
22719
+ return _results;
22720
+ };
22721
+ ns.Widget = function(target) {
22722
+ var el;
22723
+ el = $(target).eq(0);
22724
+ if (!getSettings(el).multiple) {
22725
+ return initializeWidget(el, ns.widget.Widget);
22726
+ } else {
22727
+ throw new Error('Widget can\'t be initialized on this element');
22728
+ }
22729
+ };
22730
+ ns.MultipleWidget = function(target) {
22731
+ var el;
22732
+ el = $(target).eq(0);
22733
+ if (getSettings(el).multiple) {
22734
+ return initializeWidget(el, ns.widget.MultipleWidget);
22735
+ } else {
22736
+ throw new Error('MultipleWidget can\'t be initialized on this element');
22737
+ }
22738
+ };
22739
+ initializeWidget = function(el, Widget) {
22740
+ var widget;
22741
+ widget = el.data(dataAttr);
22742
+ if (!widget || el[0] !== widget.element[0]) {
22743
+ cleanup(el);
22744
+ widget = new Widget(el);
22745
+ el.data(dataAttr, widget);
22746
+ widget.template.content.data(dataAttr, widget.template);
22747
+ }
22748
+ return widget.api();
22749
+ };
22750
+ cleanup = function(el) {
22751
+ var template;
22752
+ el.off('.uploadcare');
22753
+ el = el.next('.uploadcare-widget');
22754
+ template = el.data(dataAttr);
22755
+ if (el.length && (!template || el[0] !== template.content[0])) {
22756
+ return el.remove();
22757
+ }
22758
+ };
22759
+ ns.start = function(settings) {
22760
+ var live;
22761
+ s.common(settings);
22762
+ live = function() {
22763
+ return initialize($('@uploadcare-uploader'));
22764
+ };
22765
+ if (s.build().live) {
22766
+ return setInterval(live, 100);
22767
+ } else {
22768
+ return live();
22769
+ }
22770
+ };
22771
+ return $(function() {
22772
+ if (!s.globals().manualStart) {
22773
+ return ns.start();
22774
+ }
21576
22775
  });
21577
- } else {
21578
- $(live);
21579
- }
22776
+ });
21580
22777
 
21581
22778
  }).call(this);
21582
22779
  (function() {
@@ -21627,18 +22824,24 @@ var _require = (function() {
21627
22824
  var expose, key,
21628
22825
  __hasProp = {}.hasOwnProperty;
21629
22826
 
21630
- uploadcare.version = '0.6.9.2';
22827
+ uploadcare.version = '0.8';
21631
22828
 
21632
22829
  expose = uploadcare.expose;
21633
22830
 
21634
22831
  expose('whenReady');
21635
22832
 
21636
- expose('defaults');
22833
+ expose('globals', uploadcare.settings.globals);
22834
+
22835
+ expose('start');
21637
22836
 
21638
22837
  expose('initialize');
21639
22838
 
21640
22839
  expose('fileFrom');
21641
22840
 
22841
+ expose('FileGroup');
22842
+
22843
+ expose('loadFileGroup');
22844
+
21642
22845
  expose('locales', (function() {
21643
22846
  var _ref, _results;
21644
22847
  _ref = uploadcare.locale.translations;
@@ -21656,5 +22859,7 @@ var _require = (function() {
21656
22859
 
21657
22860
  expose('Widget');
21658
22861
 
22862
+ expose('MultipleWidget');
22863
+
21659
22864
  }).call(this);
21660
22865
  }({}));