/** Notice * This file contains works from many authors under various (but compatible) licenses. Please see core.txt for more information. **/
(function(){(window.wpCoreControlsBundle=window.wpCoreControlsBundle||[]).push([[11],{327:function(Ca,va,ba){ba.r(va);var pa=ba(2);Ca=ba(44);var ka=ba(283),la=ba(344),fa=window;ba=function(){function ca(z){var r=this;this.V0=function(n){return n&&("image"===n.type.split("/")[0].toLowerCase()||n.name&&!!n.name.match(/.(jpg|jpeg|png|gif)$/i))};this.file=z;this.f1=new Promise(function(n){return Object(pa.b)(r,void 0,void 0,function(){var b;return Object(pa.d)(this,function(a){switch(a.label){case 0:return this.V0(this.file)?
[4,Object(la.a)(z)]:[3,2];case 1:b=a.ia(),this.file=new File([b],null===z||void 0===z?void 0:z.name,{type:z.type}),a.label=2;case 2:return n(!0),[2]}})})})}ca.prototype.getFileData=function(z){var r=this,n=new FileReader;n.onload=function(b){r.trigger(ca.Events.DOCUMENT_LOADING_PROGRESS,[b.loaded,b.loaded]);z(new Uint8Array(b.target.result))};n.onprogress=function(b){b.lengthComputable&&r.trigger(ca.Events.DOCUMENT_LOADING_PROGRESS,[b.loaded,0<b.total?b.total:0])};n.readAsArrayBuffer(this.file)};
ca.prototype.getFile=function(){return Object(pa.b)(this,void 0,Promise,function(){return Object(pa.d)(this,function(z){switch(z.label){case 0:return[4,this.f1];case 1:return z.ia(),fa.utils.isJSWorker?[2,this.file.path]:[2,this.file]}})})};ca.Events={DOCUMENT_LOADING_PROGRESS:"documentLoadingProgress"};return ca}();Object(Ca.a)(ba);Object(ka.a)(ba);Object(ka.b)(ba);va["default"]=ba}}]);}).call(this || window)
