-
Notifications
You must be signed in to change notification settings - Fork 0
/
999.0e4501f54148c98f0ba5.js
1 lines (1 loc) · 1.41 KB
/
999.0e4501f54148c98f0ba5.js
1
"use strict";(self.webpackChunksparkworks_console=self.webpackChunksparkworks_console||[]).push([[999],{24999:function(U,h,e){e.r(h),e.d(h,{amplify_s3_text_picker:function(){return C}});var P=e(8239),v=e(75134),T=e(47289),D=e(88774),u=e.n(D),s=e(65513),M=e(45013),O=e(53799),y=e(22594),I=e(33754),c=(e(78660),e(55210)),E=new M.k("S3TextPicker"),C=function(){function r(t){(0,v.Z)(this,r),(0,s.r)(this,t),this.contentType="text/*",this.level=y.A.Public,this.fallbackText=I.T.PICKER_TEXT}return(0,T.Z)(r,[{key:"handleInput",value:(t=(0,P.Z)(u().mark(function n(i){var _,o,f,m,p;return u().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(f=this.level,m=this.track,p=(void 0===(o=this.path)?"":o)+(0,c.c)(_=i.target.files[0],this.fileToKey),_){a.next=5;break}throw new Error("No file was selected");case 5:return a.prev=5,a.next=8,(0,c.p)(p,_,f,m,_.type,E);case 8:this.src=p,a.next=15;break;case 11:throw a.prev=11,a.t0=a.catch(5),E.debug(a.t0),new Error(a.t0);case 15:case"end":return a.stop()}},n,this,[[5,11]])})),function(n){return t.apply(this,arguments)})},{key:"render",value:function(){var l=this;return(0,s.h)(s.H,null,(0,s.h)("amplify-s3-text",{textKey:this.src,path:this.path,level:this.level,track:this.track,identityId:this.identityId,contentType:this.contentType,fallbackText:O.o.get(this.fallbackText)}),(0,s.h)("amplify-picker",{inputHandler:function(i){return l.handleInput(i)},acceptValue:"text/*"}))}}]),r;var t}()}}]);