uploadcare-rails 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
|
|
1
|
+
(function(){"use strict";window.UploadCare={_readyCallbacks:[],_jQueryMinVersion:[1,5,0],_jQueryCDN:"http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js",initialized:!1,jQuery:null,publicKey:null,uploadBaseUrl:"http://upload.uploadcare.com",urls:{byIframe:{upload:""},byUrl:{upload:"",status:""},byXHR2:{upload:""},fileInfo:""},instances:{},_domReady:function(e){var t=this,n=!1,r=null,i=function(){if(n)return;n=!0,r(),e.call(t)};if(document.readyState==="complete"){e.call(this);return}document.addEventListener?(r=function(){document.removeEventListener("DOMContentLoaded",i,!1)},document.addEventListener("DOMContentLoaded",i,!1),window.addEventListener("load",i,!1)):(r=function(){document.detachEvent("onreadystatechange",i,!1)},document.attachEvent("onreadystatechange",i,!1),window.attachEvent("load",i,!1))},_callReadyCallbacks:function(){this.initialized=!0;for(var e=0;e<this._readyCallbacks.length;e++)this._readyCallbacks[e].call(this,this.jQuery)},_uuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,n=e=="x"?t:t&3|8;return n.toString(16)})},_checkJQuery:function(e,t,n){if(!e||typeof e=="undefined"){t.call(this);return}var r,i,s=e.fn.jquery.split(".");for(var o=0;o<this._jQueryMinVersion.length;o++){r=this._jQueryMinVersion[o],i=parseInt(s[o]);if(r>i){n.call(this);return}if(r<i){this._getJQuery();return}}this._getJQuery()},_getJQuery:function(){typeof window.jQuery!="undefined"&&(this.jQuery=window.jQuery),this._callReadyCallbacks()},_loadJQuery:function(){var e=document.createElement("script");e.src=this._jQueryCDN,e.onload=e.onreadystatechange=function(){typeof window.jQuery!="undefined"&&(window.jQuery.noConflict(),UploadCare.jQuery=window.jQuery,window.jQuery=UploadCare._originjQuery,delete UploadCare._originjQuery,UploadCare._callReadyCallbacks())};var t=document.getElementsByTagName("head")[0];t||(t=document.body),typeof window.jQuery!="undefined"&&(this._originjQuery=window.jQuery),t.appendChild(e)},_getPublicKey:function(){var e=document.getElementsByTagName("script"),t=e[e.length-1];this.publicKey=t.getAttribute("data-public-key"),(UploadCare.publicKey===void 0||UploadCare.publicKey===null)&&UploadCare.ready(function(e){e(document).ready(function(){var t=e("input[data-public-key]");UploadCare.publicKey=t.attr("data-public-key")})})},_widgetInit:function(e){return function(t){var n=this;UploadCare.ready(function(r){var i=null,r=UploadCare.jQuery;typeof t.jquery=="undefined"?t.tagName=="INPUT"&&(i=r(t)):t.is("input")&&(i=t),i===null&&(i=r("[role~="+e+"]",t)),i.each(function(e,t){var r=UploadCare._id();typeof UploadCare.instances[r]=="undefined"&&(UploadCare.instances[r]={}),t.setAttribute("data-instance-id",r),t.getAttribute("data-upload-base-url")!==null?(UploadCare.instances[r].uploadBaseUrl=t.getAttribute("data-upload-base-url"),UploadCare.setUrls(t.getAttribute("data-upload-base-url"))):UploadCare.instances[r].uploadBaseUrl=UploadCare.uploadBaseUrl,UploadCare.instances[r].urls=UploadCare.makeUrls(UploadCare.instances[r].uploadBaseUrl),t.getAttribute("data-public-key")!==null?UploadCare.instances[r].publicKey=t.getAttribute("data-public-key"):UploadCare.instances[r].publicKey=UploadCare.publicKey,t.getAttribute("data-override-style")!==null&&(UploadCare.instances[r].overrideStyle=t.getAttribute("data-override-style")),t.getAttribute("data-only-images")!==null&&(UploadCare.instances[r].onlyImages=parseInt(t.getAttribute("data-only-images"))),UploadCare._makeStateful(UploadCare.instances[r]),n.enlive(t)})})}},_translate:function(e,t,n){e.messages.locale=t;for(var r in n)e.messages[r]=n[r]},_promise:function(e,t){typeof t=="undefined"&&(t={progress:function(){}}),typeof e.state=="undefined"&&(e.state=function(){return e.isResolved()?"resolved":e.isRejected()?"rejected":"pending"});var n=e.promise(t);return n.success=n.done,n.error=n.fail,n.complete=n.always,n},_params:function(e){typeof e=="undefined"&&(e={});var t={UPLOADCARE_PUB_KEY:e.publicKey||this.publicKey};return e.meduim&&(t.UPLOADCARE_MEDIUM=e.meduim),e.instanceId&&(t.UPLOADCARE_INSTANCE_ID=e.instanceId),t},_makeStateful:function(e){e.state={};var t={current:"idle",previous:null,callbacks:{},set:function(e){this.previous=this.current,this.current=e,this.runCallbacks(e)},get:function(){return this.current},setCallback:function(e,t){return typeof this.callbacks[e]=="undefined"&&(this.callbacks[e]=[]),this.callbacks[e].push(t),this.get()==e&&this.runCallbacks(e),this},runCallbacks:function(e){var t=UploadCare.jQuery,n=this.previous;if(typeof this.callbacks[e]!="undefined"&&this.callbacks[e].length>0){var r=this.callbacks[e];t(r).each(function(){this(t,n)})}},clearCallbacks:function(e){delete this.callbacks[e]}};e.state=t},_id:function(){return"id"+parseInt(Math.random()*99999+1)},init:function(){var e;typeof window.jQuery!="undefined"&&(e=window.jQuery),this._checkJQuery(e,function(){this._domReady(function(){this._checkJQuery(e,this._loadJQuery,this._loadJQuery)})},this._loadJQuery)},ready:function(e){this.initialized?e.call(this,this.jQuery):this._readyCallbacks.push(e)},upload:function(e,t){var n=this._params(t);return typeof e=="string"?this.byUrl.upload(e,n):this.byIframe.upload(e,n)},makeUrls:function(e){e=typeof e=="undefined"?this.uploadBaseUrl:e,e.slice(-1)==="/"&&(e=e.slice(0,-1));var t={byUrl:{upload:""+e+"/from_url/",status:""+e+"/status/"},byIframe:{upload:""+e+"/iframe/"},byXHR2:{upload:""+e+"/iframe/"},fileInfo:""+e+"/info/"};return t},setUrls:function(e){this.urls=this.makeUrls(e)},getInstance:function(e){return UploadCare.instances[e]},getInstanceOptions:function(e){var t={};return typeof UploadCare.instances[e]!="undefined"&&(t=UploadCare.instances[e]),t}},UploadCare.byIframe={_lastIframeId:0,_createIframe:function(e){this._lastIframeId+=1;var t="uploadcareIframe"+this._lastIframeId,n=UploadCare.jQuery("<iframe />").attr({id:t,name:t});return n.css("position","absolute").css("top","-9999px"),e!==void 0&&n.addClass(e),n.appendTo("body"),n},_getUploadUrl:function(){return UploadCare.urls.byIframe.upload},_createFormForIframe:function(e,t,n){var r=this._getUploadUrl();n&&(r=UploadCare.getInstanceOptions(n).urls.byIframe.upload);var i=UploadCare.jQuery("<form />").attr({method:"POST",action:r,enctype:"multipart/form-data",target:e.attr("id")});i.css("position","absolute").css("top","-9999px");var s=t.clone(!0);return s.insertBefore(t),i.appendTo("body"),t.appendTo(i),i},upload:function(e,t){var n=UploadCare._uuid(),r=null,i=null,s=null,o=!1;typeof t.UPLOADCARE_INSTANCE_ID!="undefined"&&(r=t.UPLOADCARE_INSTANCE_ID,delete t.UPLOADCARE_INSTANCE_ID),i=this._createIframe(r),s=this._createFormForIframe(i,e,r),r&&(t.UPLOADCARE_PUB_KEY=UploadCare.getInstanceOptions(r).publicKey),t.UPLOADCARE_FILE_ID=n;for(var u in t)UploadCare.jQuery('<input type="hidden" />').attr("name",u).val(t[u]).appendTo(s);var a=UploadCare.jQuery.Deferred(),f=function(){i.remove(),s.remove()},l=function(){i.bind("load",function(e){e.preventDefault(),a.resolve(n),f()}),i.bind("error",function(){a.reject(),f()}),s.submit()};return r&&(o=UploadCare.getInstanceOptions(r).onlyImages===1?!0:!1),o?/(jpg|jpeg|bmp|gif|png)/.test(e.val().split(".")[1])===!1?(a.reject("onlyImages"),f()):l():l(),UploadCare._promise(a)}},UploadCare.byUrl={checkEvery:1e3,_getUploadUrl:function(){return UploadCare.urls.byUrl.upload},_getStatusUrl:function(){return UploadCare.urls.byUrl.status},upload:function(e,t){var n=UploadCare.jQuery.Deferred(),r=[],i=UploadCare._promise(n,{progress:function(e){return r.push(e),this}}),s=null,o=this._getUploadUrl()+"?",u=null,a=function(e){UploadCare.byUrl.progress(e).success(function(e){if(e.status=="failure"){n.reject();return}for(var t=0;t<r.length;t++)r[t](e);e.status=="success"&&n.resolve(e.file_id)}).error(function(){n.reject()})};typeof t.UPLOADCARE_INSTANCE_ID!="undefined"&&(s=t.UPLOADCARE_INSTANCE_ID,delete t.UPLOADCARE_INSTANCE_ID),t.pub_key=t.UPLOADCARE_PUB_KEY,t.source_url=e,s&&(o=UploadCare.getInstanceOptions(s).urls.byUrl.upload+"?",t.pub_key=UploadCare.getInstanceOptions(s).publicKey),delete t.UPLOADCARE_PUB_KEY;for(var f in t)o=""+o+""+f+"="+t[f]+"&";return o=""+o+"jsoncallback=?",e.length==0?n.reject("badFileUrl"):UploadCare.jQuery.ajax(o,{dataType:"jsonp"}).success(function(e){u=setInterval(function(){a(e.token)},UploadCare.byUrl.checkEvery)}).error(function(){n.reject()}),i.complete(function(){clearInterval(u)}),i},progress:function(e){var t=""+this._getStatusUrl()+"?token="+e+"&jsoncallback=?";return UploadCare.jQuery.ajax(t,{dataType:"jsonp"})}},UploadCare._getPublicKey(),UploadCare.setUrls(),UploadCare.init()})(),function(){"use strict";UploadCare.Plain={init:UploadCare._widgetInit("uploadcare-plain-uploader"),enlive:function(e,t){var n=UploadCare.jQuery,r,i;typeof t=="undefined"&&(t={}),i=n(e).attr("data-instance-id"),i&&(r=UploadCare.getInstance(i)),r&&r.state.set("startEnlive");var s=n(e),o=n('<input type="file" name="file" />');o.addClass("uploadcare-uploader"),o.insertAfter(s);var u=function(e){var n=e.closest("form"),o=e.closest("[role~=uploadcare-container]");o.length==0&&(o=n),o.addClass("uploadcare-loading"),r&&(r.state.current.match(/fromUrlEnter/)?r.state.set("fromUrlBeforeUpload"):r.state.set("beforeUpload"));var u=!1;n.bind("submit.uploadcare",function(){return u=!0,!1});var a={meduim:t.meduim||"plain"},f=s.data("public-key");f&&(a.publicKey=f),i&&(a.instanceId=i);var l=e;e.is(":file")||(l=e.val()),s.trigger("uploadcare-start"),r&&(r.state.current.match(/fromUrl/)?r.state.set("fromUrlUpload"):r.state.set("upload"));var c=UploadCare.upload(l,a);c.progress(function(e){s.trigger("uploadcare-progress",e)}),c.error(function(e){e=void 0===e||null===e?"network":e,s.trigger("uploadcare-error",e),s.trigger("uploadcare-complete")}),c.success(function(e){if(s.val()!==void 0&&s.val().length>0&&s.attr("data-barebone")){var t=s.val().substr(1,s.val().length-2).split(",");t.push(e),s.val("["+t.join(",")+"]")}else s.attr("data-barebone")?s.val("["+e+"]"):s.val(e);s.trigger("uploadcare-success",e),s.trigger("uploadcare-complete"),o.removeClass("uploadcare-loading"),r&&(r.state.current.match(/fromUrl/)?r.state.set("fromUrlAfterUpload"):r.state.set("afterUpload")),n.unbind("submit.uploadcare"),u&&n.submit()})},a=t.fromUrl;if(!a&&s.data("uploadcare-from-url"))var a=n(s.data("uploadcare-from-url"));if(a){a.keypress(function(e){e.keyCode=="13"&&(u(a),e.preventDefault())});var f=t.fromUrlSubmit;!f&&a.data("uploadcare-submit")&&(f=n(a.data("uploadcare-submit"))),f&&f.click(function(e){u(a),e.preventDefault()})}return o.change(function(){var e=n(this);u(e)}),r&&r.state.set("endEnlive"),o}}}(),function(){"use strict";var e;UploadCare.ready(function(t){e=t,e.extend(e.easing,{easeInOutQuad:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t+n:-r/2*(--t*(t-2)-1)+n},easeOutBounce:function(e,t,n,r,i){return(t/=i)<1/2.75?r*7.5625*t*t+n:t<2/2.75?r*(7.5625*(t-=1.5/2.75)*t+.75)+n:t<2.5/2.75?r*(7.5625*(t-=2.25/2.75)*t+.9375)+n:r*(7.5625*(t-=2.625/2.75)*t+.984375)+n}})}),UploadCare.Line={messages:{},style:"",html:"",ie_css_url:"http://static.uploadcare.com/assets/compat/stylesheets/ie.css",init:UploadCare._widgetInit("uploadcare-line-uploader"),message:function(e){var t=UploadCare.Line.messages,n=e.split(".");for(var r=0;r<n.length;r++){t=t[n[r]];if(typeof t=="undefined")throw"There is no translation for `"+e+"`"}return t},enlive:function(t){var n=e(t);if((!e.support.opacity||!e.support.htmlSerialize)&&(/6.0/.test(navigator.userAgent)||/7.0/.test(navigator.userAgent))){if(this.ie_css_url!=null){var r=e("<link />").attr({rel:"stylesheet",type:"text/css",href:this.ie_css_url});r.appendTo(e("head"))}e("a.uploadcare-line-computer").click(function(){e("input.uploadcare-uploader").click()})}var i=this.html.replace(/{([^}]+)}/g,function(e,t){if(t=="style")return UploadCare.Line.style;if(t=="file")return'<div data-replace="file"></div>';if(t.match(/^t /))return UploadCare.Line.message(t.substr(2))}),s=e(i).insertAfter(n),o=n.attr("data-instance-id"),u;o&&(u=UploadCare.getInstance(o));if(u){var a=function(t,n){var r=[];e(t).each(function(){r=e.merge(r,e("a",this)),r=e.merge(r,e("input",this))}),n===void 0&&(n=!0),e(r).each(function(){var t=e(this).attr("tabindex");t||(t=-1),t&&t<0&&n?e(this).attr("tabindex","1"):e(this).attr("tabindex","-1")})},f=function(){a([".uploadcare-line-uploader"],!1)},l=function(){var e=[".uploadcare-line-error-wrapper",".uploadcare-line-uploading",".uploadcare-line-filedata",".uploadcare-line-from-url"];s&&s.data("fromUrl",!1),a([".uploadcare-line-upload"]),a(e,!1)},c=function(){f(),a([".uploadcare-line-from-url"])},h=function(){f(),a([".uploadcare-line-uploading"])},p=function(){f(),a([".uploadcare-line-filedata"])},d=function(e,t){var n=s.data("fromUrl");n?u.state.set("fromUrlEnter"):u.state.set("mainWindow"),s.data("fromUrl",!1)},v=function(){s&&s.data("fromUrl",!0)};s.data("fromUrl",!1),u.state.setCallback("idle",f),u.state.setCallback("startEnlive",l).setCallback("mainWindow",l).setCallback("upload",h).setCallback("afterUpload",p),u.state.setCallback("fromUrlEnter",c).setCallback("fromUrlUpload",h).setCallback("fromUrlAfterUpload",p),u.state.setCallback("fromUrlUpload",v),u.state.setCallback("reloadToBase",d)}var m=UploadCare.Plain.enlive(n,{meduim:"line",fromUrl:e(".uploadcare-line-url",s),fromUrlSubmit:e(".uploadcare-line-url-submit",s)});m.detach().replaceAll(e("[data-replace=file]",s)),s.data("info_loaded",!1),s.data("instance",u),s.addClass(o),e("a",s).click(!1),this.uploadingEvents(s,n),this.fromUrlEvents(s,n),n.bind("uploadcare-error",function(e,t){var n=!1;t=void 0===t||null===t?"network":t,n=t==="onlyImages"?!0:!1,UploadCare.Line.showError(s,t,n,function(){UploadCare.Line.hideUploading(s)})}),n.bind("uploadcare-success",function(){var e=UploadCare.FileData.fetch(n.val(),o);e.success(function(e){UploadCare.Line.showFileData(e)}),e.error(function(e){e=void 0===e||null===e?"network":e,n.trigger("uploadcare-error",e)})});if(n.attr("data-override-style")!==void 0){var g=n.attr("data-override-style"),y=e("style",s),b=y.html();b=""+b+"."+o+"{"+g+"}",y.html(b)}e(document).trigger("enlive")},uploadingEvents:function(t,n){var r=e(".uploadcare-line-progress div",t),i=r.parent().width()-r.width(),s=function(){r.animate({left:-1},800,"easeInOutQuad",o)},o=function(){r.animate({left:i},800,"easeInOutQuad",s)},u=t.data("instance");n.bind("uploadcare-start",function(){t.addClass("uploadcare-uploading"),t.find(".uploadcare-line-slider").css({"margin-top":-30}),o()});var a=e(".uploadcare-line-progress").outerWidth();r.data("width",r.width()),n.bind("uploadcare-progress",function(e,t){var n=t.done/t.total;r.stop().css({left:-1}),r.width(a*n)});var f=e(".uploadcare-line-uploading",t),l=e(".uploadcare-line-slider",t);e(".uploadcare-line-cancel",f).click(function(){l.css({"margin-top":0});var r=e('iframe[class="'+n.attr("data-instance-id")+'"]');r.length!==0&&r.remove(),UploadCare.Line.hideUploading(t)});var c=e(".uploadcare-line-filedata",t);e(".uploadcare-line-filedata-close",c).click(function(){n.val(""),c.css({top:1}),l.css({"margin-top":0}),u&&u.state.set("reloadToBase"),UploadCare.Line.hideUploading(t)})},fromUrlEvents:function(t,n){var r,i;n&&(i=n.attr("data-instance-id"),r=UploadCare.getInstance(i)),e(".uploadcare-line-web",t).click(function(){r&&r.state.set("fromUrlEnter"),t.addClass("uploadcare-from-url"),setTimeout(function(){e(".uploadcare-line-url").focus()},300)});var s=e(".uploadcare-line-from-url",t);e(".uploadcare-line-cancel",s).click(function(){r&&r.state.set("reloadToBase"),t.removeClass("uploadcare-from-url"),e(".uploadcare-line-url").val("")})},hideUploading:function(t){var n=e(".uploadcare-line-progress div",t);n.stop().css({left:-1,width:n.data("width")}),t.removeClass("uploadcare-uploading")},showError:function(t,n,r,i){var s=this.message("errors."+n),o=e(".uploadcare-line-error",t);e(".uploadcare-line-error-text",o).html(s);var u=o.parent().show(),a=o.show().outerHeight();o.css({top:-a}).animate({top:0},600,"easeOutBounce",function(){t.addClass("uploadcare-error"),i()});var f=e(".uploadcare-line-error-back",o).toggle(r);if(r){var l=this;f.one("click",function(){o.animate({top:-a},400,"easeInOutQuad",function(){u.hide(),t.removeClass("uploadcare-error")}),l.hideUploading(t),e(".uploadcare-line-slider",t).css({"margin-top":0})})}},showFileData:function(t){var n=e("input[value="+t.file_id+"]").next(),r=e(".uploadcare-line-slider",n),i=e(".uploadcare-line-filedata",n),s=e(".uploadcare-line-filedata-filename",n),o=e(".uploadcare-line-filedata-filesize",n),u=Math.ceil(t.size/1024)+"kb",a=t.original_filename;a.length>16&&(a=a.slice(0,8)+"..."+a.slice(-8)),s.html(a),s.innerHTML=a,o.innerHTML=u,o.html(u),i.animate({top:0}),r.css({"margin-top":-60}),n.data("info_loaded",!0)}}}(),function(){UploadCare.FileData={timeout:15e3,fetch:function(e,t){var n=this._getRequestUrl(),r=UploadCare.publicKey;t&&(n=UploadCare.getInstanceOptions(t).urls.fileInfo,r=UploadCare.getInstanceOptions(t).publicKey);if(e.indexOf("[")!=-1){console.log("here");var i=e.substr(1,e.length-2).split(",");e=i[i.length-1]}n=""+n+("?pub_key="+r);if(typeof e===void 0)throw"UUID must be specified";n=""+n+"&file_id="+e+"&jsoncallback=?";try{var s=UploadCare.jQuery,o=s(this),u=s.Deferred(),a=s.ajax(n,{dataType:"jsonp",global:!0,beforeSend:function(e,t){return o.data("_xhr",e),e.state=function(){return e.isResolved()?"resolved":e.isRejected()?"rejected":"pending"},s(o).bind("start-timeout",function(t,n){var r=0;n=n===void 0||typeof n=="undefined"?o.timeout:n;if(e.readyState!=4&&(void 0===e.status||e.status>=400))var i=setInterval(function(){switch(e.state()){case"resolved":case"rejected":void 0;break;case"pending":r<3?r+=1:(clearInterval(i),e.abort())}},n)}),!0}}).success(function(e){u.resolve(e)}).error(function(e){u.reject("misconfiguration")})}catch(f){u.reject("misconfiguration")}finally{if(!u.isResolved()){if(!a||a===void 0)a=o.data("_xhr");a.isResolved()?u.resolve(a.data("response")):o.triggerHandler("start-timeout",1e3)}}return UploadCare._promise(u)},_getRequestUrl:function(){return UploadCare.urls.fileInfo}},UploadCare.ready(function(e){e(document).ready(function(){UploadCare.jQuery.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!0)})})})}(),function(){UploadCare.DragDrop={useLargeDropZone:!1,started:!1,eventTimer:!1,idle:!0,selectors:{widget:"div.uploadcare-line-uploader",cropper:"div.uploadcare-line-cropper",slider:"div.uploadcare-line-slider",filedata:"div.uploadcare-line-filedata"},init:function(){return UploadCare.ready(function(e){try{if(e(UploadCare.DragDrop.selectors.widget).length===0)throw"Widget block not found. Do you use inline version if widget?";if("draggable"in document.createElement("span")==0)throw"D&D not available, please use modern browser."}catch(t){return}finally{UploadCare.DragDrop.enlive(e)}})},enlive:function(e){var t,n,r,i,s,o,u,a;u=e(this.selectors.widget),i=e(u).prev(),s=e(this.selectors.slider,u),r=e(this.selectors.filedata,u),t=e(".uploadcare-line-thumb",s).first(),n=this.createDropZone(e,u),a=e("div.uploadcare-line-thumb-empty",s),this.dragDropEvents(t,n),a.css({cursor:"pointer"}),a.mouseover(function(e){UploadCare.DragDrop.onDragOver(e,t,n)}),n.mouseleave(function(e){UploadCare.DragDrop.onDragLeave(e,t,n)}).click(function(e){e.preventDefault(),window.location="http://uploadcare.com"}).css({cursor:"pointer"}),o=function(e){var t;t=UploadCare.DragDrop.process(u,i,e),t.success(function(e){i.val(e),i.trigger("uploadcare-success",e),i.trigger("uploadcare-complete"),UploadCare.DragDrop.idle=!0}),t.error(function(e){e=typeof e===void 0?!1:e,e?UploadCare.Line.showError(u,"unknown",!0,function(){UploadCare.Line.hideUploading(u)}):(r.css({top:1}),s.css({"margin-top":0}),UploadCare.Line.hideUploading(u),UploadCare.DragDrop.idle=!0)})},n.bind("file-drop",function(e,r){var i;i=r.dataTransfer.files,typeof i!="undefined"&&i!==null&&i.length!==0?(UploadCare.DragDrop.idle=!1,o(i)):UploadCare.DragDrop.onDragLeave(e,t,n)})},createDropZone:function(e,t){var n,r,i,s,o,u,a;n=e(this.selectors.cropper,t),r=e("<div/>").attr({"class":this.useLargeDropZone?"uploadcare-line-largedrop":"uploadcare-line-tinydrop"}),a=e("<div/>").attr({"class":"uploadcare-line-drop-decoration"}).css({width:t.width()-20,height:t.height()}),dropZoneArray=e("<span />").attr({"class":"dnd-arrow"}),dropZoneArray.appendTo(a),s=e("<span />"),s.html("Drop file here"),s.attr({"class":"droptext"}),s.appendTo(a);var f;return f=e("<span />"),f.attr({"class":"branding"}),f.html("Powered by <strong>UploadCare</strong>"),f.appendTo(a),o=e("<div />").attr({"class":"lc"}),u=e("<div />").attr({"class":"rc"}),o.appendTo(a),u.appendTo(a),a.appendTo(r),i=e("<div/>").attr({"class":"uploadcare-line-dropzone"}),i.css({width:t.width(),height:t.height()}),r.appendTo(n),i.appendTo(r),i},dragDropEvents:function(e,t){var n;n=function(e){return e.stopPropagation(),e.preventDefault(),e};var r=function(r){UploadCare.DragDrop.eventTimer!==!1&&(clearTimeout(UploadCare.DragDrop.eventTimer),UploadCare.DragDrop.eventTimer=!1);if(UploadCare.DragDrop.idle===!0)switch(r.type){case"drop":UploadCare.DragDrop.started=!1,UploadCare.DragDrop.onDragLeave(r,e,t);break;case"dragleave":UploadCare.DragDrop.eventTimer=setTimeout(function(){UploadCare.DragDrop.started=!1,UploadCare.DragDrop.onDragLeave(r,e,t)},100);break;case"dragover":case"dragenter":UploadCare.DragDrop.started===!1&&(UploadCare.DragDrop.started=!0,UploadCare.DragDrop.onDragOver(r,e,t))}return n(r)};return UploadCare.jQuery(document).bind("drop",r).bind("dragenter",r).bind("dragover",r).bind("dragleave",r),t[0].ondrop=function(r){UploadCare.DragDrop.onDrop(n(r),e,t),t.trigger("file-drop",r)},null},process:function(e,t,n){var r,i,s,o,u,a;return i=new FormData,r=UploadCare.jQuery.Deferred(),o=UploadCare._params({pubKey:UploadCare.publicKey,meduim:"line"}),o.UPLOADCARE_FILE_ID=UploadCare._uuid(),t.trigger("uploadcare-start"),s=function(e){e.lengthComputable&&t.trigger("uploadcare-progress",{done:e.loaded,total:e.total})},UploadCare.jQuery.each(o,function(e,t){return i.append(e,t)}),i.append("file",n[0]),a=new XMLHttpRequest,a.upload.addEventListener("progress",s,!1),a.addEventListener("abort",function(){return r.reject()},!1),a.addEventListener("error",function(){return r.reject(!0)},!1),a.addEventListener("load",function(){return r.resolve(o.UPLOADCARE_FILE_ID)},!1),a.open("POST",UploadCare.byIframe._getUploadUrl(),!0),a.send(i),u=UploadCare.jQuery(".uploadcare-line-uploading",e),UploadCare.jQuery(".uploadcare-line-cancel",u).click(function(){a.abort()}),UploadCare._promise(r)},onDragOver:function(e,t,n){var r=t.parents(this.selectors.widget);return r.addClass("uploadcare-line-uploader-dnd"),t.parents(this.selectors.slider).css({"margin-top":-90}),r.find(this.selectors.filedata).css({top:-1}),null},onDragLeave:function(e,t,n){var r=t.parents(this.selectors.widget),i=t.parents(this.selectors.slider),s=r.find(this.selectors.filedata);return r.removeClass("uploadcare-line-uploader-dnd"),i.css({"margin-top":0}),s.css({top:1}),null},onDrop:function(e,t,n){var r=t.parents(this.selectors.widget),i=t.parents(this.selectors.slider),s=r.find(this.selectors.filedata);return r.removeClass("uploadcare-line-uploader-dnd"),i.css({"margin-top":-30}),s.css({top:1}),null}}}(),UploadCare.ready(function(e){e(document).bind("enlive",function(){UploadCare.DragDrop.init()})}),UploadCare._translate(UploadCare.Line,"en",{uploadFrom:"Upload from",computer:"Computer",web:"Web",uploading:"Uploading…",cancel:"Cancel",back:"Back",url:"URL",done:"Done",errors:{network:"You have problem with Internet",unknown:"Something awful happened",misconfiguration:"Please check your widget config",badFileUrl:"Incorrect file URL.",onlyImages:"Only images allowed."}}),UploadCare.Line.html='<div class="uploadcare-line-uploader"><style scoped="scoped">{style}</style><div class="uploadcare-line-error-wrapper"><div class="uploadcare-line-error"><div class="uploadcare-line-error-cloud"></div><div class="uploadcare-line-error-rain"></div><div class="uploadcare-line-error-text"></div><a href="#" title="{t back}" class="uploadcare-line-error-back"></a></div></div><div class="uploadcare-line-cropper"><div class="uploadcare-line-slider"><div class="uploadcare-line-upload"><div class="uploadcare-line-thumb"><div class="uploadcare-line-thumb-empty"></div></div><div class="uploadcare-line-buttons"><div class="uploadcare-line-file-input">{file}<a href="#" class="uploadcare-line-computer"><div class="uploadcare-line-icon"></div>{t computer}</a></div><a href="#" class="uploadcare-line-web"><div class="uploadcare-line-icon"></div>{t web}</a></div>{t uploadFrom}</div><div class="uploadcare-line-from-url"><div class="uploadcare-line-title">{t url}</div><div class="uploadcare-line-right"><input type="url" class="uploadcare-line-url" /><div class="uploadcare-line-buttons"><a href="#" class="uploadcare-line-url-submit">{t done}</a></div><a href="#" title="{t back}" class="uploadcare-line-cancel"></a></div></div></div><div class="uploadcare-line-uploading"><div class="uploadcare-line-thumb"><div class="uploadcare-line-thumb-empty"></div></div><a href="#" title="{t cancel}" class="uploadcare-line-cancel"></a><div class="uploadcare-line-progress"><div></div></div>{t uploading}</div><div class="uploadcare-line-filedata"><div class="uploadcare-line-filedata-icon-placeholder"><div class="uploadcare-line-filedata-icon-placeholder-icon"></div></div><div class="uploadcare-line-filedata-filename"></div><div class="uploadcare-line-filedata-filesize"></div><div class="uploadcare-line-buttons"><a href="#" title="{t cancel}" class="uploadcare-line-filedata-close">{t cancel}</a></div></div></div></div>',UploadCare.Line.style='.uploadcare-line-uploader{width:293px;height:30px;line-height:30px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;border:1px solid #d8d8d8;background:#f6f6f6;background:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fcfcfc), color-stop(100%, #ececec));background:-webkit-linear-gradient(#fcfcfc,#ececec);background:-moz-linear-gradient(#fcfcfc,#ececec);background:-o-linear-gradient(#fcfcfc,#ececec);background:-ms-linear-gradient(#fcfcfc,#ececec);background:linear-gradient(#fcfcfc,#ececec);color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:bold;-webkit-box-shadow:rgba(0,0,0,0.08) 0 1px 3px;-moz-box-shadow:rgba(0,0,0,0.08) 0 1px 3px;box-shadow:rgba(0,0,0,0.08) 0 1px 3px;position:relative}.uploadcare-line-uploader.uploadcare-error{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.uploadcare-line-cropper{position:absolute;top:-1px;left:-1px;height:100%;width:100%;padding:1px;overflow:hidden}.uploadcare-line-thumb{float:left;width:30px;height:30px;border-right:1px solid #d8d8d8;margin-right:9px;position:relative}.uploadcare-line-thumb-empty{position:absolute;top:3px;left:3px;width:25px;height:25px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAACiklEQVRIx+WWy2sTURjFg6W0SkHd1F22BXERXYsrty1YQYO6shbqQoQu3Ijozv/BjX+AG1015DUhLyfvTMw7MQtj8ZEYFMSJTcr1nGEGk3EyKTiuvHCSzNx7f+fem+/7uC6/338uFArtSZL0PhwOdwKBwIbL1PBuC/0/IBGJRAS/MSeLuQumcRtkkEUm2VpHLBaLp9PpUblcflMqlYqVSuWG2URRlMe5XG5cLBYFVSgUBJ7f1Wq1xclxnEsGWWSSrXVkMpmvjUajJITwQtcgt9kE7zzQI+jJhHagY6Zxbp3hJZNsrQOr+owVBFwONzLJNtzvQetOm5BJtuv/awhFN0LzLUJzn0J4Snh3wlEThK0nlUod5vN5hq5AeH5EqJ46MgAJ9BR6PidSLiBXDpAXolqtCvz+gO/TR+Ymk8nviUSCGXzSxuQ8Ter1uqARdjHXZIqLI1B5DACdsTHxGCbcCU1gZntcU1yct8pSgUl/mPh8Pq02oe+syWS/2+0enxxj8T/+5tqZBIPBB4gqGVuXAT40jguGP+PxeAR9rzHm9lyTdrstoc4oyM5l88Ber7eO0tBkQcS2hWGCAih4FIBkBoPBJSuTKS4+LkNXZpSGleFweLeJRjhNjCMDJD8ej71Wi9PnzuRaDV6C0Z1Wq6UZUZ1Ohwab6Ftwstgtqaq6jQ21sANlNBpdddRgwmgZuskj+CcGf92QkQ2E4TOnuWSSrT3IsvwNRS/qtAmZZGsPSLJ2Nps9iEajL+H+AiX8osVuXxk3FbvbCueSQRaZZGsd/X7/IcKyieT6ghL+CSvYsqhDaT35bG8rnEsGWWSSbUTNKnQL2oXuQ2sWkXXddFOZdVtZ0xm7OnOV738BeS37eGOiGg0AAAAASUVORK5CYII=") no-repeat 50% 50%}.uploadcare-line-buttons{float:right}.uploadcare-line-buttons a{display:block;float:left;height:22px;line-height:22px;margin:3px 3px 0 0;padding:0 7px;border:1px solid #abcddc;border-color:#abcddc #a0c3d3 #92b8c9 #a0c3d3;text-decoration:none;color:#7dadc1;text-shadow:#fff 0 1px 1px;font-size:12px;background:#e6f5fb;background:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f4fbfe), color-stop(100%, #d5eef8));background:-webkit-linear-gradient(#f4fbfe,#d5eef8);background:-moz-linear-gradient(#f4fbfe,#d5eef8);background:-o-linear-gradient(#f4fbfe,#d5eef8);background:-ms-linear-gradient(#f4fbfe,#d5eef8);background:linear-gradient(#f4fbfe,#d5eef8);-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;-webkit-box-shadow:rgba(0,0,0,0.1) 0 1px 1px;-moz-box-shadow:rgba(0,0,0,0.1) 0 1px 1px;box-shadow:rgba(0,0,0,0.1) 0 1px 1px}.uploadcare-line-buttons .uploadcare-line-icon{position:absolute;left:7px}.uploadcare-line-cancel{display:block;float:right;width:8px;height:9px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAJCAQAAAClWqWlAAAAj0lEQVQI1wXBwQmDMBgG0G8Cbx6zQCFLFDqVdwdwjAxgsFAwUUFQcvgvthsIBsxFzO3re7Cl/bQPAGi1fdsSzo3so9VW93GkcziaJQf66GPgko8GVMlIFgolJ0MF4PuSe+NGuX9PAJ0eolCyZOEQOw0/zVxzMsmseaafcNVhPw0V1WnCftVgwYoKAKhYsfgDIRFiQ7984PoAAAAASUVORK5CYII=") no-repeat 50% 50%;padding:2px;margin:9px 4px 0 1px}.uploadcare-line-slider{-webkit-transition:all,300ms;-moz-transition:all,300ms;-ms-transition:all,300ms;-o-transition:all,300ms;transition:all,300ms;position:relative;margin:0}.uploadcare-line-buttons .uploadcare-line-computer{padding-left:28px;position:relative;margin-top:0}.uploadcare-line-buttons .uploadcare-line-computer .uploadcare-line-icon{top:5px;width:16px;height:13px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAANCAMAAACXZR4WAAAAP1BMVEUAAAD///////+Qrrytx9OvydeRr72SsL+Tsb+XtsSXt8WZuMeZuciausmcvMufv8+gwtGiw9OkxdWkxtalx9d4pYbSAAAABnRSTlMAWoCz2dmZsTKvAAAAU0lEQVQI162OOxaAIBADAyjIrnzl/md1UcRn7zRJpgoA47aBM+h4PfGX2DG5K7+CfxOBnh8UZFpKOQ1yIouQa2u1v5IsmrEeTUpkjkUyLVD6gzoBORkEIOkz/78AAAAASUVORK5CYII=") no-repeat 50% 50%}.uploadcare-line-buttons .uploadcare-line-web{padding-left:29px;position:relative}.uploadcare-line-buttons .uploadcare-line-web .uploadcare-line-icon{top:2px;width:17px;height:18px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAASCAYAAAC9+TVUAAAC/UlEQVQ4y41US0wTURStBKPRsFA3khgVt7rSxMQYVixwoTFu1BiWLoiGxIULjTGCiQsWIAK1bbAWCq1QWgXbWkpbpp1+7WdaoD9KQfk0fKRSAWmhn+e9IzUFRX3JyZt359xzz33z3nA4fxgNsoGDjXLtrSaFrgkgeC4frIN1JcSLOP8aQNoDSY+a+6gNkc7RYwlMPAjPLFR7xqdv89TmaHPf0CIIXttVoLFXe+zFO8NHudkrIIQ8BlwGnIotJUpNI5Gz8Hw3sZZ8wlWZCfAkWHC7gFy7j6s0TvA1NpLN5cox1vreON/ST/FhJpjI01hJm85JhEMeItA6CLjt3ibS0m/kqj1hvcLhD0NFtgLM9yW014lJYtqXEhm9pJ0eJp1WP+mgR1ghcFTBCsAelPA1lrQpMIkt3MwLQ/V7r4cYIrEF0l22IHnrHo9J7MGs1BHK4Lrd5CMCjS3Mkvlq+g7afGNiGgrdCQZsCTUT8UXm4m2z8RWuwhke67IGiNQe2pDYQ6yjV3oXujnMkVBuETMRk4GL8rwAfIXjSMAWhAY3Iiq1js6hiMQWzKAIQkR5iVjvOI8iKmdk6lKhC57aQqFdscXP7gP7bB4l2AY6yOVydSiIcRnN3OD00oyix+iuKBRR2EcpFMhXxGQWkBia/dKBm7+QWGtCp4NM+CpH7w3XtipNBA7RkbwIkK6srKfqYa5lW9gSk1r9qxAr2+IcEhpcuVg8UcZJbabPCHXOda6SJoVugHQAZ6VnzJ930u8KufPvobCwx+KLAq8YyUVG/6QKNxAd7TzJnUZmCt3InKG4lPZ5f+2bxpqdW16pKax6oc8VioiNzPJOkY10pqbb5l8CTg2gassFoUaiWliXbCNnstmqD8wYhW3BNSgtKFCMAj9PNvUQ3q9agp+UELv42wXEtgCVwel50UsVPQwJBAF3J4V3B8U7DE5qNZl6Crxzf/0dAOEkoPrb92R9eHZR5IrOdH9e/MpLbqafQfw6YD/nfwd+HcAJwGnAUcDe3bg/ALpRdnZzPzzmAAAAAElFTkSuQmCC") no-repeat 50% 50%}.uploadcare-line-file-input{float:left;overflow:hidden;position:relative;margin-top:3px}.uploadcare-line-file-input input{position:absolute;top:0;left:0;width:100%;height:100%;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0;cursor:pointer;z-index:2}.uploadcare-line-uploader.uploadcare-from-url .uploadcare-line-slider{left:-293px}.uploadcare-line-from-url{position:absolute;top:0;left:293px;width:293px}.uploadcare-line-title{margin:0 5px 0 10px;float:left}.uploadcare-line-url{float:left;border:1px solid #b9bcbe;border-color:#b9bcbe #bdc0c2 #c1c5c7 #bdc0c2;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;background:#fff;color:#777;height:22px;width:160px;padding:0 5px;-webkit-box-shadow:rgba(0,0,0,0.15) 0 1px 1px 0 inset;-moz-box-shadow:rgba(0,0,0,0.15) 0 1px 1px 0 inset;box-shadow:rgba(0,0,0,0.15) 0 1px 1px 0 inset;margin:3px 3px 0 0}.uploadcare-line-url:focus{outline:none}.uploadcare-line-right{float:right}.uploadcare-line-right .uploadcare-line-buttons{float:left}.uploadcare-line-right .uploadcare-line-cancel{float:left}.uploadcare-line-uploader.uploadcare-uploading .uploadcare-line-slider{margin-top:-30px}.uploadcare-line-progress{float:right;width:137px;height:4px;margin:12px 4px 0 0;border:1px solid #c9c9c9;border-top-color:#bbb;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;background:#d8d8d8;-webkit-box-shadow:#d0d0d0 0 1px 0 0 inset;-moz-box-shadow:#d0d0d0 0 1px 0 0 inset;box-shadow:#d0d0d0 0 1px 0 0 inset;position:relative}.uploadcare-line-progress div{position:absolute;width:40px;height:4px;top:-1px;left:-1px;border:1px solid #a9ccdb;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;background:#b7e2f3 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAEAQMAAACTPww9AAAABlBMVEWb1u634vNqPjngAAAAEElEQVQI12N4wHCBYQNDAQAMuALRrGb97AAAAABJRU5ErkJggg==");-webkit-box-shadow:rgba(255,255,255,0.3) 0 1px 0 0 inset;-moz-box-shadow:rgba(255,255,255,0.3) 0 1px 0 0 inset;box-shadow:rgba(255,255,255,0.3) 0 1px 0 0 inset}.uploadcare-line-error-wrapper{display:none;position:absolute;top:-1px;left:-1px;overflow:hidden;z-index:10}.uploadcare-line-error{padding:5px 0;line-height:20px;width:293px;border:1px solid #dda1a5;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;color:#d15d62;background:#fff;-webkit-box-shadow:rgba(206,88,93,0.45) 0 0 15px 0 inset;-moz-box-shadow:rgba(206,88,93,0.45) 0 0 15px 0 inset;box-shadow:rgba(206,88,93,0.45) 0 0 15px 0 inset;position:relative;display:inline-block}.uploadcare-line-error-cloud{position:absolute;top:6px;left:9px;width:18px;height:12px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAMCAYAAABvEu28AAAAsElEQVQoz2NgQAMXY5PYgZgFymYC4iwgvgHE/6H4LxCfAmJvBmwAKCEHxBOA+AwQHwXiEiDOBeLfSIYg4ydAbItuiBIQn8Si+C8OQ2B4ERAzwwxhAeIWAhpw4f1ALIocJkvINGgHEHPBDNIE4otkGvQBiPuAmA9k0DEyDUHGXQx4YoUU/Apk0E8qGPQNZNAXKhh0iAGa8Cgx7AEQO4AM4gDiTCDeBU36pOBVQOwOin0AgvHi6I+GKv8AAAAASUVORK5CYII=") no-repeat 50% 50%}.uploadcare-line-error-rain{position:absolute;top:18px;left:10px;height:8px;width:15px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAHCAYAAADXhRcnAAAAb0lEQVQY02NggIKLsUmBDFgALvFLMPFLscldQEXzMRVgFweKQcQvxiQxAxlvgQrTUBRAxYE4DU0jqjhQox6SZAeSzXpIbCTxJD1s/jsJxLeJFUf2HxvQqf+Api5GCxg2oMZ/F9HEsdmsh1U8Brs4AKuWR7uentiJAAAAAElFTkSuQmCC") repeat 0 0;animation:uploadcare-line-pulse 1.3s linear infinite;-webkit-animation:uploadcare-line-pulse 1.3s linear infinite;-moz-animation:uploadcare-line-pulse 1.3s linear infinite}.uploadcare-line-error-text{float:left;margin-left:36px;width:225px}.uploadcare-line-error-back{display:block;float:right;padding:2px;margin:4px 4px 0 0;width:8px;height:8px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIBAMAAAA2IaO4AAAAGFBMVEUAAADRXWLRXWLRXWLRXWLRXWLRXWLRXWJUkwjSAAAAB3RSTlMAFSotur3qBiuZYwAAACZJREFUCNdjEFVgdmQITzYrZTArS09mYE4vMwARChAuWELUgDkQAK1mCNkIwNXGAAAAAElFTkSuQmCC") no-repeat 50% 50%}.uploadcare-line-filedata{position:relative;top:1px;height:30px}.uploadcare-line-filedata a.uploadcare-line-cancel{display:inline-block !important;margin:0;position:relative;top:9px;right:4px}.uploadcare-line-filedata-icon-placeholder{display:inline-block;vertical-align:top;background:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f2fdf3), color-stop(100%, #e7f0d5));background:-webkit-linear-gradient(#f2fdf3,#e7f0d5);background:-moz-linear-gradient(#f2fdf3,#e7f0d5);background:-o-linear-gradient(#f2fdf3,#e7f0d5);background:-ms-linear-gradient(#f2fdf3,#e7f0d5);background:linear-gradient(#f2fdf3,#e7f0d5);border-right:1px solid #d8d8d8;width:30px;height:30px}.uploadcare-line-filedata-icon-placeholder-icon{position:relative;display:inline-block;border:0 none;margin-left:6px;margin-top:6px;padding:0;width:18px;height:18px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowM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6QJHhU11eTkX2rCcpQCcHd2naAGJguURrn0zvOKLvZlpMavW50heLB/bh8hCWCQ8RK01jc2/2Ho12WgiyfdGurhGudyzZ5FbEJXrON7mm3262RmoM9HkiFFbuZh2xQUFvWWR0s5JoWmV1rooOiK1LIugdj5pRwLvPj2xO0bvmo9LA0Zu5cKwyTUNg4tAIwfIFQjta5bFk0xtdAjJKx2JERNZkPKza/a8ty/YbJ77a7cD8S7juBt+pWUVgMoiKjcqsvRb78hcuxmYaTWLmcltqcltRxAPF7kbC5lgsj/4sOD11xgf9GCZGldKnlZKoR0izNMVKSvW0z/VAhNrTO+HJjO36tvkMtsMkrnXwQfGO1YHQx6ZDI0nHEmqhZAIZDtFXOBi0NdTJGoNwkZFWc9Eo5la6NP9063bnYF60z1x34RXho2j16e54IeEgMuQArIVP4QA4g4poRS/lSbR7FCorSTz+mtNV6ABqDe+2WeGqBWT58l2x+HQT3eBOGc/gdtR7E4KR8Tb0GNTzOTleIPpge9l2QqBZNVHuX2CO+xfIoYoxYeV5rUp/MUehEw6Ru+Z8Vi3wWJtIs/SZyjPoj2JGOMIUwvenV1N2NHZIdgsmQ8bwnIXMc0hwmxEGfktv4goHGJECEGQxaUMiyubJ4YpJYiUwH9kl6gkoxSKNmI8X52n6VN/E5RFB/Vj+w6Gzcd8vWkbFQAAAABJRU5ErkJggg==") no-repeat 50% 50%;width:18px;height:18px}.uploadcare-line-filedata-filename{position:relative;display:inline-block;vertical-align:top;padding-left:10px;width:40%;height:30px}.uploadcare-line-filedata-filesize{display:inline-block;vertical-align:baseline;text-align:center;padding-left:7px;font-weight:400;height:30px;width:60px;opacity:0.9;position:relative}.uploadcare-line-filedata-close{position:relative}.uploadcare-line-tinydrop{position:relative;top:1px;height:30px;text-align:center}.uploadcare-line-drop-decoration{position:absolute;left:10px;top:0px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAeCAIAAAB11XNZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWF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8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlRlfWQAAADFSURBVCjPzZDLSgNREERP9e0h7hQdiBDw/z9MRCKaiI+JOveWi7hQkUxACdayabrOaa2HF3YmjXZvBFNJICKehs3l8vb+8TkkQ8D87OTivB9rSwA7Qpk5mx1FCbydhA2g1fAKCEWgT0y2q/3RAhjXBvhHl0nSqZU9bCdbDnTj/7j4t6SH+elfcCSQpSxX6+ubu3GsCtkE9KfHi3lfa0vj5lZC3axT14WEAUcpto119bAxpMj44lXtt2ZtWwTV1Nq+EWhP0neQhF0gA0Q2WAAAAABJRU5ErkJggg==") repeat-x 0 0;background-position-x:-1px;z-index:1;text-align:left}.uploadcare-line-drop-decoration span{color:#7391a0;display:inline-block;z-index:5}.uploadcare-line-drop-decoration .droptext{margin-left:10px}.uploadcare-line-drop-decoration .branding{font-size:11px;font-weight:200;opacity:0.9;float:right;text-shadow:1px 0px #fff}.uploadcare-line-drop-decoration .dnd-arrow{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAMAAAEbsuwEAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb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6/f3V8BPSAAAAcElEQVQIHQXBiUIBUQAAwLHkJiT3kbuSYxWx7/3/d5mBUs9eJFKbah7tMlrhwGQRz3PyX+/43heRZlWkWYWPvzAbGIe4KjDaJND4vV1PZfCaxnCsIqd+idnPi5zO9v8Rw/22bJMffoaw7iag0H9L8AQwIgumRuIwGgAAAABJRU5ErkJggg==") no-repeat 0 0;display:inline-block;width:10px;height:12px;margin-bottom:-2px;margin-right:5px;z-index:5}.uploadcare-line-drop-decoration .lc{position:absolute;left:-10px;top:0;width:10px;height:30px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAeCAIAAACaFxhnAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QjMyMDVDRUYwOUVDMTFFMUEyMTBGMTk4Q0QyMTA1MzQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QjMyMDVDRjAwOUVDMTFFMUEyMTBGMTk4Q0QyMTA1MzQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpCMzIwNUNFRDA5RUMxMUUxQTIxMEYxOThDRDIxMDUzNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpCMzIwNUNFRTA5RUMxMUUxQTIxMEYxOThDRDIxMDUzNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PhMgTkcAAAFNSURBVCjPpVPZTgJBEKw+XAQWF4yGN///nzQkRANeEQ/IArsz5cPCcuODnUkmMzXVR/W0PLx83nSaEBw176VNygkQ0EjitHm1CbAoytHbx3Seh8B+L7u9ztxsDauM3j6+80Wn3VJIo5EIBKTXfpYhXrVbd/1e4hYjIsnaOQAzU0WMCBVSeX2dzt0UgKuQCLuZOggQAMpwpATFWfM1+YQs59m6YouM3yeDp/GyLCFSXbJmi8jXLJ/M8qIM29Gcq5c0d/dEIIg7sVnLLget8zpMZXvHlagkup3WZVIkbpAN7gQJkrzJUgFC5PYP2Igajon6P9X+ZBMgVPR++DR4fC6KIJC6vrpuipraBtrKHADRaja+Z/PHl3cwdtM066Rmsqo7kP1uZqo/+aIsY2AgImEynMwu3KqmmYgKAAQyRALwerpIlgcTo0URuNWJvfULcDLD4OsDXUsAAAAASUVORK5CYII=") no-repeat 0 0}.uploadcare-line-drop-decoration .rc{position:absolute;right:-10px;top:0;width:10px;height:30px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAeCAIAAACaFxhnAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJp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cGFja2V0IGVuZD0iciI/PlWZRmEAAAE7SURBVCjPtZJLTwJBEISregZBXqKoiR6MN///X9KEqCSrCAbd3e7ysAquUYwH5zCPdHrqq5rh4/oVPw0hC/yxShh2jkyydp8Xi7uHRUoc9vbPT466nQxAgEEi2O3uTUbDQb//tH6dzQsaaQSQBZhxOh6eTIZl7dd3D2VVbS9vlpAUiIAZUkqbMot1+ZklkSTqEAAJGWqhulrnncaErF3VX2PZdJOsqno2L4y4ODtt7OQWV0SxfN7r5GgA+ZWcuZNzznjnZ0ubAGEkv9FuUJt5s/mkLaVk04MBAaMB8BDvn1u/JRmJHaG6/iO177q11SZZVvXN7dyjvrq8AODh7W7CEgNp65uEuxbL1eNqBVpZ+3jQ+wgVWYAQLi/ryB07HPWPxyNXNNqcLV+aNBIJIASXpCaWjwf1kEN/NYY3iBer0LuJJuEAAAAASUVORK5CYII=") no-repeat 0 0}.uploadcare-line-dropzone{position:absolute;left:0;top:0;z-index:10}.uploadcare-line-uploader-dnd{border:1px solid #b2cedc}.uploadcare-line-uploader-dnd .uploadcare-line-tinydrop{top:0px}@keyframes uploadcare-line-pulse{from{background-position:0 0}to{background-position:0 15px}}@-webkit-keyframes uploadcare-line-pulse{from{background-position:0 0}to{background-position:0 15px}}@-moz-keyframes uploadcare-line-pulse{from{background-position:0 0}to{background-position:0 15px}}',UploadCare.ready(function(e){e(document).ready(function(){UploadCare.Line.init(e("body"))})})
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uploadcare-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: uploadcare
|
16
|
-
requirement: &
|
16
|
+
requirement: &70126901194860 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70126901194860
|
25
25
|
description: Rubygem to use UploadCare.com service and serve file uploads in your
|
26
26
|
Rails projects.
|
27
27
|
email: az@uploadcare.com
|
@@ -33,9 +33,12 @@ files:
|
|
33
33
|
- lib/uploadcare-rails/exception.rb
|
34
34
|
- lib/uploadcare-rails/inject.rb
|
35
35
|
- lib/uploadcare-rails/install.rb
|
36
|
+
- lib/uploadcare-rails/simple_form.rb
|
36
37
|
- lib/uploadcare-rails/upload.rb
|
37
38
|
- lib/uploadcare-rails/version.rb
|
38
39
|
- lib/uploadcare-rails.rb
|
40
|
+
- vendor/assets/javascripts/uploadcare.js
|
41
|
+
- vendor/assets/javascripts/uploadcare.min.js
|
39
42
|
- init.rb
|
40
43
|
homepage: http://github.com/uploadcare/uploadcare-rails
|
41
44
|
licenses: []
|