module.exports=function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=v.getDataByKey("novi-plugin-image");return e.ui.editor[0].title=t.editor.title,e.ui.editor[0].tooltip=t.editor.tooltip,e}var r=n(1),a=i(r),u=n(2),s=i(u),l=n(3),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(l),g=novi.react.React,v=novi.language,p={name:"novi-plugin-image",title:"Novi Image",description:"Novi Image description",version:"1.0.7",dependencies:{novi:"0.9.0"},defaults:{querySelector:"img[src]"},ui:{editor:[a.default],settings:g.createElement(s.default,null)},excerpt:c.isImageReplaceble,onLanguageChange:o};novi.plugins.register(p)},function(e,t){"use strict";function n(e){var t=this,n=void 0,r=void 0,a=void 0;n=e.ownerDocument.querySelector("base").getAttribute("href"),r=novi.element.getAttribute(e,"src"),a=n+r,o(a).then(function(n){novi.media.choose({onSubmit:i.bind(t,e),width:n.width,height:n.height,type:s.mediaImage})})}function i(e,t){novi.element.setAttribute(e,"src",t),novi.element.removeAttribute(e,"srcset")}function o(e){return new Promise(function(t,n){var i=new Image;i.src=e,i.onload=function(e){var n=e.target,i=n.naturalWidth,o=n.naturalHeight;t({width:i,height:o})}})}Object.defineProperty(t,"__esModule",{value:!0});var r=novi.react.React,a=novi.ui.icon,u=novi.ui.icons,s=novi.types,l=novi.language.getDataByKey("novi-plugin-image"),c={trigger:r.createElement(a,null,u.ICON_PICTURE),tooltip:l.editor.tooltip,closeIcon:"submit",title:l.editor.title,onTriggerClick:n};t.default=c},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=novi.react.React,u=novi.react.Component,s=novi.ui.input,l=novi.ui.button,c=novi.language,g=function(e){function t(e){n(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.state={settings:e.settings},o.saveSettings=o.saveSettings.bind(o),o.onChange=o.onChange.bind(o),o.messages=c.getDataByKey("novi-plugin-image"),o}return o(t,e),r(t,[{key:"componentWillReceiveProps",value:function(e){this.setState({settings:e.settings})}},{key:"render",value:function(){return a.createElement("div",null,a.createElement("span",{style:{letterSpacing:"0,0462em"}},"Image Plugin"),a.createElement("div",{style:{fontSize:13,color:"#6E778A",marginTop:21}},this.messages.settings.inputPlaceholder),a.createElement(s,{style:{marginTop:10,width:340},value:this.state.settings.querySelector,onChange:this.onChange}),a.createElement("div",{style:{marginTop:30}},a.createElement(l,{type:"primary",messages:{textContent:this.messages.settings.submitButton},onClick:this.saveSettings})))}},{key:"onChange",value:function(e){var t=e.target.value;this.setState({settings:{querySelector:t}})}},{key:"saveSettings",value:function(){novi.plugins.settings.update("novi-plugin-image",this.state.settings)}}]),t}(u);t.default=g},function(e,t){"use strict";function n(e){return!!(e&&e.hasAttribute("src")&&novi.element.hasAttribute(e,"src"))&&e.getAttribute("src")===novi.element.getAttribute(e,"src")}Object.defineProperty(t,"__esModule",{value:!0}),t.isImageReplaceble=n}]);