this.wp=this.wp||{},this.wp.mediaUtils=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=362)}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},10:function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,"a",(function(){return n}))},11:function(t,e,r){"use strict";function n(t,e){for(var r=0;r0&&this.buildAndSetGalleryFrame(),this.frame.open()}},{key:"render",value:function(){return this.props.render({open:this.openModal})}}]),e}(s.Component),m=r(20),b=r.n(m),v=r(7),g=r(43),w=r(17),O=r(23),j=r(34),_=r.n(j),x=r(35);function S(t){return E.apply(this,arguments)}function E(){return(E=Object(g.a)(b.a.mark((function t(e){var r,n,o,i,a,c,u,p,h,d,y,m,g,j,_,S,E,k,T,P,F,M,A,G,I,N,C,U,R;return b.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.allowedTypes,n=e.additionalData,o=void 0===n?{}:n,i=e.filesList,a=e.maxUploadFileSize,c=e.onError,u=void 0===c?l.noop:c,p=e.onFileChange,h=e.wpAllowedMimeTypes,d=void 0===h?null:h,y=Object(w.a)(i),m=[],g=function(t,e){Object(x.revokeBlobURL)(Object(l.get)(m,[t,"url"])),m[t]=e,p(Object(l.compact)(m))},j=function(t){return!r||Object(l.some)(r,(function(e){return Object(l.includes)(e,"/")?e===t:Object(l.startsWith)(t,"".concat(e,"/"))}))},_=(b=d)?Object(l.flatMap)(b,(function(t,e){var r=t.split("/"),n=Object(O.a)(r,1)[0],o=e.split("|");return[t].concat(Object(w.a)(Object(l.map)(o,(function(t){return"".concat(n,"/").concat(t)}))))})):b,S=function(t){return Object(l.includes)(_,t)},E=function(t){t.message=[Object(s.createElement)("strong",{key:"filename"},t.file.name),": ",t.message],u(t)},k=[],T=!0,P=!1,F=void 0,t.prev=12,M=y[Symbol.iterator]();case 14:if(T=(A=M.next()).done){t.next=34;break}if(G=A.value,!_||S(G.type)){t.next=19;break}return E({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:Object(f.__)("Sorry, this file type is not permitted for security reasons."),file:G}),t.abrupt("continue",31);case 19:if(j(G.type)){t.next=22;break}return E({code:"MIME_TYPE_NOT_SUPPORTED",message:Object(f.__)("Sorry, this file type is not supported here."),file:G}),t.abrupt("continue",31);case 22:if(!(a&&G.size>a)){t.next=25;break}return E({code:"SIZE_ABOVE_LIMIT",message:Object(f.__)("This file exceeds the maximum upload size for this site."),file:G}),t.abrupt("continue",31);case 25:if(!(G.size<=0)){t.next=28;break}return E({code:"EMPTY_FILE",message:Object(f.__)("This file is empty."),file:G}),t.abrupt("continue",31);case 28:k.push(G),m.push({url:Object(x.createBlobURL)(G)}),p(m);case 31:T=!0,t.next=14;break;case 34:t.next=40;break;case 36:t.prev=36,t.t0=t.catch(12),P=!0,F=t.t0;case 40:t.prev=40,t.prev=41,T||null==M.return||M.return();case 43:if(t.prev=43,!P){t.next=46;break}throw F;case 46:return t.finish(43);case 47:return t.finish(40);case 48:I=0;case 49:if(!(I=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},5:function(t,e,r){"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}r.d(e,"a",(function(){return n}))},7:function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(10);function o(t){for(var e=1;e