PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/eastfin/wp-includes/js/dist/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : /home/trave494/eastfin/wp-includes/js/dist/media-utils.min.js

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;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}r.d(e,"a",(function(){return o}))},12:function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"a",(function(){return n}))},13:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(31),o=r(5);function i(t,e){return!e||"object"!==Object(n.a)(e)&&"function"!=typeof e?Object(o.a)(t):e}},14:function(t,e,r){"use strict";function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.d(e,"a",(function(){return n}))},15:function(t,e,r){"use strict";function n(t,e){return(n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)}r.d(e,"a",(function(){return o}))},17:function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(30);function o(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||Object(n.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}},2:function(t,e){!function(){t.exports=this.lodash}()},20:function(t,e,r){t.exports=r(47)},23:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(38);var o=r(39);function i(t,e){return Object(n.a)(t)||function(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(n=(a=c.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}return r}(t,e)||Object(o.a)()}},30:function(t,e,r){"use strict";function n(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}r.d(e,"a",(function(){return n}))},31:function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return(o="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}r.d(e,"a",(function(){return o}))},34:function(t,e){!function(){t.exports=this.wp.apiFetch}()},35:function(t,e){!function(){t.exports=this.wp.blob}()},362:function(t,e,r){"use strict";r.r(e),r.d(e,"MediaUpload",(function(){return y})),r.d(e,"uploadMedia",(function(){return E}));var n=r(12),o=r(11),i=r(13),a=r(14),c=r(5),u=r(15),l=r(2),s=r(0),f=r(1),p=window.wp,d=function(t){return Object(l.pick)(t,["sizes","mime","type","subtype","id","url","alt","link","caption"])},h=function(t){return p.media.query({order:"ASC",orderby:"post__in",post__in:t,posts_per_page:-1,query:!0,type:"image"})},y=function(t){function e(t){var r,o=t.allowedTypes,u=t.gallery,l=void 0!==u&&u,s=t.unstableFeaturedImageFlow,d=void 0!==s&&s,h=t.modalClass,y=t.multiple,m=void 0!==y&&y,v=t.title,b=void 0===v?Object(f.__)("Select or Upload Media"):v;if(Object(n.a)(this,e),(r=Object(i.a)(this,Object(a.a)(e).apply(this,arguments))).openModal=r.openModal.bind(Object(c.a)(r)),r.onOpen=r.onOpen.bind(Object(c.a)(r)),r.onSelect=r.onSelect.bind(Object(c.a)(r)),r.onUpdate=r.onUpdate.bind(Object(c.a)(r)),r.onClose=r.onClose.bind(Object(c.a)(r)),l)r.buildAndSetGalleryFrame();else{var g={title:b,multiple:m};o&&(g.library={type:o}),r.frame=p.media(g)}return h&&r.frame.$el.addClass(h),d&&r.buildAndSetFeatureImageFrame(),r.initializeListeners(),r}return Object(u.a)(e,t),Object(o.a)(e,[{key:"initializeListeners",value:function(){this.frame.on("select",this.onSelect),this.frame.on("update",this.onUpdate),this.frame.on("open",this.onOpen),this.frame.on("close",this.onClose)}},{key:"buildAndSetGalleryFrame",value:function(){var t=this.props,e=t.addToGallery,r=void 0!==e&&e,n=t.allowedTypes,o=t.multiple,i=void 0!==o&&o,a=t.value,c=void 0===a?null:a;if(c!==this.lastGalleryValue){var u;this.lastGalleryValue=c,this.frame&&this.frame.remove(),u=r?"gallery-library":c?"gallery-edit":"gallery",this.GalleryDetailsMediaFrame||(this.GalleryDetailsMediaFrame=p.media.view.MediaFrame.Post.extend({createStates:function(){this.states.add([new p.media.controller.Library({id:"gallery",title:p.media.view.l10n.createGalleryTitle,priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:!1,library:p.media.query(Object(l.defaults)({type:"image"},this.options.library))}),new p.media.controller.GalleryEdit({library:this.options.selection,editing:this.options.editing,menu:"gallery",displaySettings:!1,multiple:!0}),new p.media.controller.GalleryAdd])}}));var s=h(c),f=new p.media.model.Selection(s.models,{props:s.props.toJSON(),multiple:i});this.frame=new this.GalleryDetailsMediaFrame({mimeType:n,state:u,multiple:i,selection:f,editing:!!c}),p.media.frame=this.frame,this.initializeListeners()}}},{key:"buildAndSetFeatureImageFrame",value:function(){var t=p.media.view.MediaFrame.Select.extend({featuredImageToolbar:function(t){this.createSelectToolbar(t,{text:p.media.view.l10n.setFeaturedImage,state:this.options.state})},createStates:function(){this.on("toolbar:create:featured-image",this.featuredImageToolbar,this),this.states.add([new p.media.controller.FeaturedImage])}}),e=h(this.props.value),r=new p.media.model.Selection(e.models,{props:e.props.toJSON()});this.frame=new t({mimeType:this.props.allowedTypes,state:"featured-image",multiple:this.props.multiple,selection:r,editing:!!this.props.value}),p.media.frame=this.frame}},{key:"componentWillUnmount",value:function(){this.frame.remove()}},{key:"onUpdate",value:function(t){var e=this.props,r=e.onSelect,n=e.multiple,o=void 0!==n&&n,i=this.frame.state(),a=t||i.get("selection");a&&a.models.length&&r(o?a.models.map((function(t){return d(t.toJSON())})):d(a.models[0].toJSON()))}},{key:"onSelect",value:function(){var t=this.props,e=t.onSelect,r=t.multiple,n=void 0!==r&&r,o=this.frame.state().get("selection").toJSON();e(n?o:o[0])}},{key:"onOpen",value:function(){if(this.updateCollection(),this.props.value){if(!this.props.gallery){var t=this.frame.state().get("selection");Object(l.castArray)(this.props.value).forEach((function(e){t.add(p.media.attachment(e))}))}h(Object(l.castArray)(this.props.value)).more()}}},{key:"onClose",value:function(){var t=this.props.onClose;t&&t()}},{key:"updateCollection",value:function(){var t=this.frame.content.get();if(t&&t.collection){var e=t.collection;e.toArray().forEach((function(t){return t.trigger("destroy",t)})),e.mirroring._hasMore=!0,e.more()}}},{key:"openModal",value:function(){this.props.gallery&&this.props.value&&this.props.value.length>0&&this.buildAndSetGalleryFrame(),this.frame.open()}},{key:"render",value:function(){return this.props.render({open:this.openModal})}}]),e}(s.Component),m=r(20),v=r.n(m),b=r(7),g=r(43),w=r(17),O=r(23),j=r(34),x=r.n(j),_=r(35);function S(t){return t?Object(l.flatMap)(t,(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)}))))})):t}function E(t){return L.apply(this,arguments)}function L(){return(L=Object(g.a)(v.a.mark((function t(e){var r,n,o,i,a,c,u,p,d,h,y,m,g,O,j,x,E,L,T,P,F,M,A,G,I,N,C,U,R;return v.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,d=e.wpAllowedMimeTypes,h=void 0===d?null:d,y=Object(w.a)(i),m=[],g=function(t,e){Object(_.revokeBlobURL)(Object(l.get)(m,[t,"url"])),m[t]=e,p(Object(l.compact)(m))},O=function(t){return!r||Object(l.some)(r,(function(e){return Object(l.includes)(e,"/")?e===t:Object(l.startsWith)(t,"".concat(e,"/"))}))},j=S(h),x=function(t){return Object(l.includes)(j,t)},E=function(t){t.message=[Object(s.createElement)("strong",{key:"filename"},t.file.name),": ",t.message],u(t)},L=[],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,!j||x(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(O(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:L.push(G),m.push({url:Object(_.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<L.length)){t.next=68;break}return N=L[I],t.prev=51,t.next=54,k(N,o);case 54:C=t.sent,U=Object(b.a)({},Object(l.omit)(C,["alt_text","source_url"]),{alt:C.alt_text,caption:Object(l.get)(C,["caption","raw"],""),title:C.title.raw,url:C.source_url}),g(I,U),t.next=65;break;case 59:t.prev=59,t.t1=t.catch(51),g(I,null),R=void 0,R=Object(l.has)(t.t1,["message"])?Object(l.get)(t.t1,["message"]):Object(f.sprintf)(Object(f.__)("Error while uploading file %s to the media library."),N.name),u({code:"GENERAL",message:R,file:N});case 65:++I,t.next=49;break;case 68:case"end":return t.stop()}}),t,null,[[12,36,40,48],[41,,43,47],[51,59]])})))).apply(this,arguments)}function k(t,e){var r=new window.FormData;return r.append("file",t,t.name||t.type.replace("/",".")),Object(l.forEach)(e,(function(t,e){return r.append(e,t)})),x()({path:"/wp/v2/media",body:r,method:"POST"})}},38:function(t,e,r){"use strict";function n(t){if(Array.isArray(t))return t}r.d(e,"a",(function(){return n}))},39:function(t,e,r){"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}r.d(e,"a",(function(){return n}))},43:function(t,e,r){"use strict";function n(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,u,"next",t)}function u(t){n(a,o,i,c,u,"throw",t)}c(void 0)}))}}r.d(e,"a",(function(){return o}))},47:function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r,n){var o=e&&e.prototype instanceof s?e:s,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return _()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=g(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l={};function s(){}function f(){}function p(){}var d={};d[o]=function(){return this};var h=Object.getPrototypeOf,y=h&&h(h(x([])));y&&y!==e&&r.call(y,o)&&(d=y);var m=p.prototype=s.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function b(t){var e;this._invoke=function(n,o){function i(){return new Promise((function(e,i){!function e(n,o,i,a){var c=u(t[n],t,o);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==typeof s&&r.call(s,"__await")?Promise.resolve(s.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):Promise.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return e("throw",t,i,a)}))}a(c.arg)}(n,o,e,i)}))}return e=e?e.then(i,i):i()}}function g(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,g(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function x(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:_}}function _(){return{value:void 0,done:!0}}return f.prototype=m.constructor=p,p.constructor=f,p[a]=f.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},v(b.prototype),b.prototype[i]=function(){return this},t.AsyncIterator=b,t.async=function(e,r,n,o){var i=new b(c(e,r,n,o));return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},v(m),m[a]="Generator",m[o]=function(){return this},m.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=x,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),l}},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;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},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<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Object(n.a)(t,e,r[e])}))}return t}}});